unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 11715@debbugs.gnu.org
Subject: bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal
Date: Sat, 23 Jun 2012 07:50:55 -0700	[thread overview]
Message-ID: <C4694C42921C4D56B363096F79010376@us.oracle.com> (raw)
In-Reply-To: <jwvsjdmruwl.fsf-monnier+emacs@gnu.org>

> > What would construct a function of no args that is essentially
> > `read-file-name-internal' and put it on `post-command-hook'
> 
> As I said, it is *not* put on post-command-hook:
> it is run by Icomplete's post-command-hook

Don't know what you're insisting about.  I was clear about that:

   Icomplete runs only `icomplete-exhibit' on
   `icomplete-post-command-hook' (hence on `post-command-hook')".
   Icomplete runs its hook on `post-command-hook'...

(add-hook 'post-command-hook
	     (lambda () (run-hooks 'icomplete-post-command-hook))
	     nil t)

> so the error could be because that
> function was put in minibuffer-completion-table or
> minibuffer-completion-predicate (and hence called by
> icomplete-completions), or even on icomplete-post-command-hook.
> Can you check some of those variables?

I have checked them and did not find anything.  But the problem does not occur
all the time.  And, IIRC, it seems to occur once and then go away.  (I'm not
certain of that.)

And as you know it is difficult (~impossible) to use the debugger with the
Icomplete code.

FWIW, I'm guessing also that if that function were somehow put into
`minibuffer-completion-*' then I would see an error message sooner and in other
places.

> If you can find a way to trigger the problem with
> M-: (run-hooks 'icomplete-post-command-hook) RET then we 
> could debug it a bit more easily (e.g. get a backtrace, use edebug, ...).

Agreed.  If I could.  So far, I don't know how to repro the problem.

FWIW, I don't see the error right now.  I try `M-x forw' (to get Icomplete to
kick in), and then I try `M-: (run-hooks 'icomplete-post-command-hook)'.  It
does not appear to do anything (besides show the completions), and it returns
nil.  And if I instead do `M-: icomplete-post-command-hook' it says only
`(icomplete-exhibit)', as expected.

I will try to keep my eyes open and see if I can find out anything more the next
time I see the error.  Dunno what else to look at.  I realize that you cannot do
more at this point either.






  reply	other threads:[~2012-06-23 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 15:36 bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments - read-file-internal Drew Adams
2012-06-23  4:30 ` Stefan Monnier
2012-06-23 13:39   ` Drew Adams
2012-06-23 14:04     ` Stefan Monnier
2012-06-23 14:50       ` Drew Adams [this message]
2012-06-24  3:54         ` bug#11715: 24.1; Error in post-command-hook: wrong-number-of-arguments -read-file-internal 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=C4694C42921C4D56B363096F79010376@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=11715@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).