GNU bug report logs -
#75415
31.0.50; quoted-printable-en/decode-region doesn't preserve end markers
Previous Next
To reply to this bug, email your comments to 75415 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#75415
; Package
emacs
.
(Tue, 07 Jan 2025 04:25:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Tue, 07 Jan 2025 04:25:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: Emacs
Version: 31.0.50
In a fresh Emacs try:
(with-temp-buffer
(set-buffer-multibyte nil)
(insert "\300\300")
(encode-coding-region (point-min) (point) 'utf-8)
(quoted-printable-encode-region (point-min) (point))
(insert "!!")
(buffer-string))
It will likely return "=C0!!=C0" whereas it should return "=C0=C0!!".
Found via a bug in VM: https://gitlab.com/emacs-vm/vm/-/issues/491
The same problem plagues `quoted-printable-decode-region`.
I think we really need to introduce a `replace-region` primitive which
takes care of preserving the position of markers instead of having to teach
ELisp coders the delicate art of combining `insert(-before-markers)` and
`delete` to best preserve markers.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75415
; Package
emacs
.
(Tue, 07 Jan 2025 19:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 75415 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> I think we really need to introduce a `replace-region` primitive which
> takes care of preserving the position of markers instead of having to teach
> ELisp coders the delicate art of combining `insert(-before-markers)` and
> `delete` to best preserve markers.
Sounds good to me, but would this deserve a separate bug report?
This bug report was last modified 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.