GNU bug report logs -
#12861
wrong default value when completing in woman-file-name
Previous Next
Reported by: Jonas Bernoulli <jonas <at> bernoul.li>
Date: Sun, 11 Nov 2012 14:39:02 UTC
Severity: minor
Tags: patch
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 12861 <at> debbugs.gnu.org (full text, mbox):
> 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.
This bug report was last modified 12 years and 254 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.