* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection @ 2023-05-05 10:42 Jimmy Yuen Ho Wong 2023-06-04 8:59 ` Michael Albinus 0 siblings, 1 reply; 17+ messages in thread From: Jimmy Yuen Ho Wong @ 2023-05-05 10:42 UTC (permalink / raw) To: 63300 Whenever I install a package or do anything that turns on Tramp such as sudoing, Tramp writes to my `custom-file-path` the variables `connection-local-criteria-alist` and `connection-local-profile-alist`. This is undesirable as it prevents the customs files from being versioned effectively and shared across multiple Emacs installations across machines. Furthermore, no package should write to the customs file without the user's explicitly approval. Defcustoms should be used for customizations, not caching. In GNU Emacs 29.0.90 (build 1, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-04 built on MobileCat.localdomain Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.3.1 Configured using: 'configure --prefix=/opt/local --disable-silent-rules --without-dbus --without-gconf --without-libotf --without-m17n-flt --with-libgmp --with-gnutls --with-json --with-xml2 --with-modules --infodir /opt/local/share/info/emacs --with-sqlite3 --with-webp --with-ns --with-lcms2 --without-harfbuzz --without-imagemagick --without-xaw3d --with-tree-sitter --with-rsvg --with-xwidgets --with-native-compilation=aot 'CFLAGS=-pipe -Os -Wno-attributes -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64' 'CPPFLAGS=-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath /opt/local/lib/gcc12 -Wl,-no_pie -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XWIDGETS ZLIB Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: company-quickhelp-mode: t company-quickhelp-local-mode: t company-prescient-mode: t prescient-persist-mode: t rainbow-mode: t elisp-def-mode: t display-line-numbers-mode: t subword-mode: t page-break-lines-mode: t beginend-prog-mode: t imenu-list-minor-mode: t purpose-mode: t windmove-mode: t magit-todos-mode: t global-git-commit-mode: t magit-auto-revert-mode: t diff-hl-flydiff-mode: t projectile-rails-global-mode: t projectile-mode: t shell-dirtrack-mode: t pdf-occur-global-minor-mode: t crm-custom-mode: t override-global-mode: t dap-tooltip-mode: t dap-ui-many-windows-mode: t dap-ui-controls-mode: t dap-ui-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t winner-mode: t which-key-mode: t which-function-mode: t smooth-scrolling-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-global-mode: t smartparens-mode: t server-mode: t savehist-mode: t save-place-mode: t rxt-global-mode: t rxt-mode: t recentf-mode: t minibuffer-depth-indicate-mode: t ido-vertical-mode: t ido-ubiquitous-mode: t global-whitespace-cleanup-mode: t whitespace-cleanup-mode: t global-so-long-mode: t global-origami-mode: t origami-mode: t global-move-dup-mode: t move-dup-mode: t global-hl-line-mode: t global-flycheck-mode: t global-diff-hl-show-hunk-mouse-mode: t diff-hl-show-hunk-mouse-mode: t global-diff-hl-mode: t diff-hl-mode: t global-company-mode: t company-mode: t global-auto-revert-mode: t global-aggressive-indent-mode: t aggressive-indent-mode: t flx-ido-mode: t ido-everywhere: t icomplete-vertical-mode: t icomplete-mode: t fido-mode: t editorconfig-mode: t direnv-mode: t desktop-save-mode: t delete-selection-mode: t dap-auto-configure-mode: t dap-mode: t yas-minor-mode: t auto-compile-on-save-mode: t auto-compile-mode: t amx-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t window-divider-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t visual-line-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t temp-buffer-resize-mode: t Load-path shadows: /opt/local/share/emacs/site-lisp/cmake-mode hides /Users/wyuenho/.emacs.d/elpa/cmake-mode-20230422.828/cmake-mode /Users/wyuenho/.emacs.d/elpa/transient-20230501.1034/transient hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/transient /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-core /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key /Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint Features: (epa-file mailalias smtpmail textsec uni-scripts idna-mapping uni-confusable textsec-check qp shadow sort mail-extr emacsbug cl-print pager-autoloads tabify loaddefs-gen misearch multi-isearch visual-regexp-steroids visual-regexp mm-archive url-cache facemenu two-column dired-aux diff-hl-dired all-the-icons-dired dired-collapse dired-hacks-utils company-quickhelp pos-tip company-prescient prescient char-fold company-keywords company-etags etags fileloop company-gtags company-dabbrev-code company-dabbrev company-yasnippet company-capf company-files company-cmake company-clang company-semantic company-template company-bbdb rainbow-mode elisp-def ert debug backtrace display-line-numbers cap-words superword subword smartparens-config smartparens-javascript smartparens-ruby smartparens-org smartparens-python smartparens-markdown smartparens-text smartparens-c page-break-lines vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs beginend window-purpose-x shut-up imenu-list hideshow window-purpose window-purpose-fixes window-purpose-prefix-overload window-purpose-switch window-purpose-layout window-purpose-core window-purpose-configuration window-purpose-utils ibuffer-vc windmove dired-hide-dotfiles shrink-path git-timemachine vc-git magit-lfs magit-todos hl-todo async forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy gsexp ghub url-http url-gw url-auth gnutls forge-notify forge-revnote forge-pullreq forge-issue forge-topic bug-reference forge-post forge-repo forge forge-core forge-db closql emacsql-sqlite-common emacsql emacsql-compiler magit-bookmark magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode git-commit log-edit message sendmail yank-media rfc822 mml mml-sec epa gnus-util mailabbrev gmm-utils add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode magit-git magit-base magit-section cursor-sensor crm diff-hl-flydiff diff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util rg rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header projectile-rails rake inflections inf-ruby ruby-mode smie autoinsert lsp-sourcekit dap-java lsp-java request mailheader mail-utils lsp cargo cargo-process rust-ts-mode yard-mode lsp-pyright pet lsp-jedi python-pytest projectile grep transient python-isort python-black python compat python-insert-docstring jq-format prettier tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp nvm iter2 generator reformatter flycheck-package package-lint finder finder-inf eterm-256color term disp-table native-complete shell ehelp xterm-color verb js c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs url-queue url-file org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat org-macs quick-peek lsp-ui lsp-ui-flycheck lsp-ui-doc xwidget goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-ui-util face-remap pdf-loader pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch pdf-misc pdf-tools pdf-view treemacs-bookmarks treemacs-tags bookmark jka-compr pdf-cache pdf-info tq pdf-util format-spec pdf-macs image-mode dired dired-loaddefs exif iedit iedit-lib mc-hide-unmatched-lines-mode mc-mark-more mc-cycle-cursors multiple-cursors-core rect crm-custom scroll-on-jump browse-kill-ring edmacro kmacro use-package-bind-key bind-key use-package-delight exec-path-from-shell all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons parse-time iso8601 time-date spaceline-config spaceline-segments spaceline powerline powerline-separators powerline-themes solarized-dark-theme solarized-theme solarized solarized-faces delight quelpa-use-package use-package-core quelpa mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr lisp-mnt help-fns radix-tree dap-mouse dap-ui lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-interface treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture treemacs-logging treemacs-customization treemacs-macros gdb-mi bindat gud bui bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils lsp-lens winner which-key which-func smooth-scrolling smartparens loadhist server savehist saveplace pcre2el rxt re-builder recentf mb-depth ido-vertical-mode ido-completing-read+ memoize cus-edit pp minibuf-eldef help-at-pt whitespace-cleanup-mode whitespace so-long origami origami-parsers cl move-dup hl-line flycheck find-func diff-hl-show-hunk diff-hl-inline-popup diff-hl log-view pcvs-util vc-dir vc vc-dispatcher company autorevert aggressive-indent flx-ido advice flx ido icomplete editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch direnv diff-mode easy-mmode desktop frameset delsel dap-mode dap-tasks dap-launch lsp-docker yaml posframe dap-overlays lsp-mode lsp-protocol yasnippet-snippets yasnippet xref project tree-widget wid-edit spinner network-stream puny nsm markdown-mode color thingatpt noutline outline lv inline imenu ht f f-shortdoc ewoc epg rfc6068 epg-config dash compile text-property-search comint ansi-osc ansi-color ring auto-compile amx s let-alist filenotify cus-load move-dup-autoloads yarn-mode-autoloads git-timemachine-autoloads web-mode-autoloads flycheck-golangci-lint-autoloads docker-compose-mode-autoloads ibuffer-vc-autoloads monky-autoloads auto-yasnippet-autoloads company-prescient-autoloads cycle-quotes-autoloads python-docstring-autoloads flycheck-plantuml-autoloads direnv-autoloads lsp-java-autoloads dap-mode-autoloads lsp-pyright-autoloads graphviz-dot-mode-autoloads lsp-sourcekit-autoloads highlight-indent-guides-autoloads ts-comint-autoloads impostman-autoloads spaceline-autoloads bug-hunter-autoloads graphql-mode-autoloads protobuf-mode-autoloads fontify-face-autoloads crm-custom-autoloads buffer-move-autoloads pet-autoloads scroll-on-jump-autoloads flycheck-package-autoloads magit-lfs-autoloads lsp-origami-autoloads origami-autoloads pdf-tools-autoloads ido-completing-read+-autoloads go-mode-autoloads window-purpose-autoloads shut-up-autoloads verb-autoloads memoize-autoloads lsp-ui-autoloads reason-mode-autoloads company-quickhelp-autoloads sbt-mode-autoloads vundo-autoloads lsp-jedi-autoloads page-break-lines-autoloads smart-semicolon-autoloads ssh-config-mode-autoloads sphinx-doc-autoloads solarized-theme-autoloads browse-kill-ring-autoloads dired-hide-dotfiles-autoloads svg-lib-autoloads jsonian-autoloads amx-autoloads eterm-256color-autoloads xterm-color-autoloads package-build-autoloads derived ialign-autoloads dotenv-mode-autoloads shrink-path-autoloads default-text-scale-autoloads enh-ruby-mode-autoloads csv-mode-autoloads dired-single-autoloads package-utils-autoloads restart-emacs-autoloads flycheck-cask-autoloads tuareg-autoloads caml-autoloads all-the-icons-dired-autoloads all-the-icons-autoloads jq-mode-autoloads smartparens-autoloads flx-isearch-autoloads emmet-mode-autoloads imenu-list-autoloads cask-mode-autoloads yard-mode-autoloads company-native-complete-autoloads native-complete-autoloads company-autoloads focus-autoloads flycheck-projectile-autoloads rainbow-mode-autoloads po-mode-autoloads delight-autoloads flx-ido-autoloads lorem-ipsum-autoloads wgrep-ag-autoloads buttercup-autoloads yaml-mode-autoloads python-insert-docstring-autoloads cargo-autoloads add-node-modules-path-autoloads request-autoloads pos-tip-autoloads jq-format-autoloads expand-region-autoloads sass-mode-autoloads haml-mode-autoloads powerline-autoloads js-doc-autoloads forge-autoloads ghub-autoloads nodejs-repl-autoloads prescient-autoloads string-inflection-autoloads visual-regexp-steroids-autoloads terraform-mode-autoloads lsp-docker-autoloads yaml-autoloads flycheck-inline-autoloads flycheck-autoloads pkg-info-autoloads epl-autoloads whitespace-cleanup-mode-autoloads closql-autoloads emacsql-autoloads projectile-rails-autoloads rake-autoloads inf-ruby-autoloads inflections-autoloads git-modes-autoloads macrostep-autoloads python-pytest-autoloads projectile-autoloads scala-mode-autoloads quick-peek-autoloads tablist-autoloads groovy-mode-autoloads imenu-anywhere-autoloads olivetti-autoloads treepy-autoloads bui-autoloads repeat-help-autoloads apib-mode-autoloads quelpa-use-package-autoloads quelpa-autoloads ido-vertical-mode-autoloads multiple-cursors-autoloads beginend-autoloads smooth-scrolling-autoloads vterm-autoloads which-key-autoloads aggressive-indent-autoloads diff-hl-autoloads osx-trash-autoloads cmake-font-lock-autoloads cmake-mode-autoloads use-package-autoloads ron-mode-autoloads rg-autoloads wgrep-autoloads hcl-mode-autoloads visual-regexp-autoloads udev-mode-autoloads dired-collapse-autoloads dired-hacks-utils-autoloads ag-autoloads arduino-mode-autoloads ede/auto eieio-base crux-autoloads auto-compile-autoloads prettier-autoloads editorconfig-autoloads nvm-autoloads iter2-autoloads elisp-def-autoloads package-lint-autoloads coverage-autoloads ov-autoloads shift-number-autoloads python-isort-autoloads magit-todos-autoloads pcre2el-autoloads magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads hl-todo-autoloads compat-autoloads async-autoloads kurecolor-autoloads flx-autoloads lsp-treemacs-autoloads lsp-mode-autoloads markdown-mode-autoloads spinner-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads yasnippet-snippets-autoloads yasnippet-autoloads python-black-autoloads reformatter-autoloads iedit-autoloads exec-path-from-shell-autoloads plantuml-mode-autoloads helpful-autoloads elisp-refs-autoloads f-autoloads s-autoloads swift-mode-autoloads ht-autoloads info dash-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core password-cache json map byte-opt url-vars comp comp-cstr warnings icons subr-x rx cl-seq cl-macs cl-extra help-mode bytecomp byte-compile gv pcase bootstrap-theme cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads xwidget-internal kqueue cocoa ns lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2734066 1135755) (symbols 48 90871 204) (strings 32 487214 217323) (string-bytes 1 16684250) (vectors 16 203584) (vector-slots 8 5399284 682384) (floats 8 1516 5281) (intervals 56 188246 17889) (buffers 984 30)) ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-05-05 10:42 bug#63300: 29.0.90; Tramp keeps customizing variables on every connection Jimmy Yuen Ho Wong @ 2023-06-04 8:59 ` Michael Albinus 2023-06-04 11:30 ` Jimmy Wong 0 siblings, 1 reply; 17+ messages in thread From: Michael Albinus @ 2023-06-04 8:59 UTC (permalink / raw) To: Jimmy Yuen Ho Wong; +Cc: 63300 Jimmy Yuen Ho Wong <wyuenho@gmail.com> writes: Hi, > Whenever I install a package or do anything that turns on Tramp such as > sudoing, Tramp writes to my `custom-file-path` the variables > `connection-local-criteria-alist` and > `connection-local-profile-alist`. This is undesirable as it prevents the > customs files from being versioned effectively and shared across > multiple Emacs installations across machines. Furthermore, no package > should write to the customs file without the user's explicitly > approval. Defcustoms should be used for customizations, not caching. This sounds like the same problem as bug#62106. This was fixed in the emacs-29 branch as commit --8<---------------cut here---------------start------------->8--- commit 36ade0704e1829fd27970e8d478cf4b52deed517 Author: Michael Albinus <michael.albinus@gmx.de> Date: Mon Mar 13 18:02:36 2023 +0100 Fix connection-local variables settings --8<---------------cut here---------------end--------------->8--- Tramp itself calls customize-save-variable only in case you use a multi-hop method, and you have set tramp-save-ad-hoc-proxies to a non-nil value. This behavior has been implemented with commit --8<---------------cut here---------------start------------->8--- commit 53dc7bec8303584772e0922acb64aa6e1625b556 Author: Michael Albinus <michael.albinus@gmx.de> Date: Mon May 29 11:22:54 2023 +0200 Fix regression when saving tramp-default-proxies-alist (Do not merge) --8<---------------cut here---------------end--------------->8--- Could you, please, check? Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 8:59 ` Michael Albinus @ 2023-06-04 11:30 ` Jimmy Wong 2023-06-04 11:42 ` Michael Albinus 0 siblings, 1 reply; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 11:30 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 2015 bytes --] I can still reproduce this bug on the latest emacs-29 commit. I do not have tramp-save-ad-hoc-proxies set. I have since found out that simply M-x load-library tramp will have these connection-local-*-alist variables set without haven’t done anything. On 4 Jun 2023 at 9:59 AM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > Jimmy Yuen Ho Wong <wyuenho@gmail.com> writes: > > Hi, > > > Whenever I install a package or do anything that turns on Tramp such as > > sudoing, Tramp writes to my `custom-file-path` the variables > > `connection-local-criteria-alist` and > > `connection-local-profile-alist`. This is undesirable as it prevents the > > customs files from being versioned effectively and shared across > > multiple Emacs installations across machines. Furthermore, no package > > should write to the customs file without the user's explicitly > > approval. Defcustoms should be used for customizations, not caching. > > This sounds like the same problem as bug#62106. This was fixed in the > emacs-29 branch as commit > > --8<---------------cut here---------------start------------->8--- > commit 36ade0704e1829fd27970e8d478cf4b52deed517 > Author: Michael Albinus <michael.albinus@gmx.de> > Date: Mon Mar 13 18:02:36 2023 +0100 > > Fix connection-local variables settings > --8<---------------cut here---------------end--------------->8--- > > Tramp itself calls customize-save-variable only in case you use a > multi-hop method, and you have set tramp-save-ad-hoc-proxies to a > non-nil value. This behavior has been implemented with commit > > --8<---------------cut here---------------start------------->8--- > commit 53dc7bec8303584772e0922acb64aa6e1625b556 > Author: Michael Albinus <michael.albinus@gmx.de> > Date: Mon May 29 11:22:54 2023 +0200 > > Fix regression when saving tramp-default-proxies-alist (Do not merge) > --8<---------------cut here---------------end--------------->8--- > > Could you, please, check? > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 2633 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 11:30 ` Jimmy Wong @ 2023-06-04 11:42 ` Michael Albinus 2023-06-04 11:44 ` Jimmy Wong 2023-06-04 11:59 ` Jimmy Wong 0 siblings, 2 replies; 17+ messages in thread From: Michael Albinus @ 2023-06-04 11:42 UTC (permalink / raw) To: Jimmy Wong; +Cc: 63300 Jimmy Wong <wyuenho@gmail.com> writes: Hi, > I have since found out that simply M-x load-library tramp will have > these connection-local-*-alist variables set without haven’t done > anything. Yes, that's intended. But nothing should have been written to your init file with this scenario. Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 11:42 ` Michael Albinus @ 2023-06-04 11:44 ` Jimmy Wong 2023-06-04 11:56 ` Michael Albinus 2023-06-04 11:59 ` Jimmy Wong 1 sibling, 1 reply; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 11:44 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 645 bytes --] Except when you customize a variable and click save for future sessions or apply and save, all the customized variables including the hacked connection local alist variables will be dumped to the customs file. On 4 Jun 2023 at 12:42 PM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > Jimmy Wong <wyuenho@gmail.com> writes: > > Hi, > > > I have since found out that simply M-x load-library tramp will have > > these connection-local-*-alist variables set without haven’t done > > anything. > > Yes, that's intended. But nothing should have been written to your init > file with this scenario. > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 1111 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 11:44 ` Jimmy Wong @ 2023-06-04 11:56 ` Michael Albinus 0 siblings, 0 replies; 17+ messages in thread From: Michael Albinus @ 2023-06-04 11:56 UTC (permalink / raw) To: Jimmy Wong; +Cc: 63300 Jimmy Wong <wyuenho@gmail.com> writes: Hi, > Except when you customize a variable and click save for future > sessions or apply and save, all the customized variables including the > hacked connection local alist variables will be dumped to the customs > file. In the past, connection-local-*-alist were simple variables. Then they have been converted to user options, see etc/NEWS: --8<---------------cut here---------------start------------->8--- *** Some connection-local variables are now user options. The variables 'connection-local-profile-alist' and 'connection-local-criteria-alist' are now user options, in order to make it more convenient to inspect and modify them. --8<---------------cut here---------------end--------------->8--- And that's the reason behind. I won't call the Tramp settings "hacked connection local alist variables". They are useful defaults. Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 11:42 ` Michael Albinus 2023-06-04 11:44 ` Jimmy Wong @ 2023-06-04 11:59 ` Jimmy Wong 2023-06-04 12:05 ` Michael Albinus 1 sibling, 1 reply; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 11:59 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 949 bytes --] To put this more concretely, if some packages I’m requiring in my init file transitively requires tramp, then I go to the package menu and install a new package, my customs file will not only have saved the new package in package-selected-packages, but also these gigantic connection-local-*-alist variables. This is just too much surprises. Again, I think if tramp needs to cache the values of these variables, they should be written to a file in user-emacs-directory, not hacked in a customizable variable. On 4 Jun 2023 at 12:42 PM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > Jimmy Wong <wyuenho@gmail.com> writes: > > Hi, > > > I have since found out that simply M-x load-library tramp will have > > these connection-local-*-alist variables set without haven’t done > > anything. > > Yes, that's intended. But nothing should have been written to your init > file with this scenario. > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 1427 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 11:59 ` Jimmy Wong @ 2023-06-04 12:05 ` Michael Albinus 2023-06-04 12:16 ` Jimmy Wong 0 siblings, 1 reply; 17+ messages in thread From: Michael Albinus @ 2023-06-04 12:05 UTC (permalink / raw) To: Jimmy Wong; +Cc: 63300 Jimmy Wong <wyuenho@gmail.com> writes: > Again, I think if tramp needs to cache the values of these variables, > they should be written to a file in user-emacs-directory, not hacked > in a customizable variable. But these Tramp settings are connection-local, meaning they are different for different remote hosts. Connection-local variables have been invented for exact this purpose. Now we can argue whether connection-local-*-alist shall be user options or not. But exactly this has been requested, and that's why they have been adapted. Your request is the opposite ... Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 12:05 ` Michael Albinus @ 2023-06-04 12:16 ` Jimmy Wong 2023-06-04 12:21 ` Michael Albinus 0 siblings, 1 reply; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 12:16 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 1121 bytes --] Well, yes, I consider this a poorly considered “feature”, or arguably a bug, for exactly the reason you said, they are local to connections and machines, and thus highly variable. We can probably argue whether this is a bug in tramp or a bug in customize-save-variable tho (why on earth does the act of saving a single variable value saves all customized values if a custom file exists?) On 4 Jun 2023 at 1:05 PM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > Jimmy Wong <wyuenho@gmail.com> writes: > > > Again, I think if tramp needs to cache the values of these variables, > > they should be written to a file in user-emacs-directory, not hacked > > in a customizable variable. > > But these Tramp settings are connection-local, meaning they are > different for different remote hosts. Connection-local variables have > been invented for exact this purpose. > > Now we can argue whether connection-local-*-alist shall be user options > or not. But exactly this has been requested, and that's why they have > been adapted. Your request is the opposite ... > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 1623 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 12:16 ` Jimmy Wong @ 2023-06-04 12:21 ` Michael Albinus 2023-06-04 12:22 ` Jimmy Wong 0 siblings, 1 reply; 17+ messages in thread From: Michael Albinus @ 2023-06-04 12:21 UTC (permalink / raw) To: Jimmy Wong; +Cc: 63300 Jimmy Wong <wyuenho@gmail.com> writes: Hi, > Well, yes, I consider this a poorly considered “feature”, or arguably > a bug, for exactly the reason you said, they are local to connections > and machines, and thus highly variable. Not really. They exist for the reason that a user can override the default values offered by Tramp. This I would call a user option. Tramp has a lot of further host specific data, which are all kept in variables. > We can probably argue whether this is a bug in tramp or a bug in > customize-save-variable tho (why on earth does the act of saving a > single variable value saves all customized values if a custom file > exists?) I agree with the latter. Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 12:21 ` Michael Albinus @ 2023-06-04 12:22 ` Jimmy Wong 2023-06-04 16:55 ` Jimmy Wong 0 siblings, 1 reply; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 12:22 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 919 bytes --] I’ll file a separate bug. You can close this one. Thanks. On 4 Jun 2023 at 1:21 PM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > Jimmy Wong <wyuenho@gmail.com> writes: > > Hi, > > > Well, yes, I consider this a poorly considered “feature”, or arguably > > a bug, for exactly the reason you said, they are local to connections > > and machines, and thus highly variable. > > Not really. They exist for the reason that a user can override the > default values offered by Tramp. This I would call a user option. > > Tramp has a lot of further host specific data, which are all kept in > variables. > > > We can probably argue whether this is a bug in tramp or a bug in > > customize-save-variable tho (why on earth does the act of saving a > > single variable value saves all customized values if a custom file > > exists?) > > I agree with the latter. > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 1457 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 12:22 ` Jimmy Wong @ 2023-06-04 16:55 ` Jimmy Wong 2023-06-04 17:24 ` Eli Zaretskii 2023-06-06 11:46 ` Michael Albinus 0 siblings, 2 replies; 17+ messages in thread From: Jimmy Wong @ 2023-06-04 16:55 UTC (permalink / raw) To: Michael Albinus; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 1994 bytes --] Actually, I take it back. customize-save-variable only saves variables that have the saved-value symbol property set. This property is normally set by customize when it is saved to the custom file. Something in Tramp is setting this property without saving the variable values to the custom file or going through customize. In fact, you can see it via M-x customize-option connection-local-criteria-alist. The value will be shown as SAVED. In addition, setting `enable-connection-local-variables` to nil early in early-init.el has no effect, the variable is still set on load. Both of this behavior violate what is documented in the docstring and https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html. If you must, enable-conneciton-local-variables should be respected, and if you must, set the theme-value property on these connection-local variables instead of saved-value so custom-save-all will not save them. On 4 Jun 2023 at 1:23 PM +0100, Jimmy Wong <wyuenho@gmail.com>, wrote: > I’ll file a separate bug. You can close this one. Thanks. > On 4 Jun 2023 at 1:21 PM +0100, Michael Albinus <michael.albinus@gmx.de>, wrote: > > Jimmy Wong <wyuenho@gmail.com> writes: > > > > Hi, > > > > > Well, yes, I consider this a poorly considered “feature”, or arguably > > > a bug, for exactly the reason you said, they are local to connections > > > and machines, and thus highly variable. > > > > Not really. They exist for the reason that a user can override the > > default values offered by Tramp. This I would call a user option. > > > > Tramp has a lot of further host specific data, which are all kept in > > variables. > > > > > We can probably argue whether this is a bug in tramp or a bug in > > > customize-save-variable tho (why on earth does the act of saving a > > > single variable value saves all customized values if a custom file > > > exists?) > > > > I agree with the latter. > > > > Best regards, Michael. [-- Attachment #2: Type: text/html, Size: 2808 bytes --] ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 16:55 ` Jimmy Wong @ 2023-06-04 17:24 ` Eli Zaretskii 2023-06-06 11:35 ` Michael Albinus 2023-06-06 11:46 ` Michael Albinus 1 sibling, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2023-06-04 17:24 UTC (permalink / raw) To: Jimmy Wong; +Cc: michael.albinus, 63300 > Cc: 63300@debbugs.gnu.org > Date: Sun, 4 Jun 2023 17:55:42 +0100 > From: Jimmy Wong <wyuenho@gmail.com> > > Actually, I take it back. customize-save-variable only saves variables that have the saved-value > symbol property set. This property is normally set by customize when it is saved to the custom file. > Something in Tramp is setting this property without saving the variable values to the custom file or > going through customize. In fact, you can see it via M-x customize-option > connection-local-criteria-alist. The value will be shown as SAVED. Maybe Tramp uses setopt or something to change the values of these options? Michael? > Both of this behavior violate what is documented in the docstring and > https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html. > > If you must, enable-conneciton-local-variables should be respected, and if you must, set the > theme-value property on these connection-local variables instead of saved-value so custom-save-all > will not save them. I believe my proposal to make Tramp use variables that are initialized from the user options should solve all of this. Let's wait for Michael to chime in on that. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 17:24 ` Eli Zaretskii @ 2023-06-06 11:35 ` Michael Albinus 2023-06-06 12:04 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Michael Albinus @ 2023-06-06 11:35 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jimmy Wong, 63300 Eli Zaretskii <eliz@gnu.org> writes: Hi Eli, >> Actually, I take it back. customize-save-variable only saves variables that have the saved-value >> symbol property set. This property is normally set by customize when it is saved to the custom file. >> Something in Tramp is setting this property without saving the variable values to the custom file or >> going through customize. In fact, you can see it via M-x customize-option >> connection-local-criteria-alist. The value will be shown as SAVED. > > Maybe Tramp uses setopt or something to change the values of these > options? Michael? Tramp does nothing special, it just calls connection-local-set-profiles and connection-local-set-profile-variables. >> Both of this behavior violate what is documented in the docstring and >> https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html. >> >> If you must, enable-conneciton-local-variables should be respected, and if you must, set the >> theme-value property on these connection-local variables instead of saved-value so custom-save-all >> will not save them. > > I believe my proposal to make Tramp use variables that are initialized > from the user options should solve all of this. Let's wait for > Michael to chime in on that. By this, a user couldn't change the user options later on, after Tramp is initilized. And it isn't only Tramp, other packages use connection-local variables as well. See my other message for a proposal. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-06 11:35 ` Michael Albinus @ 2023-06-06 12:04 ` Eli Zaretskii 2023-06-08 8:08 ` Michael Albinus 0 siblings, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2023-06-06 12:04 UTC (permalink / raw) To: Michael Albinus; +Cc: wyuenho, 63300 > From: Michael Albinus <michael.albinus@gmx.de> > Cc: Jimmy Wong <wyuenho@gmail.com>, 63300@debbugs.gnu.org > Date: Tue, 06 Jun 2023 13:35:35 +0200 > > > I believe my proposal to make Tramp use variables that are initialized > > from the user options should solve all of this. Let's wait for > > Michael to chime in on that. > > By this, a user couldn't change the user options later on, after Tramp > is initilized. And it isn't only Tramp, other packages use > connection-local variables as well. There are many options that behave like that. It's nothing new. > See my other message for a proposal. If it works, I don't mind, although the solution looks more complicated (thus more risky during a pretest). In general, Lisp programs should not modify values of user options, that is only for the user. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-06 12:04 ` Eli Zaretskii @ 2023-06-08 8:08 ` Michael Albinus 0 siblings, 0 replies; 17+ messages in thread From: Michael Albinus @ 2023-06-08 8:08 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 63300-done, wyuenho Version: 29.1 Eli Zaretskii <eliz@gnu.org> writes: Hi Eli, >> See my other message for a proposal. > > If it works, I don't mind, although the solution looks more > complicated (thus more risky during a pretest). No further comments, so I've pushed the change to the emacs-29 branch. Closing the bug. > In general, Lisp programs should not modify values of user options, > that is only for the user. I agree, but here we have the case, that two complex variables have been transformed into user options in order to offer more convenient ways to modify them. So we must handle both cases, modification by other packages due to call of connection-local-set-profiles or connection-local-set-profile-variables, and modification in the customization buffer. Best regards, Michael. ^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#63300: 29.0.90; Tramp keeps customizing variables on every connection 2023-06-04 16:55 ` Jimmy Wong 2023-06-04 17:24 ` Eli Zaretskii @ 2023-06-06 11:46 ` Michael Albinus 1 sibling, 0 replies; 17+ messages in thread From: Michael Albinus @ 2023-06-06 11:46 UTC (permalink / raw) To: Jimmy Wong; +Cc: 63300 [-- Attachment #1: Type: text/plain, Size: 2216 bytes --] Jimmy Wong <wyuenho@gmail.com> writes: Hi, > Actually, I take it back. customize-save-variable only saves variables > that have the saved-value symbol property set. This property is > normally set by customize when it is saved to the custom file. > Something in Tramp is setting this property without saving the > variable values to the custom file or going through customize. In > fact, you can see it via M-x customize-option > connection-local-criteria-alist. The value will be shown as SAVED. This property is set as well in custom-set-variables. > In addition, setting `enable-connection-local-variables` to nil early > in early-init.el has no effect, the variable is still set on load. This is a different game. enable-connection-local-variables has no effect on setting / saving connection-local-criteria-alist and connection-local-profile-alist. e-c-l-v is used only in hack-connection-local-variables in order to control, whether connection-local variables shall be set as buffer-local variables. And the documentation is clear about, that it isn't intended to be used on user level, see (info "(elisp) Applying Connection Local Variables") --8<---------------cut here---------------start------------->8--- -- Variable: enable-connection-local-variables If ‘nil’, connection-local variables are ignored. This variable shall be changed temporarily only in special modes. --8<---------------cut here---------------end--------------->8--- > Both of this behavior violate what is documented in the docstring and > https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html. No. > If you must, enable-conneciton-local-variables should be respected, > and if you must, set the theme-value property on these > connection-local variables instead of saved-value so custom-save-all > will not save them. No. In connection-local-set-profiles and connection-local-set-profile-variables it should be checked, whether the saved-value property is set. If not, it shall be reset to nil, after custom-set-variables has been called. The appended patch shall do the trick. Could you, please, test? Best regards, Michael. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 2160 bytes --] diff --git a/lisp/files-x.el b/lisp/files-x.el index 548d9efc193..bae535da550 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -674,15 +674,18 @@ connection-local-set-profiles (dolist (profile profiles) (unless (assq profile connection-local-profile-alist) (error "No such connection profile `%s'" (symbol-name profile)))) - (let* ((criteria (connection-local-normalize-criteria criteria)) + (let* ((saved-value (get 'connection-local-criteria-alist 'saved-value)) + (criteria (connection-local-normalize-criteria criteria)) (slot (assoc criteria connection-local-criteria-alist))) (if slot (setcdr slot (delete-dups (append (cdr slot) profiles))) (setq connection-local-criteria-alist (cons (cons criteria (delete-dups profiles)) - connection-local-criteria-alist)))) - (custom-set-variables - `(connection-local-criteria-alist ',connection-local-criteria-alist now))) + connection-local-criteria-alist))) + (custom-set-variables + `(connection-local-criteria-alist ',connection-local-criteria-alist now)) + (unless saved-value + (put 'connection-local-criteria-alist 'saved-value nil)))) (defsubst connection-local-get-profile-variables (profile) "Return the connection-local variable list for PROFILE." @@ -701,9 +704,12 @@ connection-local-set-profile-variables variables are set in the server's process buffer according to the VARIABLES list of the connection profile. The list is processed in order." - (setf (alist-get profile connection-local-profile-alist) variables) - (custom-set-variables - `(connection-local-profile-alist ',connection-local-profile-alist now))) + (let ((saved-value (get 'connection-local-profile-alist 'saved-value))) + (setf (alist-get profile connection-local-profile-alist) variables) + (custom-set-variables + `(connection-local-profile-alist ',connection-local-profile-alist now)) + (unless saved-value + (put 'connection-local-profile-alist 'saved-value nil)))) ;;;###autoload (defun connection-local-update-profile-variables (profile variables) ^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2023-06-08 8:08 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-05 10:42 bug#63300: 29.0.90; Tramp keeps customizing variables on every connection Jimmy Yuen Ho Wong 2023-06-04 8:59 ` Michael Albinus 2023-06-04 11:30 ` Jimmy Wong 2023-06-04 11:42 ` Michael Albinus 2023-06-04 11:44 ` Jimmy Wong 2023-06-04 11:56 ` Michael Albinus 2023-06-04 11:59 ` Jimmy Wong 2023-06-04 12:05 ` Michael Albinus 2023-06-04 12:16 ` Jimmy Wong 2023-06-04 12:21 ` Michael Albinus 2023-06-04 12:22 ` Jimmy Wong 2023-06-04 16:55 ` Jimmy Wong 2023-06-04 17:24 ` Eli Zaretskii 2023-06-06 11:35 ` Michael Albinus 2023-06-06 12:04 ` Eli Zaretskii 2023-06-08 8:08 ` Michael Albinus 2023-06-06 11:46 ` Michael Albinus
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).