From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: andrewjmoreton@gmail.com, 66697@debbugs.gnu.org
Subject: bug#66697: 30.0.50; [PATCH] desktop-save-mode with expiring remote buffers
Date: Sat, 09 Dec 2023 13:05:24 +0100 [thread overview]
Message-ID: <877clneg3f.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <83edfvy9ka.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Dec 2023 12:06:13 +0200")
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
[...]
> Thanks, but I wonder whether a better way would be to modify
> dired-desktop-save-p such that it handled correctly non-string values
> of desktop-files-not-to-save? That would make the handling of this
> variable more local, which is better for maintenance, I think.
>
> WDYT?
Sure. Good idea. Here is a new version.
--
Manuel Giraud
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-desktop-save-for-dired-buffers-bug-66697.patch --]
[-- Type: text/x-patch, Size: 1506 bytes --]
From b421faf27c38d7ce8d3c4f39df68f21d2eccc735 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sat, 9 Dec 2023 13:02:19 +0100
Subject: [PATCH] Fix desktop-save for dired buffers (bug#66697)
* lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.
---
lisp/dired.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index 7f4b96353ee..36ca54efc37 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4989,14 +4989,15 @@ dired-dnd-handle-file
(defun dired-desktop-save-p ()
"Should `dired-directory' be desktop saved?"
- (if (consp dired-directory)
- (not (string-match-p desktop-files-not-to-save (car dired-directory)))
- (not (string-match-p desktop-files-not-to-save dired-directory))))
+ (or (null desktop-files-not-to-save)
+ (and (stringp desktop-files-not-to-save)
+ (if (consp dired-directory)
+ (not (string-match-p desktop-files-not-to-save (car dired-directory)))
+ (not (string-match-p desktop-files-not-to-save dired-directory))))))
(defun dired-desktop-buffer-misc-data (dirname)
"Auxiliary information to be saved in desktop file."
- (when (and (stringp desktop-files-not-to-save)
- (dired-desktop-save-p))
+ (when (dired-desktop-save-p)
(cons
;; Value of `dired-directory'.
(if (consp dired-directory)
--
2.43.0
next prev parent reply other threads:[~2023-12-09 12:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 9:21 bug#66697: 30.0.50; [PATCH] desktop-save-mode with expiring remote buffers Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 11:41 ` Eli Zaretskii
2023-10-23 12:34 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 12:47 ` Eli Zaretskii
2023-10-23 12:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 13:25 ` Michael Albinus
2023-10-23 13:33 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 14:07 ` Michael Albinus
2023-10-23 15:21 ` Michael Albinus
2023-10-23 14:21 ` Eli Zaretskii
2023-10-23 14:55 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 15:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-24 9:21 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-24 11:56 ` Eli Zaretskii
2023-10-24 12:00 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-24 13:18 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-31 21:14 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-01 3:28 ` Eli Zaretskii
2023-11-01 10:20 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-01 12:15 ` Eli Zaretskii
[not found] ` <87fs0csri9.fsf@ledu-giraud.fr>
2023-12-08 16:02 ` Andy Moreton
2023-12-09 10:06 ` Eli Zaretskii
2023-12-09 12:05 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-09 13:16 ` Eli Zaretskii
2023-12-09 15:24 ` Andy Moreton
2023-12-09 15:45 ` Eli Zaretskii
2023-11-04 8:05 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877clneg3f.fsf@ledu-giraud.fr \
--to=bug-gnu-emacs@gnu.org \
--cc=66697@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
--cc=eliz@gnu.org \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).