GNU bug report logs - #34093
auto-save prevents quitting emacs on read-only filesystem

Previous Next

Package: emacs;

Reported by: Leonard Lausen <leonard <at> lausen.nl>

Date: Wed, 16 Jan 2019 03:03:02 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Leonard Lausen <leonard <at> lausen.nl>
Cc: 34093 <at> debbugs.gnu.org
Subject: bug#34093: auto-save prevents quitting emacs on read-only filesystem
Date: Tue, 18 Aug 2020 17:52:24 +0000
[Message part 1 (text/plain, inline)]
tags 34093 + patch
thanks

Leonard Lausen <leonard <at> lausen.nl> writes:

> Recently my filesystem had to be emergency remounted as read-only. I
> observed that I could not kill-emacs anymore. The following showed up in
> my log upon trying to quit emacs:
>
> ```
> company-statistics--save: Opening output file: Read-only file system, /home/leonard/.emacs.d/.cache/company-statistics-cache.el
> Error running timer ‘savehist-autosave’: (file-error "Opening output file" "Read-only file system" "/home/leonard/.emacs.d/.cache/savehist")
> ```
>
> This prevented quitting emacs.
>
> I am not sure if `company-statistics--save` prevented the shutdown, or
> just warned about the read-only file system. Possibly the behavior of
> `company-statistics--save` is sane and only `savehist-autosave` is at
> fault. Maybe both are at fault?
>
> The expected behavior is that emacs may warn about or ignore that it
> cannot write the savehist file. Calling kill-emacs should still quit
> emacs.

I can reproduce this under "emacs -Q" by evaluating:

(progn (savehist-mode)
       (setq savehist-file "/usr/foo")
       (confirm-exit-emacs))

I have attached a patch which fixes this bug by showing a warning if
this file is not readable.

Best regards,
Stefan Kangas
[0001-Fix-exiting-Emacs-when-savehist-file-not-writable.patch (text/x-diff, attachment)]

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

Previous Next


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