From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.bugs Subject: bug#55877: 29.0.50; list-directory doesn't allow globbing interactively Date: Fri, 10 Jun 2022 21:31:14 -0400 Message-ID: References: <87ilp9y518.fsf@gnus.org> <87edzxx711.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000062fb5605e12203c3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25023"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55877@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 11 03:32:16 2022 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 1nzpz6-0006Q6-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 03:32:16 +0200 Original-Received: from localhost ([::1]:40170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzpz5-0000Pg-Bp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 21:32:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzpys-0000PV-ER for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 21:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzpyr-0008CX-QC for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 21:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzpyr-00019A-Li for bug-gnu-emacs@gnu.org; Fri, 10 Jun 2022 21:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: chad Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jun 2022 01:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55877 X-GNU-PR-Package: emacs Original-Received: via spool by 55877-submit@debbugs.gnu.org id=B55877.16549110934366 (code B ref 55877); Sat, 11 Jun 2022 01:32:01 +0000 Original-Received: (at 55877) by debbugs.gnu.org; 11 Jun 2022 01:31:33 +0000 Original-Received: from localhost ([127.0.0.1]:51580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzpyP-00018L-FX for submit@debbugs.gnu.org; Fri, 10 Jun 2022 21:31:33 -0400 Original-Received: from mail-lf1-f50.google.com ([209.85.167.50]:34563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzpyN-000186-PF for 55877@debbugs.gnu.org; Fri, 10 Jun 2022 21:31:32 -0400 Original-Received: by mail-lf1-f50.google.com with SMTP id p18so1026795lfr.1 for <55877@debbugs.gnu.org>; Fri, 10 Jun 2022 18:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xo++xru0+oaQONqlQz4TgRfG1n2k+ODL8UUFRs5WVP8=; b=eR58uRCHpYUrL/B2AvHa8/UsOZAXcPEjEIcLXCxjCtrkpeCfBhP17Yyl30pnfDtjc9 fLSfHex/cut0s1Zggq+oPqR17zQgd6DkfP0/5yw2qdJ4rV/PcYp5E6CZZ3+3+nm3Fs5v GrpoNSaXwYzJp0mwqk4Yse+U71UGpLFcGhC9QF5bwHkruMBZ7pzDUYIVKcG3yGxHFcKv pOwnnf6eiYTc5McRLzYvP/+PHNSDWiAdLVQUUFmMPOywskwsRbu7lH3+5mpacK/Nbjyj SxrA0/5tcjyMjHJnTQdzeM4taXcLffpvjQ/PKiZPHf4Vu6kFYYPYvy/fjCZ5qsJk0rGe /Vzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xo++xru0+oaQONqlQz4TgRfG1n2k+ODL8UUFRs5WVP8=; b=sSmfBPOKVuDh1dhPXKKMpMK0lT7KbJu5vswAzFUjGGAo8YtRiZ/xTTglRdoOVMZiqS ynsHNatBVT9AnzbVVn/xTlHVFiA6USQR5E8glo8ugyKZ9cqahm5nf5vGJpvQlwCt4yHJ 5nfJGzWe4eEPahbmHQ4S2LVRs/nKljUtF0cegNAd9SBsZUMU4hOQ8bmp6S1+tz7rGJde D6WUEfkEkj2RnEZmRJUiVGlsY67QFactZwW+C4tj4CGlMGWO/X1W5vWNOWt5ynziHemZ +siByAeIrb1HmwiKa8YRH+4HWiNZHdk6fmPX2hLiYykS9uGAaLP3GXaHGOt5Oc4MEjvs w1Tg== X-Gm-Message-State: AOAM532QnZgIFsHmrsJBwiItbjyLeKdgjhYdqoAu/IsN7e1jeu7kHfz7 T4j9EaaZ6wofzesc58iW5I/sM1UfUFiytEIqt2s= X-Google-Smtp-Source: ABdhPJyDQd0F6hj3XERRqVbbIq3xMb+lEtyjtKw/AyEL9X/n2ZiJi+QRo/6WuCOoEdI4OIAAzJ7B/mPAnfF17ek6ftg= X-Received: by 2002:a05:6512:b8e:b0:478:f926:1d01 with SMTP id b14-20020a0565120b8e00b00478f9261d01mr30577731lfv.151.1654911085508; Fri, 10 Jun 2022 18:31:25 -0700 (PDT) In-Reply-To: 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:234246 Archived-At: --00000000000062fb5605e12203c3 Content-Type: text/plain; charset="UTF-8" I thought I saw an error here when list-directory with a directory (not file) glob (ex: ~/Project/emacs/*/) is followed by another list-directory, but I think the actual issue is that the default directory in the first case is set to something that doesn't exist, which messes up call-process in the second invocation of list-directory. The error I saw was: Debugger entered--Lisp error: (file-missing "Setting current directory" "No > such file or directory" "/home/chadpbrown/Project/emacs/*/") > call-process("ls" nil t nil "-CF" "--" > "/home/chadpbrown/Project/emacs/src/") > insert-directory("/home/chadpbrown/Project/emacs/src/" "-CF" nil t) > list-directory("~/Project/emacs/src/" nil) > funcall-interactively(list-directory "~/Project/emacs/src/" nil) > call-interactively(list-directory nil nil) > command-execute(list-directory) I'm not sure it's worth the overhead to fix this. I'm testing a small change that replaced default-directory in list-directory (lisp/files.el:7387) with (if (file-exists-p default-directory) default-directory user-emacs-directory) ..but it feels like a hack? ~Chad --00000000000062fb5605e12203c3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I thought I saw an error here when list-directory wit= h a directory (not file) glob (ex: ~/Project/emacs/*/) is followed by anoth= er list-directory, but I think the actual issue is that the default directo= ry in the first case is set to something that doesn't exist, which mess= es up call-process in the second invocation of list-directory. The error I = saw was:

Debugger entered--Lisp error: (file-missing "Setting current direc= tory" "No such file or directory" "/home/chadpbrown/Pro= ject/emacs/*/")
=C2=A0 call-process("ls" nil t nil "= -CF" "--" "/home/chadpbrown/Project/emacs/src/")=C2=A0 insert-directory("/home/chadpbrown/Project/emacs/src/" &= quot;-CF" nil t)
=C2=A0 list-directory("~/Project/emacs/src/&q= uot; nil)
=C2=A0 funcall-interactively(list-directory "~/Project/em= acs/src/" nil)
=C2=A0 call-interactively(list-directory nil nil)=C2=A0 command-execute(list-directory)

I&#= 39;m not sure it's worth the overhead to fix this. I'm testing a sm= all change that replaced default-directory in list-directory (lisp/files.el= :7387) with

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (if (file-exists-p default-directory)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 default-directory
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 user-emacs-directory)

..but it feels like a hack?

~Chad

<= /div>
--00000000000062fb5605e12203c3--