emacs-devel
[Top][All Lists]
Advanced

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

Re: Overlay mechanic improvements


From: David Kastrup
Subject: Re: Overlay mechanic improvements
Date: Tue, 23 Sep 2014 21:27:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>     The whole point is to work with an editable source and have the images
>     as a transient view.  In order to make movement unsurprising, only some
>     movement commands (like cursor left/right) will actually disable the
>     move-out-of-images-in-the-main-loop behavior of Emacs in order to "open"
>     images and display the source: most commands will avoid the inside of
>     images in the way Emacs usually does.
>
> What is the _desired_ behavior when the user edits text that corresponds
> to an image?  Should the image disappear?

Editing involves making the image disappear anyway since otherwise you
don't have the text for editing visible (either one or the other is
displayed).  There are exceptions, like when typing C-d with the cursor
on an image.  In that case, the first character of the underlying text
will get deleted and, since the overlay content no longer corresponds to
the image, the image will get undisplayed and the source text (with the
first character already deleted) will reappear.

When the text corresponding to an image is displayed, the image itself
is not visible.  Instead the text is marked in a recognizable color and
it is preceded by a clickable icon with a generic "image" look.  Once
you finished editing, you can click that icon, the image will get
regenerated from the text covered by the overlay and will again replace
it in the source view.  Or you can use key sequences for regeneration.
Or just let the text be text and edit other things.  The overlays stick
around unless explicitly removed in order to make it easier to
regenerate an image based on exactly the region covered by the overlay.

It's not that hard to try that out yourself if you have LaTeX installed
on your system and some files preferably using mathematics written in
it.  Just use ELPA to install AUCTeX, open a LaTeX file, and use the
Preview menu (should be available by default when AUCTeX is installed
via ELPA, I think).

-- 
David Kastrup



reply via email to

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