From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session Date: Fri, 05 Jan 2018 16:25:58 +0200 Message-ID: <83wp0w9ybt.fsf@gnu.org> References: <83d12pbmol.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1515162322 1007 195.159.176.226 (5 Jan 2018 14:25:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2018 14:25:22 +0000 (UTC) Cc: 29972@debbugs.gnu.org To: Jimmy Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 05 15:25:18 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXSvq-0008B9-Kk for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 15:25:14 +0100 Original-Received: from localhost ([::1]:42781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXSxq-0001is-1p for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 09:27:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXSxf-0001gT-CB for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 09:27:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXSxa-0006Fi-BA for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 09:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXSxa-0006FI-6m for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 09:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eXSxZ-0001Vc-UU for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 09:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jan 2018 14:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29972-submit@debbugs.gnu.org id=B29972.15151624015773 (code B ref 29972); Fri, 05 Jan 2018 14:27:01 +0000 Original-Received: (at 29972) by debbugs.gnu.org; 5 Jan 2018 14:26:41 +0000 Original-Received: from localhost ([127.0.0.1]:36413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXSxE-0001V2-P7 for submit@debbugs.gnu.org; Fri, 05 Jan 2018 09:26:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXSxD-0001Up-Ap for 29972@debbugs.gnu.org; Fri, 05 Jan 2018 09:26:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXSx3-0005er-4o for 29972@debbugs.gnu.org; Fri, 05 Jan 2018 09:26:34 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXSx3-0005eh-1o; Fri, 05 Jan 2018 09:26:29 -0500 Original-Received: from [176.228.60.248] (port=4883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eXSx1-0004Ha-4W; Fri, 05 Jan 2018 09:26:28 -0500 In-reply-to: (message from Jimmy Yuen Ho Wong on Fri, 5 Jan 2018 13:08:35 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141796 Archived-At: > From: Jimmy Yuen Ho Wong > Date: Fri, 5 Jan 2018 13:08:35 +0000 > Cc: 29972@debbugs.gnu.org > > I don't believe so. I've looked at a number of approaches. > > 1. `desktop-minor-mode-handlers` on desktop-read > Not going to be consulted unless `dired-hide-details-mode` is saved as a buffer minor mode. > 2. `desktop-minor-mode-table` on desktop-save > If `dired-hide-details-mode` is not in `minor-mode-alist`, `desktop-minor-mode-table` will not even be > consulted. > 3. `desktop-locals-to-save` > This does save the minor mode local variable to the desktop file, but desktop won't be able to restore the > minor mode because minor modes are activated before buffer local variables are restored, not after. > > So the only choices left to me are: > - :lighter "" > - (add-minor-mode 'dired-hide-details-mode "") > > Either way adds an empty string as a lighter, and the second option makes you ask why you are declaring > *and* adding a minor mode, so I picked the first option. It's more concise. Then maybe we need a new, more thorough customization facility for desktop.el, or a change in the facilities you tried to make them handle this case as well. It doesn't sound right to me to make tricky changes in a minor mode just so it could be restored by desktop.el.