all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tooltip-mode shouldn't be enabled in the Linux console by default
@ 2009-04-26 11:04 Nick Roberts
  2009-04-26 17:43 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nick Roberts @ 2009-04-26 11:04 UTC (permalink / raw)
  To: emacs-devel


For Emacs in CVS, tooltip-mode is enabled by default for text-only terminals.
The file tooltip.el says this:

  ;; Even if we start on a text-only terminal, make this non-nil by
  ;; default because we can open a graphical frame later (multi-tty).

I think this is wrong because, in the Linux console with gpm, every time the
mouse moves over a region with a help-echo property, in the mini-buffer, you
get the error message:

 Error while displaying tooltip: (error Non-X frame used)

before the help text appears.

Presumably if a multi-tty user chooses to open a graphical frame, he
can enable tooltip-mode if he wishes.  Or maybe it is possible to distinguish
between the Linux console and a text-only terminal on a graphical terminal,
e.g xterm on X11 where gpm is not available.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-26 11:04 tooltip-mode shouldn't be enabled in the Linux console by default Nick Roberts
@ 2009-04-26 17:43 ` Eli Zaretskii
  2009-04-26 18:24 ` Glenn Morris
  2009-04-27  4:00 ` Stefan Monnier
  2 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2009-04-26 17:43 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

> Date: Sun, 26 Apr 2009 23:04:05 +1200
> From: nickrob@snap.net.nz (Nick Roberts)
> 
>   ;; Even if we start on a text-only terminal, make this non-nil by
>   ;; default because we can open a graphical frame later (multi-tty).
> 
> I think this is wrong because, in the Linux console with gpm, every time the
> mouse moves over a region with a help-echo property, in the mini-buffer, you
> get the error message:
> 
>  Error while displaying tooltip: (error Non-X frame used)
> 
> before the help text appears.

Yes, it's wrong.

> Presumably if a multi-tty user chooses to open a graphical frame, he
> can enable tooltip-mode if he wishes.  Or maybe it is possible to distinguish
> between the Linux console and a text-only terminal on a graphical terminal,
> e.g xterm on X11 where gpm is not available.

I think it should be possible to set this mode per frame, and then it
should be off on text-only terminals.

I suggest to file a bug report about this.




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-26 11:04 tooltip-mode shouldn't be enabled in the Linux console by default Nick Roberts
  2009-04-26 17:43 ` Eli Zaretskii
@ 2009-04-26 18:24 ` Glenn Morris
  2009-04-27  4:00 ` Stefan Monnier
  2 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2009-04-26 18:24 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

Nick Roberts wrote:

> For Emacs in CVS, tooltip-mode is enabled by default for text-only terminals.
> The file tooltip.el says this:
>
>   ;; Even if we start on a text-only terminal, make this non-nil by
>   ;; default because we can open a graphical frame later (multi-tty).

I believe this was motivated by bug #905.




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-26 11:04 tooltip-mode shouldn't be enabled in the Linux console by default Nick Roberts
  2009-04-26 17:43 ` Eli Zaretskii
  2009-04-26 18:24 ` Glenn Morris
@ 2009-04-27  4:00 ` Stefan Monnier
  2009-04-27 18:47   ` Eli Zaretskii
  2 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-04-27  4:00 UTC (permalink / raw)
  To: Nick Roberts; +Cc: emacs-devel

> For Emacs in CVS, tooltip-mode is enabled by default for text-only terminals.

Actually I think it should be enabled by default regardless of anything,
simply because it should indicate "are tooltips popups going to be
shown" but rather "should tooltips popups be shown when possible".

> I think this is wrong because, in the Linux console with gpm, every time the
> mouse moves over a region with a help-echo property, in the mini-buffer, you
> get the error message:

>  Error while displaying tooltip: (error Non-X frame used)

> before the help text appears.

Looks like an error in the tooltip code where it should check
applicability before trying to create a tooltip frame.


        Stefan




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-27  4:00 ` Stefan Monnier
@ 2009-04-27 18:47   ` Eli Zaretskii
  2009-04-28  2:18     ` Chong Yidong
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2009-04-27 18:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: nickrob, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 27 Apr 2009 00:00:18 -0400
> Cc: emacs-devel@gnu.org
> 
> > For Emacs in CVS, tooltip-mode is enabled by default for text-only terminals.
> 
> Actually I think it should be enabled by default regardless of anything,
> simply because it should indicate "are tooltips popups going to be
> shown" but rather "should tooltips popups be shown when possible".

Don't we want to show the help echo in the minibuffer instead, when
the mouse is available?

> Looks like an error in the tooltip code where it should check
> applicability before trying to create a tooltip frame.

And if not applicable, what should it do, in your opinion?




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-27 18:47   ` Eli Zaretskii
@ 2009-04-28  2:18     ` Chong Yidong
  2009-04-28  7:57       ` Nick Roberts
  0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-04-28  2:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: nickrob, Stefan Monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Looks like an error in the tooltip code where it should check
>> applicability before trying to create a tooltip frame.
>
> And if not applicable, what should it do, in your opinion?

Show the tip in the echo area, as though tooltip-mode were off.  I've
checked in a fix to CVS.




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-28  2:18     ` Chong Yidong
@ 2009-04-28  7:57       ` Nick Roberts
  2009-04-28  8:36         ` Eli Zaretskii
  2009-04-28 13:45         ` Chong Yidong
  0 siblings, 2 replies; 10+ messages in thread
From: Nick Roberts @ 2009-04-28  7:57 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Eli Zaretskii, Stefan Monnier, emacs-devel

 > > And if not applicable, what should it do, in your opinion?
 > 
 > Show the tip in the echo area, as though tooltip-mode were off.  I've
 > checked in a fix to CVS.

I would prefer that you posted the patch to the mailing list first.  This
looks to me like an ugly hack that subverts the purpose of
tooltip-show-help-non-mode.  I tried the patch below (against 1.93, the
version before your checkin) but the help message seems to persist after the
mouse has moved away from the mouse-highlight region.  In any case, I think
the patch should make use of the use-echo-area argument of tooltip-show.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** /home/nickrob/emacs/lisp/tooltip.el.~1.93~	2009-04-28 19:24:26.000000000 +1200
--- /home/nickrob/emacs/lisp/tooltip.el	2009-04-28 19:42:47.000000000 +1200
*************** This is installed on the hook `tooltip-f
*** 375,382 ****
  is run when the timer with id `tooltip-timeout-id' fires.
  Value is non-nil if this function handled the tip."
    (when (stringp tooltip-help-message)
!     (tooltip-show tooltip-help-message tooltip-use-echo-area)
!     t))
  
  (provide 'tooltip)
  
--- 375,382 ----
  is run when the timer with id `tooltip-timeout-id' fires.
  Value is non-nil if this function handled the tip."
    (when (stringp tooltip-help-message)
!     (tooltip-show tooltip-help-message
! 		  (or (not (display-graphic-p)) tooltip-use-echo-area))  t))
  
  (provide 'tooltip)
  





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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-28  7:57       ` Nick Roberts
@ 2009-04-28  8:36         ` Eli Zaretskii
  2009-04-28 13:45         ` Chong Yidong
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2009-04-28  8:36 UTC (permalink / raw)
  To: Nick Roberts; +Cc: cyd, monnier, emacs-devel

> Date: Tue, 28 Apr 2009 19:57:18 +1200
> Cc: Eli Zaretskii <eliz@gnu.org>,
> 	Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
> From: nickrob@snap.net.nz (Nick Roberts)
> 
>  > > And if not applicable, what should it do, in your opinion?
>  > 
>  > Show the tip in the echo area, as though tooltip-mode were off.  I've
>  > checked in a fix to CVS.
> 
> I would prefer that you posted the patch to the mailing list first.  This
> looks to me like an ugly hack that subverts the purpose of
> tooltip-show-help-non-mode.

Could you explain why you think it subverts the purpose of
tooltip-show-help-non-mode?




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-28  7:57       ` Nick Roberts
  2009-04-28  8:36         ` Eli Zaretskii
@ 2009-04-28 13:45         ` Chong Yidong
  2009-04-29  7:22           ` Nick Roberts
  1 sibling, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-04-28 13:45 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Eli Zaretskii, Stefan Monnier, emacs-devel

nickrob@snap.net.nz (Nick Roberts) writes:

> This looks to me like an ugly hack that subverts the purpose of
> tooltip-show-help-non-mode.  I tried the patch below (against 1.93,
> the version before your checkin) but the help message seems to persist
> after the mouse has moved away from the mouse-highlight region.

Yes, and if you fix that bug, you end up with a function that looks like
tooltip-show-help-non-mode, pretty much.  So it's better to use
tooltip-show-help-non-mode in the first place.




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

* Re: tooltip-mode shouldn't be enabled in the Linux console by default
  2009-04-28 13:45         ` Chong Yidong
@ 2009-04-29  7:22           ` Nick Roberts
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Roberts @ 2009-04-29  7:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Eli Zaretskii, Stefan Monnier, emacs-devel

 > > This looks to me like an ugly hack that subverts the purpose of
 > > tooltip-show-help-non-mode.  I tried the patch below (against 1.93,
 > > the version before your checkin) but the help message seems to persist
 > > after the mouse has moved away from the mouse-highlight region.
 > 
 > Yes, and if you fix that bug, you end up with a function that looks like
 > tooltip-show-help-non-mode, pretty much.  So it's better to use
 > tooltip-show-help-non-mode in the first place.

I don't follow that logic as I don't currently understand why the help message
persists with my patch.

Addressing Eli's question, it just seems convoluted to have two
help-functions, select one and then, under certain conditions, get it to call
the other - a bit like a double negative.

Clearly though, my criticism isn't really valid unless I can come up with
a better patch - which I will try to do.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




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

end of thread, other threads:[~2009-04-29  7:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 11:04 tooltip-mode shouldn't be enabled in the Linux console by default Nick Roberts
2009-04-26 17:43 ` Eli Zaretskii
2009-04-26 18:24 ` Glenn Morris
2009-04-27  4:00 ` Stefan Monnier
2009-04-27 18:47   ` Eli Zaretskii
2009-04-28  2:18     ` Chong Yidong
2009-04-28  7:57       ` Nick Roberts
2009-04-28  8:36         ` Eli Zaretskii
2009-04-28 13:45         ` Chong Yidong
2009-04-29  7:22           ` Nick Roberts

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.