From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuen Ho Wong Newsgroups: gmane.emacs.bugs Subject: bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session Date: Thu, 04 Jan 2018 01:11:13 +0000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1515028345 26120 195.159.176.226 (4 Jan 2018 01:12:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 01:12:25 +0000 (UTC) To: 29972@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 02:12:21 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 1eWu4x-0006PK-7q for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 02:12:19 +0100 Original-Received: from localhost ([::1]:44259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWu6w-00011D-Dk for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jan 2018 20:14:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWu6k-0000zi-Uo for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:14:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWu6c-0000RF-KX for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:14:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWu6c-0000QU-2R for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eWu6b-0003br-RZ for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuen Ho Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jan 2018 01:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151502840813821 (code B ref -1); Thu, 04 Jan 2018 01:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2018 01:13:28 +0000 Original-Received: from localhost ([127.0.0.1]:34836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWu62-0003ap-Bo for submit@debbugs.gnu.org; Wed, 03 Jan 2018 20:13:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWu61-0003ae-9R for submit@debbugs.gnu.org; Wed, 03 Jan 2018 20:13:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWu5u-0008JS-H6 for submit@debbugs.gnu.org; Wed, 03 Jan 2018 20:13:20 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40407) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eWu5u-0008JK-Ba for submit@debbugs.gnu.org; Wed, 03 Jan 2018 20:13:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWu5r-0000m1-RJ for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:13:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWu5m-0008EG-QU for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:13:15 -0500 Original-Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:35410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWu5m-0008D4-ER for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 20:13:10 -0500 Original-Received: by mail-wr0-x22d.google.com with SMTP id l19so141351wrc.2 for ; Wed, 03 Jan 2018 17:13:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=Dd0/EBdpDLugYfzoE2gYlX2WgGqYtTfR8Dll17SI/6U=; b=jTI9BvGVxu3/mbPSdd02o//iZ/6KeFuZW9Sd9HnttLS+3Ig2VVL2P0CZ3JIzWIpjtY YlDRrXhqiq775u2bozCdNXpej2O6g3nCe4QbrAwuQXDckVn+RygVzCS7mn/XsvUIg2Iq NiQFcVUPEYnpjYVffeCB943VzZBPGikySPW83HTXxgvVlCHXQfnLiFJqQKdp6A8f4b5l DkSJNDqFdwR/pjCwN69rmNQ03ekr0z5k8QvD1/dW2EQSgPCnUFoLMK878fg2S02ksKHD Ycsm1Wp+y0a3G0BrPIW9LxyEvwnka6PL8tIHaRVxVWJHw/Fa3pbN+HBcE+i0GXrj9tzg qnTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Dd0/EBdpDLugYfzoE2gYlX2WgGqYtTfR8Dll17SI/6U=; b=AXgpVtaxvdEZWyGhscxBT7gYjGy1osibFetU6XUukqzsKhKXR2PAEP5DBAnUjq7ItT nLLjg01qIlSuryux5fZTkYIAtMGqPxZ0qkYHwtBwym+eyr+/0LvjQbyp2LqOatSLtQ6D 3Pk1/az66asl8UryW3iXe8/1AdM+zHBsb8kPo4kIc3Vk9lEgqkc9kwg7z6U0/RaGZKQF 8sg9L1omVliU38xwC1d49snCkr6j+J1kputirmnKhOxeAaAsf7M+0/oFYO4L8wblW4fP 7z/nzF29WCp3YbGsf/hxoOEWdsrA84GP6v9z0OEV0bT4J3HCdzk8z+GkdzIq1nAqR0LM 0JWQ== X-Gm-Message-State: AKGB3mLnfVanVIwlTI5tl/WXSPW89LLQStSN5WiOhP6QIDW5orQcOQmS pNwqDfwAwy2yAGuJQZY33KBFuZeI X-Google-Smtp-Source: ACJfBosfNJwbG3payioxgu1BRw12eNaS52GyOSnr3aTThyRflP0sUq2CJ4Xo5JBXwgMEw+hWUJf1/g== X-Received: by 10.223.186.72 with SMTP id t8mr3239133wrg.169.1515028388754; Wed, 03 Jan 2018 17:13:08 -0800 (PST) Original-Received: from mobilecat.lan ([88.98.208.53]) by smtp.gmail.com with ESMTPSA id p8sm657954wrf.50.2018.01.03.17.13.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 17:13:06 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:141760 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-dired-hide-details-mode-to-minor-mode-alist.patch Content-Description: Add dired-hide-details-mode to minor-mode-alist >From 49b10c2f4b17809d0b34354699e6a1a35d7be785 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Wed, 3 Jan 2018 23:43:27 +0000 Subject: [PATCH] Add dired-hide-details-mode to minor-mode-alist --- lisp/dired.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/dired.el b/lisp/dired.el index b853d64c56..97f41400f8 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2433,6 +2433,7 @@ permissions are hidden from view. See options: `dired-hide-details-hide-symlink-targets' and `dired-hide-details-hide-information-lines'." :group 'dired + :lighter: "" (unless (derived-mode-p 'dired-mode) (error "Not a Dired buffer")) (dired-hide-details-update-invisibility-spec) -- 2.15.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jimmy Yuen Ho Wong In GNU Emacs 25.3.3 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1= 265.21) of 2017-09-28 built on Atago.local Repository revision: 67b78428be670691c240a20bb7af9248b884d583 Windowing system distributor 'Apple Inc.', version 10.13.2 Configured using: 'configure --with-mac --enable-mac-app=3D/Users/build/emacs-mac-build --prefix=3D/Users/build/emacs-mac-build' Configured features: NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: company-flx-mode: t company-quickhelp-mode: t company-quickhelp-local-mode: t company-statistics-mode: t imenu-list-minor-mode: t projectile-mode: t flx-ido-mode: t override-global-mode: t winner-mode: t which-key-mode: t which-function-mode: t smooth-scrolling-mode: t show-smartparens-global-mode: t smartparens-global-mode: t show-paren-mode: t savehist-mode: t save-place-mode: t recentf-mode: t pyenv-mode: t purpose-mode: t ido-vertical-mode: t ido-ubiquitous-mode: t ido-everywhere: t global-whitespace-cleanup-mode: t global-undo-tree-mode: t global-origami-mode: t global-move-dup-mode: t global-magit-file-mode: t diff-auto-refine-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t server-mode: t global-hl-line-mode: t global-flycheck-mode: t global-company-mode: t display-time-mode: t desktop-save-mode: t delete-selection-mode: t auto-compile-on-save-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mac-mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t global-visual-line-mode: t transient-mark-mode: t Recent messages: Updating buffer list...done Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help imenu-list: couldn=E2=80=99t create index because of error: (imenu-unavaila= ble "This buffer cannot use =E2=80=98imenu-default-create-index-function=E2= =80=99") Loading /Users/wyuenho/.emacs.d/company-statistics-cache.el (source)...done Warning: symbolic link to Git-controlled source file ls does not support --dired; see =E2=80=98dired-use-ls-dired=E2=80=99 for m= ore details. Wrote /Users/wyuenho/.emacs.d/.emacs.desktop.lock Desktop: 1 frame, 2 buffers restored. Turning on magit-auto-revert-mode...done For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /Users/wyuenho/.emacs.d/elpa/seq-2.20/seq hides /Applications/Emacs.app/Con= tents/Resources/lisp/emacs-lisp/seq /Users/wyuenho/.emacs.d/elpa/let-alist-1.0.5/let-alist hides /Applications/= Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug sendmail jka-compr company-flx company-quickhelp pos-tip company-statistics company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb linum cap-words superword subword solarized-theme hideshow window-purpose-x imenu-list monky bindat rg wgrep-ag wgrep ag vc-svn find-dired go-projectile vc-git go-rename go-guru go-eldoc projectile grep ibuf-ext ibuffer go-mode find-file ffap tide tide-lv ts-comint typescript-mode compile js2-mode-expansions js2-mode etags xref project smartparens-javascript js-mode-expansions js smartparens-html html-mode-expansions sgml-mode cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs yaml-mode multi-term term disp-table ehelp bash-completion restclient yasnippet-snippets mocha-snippets yasnippet evil-numbers cycle-quotes string-inflection smartparens-config smartparens-python expand-region text-mode-expansions python-el-fgallina-expansions er-basic-expansions expand-region-core expand-region-custom visual-regexp-steroids visual-regexp multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors mc-edit-lines multiple-cursors-core rect idomenu smex flx-isearch flx-ido flx zoom-frm frame-cmds frame-fns avoid delight dired-collapse dired-single dired-hide-dotfiles all-the-icons-dired all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons font-lock+ exec-path-from-shell pager-default-keybindings pager windmove bind-key solarized-dark-theme solarized color winner which-key which-func imenu smooth-scrolling smartparens thingatpt paren savehist saveplace recentf tree-widget pyenv-mode pythonic f python tramp-sh docker-tramp tramp-cache tramp tramp-compat tramp-loaddefs trampver ucs-normalize window-purpose window-purpose-fixes window-purpose-prefix-overload window-purpose-switch window-purpose-layout window-purpose-core window-purpose-configuration window-purpose-utils ido-vertical-mode ido-completing-read+ memoize cus-edit wid-edit minibuf-eldef ido whitespace-cleanup-mode whitespace undo-tree diff origami origami-parsers cl move-dup magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-branch magit-collab ghub url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap let-alist magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify magit-process magit-margin magit-mode git-commit magit-git magit-section magit-utils crm magit-popup log-edit easy-mmode message dired format-spec rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async shell pcomplete comint ansi-color ring server hl-line flycheck json map find-func subr-x company time desktop frameset delsel auto-compile advice packed cus-start cus-load finder-inf edmacro kmacro gh-common gh-profile url-parse auth-source gnus-util mm-util help-fns mail-prsvr password-cache url-vars rx s marshal eieio-compat cl-seq dash eieio eieio-core cl-macs info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib mule-util time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel mac-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue mac multi-tty make-network-process emacs) Memory information: ((conses 16 704475 147100) (symbols 48 52021 0) (miscs 40 917 1384) (strings 32 148362 131289) (string-bytes 1 4953797) (vectors 16 109995) (vector-slots 8 2591740 314018) (floats 8 12505 8339) (intervals 56 1918 1624) (buffers 976 26)) --=-=-=--