* bug#16920: 24.3; fix eldoc-message to clear own message only
@ 2014-03-02 7:18 Leo Liu
2014-03-07 22:54 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2014-03-02 7:18 UTC (permalink / raw)
To: 16920
I would like to fix eldoc-message for the upcoming release. Now that
eldoc can be used in the minibuffer there is one issue that can be
really annoying.
1. M-x eval-expression
2. type in (+ 1 1 |) ; | is the cursor
3. quickly pressing SPC repeatedly and then RET
The value 2 is shown and then cleared by eldoc (when eldoc-idle-delay is
short enough one may not see the value at all). The proposed fix is in
the following patch. Comments or objections?
=== modified file 'lisp/emacs-lisp/eldoc.el'
--- lisp/emacs-lisp/eldoc.el 2014-01-30 07:54:28 +0000
+++ lisp/emacs-lisp/eldoc.el 2014-03-02 07:14:45 +0000
@@ -255,7 +255,8 @@
(let ((message-log-max nil))
(cond (eldoc-last-message
(funcall eldoc-message-function "%s" eldoc-last-message))
- (omessage (funcall eldoc-message-function nil)))))
+ (omessage (and (equal omessage (current-message))
+ (funcall eldoc-message-function nil))))))
eldoc-last-message)
(defun eldoc--message-command-p (command)
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16920: 24.3; fix eldoc-message to clear own message only
2014-03-02 7:18 bug#16920: 24.3; fix eldoc-message to clear own message only Leo Liu
@ 2014-03-07 22:54 ` Stefan Monnier
2014-03-08 7:32 ` Leo Liu
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-03-07 22:54 UTC (permalink / raw)
To: Leo Liu; +Cc: 16920
> - (omessage (funcall eldoc-message-function nil)))))
> + (omessage (and (equal omessage (current-message))
> + (funcall eldoc-message-function nil))))))
This can't be right when eldoc-message-function doesn't use `message'.
So, we should probably move this test to the eldoc-message-function.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16920: 24.3; fix eldoc-message to clear own message only
2014-03-07 22:54 ` Stefan Monnier
@ 2014-03-08 7:32 ` Leo Liu
2014-03-10 2:44 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Leo Liu @ 2014-03-08 7:32 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 16920
On 2014-03-08 06:54 +0800, Stefan Monnier wrote:
> This can't be right when eldoc-message-function doesn't use `message'.
> So, we should probably move this test to the eldoc-message-function.
>
>
> Stefan
The bug happens when exit minibuffer so we need to clear its state
thoroughly at exit time. How about something like this:
=== modified file 'lisp/emacs-lisp/eldoc.el'
--- lisp/emacs-lisp/eldoc.el 2014-01-30 07:54:28 +0000
+++ lisp/emacs-lisp/eldoc.el 2014-03-08 07:30:21 +0000
@@ -219,7 +219,9 @@
(if (minibufferp)
(progn
(add-hook 'minibuffer-exit-hook
- (lambda () (setq eldoc-mode-line-string nil))
+ (lambda () (setq eldoc-mode-line-string nil
+ ;; http://debbugs.gnu.org/16920
+ eldoc-last-message nil))
nil t)
(with-current-buffer
(window-buffer
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16920: 24.3; fix eldoc-message to clear own message only
2014-03-08 7:32 ` Leo Liu
@ 2014-03-10 2:44 ` Stefan Monnier
2014-03-10 5:37 ` Leo Liu
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-03-10 2:44 UTC (permalink / raw)
To: Leo Liu; +Cc: 16920
> The bug happens when exit minibuffer so we need to clear its state
> thoroughly at exit time. How about something like this:
[...]
> - (lambda () (setq eldoc-mode-line-string nil))
> + (lambda () (setq eldoc-mode-line-string nil
> + ;; http://debbugs.gnu.org/16920
> + eldoc-last-message nil))
Sounds good, thanks,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16920: 24.3; fix eldoc-message to clear own message only
2014-03-10 2:44 ` Stefan Monnier
@ 2014-03-10 5:37 ` Leo Liu
0 siblings, 0 replies; 5+ messages in thread
From: Leo Liu @ 2014-03-10 5:37 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 16920-done
Fixed in 24.4
On 2014-03-10 10:44 +0800, Stefan Monnier wrote:
> Sounds good, thanks,
>
>
> Stefan
OK, installed.
Leo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-10 5:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 7:18 bug#16920: 24.3; fix eldoc-message to clear own message only Leo Liu
2014-03-07 22:54 ` Stefan Monnier
2014-03-08 7:32 ` Leo Liu
2014-03-10 2:44 ` Stefan Monnier
2014-03-10 5:37 ` Leo Liu
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).