all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ellipsis "..." from outline-mode: how to react to mouse-1 events?
@ 2007-11-28 13:59 David Reitter
  0 siblings, 0 replies; 5+ messages in thread
From: David Reitter @ 2007-11-28 13:59 UTC (permalink / raw)
  To: gnu emacs-help gnu

How would one go about creating an overlay for every "..." ellipsis  
displayed in lieu of invisible portions of text?

I'd like to get outline-minor-mode to allow me to click on the  
ellipses to show/hide the entry (the key bindings used in outline- 
minor-mode are way too awkward).
One can change the ellipsis itself:

(set-display-table-slot standard-display-table
                          'selective-display
                          (string-to-vector "more..."))

but this way one cannot add properties or overlays, since the display  
table contains character vectors.

So what would be the best method?

Thanks
- David

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

* Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?
       [not found] <mailman.4239.1196258357.18990.help-gnu-emacs@gnu.org>
@ 2007-11-30 17:04 ` Stefan Monnier
  2007-12-01  1:18   ` Johan Bockgård
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2007-11-30 17:04 UTC (permalink / raw)
  To: help-gnu-emacs

> How would one go about creating an overlay for every "..." ellipsis
> displayed in lieu of invisible portions of text?

> I'd like to get outline-minor-mode to allow me to click on the ellipses to
> show/hide the entry (the key bindings used in outline- 
> minor-mode are way too awkward).
> One can change the ellipsis itself:

> (set-display-table-slot standard-display-table
>                          'selective-display
>                          (string-to-vector "more..."))

> but this way one cannot add properties or overlays, since the display table
> contains character vectors.

The outline overlay (which adds the `invisible' property) could simply
have a `keymap' property (as well as a mouse-face property).

I think this currently wouldn't do anything, so please request it as
a new feature via M-x report-emacs-bug.


        Stefan

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

* Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?
  2007-11-30 17:04 ` Ellipsis "..." from outline-mode: how to react to mouse-1 events? Stefan Monnier
@ 2007-12-01  1:18   ` Johan Bockgård
  2007-12-01  4:19     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2007-12-01  1:18 UTC (permalink / raw)
  To: help-gnu-emacs

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

> The outline overlay (which adds the `invisible' property) could simply
> have a `keymap' property (as well as a mouse-face property).
>
> I think this currently wouldn't do anything

And do know what "this" refers to. Anyway, my tries seemed to indicate
that bindings for mouse buttons have no effect but that ordinary
keyboard keys work.

-- 
Johan Bockgård

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

* Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?
  2007-12-01  1:18   ` Johan Bockgård
@ 2007-12-01  4:19     ` Stefan Monnier
  2007-12-01 12:29       ` Johan Bockgård
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2007-12-01  4:19 UTC (permalink / raw)
  To: help-gnu-emacs

>> The outline overlay (which adds the `invisible' property) could simply
>> have a `keymap' property (as well as a mouse-face property).
>> 
>> I think this currently wouldn't do anything

> And do know what "this" refers to.

"this" refers to adding those two properties to outline-mode's overlays.

> Anyway, my tries seemed to indicate that bindings for mouse buttons
> have no effect but that ordinary keyboard keys work.

Oh, so you're saying that the `keymap' property is obeyed for keyboard
keys (on text replaced by an ellipsis)?  I didn't know.
I do know that it doesn't work for mouse events.


        Stefan

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

* Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?
  2007-12-01  4:19     ` Stefan Monnier
@ 2007-12-01 12:29       ` Johan Bockgård
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Bockgård @ 2007-12-01 12:29 UTC (permalink / raw)
  To: help-gnu-emacs

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

>>> The outline overlay (which adds the `invisible' property) could simply
>>> have a `keymap' property (as well as a mouse-face property).
>>> 
>>> I think this currently wouldn't do anything
>
>> And do know what "this" refers to.
>
> "this" refers to adding those two properties to outline-mode's overlays.

`mouse-face' certainly works.

>> Anyway, my tries seemed to indicate that bindings for mouse buttons
>> have no effect but that ordinary keyboard keys work.
>
> Oh, so you're saying that the `keymap' property is obeyed for keyboard
> keys (on text replaced by an ellipsis)?

Yes.

-- 
Johan Bockgård

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

end of thread, other threads:[~2007-12-01 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.4239.1196258357.18990.help-gnu-emacs@gnu.org>
2007-11-30 17:04 ` Ellipsis "..." from outline-mode: how to react to mouse-1 events? Stefan Monnier
2007-12-01  1:18   ` Johan Bockgård
2007-12-01  4:19     ` Stefan Monnier
2007-12-01 12:29       ` Johan Bockgård
2007-11-28 13:59 David Reitter

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.