* master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files
@ 2020-08-21 19:47 Eli Zaretskii
2020-08-21 20:07 ` Stefan Monnier
2020-08-22 13:43 ` Lars Ingebrigtsen
0 siblings, 2 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-08-21 19:47 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> --- a/lisp/gnus/nndoc.el
> +++ b/lisp/gnus/nndoc.el
> @@ -352,6 +352,7 @@ from the document.")
> nndoc-group-alist)
> (setq nndoc-dissection-alist nil)
> (with-current-buffer nndoc-current-buffer
> + (set-buffer-multibyte nil)
> (erase-buffer)
> (condition-case error
> (if (and (stringp nndoc-address)
>
I think you want to swap the order: first erase-buffer, and then
set-buffer-multibyte. That's because the latter in a non-empty buffer
can be expensive, and tis actually waste of cycles if you are going to
erase the buffer.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files
2020-08-21 19:47 master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files Eli Zaretskii
@ 2020-08-21 20:07 ` Stefan Monnier
2020-08-22 13:43 ` Lars Ingebrigtsen
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2020-08-21 20:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, emacs-devel
> I think you want to swap the order: first erase-buffer, and then
> set-buffer-multibyte. That's because the latter in a non-empty buffer
> can be expensive, and tis actually waste of cycles if you are going to
> erase the buffer.
Indeed, IMNSHO `set-buffer-multibyte` should signal an error when the
buffer is not empty ;-)
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files
2020-08-21 19:47 master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files Eli Zaretskii
2020-08-21 20:07 ` Stefan Monnier
@ 2020-08-22 13:43 ` Lars Ingebrigtsen
1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-22 13:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> I think you want to swap the order: first erase-buffer, and then
> set-buffer-multibyte. That's because the latter in a non-empty buffer
> can be expensive, and tis actually waste of cycles if you are going to
> erase the buffer.
Yup, I've now done this. Looking at the code, it looks like a possibly
offensive case of defensive programming -- that buffer will be empty
when the `erase-buffer' is called, I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-22 13:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-21 19:47 master 9d0385d: Fix problem with 8bit content-transfer-encoding in nndoc mbox files Eli Zaretskii
2020-08-21 20:07 ` Stefan Monnier
2020-08-22 13:43 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.