From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: INSIDE_EMACS and Tramp Date: Sat, 02 May 2020 13:20:02 -0400 Message-ID: References: <20200402230535.10490.95720@vcs0.savannah.gnu.org> <20200402230536.E0A3F20CDD@vcs0.savannah.gnu.org> <87lfndarwh.fsf_-_@gmx.de> <87blo78exg.fsf@gmx.de> <871rp357s1.fsf@gmail.com> <87lfmzg3ds.fsf@gmx.de> <87a7397tqz.fsf@gmail.com> <87o8r6wfni.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94548"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Federico Tedin To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 19:21:24 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jUvpM-000OTO-6r for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 19:21:24 +0200 Original-Received: from localhost ([::1]:36006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUvpL-0001YG-9T for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 13:21:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUvoM-00005y-Ao for emacs-devel@gnu.org; Sat, 02 May 2020 13:20:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUvoE-0008UI-Mh for emacs-devel@gnu.org; Sat, 02 May 2020 13:20:21 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUvoE-0008RE-5e for emacs-devel@gnu.org; Sat, 02 May 2020 13:20:14 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 86AA7814DD; Sat, 2 May 2020 13:20:12 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E961780063; Sat, 2 May 2020 13:20:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588440003; bh=2THcYSQCdvwvdt5+Qy2OzFRJsH4oSk4IGvryD5VbG6A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gUY11oSEyXyWrXBjaSdG2BeN6/g/LiZi6jDdI4s3MMkh/Sh5kF068dkVOLi4pF8eh oSyffmeqd37jK1oRXbk0gFkv0UAoVQs2cSollAO9DK3uWHhMB5Uu0cC57aiQREpuFv Pur20Uidyz8ruNiEeb0kfjW6Kq81RDvTtfKLmxxCKAK8Ed4gQCEGthgH4/Kr8hPv3q aL6cLz8NS2VsdfICNFV3iCV1V6Arl3pabAjCXqinO7kPLnpkpgLpSOXZfrScT4wyCU sHX4GGrNNb5Ymwp43mRPlQMUKV8FWxJeVAgoXHyqipHREj6wCOI/fJfxNb7F0qQx0P p0ijm7oPQc1oQ== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9AA9812040A; Sat, 2 May 2020 13:20:03 -0400 (EDT) In-Reply-To: <87o8r6wfni.fsf@gmx.de> (Michael Albinus's message of "Sat, 02 May 2020 16:54:57 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/02 12:48:41 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248508 Archived-At: > +(defvar inside-emacs-functions nil [...] > +(defun inside-emacs (&optional context) > + "Return the string to be set in environment variable INSIDE_EMACS. > +CONTEXT could be a string which is added." > + (mapconcat > + #'identity > + (delq nil (append `(,emacs-version > + ,(and (stringp context) context)) > + (mapcar #'funcall inside-emacs-functions))) > + ",")) Any chance we could live without `inside-emacs-functions` and instead do: (defun inside-emacs (&optional context) "Return the string to be set in environment variable INSIDE_EMACS. CONTEXT could be a string which is added." (let ((base (or (getenv "INSIDE_EMACS") emacs-version))) (if context (concat case "," context) base))) -- Stefan