unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eshel Yaron <me@eshelyaron.com>
Cc: 62329@debbugs.gnu.org
Subject: bug#62329: 30.0.50; Error in TRAMP due to variable aliasing
Date: Tue, 21 Mar 2023 17:20:12 +0100	[thread overview]
Message-ID: <87ttyeoz43.fsf@gmx.de> (raw)
In-Reply-To: <m1lejqme5c.fsf@eshelyaron.com> (Eshel Yaron's message of "Tue, 21 Mar 2023 15:23:43 +0200")

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Eshel Yaron <me@eshelyaron.com> writes:

 Hi Eshel,

>> I hope to find a fix, soon.
>
> Great, thanks.  In the meantime my dirty workaround is putting the
> following in my init.el:
>
> (with-eval-after-load 'compile
>   (require 'tramp-sh))
>
> This causes the defvaralias call to happen before
> tramp-use-connection-share is localized, which seems to work alright.
> The downside is that tramp-sh is loaded the first time I use M-x compile
> even if I'm only working locally.

In my local environment, I have inverted the definition of the variable
alias. This seems to solve the bug.

Could you pls try this patch?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1115 bytes --]

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 24e90447b24..339eb1fa9ab 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -106,6 +106,8 @@ tramp-initial-end-of-output
 (defconst tramp-end-of-heredoc (md5 tramp-end-of-output)
   "String used to recognize end of heredoc strings.")

+(define-obsolete-variable-alias
+  'tramp-use-ssh-controlmaster-options 'tramp-use-connection-share "30.1")
 (defcustom tramp-use-connection-share (not (eq system-type 'windows-nt))
   "Whether to use connection share in ssh or PuTTY.
 Set it to t, if you want Tramp to apply respective options. These
@@ -122,11 +124,6 @@ tramp-use-connection-share
   ;; Check with (safe-local-variable-p 'tramp-use-connection-share 'suppress)
   :safe (lambda (val) (and (memq val '(t nil suppress)) t)))

-(defvaralias 'tramp-use-connection-share 'tramp-use-ssh-controlmaster-options)
-(make-obsolete-variable
- 'tramp-use-ssh-controlmaster-options
- "Use `tramp-use-connection-share' instead" "30.1")
-
 (defvar tramp-ssh-controlmaster-options nil
   "Which ssh Control* arguments to use.


[-- Attachment #3: Type: text/plain, Size: 36 bytes --]


Thanks, and best regards, Michael.

  reply	other threads:[~2023-03-21 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 12:00 bug#62329: 30.0.50; Error in TRAMP due to variable aliasing Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-21 13:08 ` Michael Albinus
2023-03-21 13:23   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-21 16:20     ` Michael Albinus [this message]
2023-03-21 17:05       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-21 20:26         ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttyeoz43.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=62329@debbugs.gnu.org \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).