From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: 12861@debbugs.gnu.org
Subject: bug#12861: wrong default value when completing in woman-file-name
Date: Sun, 11 Nov 2012 10:54:53 -0500 [thread overview]
Message-ID: <jwvobj4nnlx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d2zkfc0n.fsf@bernoul.li> (Jonas Bernoulli's message of "Sun, 11 Nov 2012 15:30:00 +0100")
> Could you please change this so that the key sequence actually used to
> invoke `minibuffer-complete' is unread instead of TAB (or just call
> `minibuffer-complete' explicitly?).
Unreading events is nasty business. Sometimes it's hard to avoid, but
I don't think it's justified here, indeed. The patch below should fix
your problem, but could you confirm it provides the intended
completion behavior?
Stefan
=== modified file 'lisp/woman.el'
--- lisp/woman.el 2012-10-29 10:30:11 +0000
+++ lisp/woman.el 2012-11-11 15:54:23 +0000
@@ -1303,12 +1303,11 @@
((null (cdr files)) (car (car files))) ; only 1 file for topic.
(t
;; Multiple files for topic, so must select 1.
- ;; Unread the command event (TAB = ?\t = 9) that runs the command
- ;; `minibuffer-complete' in order to automatically complete the
- ;; minibuffer contents as far as possible.
- (setq unread-command-events '(9)) ; and delete any type-ahead!
+ ;; Run the command `minibuffer-complete' in order to automatically
+ ;; complete the minibuffer contents as far as possible.
+ (minibuffer-with-setup-hook #'minibuffer-complete
(completing-read "Manual file: " files nil 1
- (try-completion "" files) 'woman-file-history))))))
+ (try-completion "" files) 'woman-file-history)))))))
(defun woman-select (predicate list)
"Select unique elements for which PREDICATE is true in LIST.
next prev parent reply other threads:[~2012-11-11 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-11 14:30 bug#12861: wrong default value when completing in woman-file-name Jonas Bernoulli
2012-11-11 15:54 ` Stefan Monnier [this message]
2012-11-12 22:15 ` Jonas Bernoulli
2012-11-13 17:01 ` Stefan Monnier
2012-11-13 22:01 ` Jonas Bernoulli
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=jwvobj4nnlx.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=12861@debbugs.gnu.org \
--cc=jonas@bernoul.li \
/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.