all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode
       [not found] ` <E1awEhg-00021a-KD@vcs.savannah.gnu.org>
@ 2016-04-30 13:36   ` Stefan Monnier
  2016-04-30 13:58     ` Lars Ingebrigtsen
  2016-04-30 14:05     ` Michael Heerdegen
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2016-04-30 13:36 UTC (permalink / raw
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>      (kill-local-variable 'eldoc-message-commands)
>      (remove-hook 'post-command-hook 'eldoc-schedule-timer t)
> -    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t))))
> +    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)
> +    (when eldoc-timer
> +      (cancel-timer eldoc-timer)
> +      (setq eldoc-timer nil)))))
 
Hmm... IIUC the timer is global (i.e. shared by all buffers), whereas
the above code is run when disabling eldoc-mode in one
particular buffer.  So it doesn't look right.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode
  2016-04-30 13:36   ` [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode Stefan Monnier
@ 2016-04-30 13:58     ` Lars Ingebrigtsen
  2016-04-30 14:30       ` Stefan Monnier
  2016-04-30 14:05     ` Michael Heerdegen
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 13:58 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>      (kill-local-variable 'eldoc-message-commands)
>>      (remove-hook 'post-command-hook 'eldoc-schedule-timer t)
>> -    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t))))
>> +    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)
>> +    (when eldoc-timer
>> +      (cancel-timer eldoc-timer)
>> +      (setq eldoc-timer nil)))))
>
> Hmm... IIUC the timer is global (i.e. shared by all buffers), whereas
> the above code is run when disabling eldoc-mode in one
> particular buffer.  So it doesn't look right.

As far as I could tell, the post-command-hook in the other buffers
should restart the timer if it isn't running.  So if you have eldoc mode
running in another buffer, it should start again once you do anything in
them?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode
  2016-04-30 13:36   ` [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode Stefan Monnier
  2016-04-30 13:58     ` Lars Ingebrigtsen
@ 2016-04-30 14:05     ` Michael Heerdegen
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Heerdegen @ 2016-04-30 14:05 UTC (permalink / raw
  To: emacs-devel; +Cc: Dmitry Gutov

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> >      (kill-local-variable 'eldoc-message-commands)
> >      (remove-hook 'post-command-hook 'eldoc-schedule-timer t)
> > - (remove-hook 'pre-command-hook
> > 'eldoc-pre-command-refresh-echo-area t))))
> > + (remove-hook 'pre-command-hook
> > 'eldoc-pre-command-refresh-echo-area t)
> > +    (when eldoc-timer
> > +      (cancel-timer eldoc-timer)
> > +      (setq eldoc-timer nil)))))
>  
> Hmm... IIUC the timer is global (i.e. shared by all buffers), whereas
> the above code is run when disabling eldoc-mode in one particular
> buffer.  So it doesn't look right.

Yes.

And Lars, please also see bug#19853.  When Dmitry will fix this, I think
this issue here will be fixed as side effect.


Michael.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode
  2016-04-30 13:58     ` Lars Ingebrigtsen
@ 2016-04-30 14:30       ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2016-04-30 14:30 UTC (permalink / raw
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> As far as I could tell, the post-command-hook in the other buffers
> should restart the timer if it isn't running.  So if you have eldoc mode
> running in another buffer, it should start again once you do anything in
> them?

Oh, looks like you're right.  Sorry,


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-30 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160429200756.7743.70425@vcs.savannah.gnu.org>
     [not found] ` <E1awEhg-00021a-KD@vcs.savannah.gnu.org>
2016-04-30 13:36   ` [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode Stefan Monnier
2016-04-30 13:58     ` Lars Ingebrigtsen
2016-04-30 14:30       ` Stefan Monnier
2016-04-30 14:05     ` Michael Heerdegen

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.