unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19853: 25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not
@ 2015-02-13 11:56 Dmitry Gutov
       [not found] ` <handler.19853.B.142382861219223.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2015-02-13 11:56 UTC (permalink / raw)
  To: 19853

1. emacs -Q
2. M-: eldoc-mode => nil
3. Type (defun |), see the function signature in the echo area.
4. M-x eldoc-mode makes no difference either way.

In GNU Emacs 25.0.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2015-02-07 on axl
Repository revision: 7eb2077f9dd14ae9d70a12c621151afd50ea6e96
Windowing system distributor `The X.Org Foundation', version 11.0.11601901
System Description:	Ubuntu 14.10





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
       [not found] ` <handler.19853.B.142382861219223.ack@debbugs.gnu.org>
@ 2015-07-21 13:48   ` Dmitry Gutov
  2016-03-20 10:00     ` bug#19853: eldoc-mode vs. global-eldoc-mode (was: bug#19853) Marcin Borkowski
                       ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Dmitry Gutov @ 2015-07-21 13:48 UTC (permalink / raw)
  To: 19853

Why is global-eldoc-mode a separate mode, instead of being a 
"globalized" eldoc-mode?





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

* bug#19853: eldoc-mode vs. global-eldoc-mode (was: bug#19853)
  2015-07-21 13:48   ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Dmitry Gutov
@ 2016-03-20 10:00     ` Marcin Borkowski
       [not found]     ` <87r3f5eaei.fsf_-_@mbork.pl>
  2016-03-20 18:21     ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Michael Heerdegen
  2 siblings, 0 replies; 27+ messages in thread
From: Marcin Borkowski @ 2016-03-20 10:00 UTC (permalink / raw)
  To: Dmitry Gutov, Help Gnu Emacs mailing list; +Cc: 19853-done

On 2015-07-21, at 17:48, Dmitry Gutov <dgutov@yandex.ru> wrote:

> Why is global-eldoc-mode a separate mode, instead of being
> a "globalized" eldoc-mode?

This is a good question, and I'd like to know the rationale for the
existence of both of them, too.  I'm forwarding it to help-gnu-emacs and
closing the bug at ths same time.

Best,

-- 
Marcin





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

* bug#19853: eldoc-mode vs. global-eldoc-mode
       [not found]     ` <87r3f5eaei.fsf_-_@mbork.pl>
@ 2016-03-20 12:41       ` Dmitry Gutov
  2016-03-20 13:17         ` Marcin Borkowski
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 12:41 UTC (permalink / raw)
  To: 19853, mbork

On 03/20/2016 12:00 PM, Marcin Borkowski wrote:

> closing the bug at ths same time.

What made you decide it's not a bug?






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

* bug#19853: eldoc-mode vs. global-eldoc-mode
  2016-03-20 12:41       ` bug#19853: eldoc-mode vs. global-eldoc-mode Dmitry Gutov
@ 2016-03-20 13:17         ` Marcin Borkowski
  2016-03-20 13:25           ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Marcin Borkowski @ 2016-03-20 13:17 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853


On 2016-03-20, at 13:41, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 03/20/2016 12:00 PM, Marcin Borkowski wrote:
>
>> closing the bug at ths same time.
>
> What made you decide it's not a bug?

The fact that apparently this behavior is consistent with the docs, so
it looks like a feature (though the intentions behind it remain
mysterious to me).  Also, the fact that if at any point you or I decide
that this is a bug indeed, reopening it can be done in 30 seconds.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University





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

* bug#19853: eldoc-mode vs. global-eldoc-mode
  2016-03-20 13:17         ` Marcin Borkowski
@ 2016-03-20 13:25           ` Dmitry Gutov
  2016-03-20 14:14             ` Marcin Borkowski
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 13:25 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: 19853

On 03/20/2016 03:17 PM, Marcin Borkowski wrote:

> The fact that apparently this behavior is consistent with the docs, so
> it looks like a feature (though the intentions behind it remain
> mysterious to me).

Which docs? global-eldoc-mode's docstring says "Enable ‘eldoc-mode’ in 
all buffers where it’s applicable.", which is not what it does.

> Also, the fact that if at any point you or I decide
> that this is a bug indeed, reopening it can be done in 30 seconds.

Until enough time passes that it's archived and forgotten. It's clear 
that it's not high priority, but it still seems like something we'd want 
to fix.





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

* bug#19853: eldoc-mode vs. global-eldoc-mode
  2016-03-20 13:25           ` Dmitry Gutov
@ 2016-03-20 14:14             ` Marcin Borkowski
  2016-03-20 17:08               ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Marcin Borkowski @ 2016-03-20 14:14 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853


On 2016-03-20, at 14:25, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 03/20/2016 03:17 PM, Marcin Borkowski wrote:
>
>> The fact that apparently this behavior is consistent with the docs, so
>> it looks like a feature (though the intentions behind it remain
>> mysterious to me).
>
> Which docs? global-eldoc-mode's docstring says "Enable ‘eldoc-mode’ in 
> all buffers where it’s applicable.", which is not what it does.

The manual.

(info "(emacs) Lisp Doc")

>> Also, the fact that if at any point you or I decide
>> that this is a bug indeed, reopening it can be done in 30 seconds.
>
> Until enough time passes that it's archived and forgotten. It's clear 
> that it's not high priority, but it still seems like something we'd want 
> to fix.

OK, I'll write it down that if no-one confirms that this is intended and
reasonable within a week, I'm reopening it.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University





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

* bug#19853: eldoc-mode vs. global-eldoc-mode
  2016-03-20 14:14             ` Marcin Borkowski
@ 2016-03-20 17:08               ` Dmitry Gutov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 17:08 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: 19853

On 03/20/2016 04:14 PM, Marcin Borkowski wrote:

>> Which docs? global-eldoc-mode's docstring says "Enable ‘eldoc-mode’ in
>> all buffers where it’s applicable.", which is not what it does.
>
> The manual.
>
> (info "(emacs) Lisp Doc")

It doesn't seem like it states conclusively whether global-eldoc-mode 
toggles eldoc-mode.

> OK, I'll write it down that if no-one confirms that this is intended and
> reasonable within a week, I'm reopening it.

Great, thanks!





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2015-07-21 13:48   ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Dmitry Gutov
  2016-03-20 10:00     ` bug#19853: eldoc-mode vs. global-eldoc-mode (was: bug#19853) Marcin Borkowski
       [not found]     ` <87r3f5eaei.fsf_-_@mbork.pl>
@ 2016-03-20 18:21     ` Michael Heerdegen
  2016-03-20 18:25       ` Dmitry Gutov
  2 siblings, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 18:21 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> Why is global-eldoc-mode a separate mode, instead of being a
> "globalized" eldoc-mode?

I think it's simpler that way: `global-eldoc-mode' adds its stuff to the
global hook bindings.  Thus toggling the global mode has an instant
effect on all buffers.  The globalized local eldoc mode would only have
an effect in new buffers or after changing the major mode.


What exactly is this bug report about (this question, or the statement
in the subject, for which you didn't provide a recipe)?


Regards,

Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 18:21     ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Michael Heerdegen
@ 2016-03-20 18:25       ` Dmitry Gutov
  2016-03-20 18:34         ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 18:25 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853

On 03/20/2016 08:21 PM, Michael Heerdegen wrote:

> I think it's simpler that way: `global-eldoc-mode' adds its stuff to the
> global hook bindings.  Thus toggling the global mode has an instant
> effect on all buffers.  The globalized local eldoc mode would only have
> an effect in new buffers or after changing the major mode.

That's not true: turning off a globalized mode turns off the related 
minor mode in all buffers. So, instant effect as well.

The current implementation, however, is not "simpler": both modes set up 
hooks. For some reasons, they also do that in slightly different ways.

> What exactly is this bug report about (this question, or the statement
> in the subject, for which you didn't provide a recipe)?

I did provide a recipe, in the bug description.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 18:25       ` Dmitry Gutov
@ 2016-03-20 18:34         ` Michael Heerdegen
  2016-03-20 18:52           ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 18:34 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 03/20/2016 08:21 PM, Michael Heerdegen wrote:
>
> > I think it's simpler that way: `global-eldoc-mode' adds its stuff to the
> > global hook bindings.  Thus toggling the global mode has an instant
> > effect on all buffers.  The globalized local eldoc mode would only have
> > an effect in new buffers or after changing the major mode.
>
> That's not true: turning off a globalized mode turns off the related
> minor mode in all buffers. So, instant effect as well.

Right, but turning on is different, right?


> The current implementation, however, is not "simpler": both modes set
> up hooks. For some reasons, they also do that in slightly different
> ways.

I mean, conceptually simpler (slightly).  But that's surely a matter of
taste.

> > What exactly is this bug report about (this question, or the
> > statement in the subject, for which you didn't provide a recipe)?
>
> I did provide a recipe, in the bug description.

I thought you mean a lighter, but you mean the effect of eldoc mode:
echoing in the echo area with "ElDoc is displayed", correct?

I see that too in emacs -Q, but global-eldoc-mode is on by default, so
this is expected.  You get eldoc echoing when either the local mode is
turned on for this buffer, or the global mode (and the current buffer is
treated by the global mode).  Don't you see this, or do think this
behavior is wrong?


Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 18:34         ` Michael Heerdegen
@ 2016-03-20 18:52           ` Dmitry Gutov
  2016-03-20 19:20             ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 18:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853

On 03/20/2016 08:34 PM, Michael Heerdegen wrote:

>> That's not true: turning off a globalized mode turns off the related
>> minor mode in all buffers. So, instant effect as well.
>
> Right, but turning on is different, right?

Different how?

> I mean, conceptually simpler (slightly).  But that's surely a matter of
> taste.

I wouldn't call that kind of duplication simpler.

>>> What exactly is this bug report about (this question, or the
>>> statement in the subject, for which you didn't provide a recipe)?
>>
>> I did provide a recipe, in the bug description.
>
> I thought you mean a lighter, but you mean the effect of eldoc mode:
> echoing in the echo area with "ElDoc is displayed", correct?

In the echo area, but not "ElDoc is displayed" (is there such a message 
anywhere?).

> I see that too in emacs -Q, but global-eldoc-mode is on by default, so
> this is expected.  You get eldoc echoing when either the local mode is
> turned on for this buffer, or the global mode (and the current buffer is
> treated by the global mode).  Don't you see this, or do think this
> behavior is wrong?

I see this, and I think it is wrong:

- The behavior is surprising if you're used to globalized minor modes.
- There's no way to have ElDoc enabled by default, but disable it in 
just certain buffers.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 18:52           ` Dmitry Gutov
@ 2016-03-20 19:20             ` Michael Heerdegen
  2016-03-20 19:27               ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 19:20 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 03/20/2016 08:34 PM, Michael Heerdegen wrote:
>
> >> That's not true: turning off a globalized mode turns off the related
> >> minor mode in all buffers. So, instant effect as well.
> >
> > Right, but turning on is different, right?
>
> Different how?

Turning on the globalized local hook would not have an immediate effect
on the affected buffers I think.


> >> I did provide a recipe, in the bug description.
> >
> > I thought you mean a lighter, but you mean the effect of eldoc mode:
> > echoing in the echo area with "ElDoc is displayed", correct?
>
> In the echo area, but not "ElDoc is displayed" (is there such a
> message anywhere?).

Yes, in your recipe in the bug description.  My question was what you
meant with that.


> - The behavior is surprising if you're used to globalized minor modes.

What behavior do you mean, apart from the next point?


> - There's no way to have ElDoc enabled by default, but disable it in
> just certain buffers.

That's a valid point, the current implementation doesn't cover this
case.  I think

  (setq-local global-eldoc-mode nil)

should work, but it looks weird, and it should not be necessary to
modify a variable after we already have two modes.


Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 19:20             ` Michael Heerdegen
@ 2016-03-20 19:27               ` Dmitry Gutov
  2016-03-20 19:53                 ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 19:27 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853

On 03/20/2016 09:20 PM, Michael Heerdegen wrote:

> Turning on the globalized local hook would not have an immediate effect
> on the affected buffers I think.

Not sure what you mean. Globalized local hook?

If globalized mode was off, and you turn it on, it turns on the local 
mode in all relevant buffers, right away.

Just try it with e.g. global-font-lock-mode.

> Yes, in your recipe in the bug description.  My question was what you
> meant with that.

Displaying, or not displaying, function signatures in the echo area.

>> - The behavior is surprising if you're used to globalized minor modes.
>
> What behavior do you mean, apart from the next point?

Compare with font-lock-mode and global-font-lock-mode.

> That's a valid point, the current implementation doesn't cover this
> case.  I think
>
>   (setq-local global-eldoc-mode nil)
>
> should work, but it looks weird, and it should not be necessary to
> modify a variable after we already have two modes.

Yes, it looks silly, and might even break some expectations of the minor 
mode machinery.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 19:27               ` Dmitry Gutov
@ 2016-03-20 19:53                 ` Michael Heerdegen
  2016-03-20 20:24                   ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 19:53 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 03/20/2016 09:20 PM, Michael Heerdegen wrote:
>
> > Turning on the globalized local hook would not have an immediate effect
> > on the affected buffers I think.
>
> Not sure what you mean. Globalized local hook?
>
> If globalized mode was off, and you turn it on, it turns on the local
> mode in all relevant buffers, right away.
>
> Just try it with e.g. global-font-lock-mode.

Yes, correct.  I only overflew the sources and missed that part - my
mistake.


> > That's a valid point, the current implementation doesn't cover this
> > case.  I think
> >
> >   (setq-local global-eldoc-mode nil)
> >
> > should work, but it looks weird, and it should not be necessary to
> > modify a variable after we already have two modes.
>
> Yes, it looks silly, and might even break some expectations of the
> minor mode machinery.

If we want the global mode to push its stuff into the global hook
bindings, and not into all the local hook bindings in every single
buffer where the mode is applicable - can we achieve this with
`define-globalized-minor-mode'?  It doesn't seem so:
`define-globalized-minor-mode' doesn't accept any kind of BODY argument.
I think this is the cause of why the author reinvented it, and that in a
not fully compliant way.

Eldoc is not the only mode where this problem arises.  In general, it
can be beneficial to add to the global hook bindings: when a buffer is
affected by the global hook, but it is not current, the local hook
bindings are not run.  Sometimes this is useful (I can give an example
if you want).

But in this case, I think it is not.  So I tend to agree with you:
simply globalizing eldoc-mode would be better, if we don't miss
anything.

And then, I think making `define-globalized-minor-mode' accept a BODY
argument would be good - a globalized minor mode might want to do some
global setup.


Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 19:53                 ` Michael Heerdegen
@ 2016-03-20 20:24                   ` Dmitry Gutov
  2016-03-20 21:10                     ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 20:24 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853

On 03/20/2016 09:53 PM, Michael Heerdegen wrote:

> If we want the global mode to push its stuff into the global hook
> bindings, and not into all the local hook bindings in every single
> buffer where the mode is applicable - can we achieve this with
> `define-globalized-minor-mode'?

You could use :after-hook argument.

But it doesn't seem like what we should in do cases like this: what 
would (eldoc-mode -1) do if the globalized mode has modified the global 
hook values? We can't modify those locally.

> And then, I think making `define-globalized-minor-mode' accept a BODY
> argument would be good - a globalized minor mode might want to do some
> global setup.

Again, see the mention of :after-hook in the define-minor-mode 
docstring. It works in the globalized definitions as well.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 20:24                   ` Dmitry Gutov
@ 2016-03-20 21:10                     ` Michael Heerdegen
  2016-03-20 21:15                       ` Dmitry Gutov
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 21:10 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> > If we want the global mode to push its stuff into the global hook
> > bindings, and not into all the local hook bindings in every single
> > buffer where the mode is applicable - can we achieve this with
> > `define-globalized-minor-mode'?
>
> You could use :after-hook argument.

Thanks.

> But it doesn't seem like what we should in do cases like this: what
> would (eldoc-mode -1) do if the globalized mode has modified the
> global hook values? We can't modify those locally.

Yes.  I think turning `globalized-eldoc-mode' could change the default
value of `eldoc-mode', while the local `eldoc-mode' changes the local
value (as it does now).

But that would lead to another problem: if the user has both modes off,
then turns on the local mode in some buffer, and after that turns on the
global mode as well, we have the stuff in both the global and the local
hook bindings.

Hmm, I think the only way out would be to add the stuff to the global
hook bindings unconditionally when eldoc is loaded - no matter whether
the global mode is on or not, and never remove it.  And use only one
(buffer local) variable for controlling, `eldoc-mode', that the local
mode sets locally.  The variable `global-eldoc-mode' would not appear in
the code any more.  `global-eldoc-mode' would become a trivial
globalized minor mode that would only turn the local value of
`eldoc-mode' in all buffers.  Would that make sense?

The alternative would be, of course, do what you suggested.


Michael.






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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 21:10                     ` Michael Heerdegen
@ 2016-03-20 21:15                       ` Dmitry Gutov
  2016-03-20 21:24                         ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-20 21:15 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853

On 03/20/2016 11:10 PM, Michael Heerdegen wrote:

> Yes.  I think turning `globalized-eldoc-mode' could change the default
> value of `eldoc-mode', while the local `eldoc-mode' changes the local
> value (as it does now).

That's not how globalized minor modes work.

> But that would lead to another problem: if the user has both modes off,
> then turns on the local mode in some buffer, and after that turns on the
> global mode as well, we have the stuff in both the global and the local
> hook bindings.

Nope: globalized mode should only turn on the local mode in appropriate 
buffers. And it would, in turn, only modify the local parts of the hook 
in each of the buffers.

> Hmm, I think the only way out would be to add the stuff to the global
> hook bindings unconditionally when eldoc is loaded - no matter whether
> the global mode is on or not, and never remove it.  And use only one
> (buffer local) variable for controlling, `eldoc-mode', that the local
> mode sets locally.  The variable `global-eldoc-mode' would not appear in
> the code any more.  `global-eldoc-mode' would become a trivial
> globalized minor mode that would only turn the local value of
> `eldoc-mode' in all buffers.  Would that make sense?

Sounds like a viable alternative, yes.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 21:15                       ` Dmitry Gutov
@ 2016-03-20 21:24                         ` Michael Heerdegen
  2016-03-21  4:02                           ` Marcin Borkowski
  2016-03-22 15:29                           ` Michael Heerdegen
  0 siblings, 2 replies; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-20 21:24 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853

Dmitry Gutov <dgutov@yandex.ru> writes:

> > Hmm, I think the only way out would be to add the stuff to the global
> > hook bindings unconditionally when eldoc is loaded - no matter whether
> > the global mode is on or not, and never remove it.  And use only one
> > (buffer local) variable for controlling, `eldoc-mode', that the local
> > mode sets locally.  The variable `global-eldoc-mode' would not appear in
> > the code any more.  `global-eldoc-mode' would become a trivial
> > globalized minor mode that would only turn the local value of
> > `eldoc-mode' in all buffers.  Would that make sense?
>
> Sounds like a viable alternative, yes.

Then maybe let's see what others say.  I think making either change
would be an improvement.


Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 21:24                         ` Michael Heerdegen
@ 2016-03-21  4:02                           ` Marcin Borkowski
  2016-03-22 15:29                           ` Michael Heerdegen
  1 sibling, 0 replies; 27+ messages in thread
From: Marcin Borkowski @ 2016-03-21  4:02 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853, Dmitry Gutov

reopen 19853
stop

Hi, since it turns out I was not right, and indeed there is a legitimate
wish to change the behavior, I'm reopening this bug report.

Dmitry, sorry for not understanding your report in the first place.

Best,
M.



On 2016-03-20, at 22:24, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Dmitry Gutov <dgutov@yandex.ru> writes:
>
>> > Hmm, I think the only way out would be to add the stuff to the global
>> > hook bindings unconditionally when eldoc is loaded - no matter whether
>> > the global mode is on or not, and never remove it.  And use only one
>> > (buffer local) variable for controlling, `eldoc-mode', that the local
>> > mode sets locally.  The variable `global-eldoc-mode' would not appear in
>> > the code any more.  `global-eldoc-mode' would become a trivial
>> > globalized minor mode that would only turn the local value of
>> > `eldoc-mode' in all buffers.  Would that make sense?
>>
>> Sounds like a viable alternative, yes.
>
> Then maybe let's see what others say.  I think making either change
> would be an improvement.
>
>
> Michael.

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-20 21:24                         ` Michael Heerdegen
  2016-03-21  4:02                           ` Marcin Borkowski
@ 2016-03-22 15:29                           ` Michael Heerdegen
  2016-03-22 15:38                             ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-22 15:29 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19853, Stefan Monnier

Hi,

maybe we can come to a decision now.

Stefan, you were the one that implemented `global-eldoc-mode', and
decided not to use `define-globalized-minor-mode' to do this.  I think I
understand your intention (use global hook bindings).

The subject of this bug report is that the global eldoc mode behaves
differently from other global modes that have a local counterpart: in
particular, turning off the global mode doesn't turn off the local mode
in all buffers where it is on.  This is somewhat unexpected for the user
and I think more or less only an unintended consequence of the
implementation.

We discussed two alternatives to make the global eldoc mode behave more
like a globalized mode, namely (1) do it indeed with
`define-globalized-minor-mode' and (2)

> > > Hmm, I think the only way out would be to add the stuff to the
> > > global hook bindings unconditionally when eldoc is loaded - no
> > > matter whether the global mode is on or not, and never remove it.
> > > And use only one (buffer local) variable for controlling,
> > > `eldoc-mode', that the local mode sets locally.  The variable
> > > `global-eldoc-mode' would not appear in the code any more.
> > > `global-eldoc-mode' would become a trivial globalized minor mode
> > > that would only turn the local value of `eldoc-mode' in all
> > > buffers.  Would that make sense?

Did we overlook an advantage of your implementation?  Which of these two
alternatives would you prefer?


Thanks,

Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-22 15:29                           ` Michael Heerdegen
@ 2016-03-22 15:38                             ` Stefan Monnier
  2016-03-23 15:16                               ` Michael Heerdegen
  0 siblings, 1 reply; 27+ messages in thread
From: Stefan Monnier @ 2016-03-22 15:38 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853, Dmitry Gutov

I don't have an opinion on this.


        Stefan


>>>>> "Michael" == Michael Heerdegen <michael_heerdegen@web.de> writes:

> Hi,
> maybe we can come to a decision now.

> Stefan, you were the one that implemented `global-eldoc-mode', and
> decided not to use `define-globalized-minor-mode' to do this.  I think I
> understand your intention (use global hook bindings).

> The subject of this bug report is that the global eldoc mode behaves
> differently from other global modes that have a local counterpart: in
> particular, turning off the global mode doesn't turn off the local mode
> in all buffers where it is on.  This is somewhat unexpected for the user
> and I think more or less only an unintended consequence of the
> implementation.

> We discussed two alternatives to make the global eldoc mode behave more
> like a globalized mode, namely (1) do it indeed with
> `define-globalized-minor-mode' and (2)

>> > > Hmm, I think the only way out would be to add the stuff to the
>> > > global hook bindings unconditionally when eldoc is loaded - no
>> > > matter whether the global mode is on or not, and never remove it.
>> > > And use only one (buffer local) variable for controlling,
>> > > `eldoc-mode', that the local mode sets locally.  The variable
>> > > `global-eldoc-mode' would not appear in the code any more.
>> > > `global-eldoc-mode' would become a trivial globalized minor mode
>> > > that would only turn the local value of `eldoc-mode' in all
>> > > buffers.  Would that make sense?

> Did we overlook an advantage of your implementation?  Which of these two
> alternatives would you prefer?


> Thanks,

> Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-22 15:38                             ` Stefan Monnier
@ 2016-03-23 15:16                               ` Michael Heerdegen
  2016-03-23 15:25                                 ` Dmitry Gutov
  2016-03-27  0:31                                 ` John Wiegley
  0 siblings, 2 replies; 27+ messages in thread
From: Michael Heerdegen @ 2016-03-23 15:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 19853, Dmitry Gutov

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I don't have an opinion on this.
>
>
>         Stefan

Ok, thanks.  I don't have a preference for one of the suggested
solutions, too.

Dmitry, then I suggest you just make the change you prefer (on master, I
guess) - can you do that?


Thanks,

Michael.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-23 15:16                               ` Michael Heerdegen
@ 2016-03-23 15:25                                 ` Dmitry Gutov
  2016-03-27  0:31                                 ` John Wiegley
  1 sibling, 0 replies; 27+ messages in thread
From: Dmitry Gutov @ 2016-03-23 15:25 UTC (permalink / raw)
  To: Michael Heerdegen, Stefan Monnier; +Cc: 19853

On 03/23/2016 05:16 PM, Michael Heerdegen wrote:

> Dmitry, then I suggest you just make the change you prefer (on master, I
> guess) - can you do that?

Sometime after we release 25.1, I guess.

Thanks for the discussion.





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-23 15:16                               ` Michael Heerdegen
  2016-03-23 15:25                                 ` Dmitry Gutov
@ 2016-03-27  0:31                                 ` John Wiegley
  2017-05-29 23:57                                   ` Dmitry Gutov
  1 sibling, 1 reply; 27+ messages in thread
From: John Wiegley @ 2016-03-27  0:31 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 19853, Stefan Monnier, Dmitry Gutov

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

>>>>> Michael Heerdegen <michael_heerdegen@web.de> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I don't have an opinion on this.

> Ok, thanks. I don't have a preference for one of the suggested solutions,
> too.

> Dmitry, then I suggest you just make the change you prefer (on master, I
> guess) - can you do that?

I prefer we use define-globalized-minor-mode, to be consistent with all other
global modes of this kind, since Stefan has no compelling reason for it to be
special.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]

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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2016-03-27  0:31                                 ` John Wiegley
@ 2017-05-29 23:57                                   ` Dmitry Gutov
  2017-05-30 22:02                                     ` John Wiegley
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Gutov @ 2017-05-29 23:57 UTC (permalink / raw)
  To: John Wiegley, Michael Heerdegen; +Cc: 19853-done, Stefan Monnier

Version: 26.1

On 3/27/16 2:31 AM, John Wiegley wrote:

> I prefer we use define-globalized-minor-mode, to be consistent with all other
> global modes of this kind, since Stefan has no compelling reason for it to be
> special.

And done!





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

* bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not)
  2017-05-29 23:57                                   ` Dmitry Gutov
@ 2017-05-30 22:02                                     ` John Wiegley
  0 siblings, 0 replies; 27+ messages in thread
From: John Wiegley @ 2017-05-30 22:02 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Michael Heerdegen, 19853-done, Stefan Monnier

>>>>> Dmitry Gutov <dgutov@yandex.ru> writes:

> And done!

Thanks, Dmitry :)

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





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

end of thread, other threads:[~2017-05-30 22:02 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 11:56 bug#19853: 25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not Dmitry Gutov
     [not found] ` <handler.19853.B.142382861219223.ack@debbugs.gnu.org>
2015-07-21 13:48   ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Dmitry Gutov
2016-03-20 10:00     ` bug#19853: eldoc-mode vs. global-eldoc-mode (was: bug#19853) Marcin Borkowski
     [not found]     ` <87r3f5eaei.fsf_-_@mbork.pl>
2016-03-20 12:41       ` bug#19853: eldoc-mode vs. global-eldoc-mode Dmitry Gutov
2016-03-20 13:17         ` Marcin Borkowski
2016-03-20 13:25           ` Dmitry Gutov
2016-03-20 14:14             ` Marcin Borkowski
2016-03-20 17:08               ` Dmitry Gutov
2016-03-20 18:21     ` bug#19853: Acknowledgement (25.0.50; ElDoc is displayed whether eldoc-mode is enabled or not) Michael Heerdegen
2016-03-20 18:25       ` Dmitry Gutov
2016-03-20 18:34         ` Michael Heerdegen
2016-03-20 18:52           ` Dmitry Gutov
2016-03-20 19:20             ` Michael Heerdegen
2016-03-20 19:27               ` Dmitry Gutov
2016-03-20 19:53                 ` Michael Heerdegen
2016-03-20 20:24                   ` Dmitry Gutov
2016-03-20 21:10                     ` Michael Heerdegen
2016-03-20 21:15                       ` Dmitry Gutov
2016-03-20 21:24                         ` Michael Heerdegen
2016-03-21  4:02                           ` Marcin Borkowski
2016-03-22 15:29                           ` Michael Heerdegen
2016-03-22 15:38                             ` Stefan Monnier
2016-03-23 15:16                               ` Michael Heerdegen
2016-03-23 15:25                                 ` Dmitry Gutov
2016-03-27  0:31                                 ` John Wiegley
2017-05-29 23:57                                   ` Dmitry Gutov
2017-05-30 22:02                                     ` John Wiegley

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).