unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: raman <raman@google.com>
To: David Kastrup <dak@gnu.org>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: HowTo: Run a hook when a buffer becomes "current"
Date: Fri, 18 Dec 2015 08:15:00 -0800	[thread overview]
Message-ID: <p918u4rvim3.fsf@google.com> (raw)
In-Reply-To: <871takf6jq.fsf@fencepost.gnu.org> (David Kastrup's message of "Fri, 18 Dec 2015 10:30:01 +0100")

David Kastrup <dak@gnu.org> writes:

mode-line-update ->mood-line-update:-)

Eventually I think that is correct if this whole thing actually and
proves useful in the sense:

For someone who can see the screen and configures emacs window layout to
reflect the current activity, the mood is best computed from the set of
visible windows/frames -- and there, latching on to mode-line might be
the right thing. For now I 'm keeping it simple by only looking at the
current buffer -- 
>
>> 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.

-- 



  reply	other threads:[~2015-12-18 16:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 16:37 HowTo: Run a hook when a buffer becomes "current" raman
2015-12-16 21:51 ` Nicolas Richard
2015-12-16 23:04   ` David Kastrup
2015-12-16 23:20     ` T.V Raman
2015-12-17  4:58 ` Richard Stallman
2015-12-17 16:15   ` raman
2015-12-18  4:04     ` Richard Stallman
2015-12-18  4:20       ` raman
2015-12-18  9:30         ` David Kastrup
2015-12-18 16:15           ` raman [this message]
2015-12-19  4:37         ` Richard Stallman
2015-12-19 16:43           ` raman
2015-12-19 17:07             ` Dmitry Gutov
2015-12-20  3:07               ` raman
2015-12-22 17:47         ` John Wiegley
2015-12-22 18:19           ` raman
2015-12-18  1:56 ` Karl Fogel
2015-12-18  3:19   ` raman
2015-12-18 12:14     ` Marcin Borkowski
2015-12-18 16:18       ` raman
2015-12-18 17:06         ` David Kastrup
2015-12-18 18:13           ` Marcin Borkowski
2015-12-18 18:28             ` T.V Raman
2015-12-18 20:12               ` Drew Adams

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=p918u4rvim3.fsf@google.com \
    --to=raman@google.com \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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).