* bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook
@ 2012-11-28 0:10 Christopher Schmidt
2012-11-28 1:42 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Schmidt @ 2012-11-28 0:10 UTC (permalink / raw
To: 13017
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
In minibuf-eldef-setup-minibuffer there is this form
(add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t)
I think this is not correct. The APPEND parameter of add-hook should be
t so all changes made to the minibuffer content by previous functions in
post-command-hook are taken into account by
minibuf-eldef-update-minibuffer.
Here is a patch for the trunk.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minibuf-eldef.diff --]
[-- Type: text/x-diff, Size: 1035 bytes --]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2012-11-27 16:40:04 +0000
+++ lisp/ChangeLog 2012-11-28 00:07:24 +0000
@@ -1,3 +1,8 @@
+2012-11-28 Christopher Schmidt <christopher@ch.ristopher.com>
+
+ * minibuf-eldef.el (minibuf-eldef-setup-minibuffer): Append
+ minibuf-eldef-update-minibuffer to post-command-hook. (Bug#)
+
2012-11-27 Glenn Morris <rgm@gnu.org>
* emacs-lisp/derived.el (derived-mode-make-docstring):
=== modified file 'lisp/minibuf-eldef.el'
--- lisp/minibuf-eldef.el 2012-11-07 20:43:38 +0000
+++ lisp/minibuf-eldef.el 2012-11-28 00:05:45 +0000
@@ -140,7 +140,7 @@
(minibuffer-contents-no-properties))
(setq minibuf-eldef-initial-buffer-length (point-max))
(add-to-list 'minibuf-eldef-frobbed-minibufs (current-buffer))
- (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t))))
+ (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer t t))))
;; post-command-hook to swap prompts when necessary
(defun minibuf-eldef-update-minibuffer ()
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Christopher
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook
2012-11-28 0:10 bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook Christopher Schmidt
@ 2012-11-28 1:42 ` Stefan Monnier
2014-02-06 0:55 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2012-11-28 1:42 UTC (permalink / raw
To: 13017
> In minibuf-eldef-setup-minibuffer there is this form
> (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t)
> I think this is not correct. The APPEND parameter of add-hook should be
> t so all changes made to the minibuffer content by previous functions in
> post-command-hook are taken into account by
> minibuf-eldef-update-minibuffer.
That sounds reasonable, but I'd be happier to know of a concrete example
where this was needed.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook
2012-11-28 1:42 ` Stefan Monnier
@ 2014-02-06 0:55 ` Lars Ingebrigtsen
2014-04-16 17:03 ` Christopher Schmidt
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-06 0:55 UTC (permalink / raw
To: Christopher Schmidt; +Cc: 13017
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> In minibuf-eldef-setup-minibuffer there is this form
>
>> (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t)
>
>> I think this is not correct. The APPEND parameter of add-hook should be
>> t so all changes made to the minibuffer content by previous functions in
>> post-command-hook are taken into account by
>> minibuf-eldef-update-minibuffer.
>
> That sounds reasonable, but I'd be happier to know of a concrete example
> where this was needed.
Christopher, do you have an example that demonstrates why this is needed?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook
2014-02-06 0:55 ` Lars Ingebrigtsen
@ 2014-04-16 17:03 ` Christopher Schmidt
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Schmidt @ 2014-04-16 17:03 UTC (permalink / raw
To: 13017-done
Tags: notabug
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Christopher, do you have an example that demonstrates why this is
> needed?
IIRC, I played around with another prompt-simplifying form in
post-command-hook. I do not have the source code any more.
It is easy to come up with an artificial sample which demonstrates this
issue. Yet, even if minibuf-eldef-update-minibuffer is appended to
post-command-hook, does this change actually improve the situation? I
do not think so. It is not hard to come up with another sample which
requires the initial behaviour.
This issue is probably not a bug and does not matter to me any more.
Closing...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-16 17:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 0:10 bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook Christopher Schmidt
2012-11-28 1:42 ` Stefan Monnier
2014-02-06 0:55 ` Lars Ingebrigtsen
2014-04-16 17:03 ` Christopher Schmidt
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.