From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Federico Tedin Newsgroups: gmane.emacs.devel Subject: Re: INSIDE_EMACS and Tramp Date: Sat, 04 Apr 2020 22:13:18 +0200 Message-ID: <871rp357s1.fsf@gmail.com> References: <20200402230535.10490.95720@vcs0.savannah.gnu.org> <20200402230536.E0A3F20CDD@vcs0.savannah.gnu.org> <87lfndarwh.fsf_-_@gmx.de> <87blo78exg.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="87275"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 22:13:56 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 1jKpAy-000Mb8-7o for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 22:13:56 +0200 Original-Received: from localhost ([::1]:41934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKpAx-00034d-AH for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 16:13:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50648) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKpAR-0002eJ-Rh for emacs-devel@gnu.org; Sat, 04 Apr 2020 16:13:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKpAQ-0001EZ-OK for emacs-devel@gnu.org; Sat, 04 Apr 2020 16:13:23 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:40154) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jKpAQ-0001EF-Ie for emacs-devel@gnu.org; Sat, 04 Apr 2020 16:13:22 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id a81so11581529wmf.5 for ; Sat, 04 Apr 2020 13:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Ddkvpx5FVCt+5RwmByChZW/QSjN+v+TLRIAl29hlk8U=; b=iiShyIh1JJ+ra8ED0keiiBEgb9/U+xXic8bsOU7gkHMDxMYnO2r7zOA7Cos1N+tZT+ Lj5SMCMckAY4zp0/e6QdviqZyBLd6GFU2aeqPzxB4gAtEH6VHFgsk4wv25ZV3BEH7VEM La8RQrwop8xo4KY23DPTt/vFke0Y9He5V0jRRD+JJmL3Y1fUsQ+HmY1ogJ9qslBUNg6Z 8bkrzQYj35f6Z+s1I/kFhTepGLtU3BZX58Ipir/x4Vi3rN0RpNikMZtZumMXlxc5GMJe vxhVzkGDskKXibk/5D71WK+RFSniMg+pff0VJxeYLit5YpxFfRD9Z4JGCZhCPss+sDO8 OsMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Ddkvpx5FVCt+5RwmByChZW/QSjN+v+TLRIAl29hlk8U=; b=szL6xW88d7WHM+QeASPztdz5B86kKG/wrLyBdUo7iXeYvBucySgZElk9b1RUV7S+Lk T73eKRGHN/+YMgGUhdxtlBeXLntrB+Hdtm8Data4l4Gvyb9q8KS8p2HIU85QiDGmyja1 4wng4jAR1J+RQOBujjfagJaD2iRqOgy0ebUEtq1eOl93uG11V2i8xxw4h11FBTvfWUVc Po5LRoDve1LZSjJY3kSnl2lCynKWDlOC9rKJPCtJiYv5g8J567fj5x6J3C6BjJCxyYnu 1vPwCbWHqieevZqgg6D7+kRDjkrKnfka19OQowfmqwXVpNoCHXbFjT9QyE8zAzNNWZZ3 HDyg== X-Gm-Message-State: AGi0PuaYu7TDXxVs0jrA+WNbJnyMKp0yerlBjZ770FeRigkPBVQEBpay rHOMkUP2sB8QYLU7G5Q3j1vovtrEbXsFjA== X-Google-Smtp-Source: APiQypLLQdNVqa7WAcJDXQ2Lqn5HQa1Hc92eP91R9VvFHE0hj6rD5wZV3gr9ImoWCkkGqJlQ9058WQ== X-Received: by 2002:a1c:6a13:: with SMTP id f19mr5861648wmc.105.1586031201161; Sat, 04 Apr 2020 13:13:21 -0700 (PDT) Original-Received: from lead ([2a02:8109:8ac0:2ff0:f8cd:4aa0:b23c:97a8]) by smtp.gmail.com with ESMTPSA id y80sm17924892wmc.45.2020.04.04.13.13.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Apr 2020 13:13:20 -0700 (PDT) In-Reply-To: <87blo78exg.fsf@gmx.de> (Michael Albinus's message of "Sat, 04 Apr 2020 17:10:35 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 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:246424 Archived-At: > Tramp is the obvious victim, but I don't know whether it is the only > package which will be mentioned in combination with another package in > INSIDE_EMACS. > > Furthermore, in eshell or any other package you don't see what Tramp > sets in the remote shell. I believe we need a mechanism where different > packages add their settings (it's not only "shell" related, epg or > compile say something different). And when this variable is set for a > process, there must be a way to use these cumulated settings inside of > just the value a single package want set. > > In the local case, this cumulative setting might be just the package > name like "eshell". > > First we shall agree a common mechanism. Something which works exactly > for eshel and Tramp isn't sufficient. Aah OK, so then this mechanism for generating the value for INSIDE_EMACS needs to be more general. How about something like: (defvar inside-emacs-extras nil) (defun inside-emacs (&optional context) (mapconcat #'identity `(,emacs-version ,@(when context (list context)) ,@inside-emacs-extras) ",")) So in Eshell we would call (inside-emacs "eshell"), and Tramp could optionally add "tramp:2.5.0-pre" to inside-emacs-extras sometime before the function is called. Other parts of Emacs could add extras as well (and at some point remove them, I suppose). Do you think something like this would make sense given how Tramp works internally?