From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#41424: bug#41412: 27.0.90; Value of default directory in completions buffer Date: Sat, 23 Jan 2021 19:47:11 +0100 Message-ID: <87a6szv6c0.fsf@gnus.org> References: <87pnay7azg.fsf@penguin> <87k0s4wwbl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10470"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena , 41424@debbugs.gnu.org, 41412@debbugs.gnu.org, Stefan Kangas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 23 19:48:19 2021 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 1l3NxK-0002bC-N3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jan 2021 19:48:18 +0100 Original-Received: from localhost ([::1]:49904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3NxJ-000435-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jan 2021 13:48:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Nx5-00041Y-6n for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 13:48:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Nx4-0007BR-VD for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 13:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3Nx4-0004EN-UC for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 13:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41424 X-GNU-PR-Package: emacs Original-Received: via spool by 41424-submit@debbugs.gnu.org id=B41424.161142764616211 (code B ref 41424); Sat, 23 Jan 2021 18:48:02 +0000 Original-Received: (at 41424) by debbugs.gnu.org; 23 Jan 2021 18:47:26 +0000 Original-Received: from localhost ([127.0.0.1]:35279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NwU-0004DJ-8v for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:47:26 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:55048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NwS-0004D1-CX; Sat, 23 Jan 2021 13:47:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EsWGEkr0LfJCyJwjKDGUYKbqPDuQF5DLh0edUlql1Zs=; b=SE8Kfn4Xn1/G9vUB9D9xwf16RI XaDbnxLBGu5W0W2oXrabPvJ0eZLguaRTzl8AJ4kMtOsz6S8u5rtY3Sh6wSZfBrrQcKCFDHD+FfUxG H3Xmc64APgGQlJA15Qdw5m4VNKgUnkMLLNGsnAoOU+fehlHeOmaSWGc4k/zNgZMEfiJA=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3NwH-0003z3-AW; Sat, 23 Jan 2021 19:47:15 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX8/PylqahUT0Yx OjccNTmzXi3///+ih99BAAAAAWJLR0QGYWa4fQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1F B+UBFxIlOdKnSfYAAAF4SURBVDjLfZRtcgIhDIZXewEdPYANy//KxwFcxguAuf9VGiCBhZ02f9zJ 45uEkLAsYlcguy6zncBZsgCXyb8GW8xtl9Fvmw1k5yfS/bewB+67BbKTSbDbDJ5/CETydQSPY0m7 wk7hCNylRwrKqDHWvXwZTO9kGngRqP9DjO/km8ZIijdmhf9AT3LOwOmqWH1i8ODcSMAn89HYspd+ bFhMk5DS5PKeFXhsxuBVi9IdUBLIsIMIBUQB5FYqe2hGdAXKVQBQQMygZCdHBVVBjsi/DGqoCNZQ caAVh8rJFUXQmBSl19SvoSqKorNCowA+YG5WIhpRDthbon05p7SkN7EWhdLEs+Wjx035tXaxtL1e lC8XldvOgKbBytVudIM+olxtG4YCNKY2DDw+PoMVILTx4YFzQEAZ1wdukZmh8uVz60NtgK2wn/0a 5DEUBW/OnZOQDYsjEgoDg2DeNSeCf9Z5ObnuD+PT4HivpieDCFdqJn95lqiw/iz9AsXRwxoTRAM0 AAAAGXRFWHRjb21tZW50AENyZWF0ZWQgd2l0aCBHSU1Q569AywAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMS0wMS0yM1QxODozNzo1NyswMDowMADX2dYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDEt MjNUMTg6Mzc6NTcrMDA6MDBximFqAAAAAElFTkSuQmCC X-Now-Playing: Herbert's _Part Four_: "Pump" In-Reply-To: (Stefan Monnier's message of "Fri, 22 Jan 2021 17:50:18 -0500") 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:198453 Archived-At: Stefan Monnier writes: >> I think that sounds likely. The patch that introduced this code is >> below, and it indeed changes the `file-name-directory' to >> `file-name-as-directory' (among other things). > > But it also changed a fair bit around it. And the `substring` is quite different. > When I look at the history of this code, > 30c7e54299fc81cd3122a17ef130ab69e9855f99 looks wrong. In order not to > change the behavior, I suspect it should have been: > > (buffer-substring (minibuffer-prompt-end) > (+ (minibuffer-prompt-end) (or completion-base-size 0)))))))) > > and then 326fdb9ec05ab5e4aec0c7064272bb3d223e9875 looks wrong again > since it presumes that `completion-base-size` is nil whereas it usually > isn't/wasn't when completing files. Aha. But then what would the correct fix now? I haven't tried the proposed change (i.e., just change to `file-name-directory'), but it sounds logical to me. That is, if the user has typed "~/foo/bar/zo" then use "~/foo/bar" as the default directory. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no