Discussion:
Emacs auto-save horror level 2
(too old to reply)
Rainer Weikusat
2019-10-29 21:57:54 UTC
Permalink
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.

Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
Keith Thompson
2019-10-30 03:50:15 UTC
Permalink
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
I was unable to reproduce the problem just now (with Emacs 26.3 on
Ubuntu 18.04).
--
Keith Thompson (The_Other_Keith) kst-***@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
Rainer Weikusat
2019-10-30 11:45:30 UTC
Permalink
Post by Keith Thompson
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
I was unable to reproduce the problem just now (with Emacs 26.3 on
Ubuntu 18.04).
AFAIK, whether or not an autosave attempt is made on the number of
unsaved changes in the buffer, ie, this doesn't happen everytime because
autosave doesn't happen everytime. It's actually quite rare (couple of
times a year for me).
Rainer Weikusat
2019-10-30 12:05:00 UTC
Permalink
Post by Keith Thompson
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
I was unable to reproduce the problem just now (with Emacs 26.3 on
Ubuntu 18.04).
AFAIK, whether or not an autosave attempt is made on the number of
unsaved changes in the buffer, ie, this doesn't happen everytime because
autosave doesn't happen everytime. It's actually quite rare (couple of
times a year for me).

This also involves editing files on remote computers via Tramp/ssh, with
one intermediate hop in this case.
John McCue
2019-10-30 23:48:31 UTC
Permalink
<snip>
Post by Rainer Weikusat
Post by Keith Thompson
I was unable to reproduce the problem just now (with Emacs 26.3 on
Ubuntu 18.04).
<snip>
Post by Rainer Weikusat
This also involves editing files on remote computers via Tramp/ssh, with
one intermediate hop in this case.
So using Tramp/ssh you did:
local -> system 1 -> system 2/edit_file ?

If that is the case, it seems to be odd when you can
go directly to system 2 :)

In anycase, I could not reproduce this either using
ssh to "system 1" via Emacs 26.3 on Slackware 14.2.
I did not even attempt a 'hop' nor I could I come up
with a way to do that in Emacs.

John
Rainer Weikusat
2019-10-31 14:04:04 UTC
Permalink
Post by John McCue
<snip>
Post by Rainer Weikusat
Post by Keith Thompson
I was unable to reproduce the problem just now (with Emacs 26.3 on
Ubuntu 18.04).
<snip>
Post by Rainer Weikusat
This also involves editing files on remote computers via Tramp/ssh, with
one intermediate hop in this case.
local -> system 1 -> system 2/edit_file ?
If that is the case, it seems to be odd when you can
go directly to system 2 :)
I can't. The ultimate target system is on some corporate network in the
USA only reachable via IPsec VPN from what would be your 'system I'.
Post by John McCue
In anycase, I could not reproduce this either using
ssh to "system 1" via Emacs 26.3 on Slackware 14.2.
I did not even attempt a 'hop' nor I could I come up
with a way to do that in Emacs.
Tramp used to support multi-hop methods. 'Nowadays' (sort-of, Emacs
23.4.1), this can be accomplished by defining ssh proxies, eg,

(add-to-list 'tramp-default-proxies-alist
'("jack" nil "/ssh:duesterwald:"))

jack being the target and duesterwald the machine where the IPsec VPN is
terminated. I even have a 2-hop access method, ie, a machine reachable
from jack which is not directly accessible over the VPN.
Pankaj Jangid
2019-10-30 10:43:05 UTC
Permalink
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
Do file a bug. It is confirmed by Keith
also. [[info:emacs#Bugs][info:emacs#Bugs]]

bug-gnu-emacs mailing list is also of help
https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

Regards,
--
Pankaj Jangid
Kenny McCormack
2019-10-30 11:41:05 UTC
Permalink
Post by Pankaj Jangid
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
Do file a bug. It is confirmed by Keith
Must be another Keith...
--
Rich people pay Fox people to convince middle class people to blame poor people.

(John Fugelsang)
Keith Thompson
2019-10-30 16:11:18 UTC
Permalink
Post by Pankaj Jangid
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
Luckily, it was possible to work around this by creating the directory
again. Nevertheless, the person who 'designed' Emacs autosaving must
have had some serious problem with signals getting crossed accidentally
in his frontal cortex ...
Do file a bug. It is confirmed by Keith
also. [[info:emacs#Bugs][info:emacs#Bugs]]
No, I said I could *not* reproduce the problem.
Post by Pankaj Jangid
bug-gnu-emacs mailing list is also of help
https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
From other responses, it sounds like this is a fairly rare
occurrence. But it's probably well worth reporting, especially if you
can come up with a way to reproduce it reliably.

(If you file a bug report, I suggest not insulting the designers
of Emacs.)
--
Keith Thompson (The_Other_Keith) kst-***@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
Rainer Weikusat
2019-10-30 18:41:30 UTC
Permalink
Post by Keith Thompson
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless,
[...]
Post by Keith Thompson
(If you file a bug report, I suggest not insulting the designers
of Emacs.)
Sorry but the idea to do an autosave of something a user just explictly
asked to be thrown away is just completely bizarre. While these are
likely independent parts of the code, the overall user interaction model
is

1. User requests an action.

2. Program asks for confirmation that user actually wants that to
happen.

3. Program goes into "I ain't gonna do it, you lose!"-mode.

The missing directory is fairly harmless because the endless "It didn't
work, let's try again!"-loop can be aborted by recreating the
directory. However, the same phenomenon can also occur when the host the
file resides on presently isn't reachable via ssh. In this case, the
only recourse is to kill the editor which causes the current desktop
file (recording all loaded files so that they can be reloaded on next
start) to be lost.
Louis Krupp
2019-10-31 17:51:51 UTC
Permalink
On Wed, 30 Oct 2019 18:41:30 +0000, Rainer Weikusat
Post by Rainer Weikusat
Post by Keith Thompson
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless,
[...]
Post by Keith Thompson
(If you file a bug report, I suggest not insulting the designers
of Emacs.)
Sorry but the idea to do an autosave of something a user just explictly
asked to be thrown away is just completely bizarre. While these are
likely independent parts of the code, the overall user interaction model
is
1. User requests an action.
2. Program asks for confirmation that user actually wants that to
happen.
3. Program goes into "I ain't gonna do it, you lose!"-mode.
The missing directory is fairly harmless because the endless "It didn't
work, let's try again!"-loop can be aborted by recreating the
directory. However, the same phenomenon can also occur when the host the
file resides on presently isn't reachable via ssh. In this case, the
only recourse is to kill the editor which causes the current desktop
file (recording all loaded files so that they can be reloaded on next
start) to be lost.
Still, if you can get the bug fixed without insulting anyone, it's
probably a good idea. The problem might be one unforeseen result of a
chain of events. If being polite doesn't work, you can always resort
to telling them what you really think.

Louis

PS

Over the years, I've learned to ask myself, when people do something
stupid, if I've ever done anything that dumb. Most of the time, the
answer is yes, I have. Once in a while, though, I'm amazed...
Doug McIntyre
2019-11-03 15:40:14 UTC
Permalink
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
..

FWIW: Long ago I setup my autosaves to go into a special subdirectory
of my home directory. I didn't like the ~ files to be hanging out
everywhere I did edits, and then I can just go wipe out old ones from
time to time if I so wish.

That would most likely avoid this.
--
Doug McIntyre
***@themcintyres.us
Kaz Kylheku
2019-11-05 02:32:40 UTC
Permalink
Post by Doug McIntyre
Post by Rainer Weikusat
Existing buffer vistiing a file residing in a directory which didn't
exist anymore changed accidentally. Noted when save attempt failed, then
tried to kill the buffer with C-x k. Answered 'yes' to discard changes
question. Auto-save kicking in trying to autosave the file, failing in
endless, unabortable loop because of the non-existant directory.
..
FWIW: Long ago I setup my autosaves to go into a special subdirectory
of my home directory. I didn't like the ~ files to be hanging out
everywhere I did edits, and then I can just go wipe out old ones from
time to time if I so wish.
Same here: mine is called ~/.vimbackup

I've pulled a file from there a few times in the past; saved my hide.
Loading...