From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.bugs Subject: bug#29972: 25.3; dired-hide-details-mode does not persist in desktop session Date: Fri, 5 Jan 2018 17:42:49 +0000 Message-ID: References: <83d12pbmol.fsf@gnu.org> <83wp0w9ybt.fsf@gnu.org> <83shbk9vzy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114984fc63919705620afb9b" X-Trace: blaine.gmane.org 1515174146 23934 195.159.176.226 (5 Jan 2018 17:42:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2018 17:42:26 +0000 (UTC) Cc: 29972@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 05 18:42:22 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 1eXW0Y-0005eQ-9o for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 18:42:18 +0100 Original-Received: from localhost ([::1]:50921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXW2X-0004Qt-PH for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jan 2018 12:44:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXW2J-0004LD-61 for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 12:44:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXW2F-000431-JE for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 12:44:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56815) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXW2F-00042l-Cm for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 12:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eXW2D-00086h-Qd for bug-gnu-emacs@gnu.org; Fri, 05 Jan 2018 12:44:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Yuen Ho Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jan 2018 17:44: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.151517419831102 (code B ref 29972); Fri, 05 Jan 2018 17:44:01 +0000 Original-Received: (at 29972) by debbugs.gnu.org; 5 Jan 2018 17:43:18 +0000 Original-Received: from localhost ([127.0.0.1]:37263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXW1W-00085a-6y for submit@debbugs.gnu.org; Fri, 05 Jan 2018 12:43:18 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:38919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXW1U-00085M-De for 29972@debbugs.gnu.org; Fri, 05 Jan 2018 12:43:16 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id i11so3813574wmf.4 for <29972@debbugs.gnu.org>; Fri, 05 Jan 2018 09:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=60mMPJ4tWd+mO8fs6ITwDygEE88L4AYniqQTcdxbEns=; b=S2eD33phnKSkvzyzlAJ4xLZgL/sAjYaQiqeCoSlwwZaTlC4A4YiaiuSQVDjvGlHsUS TFSku3/aZYu4/PVL4Mc4++zF4ygU5Q1VfFJuSFhZVWcOUDboxTTgoTNJCvmH69aic453 0IfKuUGhuhOsDctheyr/tkltjyyrCN8ZvsEHIg0cDlfbQg0/m6qEZuIwo7F/YxVSqRR7 ZxbLSt2OXejYdnPeUJ29Dbvn1hYcvxWY7Yxh6FPHF/KlPihM/eqBX3o9TKD/uhrR/1S5 nTfg3CjMq8PcbTJaB5kUxzbvXZYFcoQNc/iaHDOvCZ6c7XF16VzZ2KBOgVsKx34vbn08 BAeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=60mMPJ4tWd+mO8fs6ITwDygEE88L4AYniqQTcdxbEns=; b=s/DcBNBaNhWW71eg3nhE68ts5wYIr5oXwPOWnBuMNvqOSks8QWvRTHA/4QN7zEg1P4 La0IMwVXcrIURm0dS2inEO1GHdQuXCccUtXQQNKyaFZKKrQ4qll35vHPK/JIvhICKDew vzfXu79daBcEoa1RzJAKN7tX2pPU/gbPf1YK21ieHMw1Np1x7s9ukhV5Ptet4XD8QCYn Jf6t11xSLZr5YvvwA4XFJthNl6xMMklxfR3xpWguYeQBHrzqUP5+wQ/e5x+BDJT4hyS4 4wsuO4uhsmUWZ9wq/4YNuVJREMjxohjqi/dSXOCmzMqwJI3JKRS7cNx2vpGeZgOI+s61 pSCQ== X-Gm-Message-State: AKGB3mI5+QLyutZ6IFL9wHuji7kOURaW3f1A+70q6GrY8wpbWfD63zDH jehED6VxQxO7JwwjTrPvSMug1gFkfwADtXcb52Y= X-Google-Smtp-Source: ACJfBouBXByUs3fwSLGG8zA/9vtFVBpYuX3JklscIkUvRsLm+SsfnM0vXzmgKRBCEmgFZM8H7ihnUJFUWI7C74YZlkg= X-Received: by 10.28.142.2 with SMTP id q2mr3108158wmd.33.1515174190352; Fri, 05 Jan 2018 09:43:10 -0800 (PST) Original-Received: by 10.223.196.199 with HTTP; Fri, 5 Jan 2018 09:42:49 -0800 (PST) In-Reply-To: <83shbk9vzy.fsf@gnu.org> 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:141807 Archived-At: --001a114984fc63919705620afb9b Content-Type: text/plain; charset="UTF-8" > Because minor-mode-alist is for displaying an indication of a minor mode in the mode line? Right, but there doesn't appear to be any other more reliable way to know what minor mode is active in a buffer. An alternative I can think of is see if there's buffer local variable that also exists in `minor-mode-list`, but that's still not reliable, hence we have these `desktop-minor-mode-*` vars. The fundamental reason appears to be desktop.el needs an efficient and reliable way to know what buffer local variables are minor modes, since `minor-mode-list` is just a global list of loaded minor-modes, `minor-mode-alist` is as close as you get. If my patch make it in, it will not be the first minor mode in emacs that defines an empty string lighter. `xref`, `linum`, `erc-track` and `rcirc` all do this. There are even more examples in the wild. I have at least 8 other packages in my ~/.emacs.d/elpa that do the same thing. I agree, however, that this is an abuse. There should be perhaps some buffer local variable called `buffer-minor-modes`, but I think this should be a separate issue and a new feature, so perhaps wait til after 26.1? On Fri, Jan 5, 2018 at 3:16 PM, Eli Zaretskii wrote: > > From: Jimmy Yuen Ho Wong > > Date: Fri, 05 Jan 2018 15:02:21 +0000 > > Cc: 29972@debbugs.gnu.org > > > > Actually I would question why we have minor modes not added to > minor-mode-alist at all just because both > > lighter and keymap are missing. > > Because minor-mode-alist is for displaying an indication of a minor > mode in the mode line? > > > What do you think about changing define-minor-mode? > > IMO, a better idea is to find out why desktop.el requires a minor mode > to be in minor-mode-alist before it saves it. Is there really a > justification for that? > --001a114984fc63919705620afb9b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0Because minor-mode-alist is for displaying an indication of a minor
mode in the mode line?

Right, but there doesn't appear to be any= other more reliable way to know what minor mode is active in a buffer. An = alternative I can think of is see if there's buffer local variable that= also exists in `minor-mode-list`, but that's still not reliable, hence= we have these `desktop-minor-mode-*` vars.

The fundamental reason appears to b= e desktop.el needs an efficient=C2=A0and reliable way to know what buffer l= ocal variables are minor modes, since `minor-mode-list` is just a global li= st of loaded minor-modes, `minor-mode-alist` is as close as you get.=

If my patch make it in, it will not be the first minor mode = in emacs that defines an empty string lighter. `xref`, `linum`, `erc-track`= and `rcirc` all do this. There are even more examples in the wild. I have = at least 8 other packages in my ~/.emacs.d/elpa that do the same thing.
=
I agree, however, that this is an abuse. There should be pe= rhaps some buffer local variable called `buffer-minor-modes`, but I think t= his should be a separate=C2=A0issue and a new feature, so perhaps wait til = after 26.1?


On Fri, Jan 5, 2018 at 3:16 PM, Eli Za= retskii <eliz@gnu.org> wrote:
<= span class=3D"">> From: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
> Date: Fri, 05 Jan 2018 15:02:21 +0000
> Cc: 29972@debbugs.gnu.org=
>
> Actually I would question why we have minor modes not added to minor-m= ode-alist at all just because both
> lighter and keymap are missing.

Because minor-mode-alist is for displaying an indication of a minor<= br> mode in the mode line?

> What do you think about changing define-minor-mode?

IMO, a better idea is to find out why desktop.el requires a minor mo= de
to be in minor-mode-alist before it saves it.=C2=A0 Is there really a
justification for that?

--001a114984fc63919705620afb9b--