GNU bug report logs -
#66982
30.0.50; Cannot delete bookmark of inaccessible remote file
Previous Next
Reported by: Liu Hui <liuhui1610 <at> gmail.com>
Date: Tue, 7 Nov 2023 10:20:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
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 66982 in the body.
You can then email your comments to 66982 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66982
; Package
emacs
.
(Tue, 07 Nov 2023 10:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Liu Hui <liuhui1610 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 07 Nov 2023 10:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Recipe:
1. Save the following text as the test bookmark file
;;;; Emacs Bookmark Format Version 1;;;; -*- coding: utf-8-emacs;
mode: lisp-data -*-
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("test" (filename . "/ssh:192.168.0.100:~/") (front-context-string)
(rear-context-string . "g-style=literal\n") (position . 68)
(last-modified 25595 64776 373828 978000)))
2. emacs -Q --eval '(setq bookmark-default-file xxx)' -f list-bookmarks
3. press d, then x.
However, the bookmark cannot be deleted because Emacs hangs or displays
tramp error message/popup window after several seconds.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66982
; Package
emacs
.
(Wed, 08 Nov 2023 08:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 66982 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Liu Hui <liuhui1610 <at> gmail.com> writes:
Hi,
> Recipe:
>
> 1. Save the following text as the test bookmark file
>
> ;;;; Emacs Bookmark Format Version 1;;;; -*- coding: utf-8-emacs;
> mode: lisp-data -*-
> ;;; This format is meant to be slightly human-readable;
> ;;; nevertheless, you probably don't want to edit it.
> ;;; -*- End Of Bookmark File Format Version Stamp -*-
> (("test" (filename . "/ssh:192.168.0.100:~/") (front-context-string)
> (rear-context-string . "g-style=literal\n") (position . 68)
> (last-modified 25595 64776 373828 978000)))
>
> 2. emacs -Q --eval '(setq bookmark-default-file xxx)' -f list-bookmarks
>
> 3. press d, then x.
>
> However, the bookmark cannot be deleted because Emacs hangs or displays
> tramp error message/popup window after several seconds.
Thank you for the recipe, I can reproduce the problem. It happens,
because in `bookmark--remove-fringe-mark' there is a call of
`expand-file-name', which blocks if a remote file is not reachable.
Could you pls check the appended patch? It fixes your recipe for me, and
shouldn't harm other use cases.
Best regards, Michael.
[Message part 2 (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66982
; Package
emacs
.
(Fri, 10 Nov 2023 04:31:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 66982 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> 于2023年11月8日周三 16:40写道:
> Thank you for the recipe, I can reproduce the problem. It happens,
> because in `bookmark--remove-fringe-mark' there is a call of
> `expand-file-name', which blocks if a remote file is not reachable.
>
> Could you pls check the appended patch? It fixes your recipe for me, and
> shouldn't harm other use cases.
Thank you! I confirm it works.
BTW, I find binding non-essential to t fixes a similar problem caused
by abbreviate/expand-file-name on remote files:
1. save the following text to file A:
;;; -*- coding: utf-8; mode: lisp-data -*-
(("/ssh:192.168.0.100:~/a.txt" . 282))
2. emacs -Q --eval '(setq save-place-file <file A>)' -f save-place-mode
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 590c55d2609..2dda3b4d44b 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -156,7 +156,8 @@ save-place-abbreviate-file-names
:set (lambda (sym val)
(set-default sym val)
(or save-place-loaded (save-place-load-alist-from-file))
- (let ((fun (if val #'abbreviate-file-name #'expand-file-name)))
+ (let ((non-essential t)
+ (fun (if val #'abbreviate-file-name #'expand-file-name)))
(setq save-place-alist
(cl-delete-duplicates
(cl-loop for (k . v) in save-place-alist
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Fri, 10 Nov 2023 10:26:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Liu Hui <liuhui1610 <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 10 Nov 2023 10:26:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 66982-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Liu Hui <liuhui1610 <at> gmail.com> writes:
Hi,
>> Could you pls check the appended patch? It fixes your recipe for me, and
>> shouldn't harm other use cases.
>
> Thank you! I confirm it works.
Thanks for the feedback.
> BTW, I find binding non-essential to t fixes a similar problem caused
> by abbreviate/expand-file-name on remote files:
Indeed. I've pushed the change for bookmark.el and saveplace.el to
master, closing the bug.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 08 Dec 2023 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.