From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ishikawa Newsgroups: gmane.emacs.bugs Subject: Re: Strange error caused by post-command-hook. Date: Wed, 11 Jul 2007 18:30:21 +0900 Message-ID: <4694A32D.3000907@ubin.jp> References: <46937D1B.4000501@ubin.jp> <46938F1E.8000103@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184146246 5529 80.91.229.12 (11 Jul 2007 09:30:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2007 09:30:46 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 11 11:30:44 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I8YWx-0006qY-4W for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2007 11:30:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8YWu-0007gv-5W for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2007 05:30:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I8YWk-0007fx-9D for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2007 05:30:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I8YWg-0007es-Ro for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2007 05:30:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8YWg-0007eK-4B for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2007 05:30:26 -0400 Original-Received: from post.ubin.jp ([202.32.0.84]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I8YWe-0003Gm-Sh for bug-gnu-emacs@gnu.org; Wed, 11 Jul 2007 05:30:25 -0400 Original-Received: from post.ubin.jp (post [127.0.0.1]) by localhost.ubin.jp (Postfix) with ESMTP id 2E81929AC41; Wed, 11 Jul 2007 18:30:22 +0900 (JST) Original-Received: from [10.254.248.233] (dell-w2k-note.ddns.member.ubin.jp [10.254.248.233]) by post.ubin.jp (Postfix) with ESMTP id CF73C29AC46; Wed, 11 Jul 2007 18:30:21 +0900 (JST) User-Agent: Thunderbird 1.5.0.12 (X11/20070509) In-Reply-To: <46938F1E.8000103@gmx.at> X-detected-kernel: Linux 2.4-2.6 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16134 Archived-At: Dear Martin Rudalics, Thank you for the suggestion. I have inserted the re-defined find-file in my .emacs file. Once the problem returns, I will report the value of post-command-hook. (Aha, I see that the problem may happen before find-file gets executed. How complicated...) Chiaki Ishikawa martin rudalics wrote: > > [...] once the following message begins to appear in the > > minibuffer whenever a minibuffer interaction is attemped, > > > > Error in post-command-hook: (error Selecting deleted buffer) > > > > this message seems to re-appear (almost) always in the mini-buffer. > > > > This message obscures the prompt message which should have been shown > > in the first place. For example, if I type C-c C-f, the default > > directory usually shown is obscured with overlapping message (above). > > (Funny if I type C-c C-v, the error message doesn't show up.) > > Do you intend the commands `find-file' and `find-alternate-file' here? > You could try to add ... > > (defun find-file (filename &optional wildcards) > "..." > (interactive > (progn > (when post-command-hook > (message "... %s" post-command-hook) (sit-for 1)) > (find-file-read-args "Find file: " nil))) > (let ((value (find-file-noselect filename nil nil wildcards))) > (if (listp value) > (mapcar 'switch-to-buffer (nreverse value)) > (switch-to-buffer value)))) > > ... to your .emacs. As soon as `find-file' triggers the message _and_ > the error please tell us the value for `post-command-hook' printed by > the message (although your observations indicate that the error is > triggered _before_ the command gets executed). > > > Now, from reading the "C-H v" help message for 'post-command-hook', if > > an error occurs when the hook is run from post-command-hook, > > the hook is set to nil. But if this is set to "nil" permanently, I > > should not see this repetition of the same error message over and over > > again. (Correct?) > > > > Does this mean that whatever is causing the incorrect hook to be > installed > > is trying to install this invalid hook again and again? > > Yes. > > > <<< Press Return to bury the buffer list >>> > > This seems to come from `electric-buffer-list' which I don't know. > AFAICT it doesn't install a `post-command-hook' though. > >