From: Josh <josh@foxtail.org>
To: martin rudalics <rudalics@gmx.at>
Cc: Brian Jenkins <brian@brianjenkins.org>,
emacs-devel <emacs-devel@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
Bozhidar Batsov <bozhidar@batsov.com>,
rms@gnu.org
Subject: Re: [PATCH] frame.c: focus hooks
Date: Sat, 11 Jan 2014 11:05:04 -0800 [thread overview]
Message-ID: <CANdFEAFKPWwETi0gppcEHQW-PU0k9hymrkjs4=BcfjV5yf-3qg@mail.gmail.com> (raw)
In-Reply-To: <52D11C17.8040508@gmx.at>
On Sat, Jan 11, 2014 at 2:25 AM, martin rudalics <rudalics@gmx.at> wrote:
>>> If the NORECORD argument is non-nil as in `with-selected-window', the
>>> call is usually an ephemeral one. `buffer-list-update-hook' is called
>>> only when NORECORD is nil.
>>
>> Sorry I failed to follow up on this earlier. Stefan, do I understand
>> correctly that you'd be amenable to a new `select-window-hook'
>> provided that it did not come into play for the ephemeral changes of
>> selected-window that can occur within a single command? If so, I'd
>> like to take a stab at implementing this (I realize that any such hook
>> could not be checked in until the feature thaw). Unless anything has
>> changed since your earlier comment[0], I'd start with your suggestion
>> of adding the new run_hooks call to Fselect_window after verifying
>> that all of its current callers can tolerate running arbitrary Elisp.
>
> Can you telll me whether/why `buffer-list-update-hook' doesn't work for
> you?
I originally interpreted your mention of it as additional evidence that
deciding whether or not to call a new select-window-hook from
Fselect_window based on its NORECORD argument would be a
reasonable approach. It sounds like I misunderstood, and that you
were suggesting simply using the existing b-l-u-h for code that should
run when the selected window changes non-ephemerally. Is that right?
As an experiment, I just evaluated this form with `eval-expression':
(progn
(setq bluh-hist nil)
(add-hook 'buffer-list-update-hook
(lambda (&rest args)
(push (format "%s: %s" (buffer-name) args)
bluh-hist))))
A few seconds later bluh-hist had grown to contain several hundred
elements, even though I did not interact with Emacs at all during the
interim. All of my open buffers appear to be represented in that list,
including ERC buffers, source code buffers, *scratch*, *Backtrace*,
etc. I have not yet tried this experiment with -q/-Q so it's possible
this behavior is being caused by some of my own code or a library,
but if this expected behavior then b-l-u-h doesn't seem well-suited
to the problem I'd like to solve.
Thanks,
Josh
next prev parent reply other threads:[~2014-01-11 19:05 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 17:50 [PATCH] frame.c: focus hooks Brian Jenkins
2013-11-17 18:29 ` Bozhidar Batsov
2013-11-17 22:25 ` Brian Jenkins
2013-11-17 22:33 ` Drew Adams
2013-11-18 13:24 ` Brian Jenkins
2013-11-18 14:53 ` Drew Adams
2013-11-19 0:19 ` Stefan Monnier
2013-11-19 8:26 ` Stephen J. Turnbull
2013-11-19 14:10 ` Bozhidar Batsov
2013-11-20 3:10 ` Brian Jenkins
2013-11-18 8:20 ` Bozhidar Batsov
2013-11-18 13:32 ` Stefan Monnier
[not found] ` <CAM9Zgm18uL7+PJ+60NjZqtjZJ6tUV77xUbFhXh7UPwqs==1=hg@mail.gmail.com>
2013-11-18 14:20 ` Fwd: " Bozhidar Batsov
2013-11-18 14:23 ` Brian Jenkins
2013-11-18 18:44 ` Richard Stallman
2013-11-18 19:49 ` Brian Jenkins
2013-11-19 6:02 ` Richard Stallman
2013-11-19 18:14 ` Brian Jenkins
2013-11-19 18:53 ` Drew Adams
2013-11-20 0:52 ` Brian Jenkins
2013-11-19 23:42 ` Richard Stallman
2013-11-20 0:52 ` Josh
2013-11-20 3:16 ` Stefan Monnier
2013-11-20 3:36 ` Josh
2013-11-20 7:34 ` martin rudalics
2014-01-09 17:01 ` Josh
2014-01-11 10:25 ` martin rudalics
2014-01-11 19:05 ` Josh [this message]
2014-01-12 9:54 ` martin rudalics
2014-01-14 17:30 ` Josh
2014-01-14 18:10 ` martin rudalics
2014-01-10 17:31 ` Stefan Monnier
2014-01-11 19:06 ` Josh
2013-11-20 0:53 ` Brian Jenkins
2013-11-20 7:46 ` Jarek Czekalski
2013-11-17 19:28 ` Glenn Morris
2013-11-17 21:19 ` Stefan Monnier
2013-11-18 4:11 ` Leo Liu
[not found] ` <CADTx1Oy5pUmb9sPU6jm0yt1hJtvgJmfDtZQpeFakmHknhEXE=A@mail.gmail.com>
2013-11-18 13:33 ` Fwd: " Brian Jenkins
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANdFEAFKPWwETi0gppcEHQW-PU0k9hymrkjs4=BcfjV5yf-3qg@mail.gmail.com' \
--to=josh@foxtail.org \
--cc=bozhidar@batsov.com \
--cc=brian@brianjenkins.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.