From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Introducing thread-safe Tramp Date: Tue, 24 Jul 2018 08:06:06 -0700 (PDT) Message-ID: References: <8736wa9c5s.fsf@gmx.de> <87wotkn6do.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532446461 6156 195.159.176.226 (24 Jul 2018 15:34:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Jul 2018 15:34:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 24 17:34:17 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhzKK-0001SE-Hv for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2018 17:34:16 +0200 Original-Received: from localhost ([::1]:41166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhzMP-0002Fj-Pr for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2018 11:36:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhzMJ-0002FR-0C for emacs-devel@gnu.org; Tue, 24 Jul 2018 11:36:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhzMF-0003Yp-19 for emacs-devel@gnu.org; Tue, 24 Jul 2018 11:36:19 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:60224) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fhzME-0003Xl-Mz for emacs-devel@gnu.org; Tue, 24 Jul 2018 11:36:14 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6OFTUgJ118846; Tue, 24 Jul 2018 15:36:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Fn7Yu3Uve4liwYVPlkw/fHU/D5EdAi5wDj/GygWotfg=; b=W8Z0pkWFR0MnLm1g/4juKDwxGQHRy3RZbhIobBNqfmtP3xjALDWFJCmvcVHyfUJpfpdn u+tRfGrNLNPYwMaNm9ehQGdaGJJ4iIxVGaYlmgTJGA13OJ+/gNF4cNPpSw/zqhxXwOfF epi8XXPEWkpdvHuYULWQ/hfm6xEE5kF7NoCFqtCbIXwr6zPcfsvFkGHRwS/ic0tnn6K+ BC3dav+NaJ/GjS/qQIeu9jufouc0au9ydMCnHwEGCw6wzxuG8FFSCcKHAM9fQNlzaNII IEhznvoc2J11OBvh2RTYL38pCGEAJQCxYmQlV5ecJJTqFXWcgvelVZeS49uj2oU75myf kw== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2kbv8t1ket-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jul 2018 15:36:10 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6OFa9So019885 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jul 2018 15:36:10 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6OFa9LX029180; Tue, 24 Jul 2018 15:36:09 GMT In-Reply-To: <87wotkn6do.fsf@gmx.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4717.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8963 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807240164 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227774 Archived-At: This sounds like a good feature. I haven't looked at the code, so I don't really know how it's implemented. I have one objection to what I think you're proposing for the design, so far at least. It's true that `find-file' etc. are commands. They are also functions that users sometimes call from Lisp. My a priori objection is the use of a prefix arg to indicate that you want a separate thread. I would prefer that users specify this intention in some other way, and that we reserve the use of a prefix arg for something else (future). How else might a user specify use of a separate thread? Possibilities include: * Use a different function/command. This is the usual way Emacs handles such things: new function. It's what we do for the choice of same/other window, for example - we have two commands, which can be bound to two different keys. * Bind a defvar variable. This is what we do for respect of `find-file-wildcards', for example. I'd be OK with either of those approaches, and perhaps with others. I doubt that I can be in favor of the prefix-arg approach. If it were I, I would probably do something like this: 1. Add another optional arg (Boolean), to determine the behavior. I haven't seen your code, but this is probably what you've done already. 2. In the body, use that optional arg to override a defvar variable, which otherwise determines the behavior (choice). 3. Define additional commands for convenience, which pass the optional arg (non-nil) to give the separate-thread behavior. Any user who wants to combine such a separate command with the corresponding usual command, and who wants to use a prefix arg to make the choice, can easily do so. But Emacs itself will have reserved the ability to use a prefix arg for something else, and it will have provided new commands that users can bind to other keys. Just one opinion, and open to change. Thanks again for this feature. Let me know, if I misunderstand something.