emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invisible text and navigation commands


From: Robert Weiner
Subject: Re: invisible text and navigation commands
Date: Mon, 2 Oct 2017 09:50:20 -0400

On Sun, Oct 1, 2017 at 3:21 PM, Paul Pogonyshev <address@hidden> wrote:
Hi,

My mode implements filtering in a read-only buffer by attaching `invisible' property to text chunks and then modifying `buffer-invsibility-spec' variable. This way I can hide/show large pieces of text pretty much instantly and without modifying anything. However, I noticed that commands like M-f etc. still "see through" the hidden text and will stop at points where something is hidden.

​If you use Emacs outline-mode or the GNU Hyperbole package's Koutliner mode, you'll see they both move past invisible *lines* of text all at once.  Each Emacs buffer contains a buffer-display-table with a display-table slot that handles invisible lines.  See the doc. for buffer-display-table.​

​​
Question: is it somehow possible to make M-f and so on (of course, for interactive use only) ignore invisible text completely, as if it was not there at all? If not, could such a feature be implemented in future?
​​
​​If you want this to work for invisible fields rather than lines, I think you'll have to write your own mode which overlays all the movement commands.  Hyperbole's Koutline mode does this too, so you can use that as an example, see:


It is involved to get this right.

Bob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]