From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master f8b2a01a9e: * lisp/shell.el (shell): Query shell file name from `interactive` Date: Sat, 28 May 2022 13:58:35 -0400 Message-ID: References: <165365729037.13166.16983049289085077158@vcs2.savannah.gnu.org> <20220527131450.B347BC01683@vcs2.savannah.gnu.org> <87zgj2vwtz.fsf@gmx.de> <87v8tpwrzq.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="32172"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (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 May 28 19:59:47 2022 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 1nv0j5-0008C9-4N for ged-emacs-devel@m.gmane-mx.org; Sat, 28 May 2022 19:59:47 +0200 Original-Received: from localhost ([::1]:41670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nv0j4-0001K2-2a for ged-emacs-devel@m.gmane-mx.org; Sat, 28 May 2022 13:59:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv0i3-0000cW-Rs for emacs-devel@gnu.org; Sat, 28 May 2022 13:58:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52197) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv0i0-0007dj-PS for emacs-devel@gnu.org; Sat, 28 May 2022 13:58:42 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B6F95100140; Sat, 28 May 2022 13:58:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5A2F6100054; Sat, 28 May 2022 13:58:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1653760718; bh=nRA8+bQOi4p4m3H9rM9bbNn2TkM8SKYeDRSb4K9pvVg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ivwu6E3Sz1wXSi+bPTT14iPhFmxcKTmY3GLXQ/q83686AxTEGe+krl2yDYaVUqCZ2 Bec9xbi2xJ6fmXYd1wMVDsPM5ThBY/nbtI/wSHCtd5gjX0/m4fFiwfI/p6cDDQN4pg WJe7CWC9KsvDABISV7lRxw3n9aTCYtMKvIhLdKGOzvQMmSgZozbZ0dvnBK70JlB5qS 0GbKlmw3lafvv97HvGOg/k6MIb1cBuoh/9/7TvP46s7xiii56H9fhAnJZXdYqWFg3J AkF0FtoUI8gwQtguLRAdaUdSn3lJTOERchwLJp7xMkQyrkkYt93OFJXlUeipDuO4Pt ld5bhnC0tcjmQ== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 176101202E4; Sat, 28 May 2022 13:58:38 -0400 (EDT) In-Reply-To: <87v8tpwrzq.fsf@gmx.de> (Michael Albinus's message of "Sat, 28 May 2022 18:18:17 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:290345 Archived-At: >> Does the patch below look correct to you? >> It also tries to address the FIXME while we're at it. > I'm not sure. You use `buffer', and not `buf' for the interactive spec. Could you clarify what you mean by that? I check nullness of `buffer` so as to preserve the existing behavior where we prompt for the shell's directory only when current-prefix-arg is specified. And the interactive spec returns (list buffer ...) rather than (list buf ...) again so as to preserve the existing behavior (tho I don't think it would make any difference in practice other than the information it leaves in `command-history`). > OTOH, you set `default-directory' in `buf', which might cure it. Cure what? > Anyway, it would be an incompatible (but appreciated) change. What change are you referring to? > If you have an existing shell buffer, it would be reused as-it-is, and > you cannot change its remoteness. Something, which has been plagued me > since ever. Hmm... I don't understand. AFAICT both with my new code and with the existing code `C-u M-x shell` will prompt for the shell's directory if it's done from within (and "to") a shell buffer with remote default-directory, no? > Hmm, do we have test cases for this, for both the local and the remote > case, for both an existing and a new shell buffer? AFAICT we don't (we have rather few tests in `shell-tests.el`). > (If not, I could volunteer to write them, but it might take some > days then.) That would be very appreciated. Stefan