From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Run a hook when a buffer becomes "current" Date: Fri, 18 Dec 2015 10:30:01 +0100 Message-ID: <871takf6jq.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450431028 21784 80.91.229.3 (18 Dec 2015 09:30:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2015 09:30:28 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 10:30:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a9rMo-0003UG-Ct for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 10:30:26 +0100 Original-Received: from localhost ([::1]:59169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9rMn-0001IE-Cs for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 04:30:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9rMY-0001Hx-BK for emacs-devel@gnu.org; Fri, 18 Dec 2015 04:30:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9rMX-0006Zx-Eo for emacs-devel@gnu.org; Fri, 18 Dec 2015 04:30:10 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9rMX-0006Zo-C0; Fri, 18 Dec 2015 04:30:09 -0500 Original-Received: from localhost ([127.0.0.1]:49473 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a9rMQ-0000Ae-6d; Fri, 18 Dec 2015 04:30:02 -0500 Original-Received: by lola (Postfix, from userid 1000) id CCA7AE2C57; Fri, 18 Dec 2015 10:30:01 +0100 (CET) In-Reply-To: (raman@google.com's message of "Thu, 17 Dec 2015 20:20:08 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:196458 Archived-At: raman writes: > I divided the types of things I do into categories: > (things I do == things I do in Emacs since I dont use anything else) > > Communicate: mail, gnus, twitter, jabber etc > Program (prog-mode covers them all) > text-mode (write content) > special-mode: applications written in Emacs > web: eww, w3 > > Then I created a mapping from modes to soundscapes (think mode -> mood) > and finally, i attached myself to select-mode-hook to switch the > soundscape that is playing. Sounds to me as if you want to hook in the mode line update. Which then becomes more of a mood line update. -- David Kastrup