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 01:50:28 +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. ]]]
>
>     > Why not?  If the images are thought of as part of the buffer contents,
>
>     They most emphatically aren't.  Search and replace works on the
>     underlying text (invalidating the image when a replace happens),
>     incremental search works on the underlying text (temporarily removing
>     the image), saving saves the underlying text, all editing commands apply
>     to the underlying text.
>
> Could you explain to me why this is right?  I never used that feature,
> so I don't understand the context.

The text that is being edited is LaTeX source code.  preview-latex
displays previews of the edited material in the source buffer.  The
source are things like $\sum_{i=0}^\infty \frac{1}{i+i}$ that are easy
to enter and edit and somewhat cumbersome to read in context. Replacing
those fragments with the rendered images in the source code while the
particular corresponding source code is not being edited makes it easier
to peruse the mathematical meaning of the source while continuing to
compose further text and mathematics.

This is a visual aid, not something changing the text in any manner.
Like a tooltip, it has to get out of the way whenever you actually want
to do something to the source code of the text.

> No, I am not saying that.  I am saying something else:
>
>     > I'd expect it to be desirable that they follow text that is copied.
>     > If you kill text that contains some of these images of math
>     > and then yank  it back, shouldn't it come back with the images?
>
>     > This is what lead me to think of text properties first for this job.
>
> Since you say that is not the desired behavior, I'd like to understand
> why not.
>
> What is a scenario for editing the text that is under the image
> overlay,

Any editing at all.  The image is a visualization, you cannot edit that.
It is output, not input.

> and what is the right behavior?

The same as without preview-latex.  This is just like a document
previewer, only scattered over the corresponding input in order to save
place and concentration.  It's pointless for plain text: hopefully you
have selected a more readable font in your editor for that on a
low-contrast 100dpi color screen than some washed-out downsampling of a
font intended to look best printed with 1200dpi on a high-contrast
two-color output device.  But for stuff that becomes harder to follow
when looking at its source code rather than the rendered rendition, it's
helpful.

-- 
David Kastrup



reply via email to

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