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: Thu, 04 Jan 2018 18:42:18 +0200 Message-ID: <83d12pbmol.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1515084455 15304 195.159.176.226 (4 Jan 2018 16:47:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 16:47:35 +0000 (UTC) Cc: 29972@debbugs.gnu.org To: Yuen Ho Wong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 17:47:30 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 1eX8fx-0003b2-Cu for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 17:47:29 +0100 Original-Received: from localhost ([::1]:50012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX8hw-00063N-I8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 11:49:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX8bi-0007gl-4p for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 11:43:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eX8be-0003hK-5P for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 11:43:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eX8bd-0003gS-V9 for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 11:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eX8bd-0003bn-Jt for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2018 11:43: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: Thu, 04 Jan 2018 16:43: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.151508414613830 (code B ref 29972); Thu, 04 Jan 2018 16:43:01 +0000 Original-Received: (at 29972) by debbugs.gnu.org; 4 Jan 2018 16:42:26 +0000 Original-Received: from localhost ([127.0.0.1]:35877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX8b4-0003b0-2H for submit@debbugs.gnu.org; Thu, 04 Jan 2018 11:42:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX8b2-0003am-Dt for 29972@debbugs.gnu.org; Thu, 04 Jan 2018 11:42:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eX8au-0002Cf-5b for 29972@debbugs.gnu.org; Thu, 04 Jan 2018 11:42:19 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX8au-0002C8-2E; Thu, 04 Jan 2018 11:42:16 -0500 Original-Received: from [176.228.60.248] (port=3192 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eX8at-0000R8-Gy; Thu, 04 Jan 2018 11:42:15 -0500 In-reply-to: (message from Yuen Ho Wong on Thu, 04 Jan 2018 01:11:13 +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:141775 Archived-At: > From: Yuen Ho Wong > Date: Thu, 04 Jan 2018 01:11:13 +0000 > > How to reproduce: > 1. Turn on `desktop-save-mode` > 2. dired some directory > 3. Press `(` to turn on `dired-hide-details-mode` > 4. C-x C-c, when asked to save desktop, choose yes > 5. Launch emacs again, desktop restored the dired buffer but not > `dired-hide-details-mode` > > What went wrong: > `dired-hide-details-mode`'s definition does not declare a lighter or a > keymap, thus it is not added to `minor-mode-alist` by > `define-minor-mode`. So when `desktop` tries to get the buffer's info to > save to `.emacs.desktop` via `desktop-buffer-info`, > `dired-hide-details-mode` does not exist, and thus not saved to the > session file. > > Fix: > Just declare an empty lighter. I've attached a patch for this. Can't you instead customize desktop-locals-to-save?