emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Unexpected hiding of identical images


From: Kim F. Storm
Subject: Re: Unexpected hiding of identical images
Date: Sat, 23 Jul 2005 22:12:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Richard M. Stallman" <address@hidden> writes:

>     What is the problem of one vs. multiple chars?
>
> The issue is that there's no possibility of killing or yanking part of
> one character--so that case is easier.  The case of
> auto-image-file-mode is harder.

In the case of an image, it really doesn't matter much -

If you simply mark and copy the image, you will automatically
copy the entire propertized string -- there is no easy way to
just copy part of the string.

But even if you manage to just copy part of the string,
the full image is still inserted when you yank it back...

>
> Isn't auto-image-file-mode more or less obsolete now?  I wrote
> image-mode to replace it.  

Don't know....

>                            But image-mode probably has the same
> difficulty, as regards this issue.

I'll take a look.

>
>     Either it is put on a single character, e.g. by insert-image, or on
>     the full string representing the image data, e.g. by auto-image-file-mode.
>
> For full correctness, it needs to treat partial and complete yanks
> differently, perhaps somehow to recognize the complete text.
>
> Here's an idea.  Put one special property on the first character of
> the image, and another on the last character.  These should enable
> the yank handler to DTRT in all cases.

But what is TRT if the yank-handler only get a partial string to work on?


>
> What do you think?

With my latest change to auto-image-file-mode, ensuring that I put
unique yank-handlers as well as unique display properties on each
image, I think I've covered all practical cases. 

I'll look at adapting the change to image-mode too.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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