GNU bug report logs - #47063
27.1; Tramp customizations overridden by tramp-loaddefs.el

Previous Next

Package: emacs;

Reported by: Aaron Zeng <zeng.aaron.l <at> gmail.com>

Date: Thu, 11 Mar 2021 05:04:02 UTC

Severity: normal

Found in version 27.1

Fixed in version 28.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47063 in the body.
You can then email your comments to 47063 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Thu, 11 Mar 2021 05:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aaron Zeng <zeng.aaron.l <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 11 Mar 2021 05:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aaron Zeng <zeng.aaron.l <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Tramp customizations overridden by tramp-loaddefs.el
Date: Thu, 11 Mar 2021 00:02:32 -0500
Hello there,

I noticed that my M-x customize settings were not being applied for
some TRAMP defcustoms, namely, tramp-use-ssh-controlmaster-options.
With the following barebones ~/.emacs:

    (custom-set-variables
     ;; custom-set-variables was added by Custom.
     ;; If you edit it by hand, you could mess it up, so be careful.
     ;; Your init file should contain only one such instance.
     ;; If there is more than one, they won't work right.
     '(tramp-use-ssh-controlmaster-options nil))
    (custom-set-faces
     ;; custom-set-faces was added by Custom.
     ;; If you edit it by hand, you could mess it up, so be careful.
     ;; Your init file should contain only one such instance.
     ;; If there is more than one, they won't work right.
     )

I found that connecting to `/ssh::/' (localhost) ended up using TRAMP's
ControlMaster options despite the customization.  I also noticed that
`tramp-use-ssh-controlmaster-options' was set to t.  Furthermore, if the
following line is prepended to the init file:

    (debug-watch 'tramp-use-ssh-controlmaster-options)

It is clear that the defvar in tramp-loaddefs.el is where the variable
gets set to t.  I'm not familiar with the purpose of the *-loaddefs.el
files and why they are different from regular generated autoload files,
but it would seem that it's preventing customizations from being applied
properly.

My current workaround is to add the NOW argument in
`custom-set-variables', like so:

    (custom-set-variables
      '(tramp-use-ssh-controlmaster-options nil t))

Which seems to apply the customization corectly.  But this argument is
not saved automatically by the M-x customize interface.

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin17.7.0, NS
appkit-1561.60 Version 10.13.6 (Build 17G65))
System Description:  macOS 11.2.2

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure
 --prefix=/nix/store/94vgwpfys6y08ri6p2czzy35i24inc5n-emacs-27.1
 --disable-build-details --with-modules --with-ns
 --disable-ns-self-contained
 CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'

Configured features:
RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm seq byte-opt
gv bytecomp byte-compile cconv tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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 composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
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 threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 48799 7025)
 (symbols 48 6052 1)
 (strings 32 15746 994)
 (string-bytes 1 519667)
 (vectors 16 7304)
 (vector-slots 8 78007 5350)
 (floats 8 22 253)
 (intervals 56 176 0)
 (buffers 1000 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Thu, 11 Mar 2021 13:57:01 GMT) Full text and rfc822 format available.

Message #8 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Aaron Zeng <zeng.aaron.l <at> gmail.com>
Cc: 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1; Tramp customizations overridden by
 tramp-loaddefs.el
Date: Thu, 11 Mar 2021 14:56:31 +0100
Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:

> Hello there,

Hi Aaron,

> I noticed that my M-x customize settings were not being applied for
> some TRAMP defcustoms, namely, tramp-use-ssh-controlmaster-options.
> With the following barebones ~/.emacs:
>
>     (custom-set-variables
>      ;; custom-set-variables was added by Custom.
>      ;; If you edit it by hand, you could mess it up, so be careful.
>      ;; Your init file should contain only one such instance.
>      ;; If there is more than one, they won't work right.
>      '(tramp-use-ssh-controlmaster-options nil))
>     (custom-set-faces
>      ;; custom-set-faces was added by Custom.
>      ;; If you edit it by hand, you could mess it up, so be careful.
>      ;; Your init file should contain only one such instance.
>      ;; If there is more than one, they won't work right.
>      )
>
> I found that connecting to `/ssh::/' (localhost) ended up using TRAMP's
> ControlMaster options despite the customization.  I also noticed that
> `tramp-use-ssh-controlmaster-options' was set to t.  Furthermore, if the
> following line is prepended to the init file:
>
>     (debug-watch 'tramp-use-ssh-controlmaster-options)
>
> It is clear that the defvar in tramp-loaddefs.el is where the variable
> gets set to t.  I'm not familiar with the purpose of the *-loaddefs.el
> files and why they are different from regular generated autoload files,
> but it would seem that it's preventing customizations from being applied
> properly.
>
> My current workaround is to add the NOW argument in
> `custom-set-variables', like so:
>
>     (custom-set-variables
>       '(tramp-use-ssh-controlmaster-options nil t))
>
> Which seems to apply the customization corectly.  But this argument is
> not saved automatically by the M-x customize interface.

Perhaps you add (require 'tramp) somewhere in your ~/.emacs?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Thu, 11 Mar 2021 17:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Zeng <zeng.aaron.l <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1;
 Tramp customizations overridden by tramp-loaddefs.el
Date: Thu, 11 Mar 2021 12:05:56 -0500
Hi Michael,

Are you suggesting that I should add that to my .emacs?  Or do you
mean that I am inadvertently loading tramp.el somewhere in my .emacs?

If the latter, I was able to see the issue when using a .emacs file
consisting solely of the custom-set-variables call in my previous
email and loading no other init files, so I don't think that's the
culprit.

Thanks,
Aaron


On Thu, Mar 11, 2021 at 8:56 AM Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:
>
> > Hello there,
>
> Hi Aaron,
>
> > I noticed that my M-x customize settings were not being applied for
> > some TRAMP defcustoms, namely, tramp-use-ssh-controlmaster-options.
> > With the following barebones ~/.emacs:
> >
> >     (custom-set-variables
> >      ;; custom-set-variables was added by Custom.
> >      ;; If you edit it by hand, you could mess it up, so be careful.
> >      ;; Your init file should contain only one such instance.
> >      ;; If there is more than one, they won't work right.
> >      '(tramp-use-ssh-controlmaster-options nil))
> >     (custom-set-faces
> >      ;; custom-set-faces was added by Custom.
> >      ;; If you edit it by hand, you could mess it up, so be careful.
> >      ;; Your init file should contain only one such instance.
> >      ;; If there is more than one, they won't work right.
> >      )
> >
> > I found that connecting to `/ssh::/' (localhost) ended up using TRAMP's
> > ControlMaster options despite the customization.  I also noticed that
> > `tramp-use-ssh-controlmaster-options' was set to t.  Furthermore, if the
> > following line is prepended to the init file:
> >
> >     (debug-watch 'tramp-use-ssh-controlmaster-options)
> >
> > It is clear that the defvar in tramp-loaddefs.el is where the variable
> > gets set to t.  I'm not familiar with the purpose of the *-loaddefs.el
> > files and why they are different from regular generated autoload files,
> > but it would seem that it's preventing customizations from being applied
> > properly.
> >
> > My current workaround is to add the NOW argument in
> > `custom-set-variables', like so:
> >
> >     (custom-set-variables
> >       '(tramp-use-ssh-controlmaster-options nil t))
> >
> > Which seems to apply the customization corectly.  But this argument is
> > not saved automatically by the M-x customize interface.
>
> Perhaps you add (require 'tramp) somewhere in your ~/.emacs?
>
> Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Thu, 11 Mar 2021 17:12:02 GMT) Full text and rfc822 format available.

Message #14 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Aaron Zeng <zeng.aaron.l <at> gmail.com>
Cc: 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1; Tramp customizations overridden by
 tramp-loaddefs.el
Date: Thu, 11 Mar 2021 18:11:27 +0100
Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:

> Hi Michael,

Hi Aaron,

> Are you suggesting that I should add that to my .emacs?  Or do you
> mean that I am inadvertently loading tramp.el somewhere in my .emacs?

I recommend the former.

> Thanks,
> Aaron

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Thu, 11 Mar 2021 17:20:01 GMT) Full text and rfc822 format available.

Message #17 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Zeng <zeng.aaron.l <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1;
 Tramp customizations overridden by tramp-loaddefs.el
Date: Thu, 11 Mar 2021 12:19:01 -0500
Okay, it looks like if I add (require 'tramp) before the
custom-set-variables, the customization is applied correctly, so that
would be an effective workaround.

That still seems like a bug, though.  Customizations are supposed to
be applied even if the corresponding package isn't yet loaded.


On Thu, Mar 11, 2021 at 12:11 PM Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:
>
> > Hi Michael,
>
> Hi Aaron,
>
> > Are you suggesting that I should add that to my .emacs?  Or do you
> > mean that I am inadvertently loading tramp.el somewhere in my .emacs?
>
> I recommend the former.
>
> > Thanks,
> > Aaron
>
> Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Fri, 12 Mar 2021 00:21:01 GMT) Full text and rfc822 format available.

Message #20 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Aaron Zeng <zeng.aaron.l <at> gmail.com>, 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1;
 Tramp customizations overridden by tramp-loaddefs.el
Date: Thu, 11 Mar 2021 19:20:07 -0500
Why is tramp autoloading almost all its defcustoms?
Eg tramp-use-ssh-controlmaster-options isn't used anywhere outside
of tramp-sh.el.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Sat, 13 Mar 2021 13:38:02 GMT) Full text and rfc822 format available.

Message #23 received at 47063 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Aaron Zeng <zeng.aaron.l <at> gmail.com>, 47063 <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1; Tramp customizations overridden by
 tramp-loaddefs.el
Date: Sat, 13 Mar 2021 14:37:51 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Why is tramp autoloading almost all its defcustoms?
> Eg tramp-use-ssh-controlmaster-options isn't used anywhere outside
> of tramp-sh.el.

I've removed the autoload cookie from the defcustoms. Where it isn't
possible, I have rearranged functionality.

Best regards, Michael.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sat, 13 Mar 2021 13:45:02 GMT) Full text and rfc822 format available.

Notification sent to Aaron Zeng <zeng.aaron.l <at> gmail.com>:
bug acknowledged by developer. (Sat, 13 Mar 2021 13:45:02 GMT) Full text and rfc822 format available.

Message #28 received at 47063-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Aaron Zeng <zeng.aaron.l <at> gmail.com>
Cc: 47063-done <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1; Tramp customizations overridden by
 tramp-loaddefs.el
Date: Sat, 13 Mar 2021 14:44:39 +0100
Version: 28.1

Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:

Hi Aaron,

> That still seems like a bug, though.  Customizations are supposed to
> be applied even if the corresponding package isn't yet loaded.

Should be fixed now in the master branch. If you don't want to install
this locally, you might install Tramp 2.5.0.3, which is planned to be
released via GNU ELPA end of the month.

Closing the bug.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47063; Package emacs. (Sun, 14 Mar 2021 01:23:01 GMT) Full text and rfc822 format available.

Message #31 received at 47063-done <at> debbugs.gnu.org (full text, mbox):

From: Aaron Zeng <zeng.aaron.l <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 47063-done <at> debbugs.gnu.org
Subject: Re: bug#47063: 27.1;
 Tramp customizations overridden by tramp-loaddefs.el
Date: Sat, 13 Mar 2021 20:21:22 -0500
Thank you for the quick turnaround, Michael!

On Sat, Mar 13, 2021 at 8:44 AM Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Version: 28.1
>
> Aaron Zeng <zeng.aaron.l <at> gmail.com> writes:
>
> Hi Aaron,
>
> > That still seems like a bug, though.  Customizations are supposed to
> > be applied even if the corresponding package isn't yet loaded.
>
> Should be fixed now in the master branch. If you don't want to install
> this locally, you might install Tramp 2.5.0.3, which is planned to be
> released via GNU ELPA end of the month.
>
> Closing the bug.
>
> Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 11 Apr 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.