From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?b?SsOpcsOpbXk=?= Compostella Newsgroups: gmane.emacs.devel Subject: Re: other-buffer advice on kill-buffer Date: Tue, 2 Aug 2011 12:20:00 +0000 (UTC) Message-ID: References: <8662mgg2ea.fsf@gmail.com> <87d3go4t4d.fsf@gmail.com> <86hb60ekx7.fsf@gmail.com> <877h6w3asu.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1312287630 6967 80.91.229.12 (2 Aug 2011 12:20:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 12:20:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 02 14:20:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoDxR-0001lY-VA for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2011 14:20:26 +0200 Original-Received: from localhost ([::1]:40837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoDxN-0003t0-R5 for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2011 08:20:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoDxK-0003sk-Kd for emacs-devel@gnu.org; Tue, 02 Aug 2011 08:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoDxJ-0005x4-EH for emacs-devel@gnu.org; Tue, 02 Aug 2011 08:20:18 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoDxJ-0005wx-1S for emacs-devel@gnu.org; Tue, 02 Aug 2011 08:20:17 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QoDxF-0001f2-Qv for emacs-devel@gnu.org; Tue, 02 Aug 2011 14:20:13 +0200 Original-Received: from irdmzpr02-ext.ir.intel.com ([192.198.151.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Aug 2011 14:20:13 +0200 Original-Received: from jeremy.compostella by irdmzpr02-ext.ir.intel.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Aug 2011 14:20:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 192.198.151.37 (Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/10.04 (lucid) Firefox/3.6.17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142689 Archived-At: Antoine Levitt gmail.com> writes: > > 02/08/11 02:06, Jérémy Compostella > > Antoine Levitt 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)))))