unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68251: message-yank-buffer insert many copies of image
@ 2024-01-05  5:09 Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-05 12:09 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-05  5:09 UTC (permalink / raw)
  To: 68251

To reproduce:
- ~emacs -Q~
- Open an image in a buffer
- Create another buffer, call ~M-x message-mode~
- Run ~message-yank-buffer~, select the buffer with the image

Expected:

One image is inserted into the buffer.

Actual:

Many images are inserted into the buffer.

GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)





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

* bug#68251: message-yank-buffer insert many copies of image
  2024-01-05  5:09 bug#68251: message-yank-buffer insert many copies of image Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-05 12:09 ` Eli Zaretskii
  2024-01-05 15:58   ` Eli Zaretskii
  2024-01-05 16:22   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-05 12:09 UTC (permalink / raw)
  To: Joseph Turner; +Cc: 68251

> Date: Thu, 04 Jan 2024 21:09:23 -0800
> From:  Joseph Turner via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> To reproduce:
> - ~emacs -Q~
> - Open an image in a buffer
> - Create another buffer, call ~M-x message-mode~
> - Run ~message-yank-buffer~, select the buffer with the image
> 
> Expected:
> 
> One image is inserted into the buffer.
> 
> Actual:
> 
> Many images are inserted into the buffer.

It isn't specific to images: it happens with any 'display' property
that spans more than one text line.  message-yank-buffer looks at
buffer text and ignores the 'display' properties, so it inserts every
line after quoting it, and this you get as many copies of the
'display' property as there are newlines in the text covered by the
'display' property.





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

* bug#68251: message-yank-buffer insert many copies of image
  2024-01-05 12:09 ` Eli Zaretskii
@ 2024-01-05 15:58   ` Eli Zaretskii
  2024-01-05 16:24     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-05 16:22   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-05 15:58 UTC (permalink / raw)
  To: joseph; +Cc: 68251

> Cc: 68251@debbugs.gnu.org
> Date: Fri, 05 Jan 2024 14:09:37 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Date: Thu, 04 Jan 2024 21:09:23 -0800
> > From:  Joseph Turner via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> > 
> > To reproduce:
> > - ~emacs -Q~
> > - Open an image in a buffer
> > - Create another buffer, call ~M-x message-mode~
> > - Run ~message-yank-buffer~, select the buffer with the image
> > 
> > Expected:
> > 
> > One image is inserted into the buffer.
> > 
> > Actual:
> > 
> > Many images are inserted into the buffer.
> 
> It isn't specific to images: it happens with any 'display' property
> that spans more than one text line.  message-yank-buffer looks at
> buffer text and ignores the 'display' properties, so it inserts every
> line after quoting it, and this you get as many copies of the
> 'display' property as there are newlines in the text covered by the
> 'display' property.

Btw: how is it useful to yank images into an email message?  What do
you expect Emacs to send when the email with these citations is sent?

To DTRT here Emacs would need to produce a MIME attachment with the
image, won't it?





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

* bug#68251: message-yank-buffer insert many copies of image
  2024-01-05 12:09 ` Eli Zaretskii
  2024-01-05 15:58   ` Eli Zaretskii
@ 2024-01-05 16:22   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 6+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-05 16:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 68251-done

Happy New Year, Eli!

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 04 Jan 2024 21:09:23 -0800
>> From:  Joseph Turner via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> To reproduce:
>> - ~emacs -Q~
>> - Open an image in a buffer
>> - Create another buffer, call ~M-x message-mode~
>> - Run ~message-yank-buffer~, select the buffer with the image
>>
>> Expected:
>>
>> One image is inserted into the buffer.
>>
>> Actual:
>>
>> Many images are inserted into the buffer.
>
> It isn't specific to images: it happens with any 'display' property
> that spans more than one text line.  message-yank-buffer looks at
> buffer text and ignores the 'display' properties, so it inserts every
> line after quoting it, and this you get as many copies of the
> 'display' property as there are newlines in the text covered by the
> 'display' property.

Thank you for explaining what's going on!  Closing now.





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

* bug#68251: message-yank-buffer insert many copies of image
  2024-01-05 15:58   ` Eli Zaretskii
@ 2024-01-05 16:24     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-05 16:35       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-05 16:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 68251

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 68251@debbugs.gnu.org
>> Date: Fri, 05 Jan 2024 14:09:37 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>> > Date: Thu, 04 Jan 2024 21:09:23 -0800
>> > From:  Joseph Turner via "Bug reports for GNU Emacs,
>> >  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> >
>> > To reproduce:
>> > - ~emacs -Q~
>> > - Open an image in a buffer
>> > - Create another buffer, call ~M-x message-mode~
>> > - Run ~message-yank-buffer~, select the buffer with the image
>> >
>> > Expected:
>> >
>> > One image is inserted into the buffer.
>> >
>> > Actual:
>> >
>> > Many images are inserted into the buffer.
>>
>> It isn't specific to images: it happens with any 'display' property
>> that spans more than one text line.  message-yank-buffer looks at
>> buffer text and ignores the 'display' properties, so it inserts every
>> line after quoting it, and this you get as many copies of the
>> 'display' property as there are newlines in the text covered by the
>> 'display' property.
>
> Btw: how is it useful to yank images into an email message?  What do
> you expect Emacs to send when the email with these citations is sent?
>
> To DTRT here Emacs would need to produce a MIME attachment with the
> image, won't it?

Yes, you're right.  I had wishful thinking for a WYSIWYG flow where
message-yank-buffer would insert an inline MIME attachment, and
message-mode would display it inline.






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

* bug#68251: message-yank-buffer insert many copies of image
  2024-01-05 16:24     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-05 16:35       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-05 16:35 UTC (permalink / raw)
  To: Joseph Turner; +Cc: 68251

> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: 68251@debbugs.gnu.org
> Date: Fri, 05 Jan 2024 08:24:18 -0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Btw: how is it useful to yank images into an email message?  What do
> > you expect Emacs to send when the email with these citations is sent?
> >
> > To DTRT here Emacs would need to produce a MIME attachment with the
> > image, won't it?
> 
> Yes, you're right.  I had wishful thinking for a WYSIWYG flow where
> message-yank-buffer would insert an inline MIME attachment, and
> message-mode would display it inline.

That'd probably be a valid feature request.





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

end of thread, other threads:[~2024-01-05 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05  5:09 bug#68251: message-yank-buffer insert many copies of image Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 12:09 ` Eli Zaretskii
2024-01-05 15:58   ` Eli Zaretskii
2024-01-05 16:24     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 16:35       ` Eli Zaretskii
2024-01-05 16:22   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).