From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#53644: 29.0.50; xref-search-program breaks if programm not installed on a remote host Date: Tue, 08 Feb 2022 21:16:41 +0000 Message-ID: <87bkzhrrd2.fsf@posteo.net> References: <87v8y0rdz3.fsf@posteo.net> <87iltvnj3g.fsf@gmx.de> <3b4cfff4-4d95-9f8e-d5ec-db6cc492a9b8@yandex.ru> <87leypml9i.fsf@gmx.de> <01015f05-e40c-c18a-8b03-5012a3cb44ba@yandex.ru> <875ypp624b.fsf@posteo.net> <87iltptnem.fsf@gmx.de> <87k0e5uvtp.fsf@posteo.net> <87a6f1tdlt.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25510"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53644@debbugs.gnu.org, Dmitry Gutov To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 08 22:17:42 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHXrp-0006U0-IT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Feb 2022 22:17:41 +0100 Original-Received: from localhost ([::1]:56858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHXro-00071V-Fk for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Feb 2022 16:17:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHXrR-0006yx-Iu for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 16:17:17 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHXrC-0000XL-J7 for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 16:17:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHXrC-0004Dj-84 for bug-gnu-emacs@gnu.org; Tue, 08 Feb 2022 16:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Feb 2022 21:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53644 X-GNU-PR-Package: emacs Original-Received: via spool by 53644-submit@debbugs.gnu.org id=B53644.164435501116200 (code B ref 53644); Tue, 08 Feb 2022 21:17:02 +0000 Original-Received: (at 53644) by debbugs.gnu.org; 8 Feb 2022 21:16:51 +0000 Original-Received: from localhost ([127.0.0.1]:48900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHXr0-0004DD-Ql for submit@debbugs.gnu.org; Tue, 08 Feb 2022 16:16:51 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:55211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHXqy-0004Cw-GQ for 53644@debbugs.gnu.org; Tue, 08 Feb 2022 16:16:49 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 54E10240101 for <53644@debbugs.gnu.org>; Tue, 8 Feb 2022 22:16:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644355002; bh=i6M3K2CEIVukIgvnQAlwaTpaKweiRZ/2xnF5tGOCNTE=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=SA7dY0JoUsmNd5CM502mv1lPVZqvpEV3i3CD+5jYoOEhUoepGu9wAOBiN1wmR+8fC P3K2erNJVdolAhC86wNR2EG2+EOQW2wBDP9q4iP3j8XCIenrCERlgvGAALLxOTu6Lj 7qOynyRi73qNBra/yfZOX4v39JCE0UinfkzlJqoicIXrWM0XElvYZAqoefB7h8026L koQWk797RCgB6xiRLS+YAeC2VnKET2Kv8KByxGvtl+IuMR8WnYvtgAJ18I8fzZoHbV ja9VIcnBR4S/ww54FvrH9vVrZ+7BjYFCCQYDl56XR1PHhL6jt99g2dQaa0+tLBlFBh tsnpGjXBkNq5g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JtbRY4cbDz9rxM; Tue, 8 Feb 2022 22:16:41 +0100 (CET) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: <87a6f1tdlt.fsf@gmx.de> (Michael Albinus's message of "Tue, 08 Feb 2022 19:30:54 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226415 Archived-At: Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philip, > >> Ok, I missed that. But the question still remains for versions of Emacs >> prior to 27.1. What would you advise to do there? >> >> For context: In my specific case, I am using Guix so shell-file-name >> something like >> /gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash. >> Virtually every server I might connect to does not have this path (tough >> "/bin/sh" works in that case (which would break other systems like >> adb)). So I don't think a version check would suffice. All it does in >> the patch I provided above is provide a speedup for all greps after the >> first one. > > I would do something like this (untested!): > > (defmacro my-with-connection-local-variables (&rest body) > "Ensure, that `shell-file-name' and `xref-search-program' have proper values." > (if (bound-and-true-p enable-connection-local-variables) > `(with-connection-local-variables ,@body) > `(if (file-remote-p default-directory) > (let ((shell-file-name "/bin/sh") ;; Adapt > (xref-search-program "/bin/gerep")) ;; Adapt But the question here remains precisely what to use instead of the literal "/bin/sh"? > ,@body) > ,@body))) > > Best regards, Michael. > -- Philip Kaludercic