GNU bug report logs - #38818
Dired: mention deleting buffers, not just windows

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 30 Dec 2019 16:45:02 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38818 in the body.
You can then email your comments to 38818 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 30 Dec 2019 16:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Dec 2019 16:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 00:09:08 +0800
At (info "(emacs) Dired Enter")

   Typing ‘q’ (‘quit-window’) buries the Dired buffer, and deletes its
   window if the window was created just for that buffer.

Add:

  To delete the buffer instead of just burying it, type "1 q".

  To make deleting the buffer the default instead of burying it, use
  (setq ... ...)

  Users might find this helps keeping their buffer-list free of old
  dired buffers crowding.

emacs-version "26.3"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 30 Dec 2019 17:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 30 Dec 2019 18:53:18 +0100
> At (info "(emacs) Dired Enter")
>
>     Typing ‘q’ (‘quit-window’) buries the Dired buffer, and deletes its
>     window if the window was created just for that buffer.
>
> Add:
>
>    To delete the buffer instead of just burying it, type "1 q".

We can add that typing "q" with a prefix argument will kill the
buffer, but I'm afraid we have no facility supplying ...

>    To make deleting the buffer the default instead of burying it, use
>    (setq ... ...)

... that.

>    Users might find this helps keeping their buffer-list free of old
>    dired buffers crowding.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 30 Dec 2019 18:12:01 GMT) Full text and rfc822 format available.

Message #11 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 02:11:31 +0800
>>>>> "mr" == martin rudalics <rudalics <at> gmx.at> writes:
>> At (info "(emacs) Dired Enter")
>> 
>> Typing ‘q’ (‘quit-window’) buries the Dired buffer, and deletes its
>> window if the window was created just for that buffer.
>> 
>> Add:
>> 
>> To delete the buffer instead of just burying it, type "1 q".

mr> We can add that typing "q" with a prefix argument will kill the
mr> buffer,

Yes please do. As in (info "(elisp) Quitting Windows"). Which you might
as well add a link to...

mr> but I'm afraid we have no facility supplying ...

>> To make deleting the buffer the default instead of burying it, use
>> (setq ... ...)

mr> ... that.

OK, but there really should be a way. Else heavy dired users commonly
end up with plenty of old buffers by the end of the day.

(Note that if they toggled the default to now kill, instead of burying
the buffer, they would need a way to make an exception. E.g., the argument
would then instead bury, not kill.)

(Also let's say they have one or two dired buffers they really do want
to keep around, despite their "q" hitting habit.

Well then perhaps there should be a "dired-mark-this-buffer-as-q-kill-proof"
command... Or maybe even a regexp list that the user can put in their
.emacs file.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Tue, 31 Dec 2019 08:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 08:59:54 +0100
> mr> but I'm afraid we have no facility supplying ...
>
>>> To make deleting the buffer the default instead of burying it, use
>>> (setq ... ...)
>
> mr> ... that.
>
> OK, but there really should be a way. Else heavy dired users commonly
> end up with plenty of old buffers by the end of the day.

Since this is about 'quit-window' we would have to decide what to do
with non-dired buffers (*Backtrace*, for example).  Kill them as well?
Provide a separate function 'dired-quit'?

> (Note that if they toggled the default to now kill, instead of burying
> the buffer, they would need a way to make an exception. E.g., the argument
> would then instead bury, not kill.)
>
> (Also let's say they have one or two dired buffers they really do want
> to keep around, despite their "q" hitting habit.
>
> Well then perhaps there should be a "dired-mark-this-buffer-as-q-kill-proof"
> command... Or maybe even a regexp list that the user can put in their
> .emacs file.)

I don't use dired so I can't tell.  But we could add a buffer-local
variable say 'quit-window-kill-buffer' that would tell for that buffer
what to do whenever quitting a window that shows it: The values being
'auto-kill' (always kill it automatically), 'survive' (don't kill it
even when 'quit-window' was called with a prefix argument) and nil to
do what it does now.  The question remains how to set that variable
conveniently.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Tue, 31 Dec 2019 17:35:01 GMT) Full text and rfc822 format available.

Message #17 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 18:33:59 +0100
Hi Dan,

doesn't `kill-buffer-and-window' (C-x 4 0) already do what you want?

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 02:15:02 GMT) Full text and rfc822 format available.

Message #20 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 10:14:04 +0800
>>>>> "MH" == Michael Heerdegen <michael_heerdegen <at> web.de> writes:

MH> doesn't `kill-buffer-and-window' (C-x 4 0) already do what you want?

Actually
 C-x k runs the command kill-buffer
is good enough perhaps.

Anyway the user, in dired, uses lots of v's and q's, to browse a tree.
The v's go in, and the q's go out.
After the day is finished, the files are all gone from the buffer list,
but the directories all remain.

So q when in a directory should do the same as q in (file) view mode,
which is View-quit.

So the
  q runs the command quit-window (found in dired-mode-map)
in dired-mode-map is the culprit.

So quit-window doesn't need to be changed at all. Instead q in
dired-mode-map needs a new binding.

OK, in dired, M-x View-quit does nothing. Makes sense, we are not in view-mode.

So dired's q should be mapped to kill-buffer instead... (Except
kill-buffer asks the user which buffer. So a new function is needed,
with no asking.)

Anyway this all could be controlled by a new variable:

dired-keep-directorys-around-upon-quitting-it

t: current behaviour (bury buffer)
nil: kill buffer
ask: ask upon each q what to do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 02:48:02 GMT) Full text and rfc822 format available.

Message #23 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 03:47:21 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> Anyway this all could be controlled by a new variable:

The default should be the current behavior, to avoid that users lose
marks by accident.  Also, there could be a prompt if there are any marks
in the buffer.

But... if the default is the same as now, you would not gain any advantage,
since you can already change the key binding without much effort.

I also don't see a discontinuity in the interface because unlike buffers
in view-mode, dired buffers can be edited, and killing them by accident
can be problematic, so it's per se ok for q not just to kill them.  But
I see the annoyance of tons of unneeded dired buffers lying around,
too.  Maybe asking for confirmation when a buffer has been edited by the
user would be a good idea.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 03:08:01 GMT) Full text and rfc822 format available.

Message #26 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 11:07:22 +0800
Yup, confirmation when edited or marks sounds good.

Otherwise if the user really wanted to keep the buffer around, he could
just do C-x C-b to switch to another buffer.

Wait, looking at C-h b,

i		dired-maybe-insert-subdir
j		dired-goto-file
k		dired-do-kill-lines
l		dired-do-redisplay
m		dired-mark
n		dired-next-line
o		dired-find-file-other-window
p		dired-previous-line
q		quit-window
s		dired-sort-toggle-or-edit
t		dired-toggle-marks
u		dired-unmark
v		dired-view-file
w		dired-copy-filename-as-kill
x		dired-do-flagged-delete
y		dired-show-file-type

So we "see" the problem is caused by just reusing quit-window instead of a
more tailored dired command...

One also notices
  dired-clean-up-buffers-too is a variable defined in ‘dired-x.el’.

So previously people had been working on related problems, but never got
around to all the left over directories.

MH> But... if the default is the same as now, you would not gain any advantage,
MH> since you can already change the key binding without much effort.

Actually I don't know how to bind kill-buffer to q and not have it still
ask me which buffer, but just kill it (marks and all, for now I guess.)
I'm not a lisp wiz.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 03:46:01 GMT) Full text and rfc822 format available.

Message #29 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 04:45:30 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> One also notices
>   dired-clean-up-buffers-too is a variable defined in ‘dired-x.el’.
>
> So previously people had been working on related problems, but never got
> around to all the left over directories.

But that's not very related: AFAIK that means that if you have a buffer
visiting a file, and you kill that file in dired, Emacs asks whether to
kill the associated, and now obsolete, file buffer.  The analogue would
be to kill a dired buffer when you deleted its directory.

> Actually I don't know how to bind kill-buffer to q and not have it still
> ask me which buffer, but just kill it (marks and all, for now I guess.)
> I'm not a lisp wiz.

Does `kill-current-buffer' or `kill-buffer-and-window' (aka C-x 4 0) do
what you want?

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 04:00:02 GMT) Full text and rfc822 format available.

Message #32 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 11:59:40 +0800
OK, I'll use
(add-hook
 'dired-load-hook
 (function
  (lambda ()
    (load "dired-x")
    (define-key dired-mode-map "q" 'kill-current-buffer)
    )))
until something more fancy is invented.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 04:54:02 GMT) Full text and rfc822 format available.

Message #35 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 05:53:43 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> OK, I'll use
> (add-hook
>  'dired-load-hook
>  (function
>   (lambda ()
>     (load "dired-x")
>     (define-key dired-mode-map "q" 'kill-current-buffer)
>     )))
> until something more fancy is invented.

Slightly better version:

(add-hook
 'dired-load-hook
 (defun my-dired-load-hook-fun ()
   (require 'dired-x)
   (define-key dired-mode-map "q" #'kill-current-buffer)))

-- a named function can't accidentally be added multiple times to a
hook, lambda already self-quotes, and `require' doesn't unnecessarily
reload a file.

BTW, the q binding in dired-mode-map originates from special-mode-map
from which dired-mode-map inherits.  These are all bindings that it inherits:

SPC		scroll-up-command
-		negative-argument
0 .. 9		digit-argument
<		beginning-of-buffer
>		end-of-buffer
?		describe-mode
g		revert-buffer
h		describe-mode
q		quit-window
DEL		scroll-down-command
S-SPC		scroll-down-command
<remap>		Prefix Command

So the q binding is somewhat standard, and other modes may share your
problem.

Ok, I can't help further, I don't want to propose a solution.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 05:12:02 GMT) Full text and rfc822 format available.

Message #38 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 13:11:15 +0800
>> (add-hook
>> 'dired-load-hook
>> (function
>> (lambda ()
>> (load "dired-x")
>> (define-key dired-mode-map "q" 'kill-current-buffer)
>> )))

>>>>> "MH" == Michael Heerdegen <michael_heerdegen <at> web.de> writes:

MH> Slightly better version:

MH> (add-hook
MH>  'dired-load-hook
MH>  (defun my-dired-load-hook-fun ()
MH>    (require 'dired-x)
MH>    (define-key dired-mode-map "q" #'kill-current-buffer)))

MH> -- a named function can't accidentally be added multiple times to a
MH> hook, lambda already self-quotes, and `require' doesn't unnecessarily
MH> reload a file.

OK!
(info "(emacs) Hooks") just mentions the old fashioned way.
Maybe someone should update it.
OK maybe it is intentionally still full of those lambdas, for small jobs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 05:32:01 GMT) Full text and rfc822 format available.

Message #41 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 06:31:47 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> (info "(emacs) Hooks") just mentions the old fashioned way.
> Maybe someone should update it.
> OK maybe it is intentionally still full of those lambdas, for small jobs.

Using lambdas should be ok most of the time.  But there's a certain risk
of unintentionally having two copies of a function in a hook when the
code is executed multiple times, e.g. if you load your init file twice,
once compiled, and once the lisp source, because `add-hook' then can't
know that it's the same function.  Most of the time even this has no
visible effect, but when it has, it can be surprising and finding the
cause can be hard, so I try to just avoid adding lambdas to hooks in my
init file.

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 06:48:02 GMT) Full text and rfc822 format available.

Message #44 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: RE: bug#38818: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 22:47:24 -0800 (PST)
> But I see the annoyance of tons of unneeded dired buffers lying around,
> too.

`C-x C-v' prevents that.

---

Also, with Dired+ you can use `C-M-R' to toggle
reusing Dired buffers (instead of accumulating
them).  `RET' and `^' then automatically do what
`C-x C-v': replace the previous Dired buffer
with the new one.

It's a toggle because you can easily want to
sometimes keep Dired buffers by default and
sometimes want to replace them by default,
depending on what you're doing.

When keeping by default you can always use
`C-x C-v' to replace occasionally.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 06:55:02 GMT) Full text and rfc822 format available.

Message #47 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: RE: bug#38818: Dired: mention deleting buffers, not just windows
Date: Tue, 31 Dec 2019 22:53:22 -0800 (PST)
> Using lambdas should be ok most of the time.  But there's a certain
> risk
> of unintentionally having two copies of a function in a hook when the
> code is executed multiple times, e.g. if you load your init file twice,
> once compiled, and once the lisp source, because `add-hook' then can't
> know that it's the same function.  Most of the time even this has no
> visible effect, but when it has, it can be surprising and finding the
> cause can be hard, so I try to just avoid adding lambdas to hooks in my
> init file.

Also, if you're testing stuff and you add a lambda
form to a hook, and later you want to remove it,
you need to use exactly the same text - same
whitespace, everything.  The lambda form is taken,
in effect, as text, and it looks for an exact
textual match.

It's very good to get in the habit of not using
lambdas on hooks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 14:40:02 GMT) Full text and rfc822 format available.

Message #50 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 09:38:59 -0500
Drew Adams <drew.adams <at> oracle.com> writes:

> you need to use exactly the same text - same
> whitespace, everything.  The lambda form is taken,
> in effect, as text, and it looks for an exact
> textual match.

No, it's compared as a Lisp object with `equal', whitespace is not
significant.  If the lambda form is uncompiled then it's a list, if it's
compiled then it will be bytecode function object.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 17:25:02 GMT) Full text and rfc822 format available.

Message #53 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 38818 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 17:46:52 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Slightly better version:
>
> (add-hook
>  'dired-load-hook
>  (defun my-dired-load-hook-fun ()
>    (require 'dired-x)
>    (define-key dired-mode-map "q" #'kill-current-buffer)))

The documentation of defun says that its result is undefined. So either
it should not be relied upon, or (if the result is reliably the defined
function) it should be documented as such.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 01 Jan 2020 23:19:01 GMT) Full text and rfc822 format available.

Message #56 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 01 Jan 2020 18:18:44 -0500
[[[ 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. ]]]

How about this addition?

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 7354eb1..b52871e 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -135,13 +135,26 @@ non-@code{nil} value, it returns that value; otherwise it returns
 @node Setting Hooks
 @subsection Setting Hooks
 
-  Here's an example that uses a mode hook to turn on Auto Fill mode when
-in Lisp Interaction mode:
+  Here's an example that adds a funtion to a mode hook to turn
+on Auto Fill mode when in Lisp Interaction mode:
 
 @example
 (add-hook 'lisp-interaction-mode-hook 'auto-fill-mode)
 @end example
 
+  The value of a hook variable should be a list of functions.  You can
+manipulate that list using the normal Lisp facilities, but the modular
+way is to use the functions @code{add-hook} and @code{remove-hook},
+defined below.  They take care to handle some unusual situations and
+avoid problems.
+
+  It works to put a @code{lambda}-expression function on a hook, but
+we recommend avoiding this because it can lead to confusion.  If you
+add the same @code{lambda}-expression a second time but write it
+slightly differently, you will get two equivalent but distinct
+functions on the hook.  If you then remove one of them, the other will
+still be on it.
+
 @defun add-hook hook function &optional depth local
 This function is the handy way to add function @var{function} to hook
 variable @var{hook}.  You can use it for abnormal hooks as well as for

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Thu, 02 Jan 2020 03:32:02 GMT) Full text and rfc822 format available.

Message #59 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: rms <at> gnu.org
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: RE: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 1 Jan 2020 19:29:50 -0800 (PST)
> How about this addition?

LGTM.

> +  It works to put a @code{lambda}-expression function on a hook, but
> +we recommend avoiding this because it can lead to confusion.  If you
> +add the same @code{lambda}-expression a second time but write it
> +slightly differently, you will get two equivalent but distinct
> +functions on the hook.  If you then remove one of them, the other will
> +still be on it.

But see Noam's reply to my message.

Given that, we might want to describe better
how two lambda forms that you might think
represent the same function can be considered
different in this context.

(I know I've been bitten by that, in particular
not recalling exactly how I wrote a lambda form
that I added, when I later wanted to remove it,
and not bothering to check its form on the hook.
But I'm sure Noam is right in what he says.)

Alternatively, maybe the language should just
be vague enough to skirt the conditions that
can treat two seemingly "equal" anonymous
functions as different.  IOW, that's not really
the point here, which is just to tell users that
they probably want to use named functions on hooks.

Your "because it can lead to confusion" is maybe
sufficient, here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Thu, 02 Jan 2020 04:15:02 GMT) Full text and rfc822 format available.

Message #62 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: 38818 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Thu, 02 Jan 2020 05:14:15 +0100
Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:

> > Slightly better version:
> >
> > (add-hook
> >  'dired-load-hook
> >  (defun my-dired-load-hook-fun ()
> >    (require 'dired-x)
> >    (define-key dired-mode-map "q" #'kill-current-buffer)))
>
> The documentation of defun says that its result is undefined. So either
> it should not be relied upon, or (if the result is reliably the defined
> function) it should be documented as such.

Indeed: the return value of `defun' even changed recently (from
returning the definition to returning the defined symbol).  Same for
defalias.

I think I'll file another bug report: adding user defined functions to
hooks not only has the common pitfall which is not warned about - the
alternative, using named functions, is also quite inconvenient since
defun's return value is unspecified.  I guess most users currently do it
wrong.  Or do I miss something?


Thanks,

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Thu, 02 Jan 2020 22:00:02 GMT) Full text and rfc822 format available.

Message #65 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Thu, 02 Jan 2020 16:59:13 -0500
[[[ 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. ]]]

  > Given that, we might want to describe better
  > how two lambda forms that you might think
  > represent the same function can be considered
  > different in this context.

It seems clear to me, but I don't insist on the wording I suggested.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Fri, 03 Jan 2020 15:11:02 GMT) Full text and rfc822 format available.

Message #68 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Fri, 03 Jan 2020 23:10:09 +0800
>>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
PvO> Michael Heerdegen <michael_heerdegen <at> web.de> writes:

>> Slightly better version:
>> 
>> (add-hook
>> 'dired-load-hook
>> (defun my-dired-load-hook-fun ()
>> (require 'dired-x)
>> (define-key dired-mode-map "q" #'kill-current-buffer)))

PvO> The documentation of defun says that its result is undefined. So either
PvO> it should not be relied upon, or (if the result is reliably the defined
PvO> function) it should be documented as such.

OK. So what is the best way I should write it for my .emacs file? Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Fri, 03 Jan 2020 23:19:01 GMT) Full text and rfc822 format available.

Message #71 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 00:18:39 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

>>>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
> PvO> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
>>> Slightly better version:
>>> 
>>> (add-hook
>>> 'dired-load-hook
>>> (defun my-dired-load-hook-fun ()
>>> (require 'dired-x)
>>> (define-key dired-mode-map "q" #'kill-current-buffer)))
>
> PvO> The documentation of defun says that its result is undefined. So either
> PvO> it should not be relied upon, or (if the result is reliably the defined
> PvO> function) it should be documented as such.
>
> OK. So what is the best way I should write it for my .emacs file? Thanks.

Well, this is how I do it.

(defun my-dired-load-hook-fun ()
       (require 'dired-x)
       (define-key dired-mode-map "q" #'kill-current-buffer))

(add-hook 'dired-load-hook 'my-dired-load-hook-fun)

-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Fri, 03 Jan 2020 23:32:01 GMT) Full text and rfc822 format available.

Message #74 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 07:31:22 +0800
>>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
PvO> Well, this is how I do it.

PvO> (defun my-dired-load-hook-fun ()
PvO>        (require 'dired-x)
PvO>        (define-key dired-mode-map "q" #'kill-current-buffer))

PvO> (add-hook 'dired-load-hook 'my-dired-load-hook-fun)

OK, but this does not seem environmentally friendly, leaving a function
(that I hereby promise not to use a second time,) lying around.

Well I guess I could undefun it... But one never can find out how (Bug!:
(info "(eintr) Change a defun") etc. Info pages never say how!)
Plus seems a little bulky to do a defun ... undefun each time in a
.emacs file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Fri, 03 Jan 2020 23:52:01 GMT) Full text and rfc822 format available.

Message #77 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 00:51:03 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

>>>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
> PvO> Well, this is how I do it.
>
> PvO> (defun my-dired-load-hook-fun ()
> PvO>        (require 'dired-x)
> PvO>        (define-key dired-mode-map "q" #'kill-current-buffer))
>
> PvO> (add-hook 'dired-load-hook 'my-dired-load-hook-fun)
>
> OK, but this does not seem environmentally friendly, leaving a function
> (that I hereby promise not to use a second time,) lying around.
>
> Well I guess I could undefun it... But one never can find out how (Bug!:
> (info "(eintr) Change a defun") etc. Info pages never say how!)
> Plus seems a little bulky to do a defun ... undefun each time in a
> .emacs file.

Your version does that too, if the defun semantics would be what you expected. It leaves exactly the same function in the name space. If you don't want that then use the lambda form. But you said your version was better. Why then if you want the function to be anonymous?
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 00:14:02 GMT) Full text and rfc822 format available.

Message #80 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 08:13:45 +0800
OK I'll go back to the lambda way I had in
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-01/msg00000.html

OK can find lots of "defun" documentation, but it never mentions how to
undefine one. For that one needs a web search
https://www.google.com/search?q=emacs+undefine+a+function




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 06:18:01 GMT) Full text and rfc822 format available.

Message #83 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Pieter van Oostrum <pieter-l <at> vanoostrum.org>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 07:16:53 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> >>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
> PvO> Well, this is how I do it.
>
> PvO> (defun my-dired-load-hook-fun ()
> PvO>        (require 'dired-x)
> PvO>        (define-key dired-mode-map "q" #'kill-current-buffer))
>
> PvO> (add-hook 'dired-load-hook 'my-dired-load-hook-fun)
>
> OK, but this does not seem environmentally friendly, leaving a function
> (that I hereby promise not to use a second time,) lying around.

Your lambda will also keep lying around.  The name "dired-load-hook"
will keep lying around.

And: for most of the hooks you want to add stuff to you probably can't
be sure that it won't be run more than once.  Undefining cries for
errors.  It's also not necessary, those few additional names hardly make
a difference.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 13:27:01 GMT) Full text and rfc822 format available.

Message #86 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 martin rudalics <rudalics <at> gmx.at>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 08:26:10 -0500
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> OK, I'll use
> (add-hook
>  'dired-load-hook
>  (function
>   (lambda ()
>     (load "dired-x")
>     (define-key dired-mode-map "q" 'kill-current-buffer)
>     )))
> until something more fancy is invented.

With regards to all the subsequent lambda vs defun stuff, you could also
use with-eval-after-load instead of dired-load-hook:

(with-eval-after-load 'dired
  (require 'dired-x)
  (define-key dired-mode-map "q" 'kill-current-buffer))

Actually, this does also use a lambda behind the scenes and has similar
drawbacks, but for some reason it doesn't seem to bother people as much.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 13:58:01 GMT) Full text and rfc822 format available.

Message #89 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 38818 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 14:57:38 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
>
>> >>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> writes:
>> PvO> Well, this is how I do it.
>>
>> PvO> (defun my-dired-load-hook-fun ()
>> PvO>        (require 'dired-x)
>> PvO>        (define-key dired-mode-map "q" #'kill-current-buffer))
>>
>> PvO> (add-hook 'dired-load-hook 'my-dired-load-hook-fun)
>>
>> OK, but this does not seem environmentally friendly, leaving a function
>> (that I hereby promise not to use a second time,) lying around.
>
> Your lambda will also keep lying around.  The name "dired-load-hook"
> will keep lying around.

Yes, of course, I want that.

> And: for most of the hooks you want to add stuff to you probably can't
> be sure that it won't be run more than once.  Undefining cries for
> errors.  It's also not necessary, those few additional names hardly make
> a difference.

For me it doesn't. It was Dan who complained about that.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 13:59:02 GMT) Full text and rfc822 format available.

Message #92 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 14:58:32 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> OK I'll go back to the lambda way I had in
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-01/msg00000.html

You can make it a bit simpler by eliminating the (function ... ) around the lambda.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 04 Jan 2020 23:50:02 GMT) Full text and rfc822 format available.

Message #95 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: 積丹尼 Dan Jacobson
 <jidanni <at> jidanni.org>
Cc: michael_heerdegen <at> web.de, pieter-l <at> vanoostrum.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 18:48:59 -0500
[[[ 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. ]]]

  > OK can find lots of "defun" documentation, but it never mentions how to
  > undefine one.

Would you please say precisely where you found that "defun" documentation?
Then we could think about whether to add something there.

In the Lisp Reference manual, defun is described in
node Defining Functions.  We could add an xref to the node
Function Cells about this.


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 07:40:01 GMT) Full text and rfc822 format available.

Message #98 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Richard Stallman <rms <at> gnu.org>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org,
 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 08:39:24 +0100
Richard Stallman <rms <at> gnu.org> 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. ]]]
>
>   > OK can find lots of "defun" documentation, but it never mentions how to
>   > undefine one.
>
> Would you please say precisely where you found that "defun" documentation?
> Then we could think about whether to add something there.

C-h f defun

> In the Lisp Reference manual, defun is described in
> node Defining Functions.  We could add an xref to the node
> Function Cells about this.
>

-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 08:07:02 GMT) Full text and rfc822 format available.

Message #101 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Richard Stallman <rms <at> gnu.org>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org,
 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 09:06:48 +0100
And, by the way, that message arrived here with the CJK characters in Dan Jacobson's name mangled. Whereas the normally are 積丹尼, they now are <some unprintable characters>, and message-send-mail crashes on it.

Debugger entered--Lisp error: (cl-assertion-failed ((save-excursion (goto-char (point-min)) (not (re-search-forward "[^\0-\377]" nil t))) nil))
  cl--assertion-failed((save-excursion (goto-char (point-min)) (not (re-search-forward "[^\0-\377]" nil t))))
  message-send-mail(nil)
  message-send-via-mail(nil)

The raw header is:

To: =?iso-8859-1?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson
 <jidanni <at> jidanni.org>
which translates to unprintable characters, which cause this error.
Normally it would be
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson
so it seems to be a mixup of encodings on RMS's side.

When these unprintable characters re in the message body, you get an error message with a choice:

Non-printable characters found.  Continue sending? (delete, replace, send, edit, ?):

but when they are in the header it just bails out with an uncomprehensible error
cl--assertion-failed: Assertion failed: (save-excursion (goto-char (point-min)) (not (re-search-forward "[^.-ÿ]" nil t)))
which isn't helpful at all.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 15:33:01 GMT) Full text and rfc822 format available.

Message #104 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, rms <at> gnu.org,
 jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 17:31:59 +0200
> From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
> Date: Sun, 05 Jan 2020 09:06:48 +0100
> Cc: michael_heerdegen <at> web.de, Dan Jacobson <jidanni <at> jidanni.org>,
>  38818 <at> debbugs.gnu.org
> 
> And, by the way, that message arrived here with the CJK characters in Dan Jacobson's name mangled. Whereas the normally are 積丹尼, they now are <some unprintable characters>, and message-send-mail crashes on it.

Please report this as a separate bug, and please include the offending
email message (as an attachment) with your report.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 18:20:02 GMT) Full text and rfc822 format available.

Message #107 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, Pieter van Oostrum <pieter-l <at> vanoostrum.org>,
 rms <at> gnu.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 06 Jan 2020 02:19:03 +0800
Sounds like RMS's personal CJK-mangling mail system. But he doesn't have time to fix it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 18:21:01 GMT) Full text and rfc822 format available.

Message #110 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 06 Jan 2020 02:20:26 +0800
OK, as to what to put into my .emacs, I'll stick to what is in the books.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 18:49:01 GMT) Full text and rfc822 format available.

Message #113 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: michael_heerdegen <at> web.de, pieter-l <at> vanoostrum.org, rms <at> gnu.org,
 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 20:48:09 +0200
> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
> Cc: Pieter van Oostrum <pieter-l <at> vanoostrum.org>,  rms <at> gnu.org,  michael_heerdegen <at> web.de,  38818 <at> debbugs.gnu.org
> Date: Mon, 06 Jan 2020 02:19:03 +0800
> 
> Sounds like RMS's personal CJK-mangling mail system. But he doesn't have time to fix it.

It isn't just RMS's email, it's also your email: it claims to be
text/plain and doesn't state any charset, but comes with a non-ASCII
name.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 19:10:02 GMT) Full text and rfc822 format available.

Message #116 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, pieter-l <at> vanoostrum.org,
 rms <at> gnu.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 03:09:33 +0800
EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.

Naw....

From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
      ^^^^^^^^^^^
is all one needs.
Content-Type: text/plain
is discussing the body, not the header.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 19:34:02 GMT) Full text and rfc822 format available.

Message #119 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, pieter-l <at> vanoostrum.org,
 rms <at> gnu.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Sun, 05 Jan 2020 21:33:04 +0200
> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
> Cc: pieter-l <at> vanoostrum.org,  rms <at> gnu.org,  michael_heerdegen <at> web.de,  38818 <at> debbugs.gnu.org, larsi <at> gnus.org
> Date: Mon, 06 Jan 2020 03:09:33 +0800
> 
> EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.
> 
> Naw....
> 
> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
>       ^^^^^^^^^^^

Why do you think this arrives intact to people's MUA?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 20:50:01 GMT) Full text and rfc822 format available.

Message #122 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, 38818 <at> debbugs.gnu.org,
 rms <at> gnu.org, 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Sun, 05 Jan 2020 21:48:54 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
>> Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
>> 38818 <at> debbugs.gnu.org, larsi <at> gnus.org
>> Date: Mon, 06 Jan 2020 03:09:33 +0800
>> 
>> EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.
>> 
>> Naw....
>> 
>> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
>>       ^^^^^^^^^^^
>
> Why do you think this arrives intact to people's MUA?

What would be wrong with that? It seems to me that it conforms to RFC 2047.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 22:19:01 GMT) Full text and rfc822 format available.

Message #125 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 17:18:08 -0500
[[[ 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. ]]]

  > > Would you please say precisely where you found that "defun" documentation?
  > > Then we could think about whether to add something there.

  > C-h f defun

That is supposed to document defun specifically.
I don't have an opinion about whether it should document related topics.
I will leave that discussion to others.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 22:20:02 GMT) Full text and rfc822 format available.

Message #128 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: 積丹尼 Dan Jacobson
 <jidanni <at> jidanni.org>
Cc: michael_heerdegen <at> web.de, eliz <at> gnu.org, pieter-l <at> vanoostrum.org,
 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sun, 05 Jan 2020 17:19:44 -0500
[[[ 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. ]]]

  > Sounds like RMS's personal CJK-mangling mail system. But he
  > doesn't have time to fix it.

That code is part of Rmail.  I don't think it has changed,
but it seems other systems now react strangely to it, so it
needs to be changed.

I could fix, it but I might need an hour to figure out the
way things are supposed to work nowadays, and I can't spare that.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sun, 05 Jan 2020 23:31:02 GMT) Full text and rfc822 format available.

Message #131 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson
 <jidanni <at> jidanni.org>
To: Pieter van Oostrum <pieter <at> vanoostrum.org>
Cc: michael_heerdegen <at> web.de, eliz <at> gnu.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 6 Jan 2020 00:30:12 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> 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. ]]]
>
>   > Sounds like RMS's personal CJK-mangling mail system. But he
>   > doesn't have time to fix it.
>
> That code is part of Rmail.  I don't think it has changed,
> but it seems other systems now react strangely to it, so it
> needs to be changed.
>
> I could fix, it but I might need an hour to figure out the
> way things are supposed to work nowadays, and I can't spare that.
>
> -- 
> Dr Richard Stallman
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)

-- 
Pieter van Oostrum <pieter <at> vanoostrum.org>
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 03:27:01 GMT) Full text and rfc822 format available.

Message #134 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, 38818 <at> debbugs.gnu.org,
 rms <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 05:26:04 +0200
> From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
> Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
>   rms <at> gnu.org,
>   michael_heerdegen <at> web.de,  38818 <at> debbugs.gnu.org,  larsi <at> gnus.org
> Date: Sun, 05 Jan 2020 21:48:54 +0100
> 
> >> EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.
> >> 
> >> Naw....
> >> 
> >> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
> >>       ^^^^^^^^^^^
> >
> > Why do you think this arrives intact to people's MUA?
> 
> What would be wrong with that? It seems to me that it conforms to RFC 2047.

Sorry, I don't understand: what would be wrong with what, exactly?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 03:33:01 GMT) Full text and rfc822 format available.

Message #137 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: michael_heerdegen <at> web.de, pieter-l <at> vanoostrum.org, 38818 <at> debbugs.gnu.org,
 jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 06 Jan 2020 05:32:52 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Cc: eliz <at> gnu.org, pieter-l <at> vanoostrum.org, michael_heerdegen <at> web.de,
> 	38818 <at> debbugs.gnu.org
> Date: Sun, 05 Jan 2020 17:19:44 -0500
> 
>   > Sounds like RMS's personal CJK-mangling mail system. But he
>   > doesn't have time to fix it.
> 
> That code is part of Rmail.  I don't think it has changed,
> but it seems other systems now react strangely to it, so it
> needs to be changed.

It's not just Rmail, it's something in your personal setup as well.
Because I use Rmail as well, and have no such problems.  I'm guessing
it's some locale-dependent or coding-system-dependent customizations,
and perhaps also the way you fetch your email from gnu.org.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 08:32:01 GMT) Full text and rfc822 format available.

Message #140 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 09:30:55 +0100
On Jan 05 2020, Eli Zaretskii wrote:

>> From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
>> Cc: pieter-l <at> vanoostrum.org,  rms <at> gnu.org,  michael_heerdegen <at> web.de,  38818 <at> debbugs.gnu.org, larsi <at> gnus.org
>> Date: Mon, 06 Jan 2020 03:09:33 +0800
>> 
>> EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.
>> 
>> Naw....
>> 
>> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
>>       ^^^^^^^^^^^
>
> Why do you think this arrives intact to people's MUA?

Why do you think this does not arrive intact to people's MUA?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 08:52:01 GMT) Full text and rfc822 format available.

Message #143 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 10:50:50 +0200
On January 6, 2020 10:30:55 AM GMT+02:00, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> On Jan 05 2020, Eli Zaretskii wrote:
> 
> >> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
> >>       ^^^^^^^^^^^
> >
> > Why do you think this arrives intact to people's MUA?
> 
> Why do you think this does not arrive intact to people's MUA?

Because some methods of fetching email auto-convert qp-encoded and base64 encoded parts.

I don't know how exactly RMS fetches his, but it could happen for him.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 09:24:02 GMT) Full text and rfc822 format available.

Message #146 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 10:23:13 +0100
On Jan 06 2020, Eli Zaretskii wrote:

> On January 6, 2020 10:30:55 AM GMT+02:00, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
>> On Jan 05 2020, Eli Zaretskii wrote:
>> 
>> >> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
>> >>       ^^^^^^^^^^^
>> >
>> > Why do you think this arrives intact to people's MUA?
>> 
>> Why do you think this does not arrive intact to people's MUA?
>
> Because some methods of fetching email auto-convert qp-encoded and base64 encoded parts.

But that isn't the fault of the raw mail contents.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 09:57:02 GMT) Full text and rfc822 format available.

Message #149 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, 38818 <at> debbugs.gnu.org,
 rms <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 10:56:18 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
>> Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
>>   rms <at> gnu.org,
>>   michael_heerdegen <at> web.de,  38818 <at> debbugs.gnu.org,  larsi <at> gnus.org
>> Date: Sun, 05 Jan 2020 21:48:54 +0100
>> 
>> >> EZ> it claims to be text/plain and doesn't state any charset, but comes with a non-ASCII name.
>> >> 
>> >> Naw....
>> >> 
>> >> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni <at> jidanni.org>
>> >>       ^^^^^^^^^^^
>> >
>> > Why do you think this arrives intact to people's MUA?
>> 
>> What would be wrong with that? It seems to me that it conforms to RFC 2047.
>
> Sorry, I don't understand: what would be wrong with what, exactly?

OK, then I probably didn't understand you.
You asked about =?utf-8?B?56mN5Li55bC8?=
"Why do you think this arrives intact to people's MUA?"

So I thought you meant there is something wrong with that part. Apparently you did not mean that. So what did you mean? Dan seems to want that part (some CJK characters) to show up in the email, and it does for me. And that is how it should be.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 10:03:02 GMT) Full text and rfc822 format available.

Message #152 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 12:02:32 +0200
On January 6, 2020 11:23:13 AM GMT+02:00, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> On Jan 06 2020, Eli Zaretskii wrote:
> 
> > On January 6, 2020 10:30:55 AM GMT+02:00, Andreas Schwab
> <schwab <at> linux-m68k.org> wrote:
> >> On Jan 05 2020, Eli Zaretskii wrote:
> >> 
> >> >> From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson
> <jidanni <at> jidanni.org>
> >> >>       ^^^^^^^^^^^
> >> >
> >> > Why do you think this arrives intact to people's MUA?
> >> 
> >> Why do you think this does not arrive intact to people's MUA?
> >
> > Because some methods of fetching email auto-convert qp-encoded and
> base64 encoded parts.
> 
> But that isn't the fault of the raw mail contents.


This isn't about assigning blame, this is about finding where that mojibake comes from and what triggers it, and hopefully figuring out how to avoid or fix that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 10:10:02 GMT) Full text and rfc822 format available.

Message #155 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pieter van Oostrum <pieter-l <at> vanoostrum.org>
Cc: michael_heerdegen <at> web.de, larsi <at> gnus.org, 38818 <at> debbugs.gnu.org,
 rms <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 12:09:17 +0200
On January 6, 2020 11:56:18 AM GMT+02:00, Pieter van Oostrum <pieter-l <at> vanoostrum.org> wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> OK, then I probably didn't understand you.
> You asked about =?utf-8?B?56mN5Li55bC8?=
> "Why do you think this arrives intact to people's MUA?"
> 
> So I thought you meant there is something wrong with that part.
> Apparently you did not mean that. So what did you mean? Dan seems to
> want that part (some CJK characters) to show up in the email, and it
> does for me. And that is how it should be.

I'm saying that if the original mail had some suitable MIME charset in its headers, the problem would be less likely to happen.  Because email messages that rely on implicit encoding specifications are more likely to hit subtle problems.

And btw, no one can rely on having the exact same encoded name in response email, MUA and MTA are free to change the representation at will, as long as the content is transferred without losses.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 10:14:01 GMT) Full text and rfc822 format available.

Message #158 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pieter-l <at> vanoostrum.org, rms <at> gnu.org, michael_heerdegen <at> web.de,
 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 11:13:18 +0100
On Jan 06 2020, Eli Zaretskii wrote:

> This isn't about assigning blame,

The please don't make is sound like that.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 10:17:02 GMT) Full text and rfc822 format available.

Message #161 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Pieter van Oostrum <pieter-l <at> vanoostrum.org>, rms <at> gnu.org,
 michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, larsi <at> gnus.org,
 jidanni <at> jidanni.org
Subject: Re: bug#38818: jidanni's mail headers not perfect?!
Date: Mon, 06 Jan 2020 11:16:02 +0100
On Jan 06 2020, Eli Zaretskii wrote:

> I'm saying that if the original mail had some suitable MIME charset in
> its headers, the problem would be less likely to happen.

The MIME charset is there: =?UTF-8?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Mon, 06 Jan 2020 23:09:01 GMT) Full text and rfc822 format available.

Message #164 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, pieter-l <at> vanoostrum.org, 38818 <at> debbugs.gnu.org,
 jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Mon, 06 Jan 2020 18:08:36 -0500
[[[ 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. ]]]

  > It's not just Rmail, it's something in your personal setup as well.
  > Because I use Rmail as well, and have no such problems.  I'm guessing
  > it's some locale-dependent or coding-system-dependent customizations,
  > and perhaps also the way you fetch your email from gnu.org.

I fetch the mail by copying the inbox file verbatim, so I doubt it can
be that.

I debugged this some, and found that rfc2047-decode-encoded-words
is decoding header fields such as =?iso-8859-1?Q?B=C3=A9raud?=
incorrectly, using a peculiar choice of coding system, windows-1252.
That seems to come from mm-charset-to-coding-system.

Does anyone see how that could happen?

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Sat, 11 Jan 2020 09:41:02 GMT) Full text and rfc822 format available.

Message #167 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: michael_heerdegen <at> web.de, 38818 <at> debbugs.gnu.org, drew.adams <at> oracle.com,
 jidanni <at> jidanni.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 11 Jan 2020 11:40:20 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Date: Wed, 01 Jan 2020 18:18:44 -0500
> Cc: michael_heerdegen <at> web.de, jidanni <at> jidanni.org, 38818 <at> debbugs.gnu.org
> 
> How about this addition?
> 
> diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
> index 7354eb1..b52871e 100644
> --- a/doc/lispref/modes.texi
> +++ b/doc/lispref/modes.texi

Thanks, I installed it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 22 Jan 2020 12:48:02 GMT) Full text and rfc822 format available.

Message #170 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Richard Stallman <rms <at> gnu.org>
Cc: michael_heerdegen <at> web.de, Eli Zaretskii <eliz <at> gnu.org>,
 pieter-l <at> vanoostrum.org, jidanni <at> jidanni.org, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 22 Jan 2020 13:47:49 +0100
Richard Stallman <rms <at> gnu.org> writes:

> I debugged this some, and found that rfc2047-decode-encoded-words
> is decoding header fields such as =?iso-8859-1?Q?B=C3=A9raud?=
> incorrectly, using a peculiar choice of coding system, windows-1252.
> That seems to come from mm-charset-to-coding-system.
>
> Does anyone see how that could happen?

I don't.  Do you have a test case?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 22 Jan 2020 12:52:02 GMT) Full text and rfc822 format available.

Message #173 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 22 Jan 2020 13:51:14 +0100
Reading this thread, there doesn't seem like there's anything much to
fix here.  The user can redefine `q' in the buffers they want, or use
quit-window-hook to do something, or use `C-x k'.

(There were other issues touched upon (like defun in hooks), but they've
been clarified.)

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 12:52:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 38818 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 12:52:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 22 Jan 2020 13:18:02 GMT) Full text and rfc822 format available.

Message #180 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: michael_heerdegen <at> web.de, Eli Zaretskii <eliz <at> gnu.org>,
 pieter-l <at> vanoostrum.org, Richard Stallman <rms <at> gnu.org>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 22 Jan 2020 21:17:19 +0800
>>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
LI> Richard Stallman <rms <at> gnu.org> writes:

>> I debugged this some, and found that rfc2047-decode-encoded-words
>> is decoding header fields such as =?iso-8859-1?Q?B=C3=A9raud?=
>> incorrectly, using a peculiar choice of coding system, windows-1252.
>> That seems to come from mm-charset-to-coding-system.
>> 
>> Does anyone see how that could happen?

LI> I don't.  Do you have a test case?

I thought the test case was my header as on the From: in the header of
this message that I am sending now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38818; Package emacs. (Wed, 22 Jan 2020 13:20:02 GMT) Full text and rfc822 format available.

Message #183 received at 38818 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: michael_heerdegen <at> web.de, Eli Zaretskii <eliz <at> gnu.org>,
 pieter-l <at> vanoostrum.org, Richard Stallman <rms <at> gnu.org>, 38818 <at> debbugs.gnu.org
Subject: Re: bug#38818: Dired: mention deleting buffers, not just windows
Date: Wed, 22 Jan 2020 14:19:24 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> I thought the test case was my header as on the From: in the header of
> this message that I am sending now.

No, your From header is perfect the way it is.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 20 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.