unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jérémy Compostella" <jeremy.compostella@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: other-buffer advice on kill-buffer
Date: Tue, 2 Aug 2011 12:20:00 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110802T140126-938@post.gmane.org> (raw)
In-Reply-To: 877h6w3asu.fsf@gmail.com

Antoine Levitt <antoine.levitt <at> gmail.com> writes:

> 
> 02/08/11 02:06, Jérémy Compostella
> > Antoine Levitt <antoine.levitt <at> gmail.com> writes:
> >> Just out of curiosity, what buffers are you trying to exclude?
> > I developed an activity manager since I use Emacs as my full desktop
> > environment (Web, Mail, Jabber, Code with different project at the same
> > time).
> >
> > This activity module let me define statically and dynamically
> > activities. Activities are named and have open/enable/disable handlers to
> > modify the Emacs behavior in regards of what I like to do under a
> > particular activity.
> 
> That seems interesting. I toyed with the idea in my mind some time ago,
> but couldn't figure out something neat enough to be really
> usable. Ideally, you'd have separate buffer groups, and C-x b with
> ido/iswitchb/whatever would only display the current group. There'd be a
> system to switch activity, with memorised window configurations, and
> notifications (say, ERC or gnus has received new messages, or a
> compilation has finished) would be unified (so you could have one
> keybinding to "switch to the activity requiring attention"). However,
> that all seems a bit hackish, and I wonder if that's not twisting emacs
> around too much.
I didn't really think about the notification stuff. The only notifications I
care about are already bound to the mode-line : jabber and gnus notify me this
way. Especially since my objective is having a distraction-less work optimized
environment (fullscreen, no bar, no window decoration, no scrollbar, ...). I
don't like to be disturbed by notifications.

Note: I wrote this activity buffer filtering mechanism flexible to easily, for
example, associate a jabber buffer to my Linux kernel coding activity just by
calling the interactive jabber-chat-with function.

> Your code looks cool, but I'm thinking of something a little more static
> - ie "c-mode or emacs-lisp-mode files under ~/emacs go to activity
> emacs-hack", etc.
This module is ready for that. The automatic associated buffer is the bonus part
:) For example, this is how I define my Emacs hack activity.
(add-to-list 'available-activities (make-activity :name "Emacs"
						    :enable-hook (lambda () (toggle-debug-on-error t))
						    :disable-hook (lambda () (toggle-debug-on-error nil))
						    :buffer-filter-p (lambda (buf)
								       (with-current-buffer buf
									 (eq major-mode 'emacs-lisp-mode)))))





  reply	other threads:[~2011-08-02 12:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 23:03 other-buffer advice on kill-buffer Jérémy Compostella
2011-08-01 23:19 ` Antoine Levitt
2011-08-02  0:06   ` Jérémy Compostella
2011-08-02  0:40     ` Antoine Levitt
2011-08-02 12:20       ` Jérémy Compostella [this message]
2011-08-02 18:04     ` Dimitri Fontaine
2011-08-03  7:41   ` Stephen J. Turnbull
2011-08-02  0:55 ` Tim Cross
2011-08-02  1:00   ` Tim Cross
2011-08-02 12:29     ` Jérémy Compostella
2011-08-02  1:52   ` Alp Aker
2011-08-02 11:58     ` Jérémy Compostella
2011-08-02 21:55     ` Richard Stallman
2011-08-03  6:18       ` David Kastrup
2011-08-03 15:14         ` Jérémy Compostella
2011-08-04  2:24           ` Stephen J. Turnbull
2011-08-03 19:18         ` Richard Stallman
2011-08-04  6:42         ` Tim Cross
2011-08-04 14:03           ` Stefan Monnier
2011-08-04 19:56             ` Jérémy Compostella
2011-08-19  7:10       ` Leo
2011-08-14 17:16 ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20110802T140126-938@post.gmane.org \
    --to=jeremy.compostella@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).