From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#54459: 29.0.50; Simplify connection-local variables (feature request) Date: Sun, 20 Mar 2022 12:04:28 +0100 Message-ID: <87fsncdgw3.fsf@gmx.de> References: <87bky2zjzz.fsf.ref@aol.com> <87bky2zjzz.fsf@aol.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9474"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: spacibba@aol.com To: 54459@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 20 12:06:00 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 1nVtNn-0002DD-PZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 12:05:59 +0100 Original-Received: from localhost ([::1]:51654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVtNl-0004p5-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 07:05:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVtN2-0004oq-8m for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 07:05:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVtMs-0007N6-Pm for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 07:05:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVtMs-0001tS-KG for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 07:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2022 11:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54459 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 54459@debbugs.gnu.org, Ergus Original-Received: via spool by submit@debbugs.gnu.org id=B.16477742877246 (code B ref -1); Sun, 20 Mar 2022 11:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Mar 2022 11:04:47 +0000 Original-Received: from localhost ([127.0.0.1]:32919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVtMd-0001sn-2c for submit@debbugs.gnu.org; Sun, 20 Mar 2022 07:04:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVtMb-0001sg-Dk for submit@debbugs.gnu.org; Sun, 20 Mar 2022 07:04:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVtMb-0004oU-9s for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 07:04:45 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:50953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVtMZ-0007Lj-F1 for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2022 07:04:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647774270; bh=xdP3kFR1bj7HK8gE1sC2WfCra3/pA1k8Pe57c+dW3Z4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=CN4OxnYpNHnaJWo+WQ74Euqc5E/OlVE6sjx2PW59YMltN4FUYmSdUbazLn12aSDTn tzScChhp+xgfL+x86uH3t3Px6yypOgvfM5+U+/rrAOgX2dLf53rAdcVqRmNpZWGqCq dHyYYWVhuLABQ76Q9r2YEnb43pBnG7mxrxC29nlg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.159.32]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MS3il-1ng9y91UOh-00TYYd; Sun, 20 Mar 2022 12:04:30 +0100 In-Reply-To: <87bky2zjzz.fsf@aol.com> (Ergus via's message of "Sat, 19 Mar 2022 04:41:52 +0100") X-Provags-ID: V03:K1:h8+Ztcy+jNSBrJA4jBm8IdOjmMwCAE5DZuJyb27N90rMejEjWVU CLm/CuI9EQp9tW+jBh3Ytt59hkLOBwvQflAC/PCUdH32cEivXHoYhGhEgnOSJCwrG6BNuBI LqJQP/L39wLLYlyS+A+6O+VkWWLHmxSw+Ge3WH0x6PeekfsIV43PWqTONF1euCuTrgbch/N Im2r9/Ew4eUQPZxOOPg7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:k4mlkN85Ayw=:+QjjwMVFmIujIrrKLbSVKZ H5KHWxiky30ye6L8cZzgadJYiBzsif2ZQ8TBtZzAEJsV0gZweTS5oUhwQt2PSV/ejs27OkyYS xjFuHpLjQTJfMLXEs5rLF44aVH2AbRMWSpmlou1CXSI8ww6F71I+OpKe42hEgXtrAbSkNAr5M WRxOhIRxwcBEbWbc5zOna3pGw/fgISXxJ7+7NqsBigFOPV9xTYIkF5KbfWOgA0zU2sioPZsh3 zwZi2c1UvvbRKpXEXdKdDAhFQK+KEAEo2X3rRopfbhHnJ6BBqtNDu14TCqC/9sBFaZPen2aAN pvFRYOO1esmRFLCplq3DpiM9SPfoYv5bIe/FgY8glKx7/m4bn+Dvbn+G5sASAFG8TPo1w1GiQ glfFopcb45fIGs2LalZ19WGBOY4XQyxfHasBS7uwqYNEZixkOzi8blMPhH/IAbXhlSw0G97E/ lNf/2zVxi1QLjMe4a+iMoOZiCjJFP9vFi7NvkV7wOCcQFyl0/6T8pvByvLvf1bgTJFsVUk0JP +gx4lm8nSTg9F0d+W8ejdNukrR+usw0clSCHlV6MineJgINcUTVMkq/vZ5kyHZVJR6U+SXbjS Z2jsa7+s838xK88Z4ni6bh2yCsVvK9ZsLfqSn2NTHuyN3w22cy+rT7Fjq3wemjFixsu5w1OS0 Yy1usfBzYBKb92AeOjDojs0vKWi5WHEtGv4MPi2n81qQrH2y6yJ0KpLhdMUO47nyjLFVx3DLC ImAYo8ioWQ3TbQn9GNfa1Xr+8WZvXrySlHw6A5Ga1uuQQKnJbzElpwyHLaGssqGkjtir9iLk Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:228616 Archived-At: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Hi: Hi, > There are 3 issues that could be solved/improved: > > 1) If another buffer of a file in the same remote host is already open, > then when the function is called in that buffer for the first time it > will use the value cached in gtags--executable-connection. That's why in > the code I need to create a buffer local variable... Could we provide a > way to update all of them immediately? I don't understand the scenario, sorry. Could you pls explain it in detail= ? > 2) There are functions to set connection-local profile variables > (connection-local-set-profile-variables) But so far there are not any > clean way to append variables to an existing profile; so a call to > connection-local-set-profile-variables deleted any previous variable, > actually the user is enforced to create a unique name for every profile > every time it needs something like this. =2D-8<---------------cut here---------------start------------->8--- (connection-local-set-profile-variables 'profile (append (connection-local-get-profile-variables 'profile) my-variables-list)) =2D-8<---------------cut here---------------end--------------->8--- > 3) In the ideal world it may be possible to add an optional parameter to > tell executable-find to cache the found values per host and executable > name... so it could avoid the extra remote search... I understand this > shouldn't be enabled by default, but many packages may find it > useful. executable-find could be smart enough to remember some of the > previous searches at least in remote hosts. That's hard to do. A user could change the remote PATH while the result of executable-find is cached. Furthermore, Tramp appends the local part of the remote default-directory to the directory search list. Therefore, executable-find could return a possibly wrong cached value. You could write your own function, using Tramp's cache mechanism, but at your own risk. Something like (untested) =2D-8<---------------cut here---------------start------------->8--- (defun my-executable-find (command &optional remote) (if (and remote (file-remote-p default-directory)) (with-tramp-connection-property (tramp-get-process (tramp-dissect-file-name default-directory)) (concat "executable-find-" command) (executable-find command remote)) (executable-find command remote))) =2D-8<---------------cut here---------------end--------------->8--- Best regards, Michael.