From: martin rudalics <rudalics@gmx.at>
To: ishikawa <chiaki.ishikawa@ubin.jp>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: Strange error caused by post-command-hook.
Date: Thu, 12 Jul 2007 10:54:42 +0200 [thread overview]
Message-ID: <4695EC52.8020704@gmx.at> (raw)
In-Reply-To: <4695DFB8.5060202@ubin.jp>
> I am now trying to figure out where minibuffer-setup-hook is set.
> Things get quite interesting. It seems that there are certainly more
> references to minibuffer-setup-hook than to post-command-hook, etc..
>
> I need to refresh my knowledge of edebug now.
Just to elaborate on this: One of the packages you call adds a
buffer-local post-command-hook when setting up the minibuffer like:
(add-hook 'post-command-hook 'foo ... t)
This means you cannot see "foo" when you investigate `post-command-hook'
_before_ executing a command because it's set up by the command itself.
If the function chokes because it wants to select a deleted buffer it's
automatically removed from `post-command-hook'. Hence, you can't see it
_after_ executing the command when Emacs is still prompting you for a
file-name. All you see is the error message which still obscures the
prompt. Now consider:
(defun find-file-read-args (prompt mustmatch)
(list (let ((find-file-default
(and buffer-file-name
(abbreviate-file-name buffer-file-name))))
(minibuffer-with-setup-hook
(lambda () (setq minibuffer-default find-file-default))
(read-file-name prompt nil default-directory mustmatch)))
t))
First `read-file-name' puts the prompt in the minibuffer. Then foo
triggers the bug and the prompt is overwritten because minibuffer and
echo area share the same screen area. According to the Emacs manual the
error message should go away after a "few seconds". I don't know
whether it does so with a `post-command-hook' error.
Anyway you have to find the function that wants to resurrect the deleted
buffer in the first place.
next prev parent reply other threads:[~2007-07-12 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 12:35 Strange error caused by post-command-hook ishikawa
2007-07-10 13:52 ` martin rudalics
2007-07-11 9:30 ` ishikawa
2007-07-11 11:47 ` martin rudalics
2007-07-11 12:10 ` ishikawa
2007-07-11 12:27 ` ishikawa
2007-07-11 20:40 ` martin rudalics
2007-07-12 8:00 ` ishikawa
2007-07-12 8:54 ` martin rudalics [this message]
2007-07-11 14:24 ` martin rudalics
2007-07-11 11:53 ` ishikawa
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=4695EC52.8020704@gmx.at \
--to=rudalics@gmx.at \
--cc=bug-gnu-emacs@gnu.org \
--cc=chiaki.ishikawa@ubin.jp \
/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).