From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Charles El Hourani Newsgroups: gmane.emacs.bugs Subject: bug#10607: bug-10607 Date: Thu, 6 Apr 2023 12:45:46 -0400 Message-ID: References: <6o62fzm010.fsf@fencepost.gnu.org> <837curszqy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000096b95505f8ada422" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15296"; mail-complaints-to="usenet@ciao.gmane.io" To: 10607@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 06 18:47:52 2023 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 1pkSm8-0003o2-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Apr 2023 18:47:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkSlN-0000YF-8l; Thu, 06 Apr 2023 12:47:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkSlL-0000XH-BH for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkSlL-0001PC-1R for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkSlK-0002J7-TD for bug-gnu-emacs@gnu.org; Thu, 06 Apr 2023 12:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Charles El Hourani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Apr 2023 16:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10607 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 10607-submit@debbugs.gnu.org id=B10607.16807995688775 (code B ref 10607); Thu, 06 Apr 2023 16:47:02 +0000 Original-Received: (at 10607) by debbugs.gnu.org; 6 Apr 2023 16:46:08 +0000 Original-Received: from localhost ([127.0.0.1]:54902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkSkR-0002HS-RY for submit@debbugs.gnu.org; Thu, 06 Apr 2023 12:46:08 -0400 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:36511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkSkO-0002GX-5J for 10607@debbugs.gnu.org; Thu, 06 Apr 2023 12:46:06 -0400 Original-Received: by mail-ej1-f53.google.com with SMTP id jw24so2873045ejc.3 for <10607@debbugs.gnu.org>; Thu, 06 Apr 2023 09:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680799558; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QiAl6Ch0KOiIEh1Fy2DsgpaNlC76KFCqH8xdLQ3jL9U=; b=K7aIGl0EwoLox1CqDriphUD2EZlm1dV8HxgVE/WrGC1mADj3pCCc2ENNra7hqUfdAX 38x9U2sbn7/gKz0PWoXOTW65F/DtzJh0hevNSLJy2dGO6dZSUGQ9pUexgKosIqgeXF4T lSdyhL+ezT/uDsRb8VqIBY8CgXBtzG9h2gyvpTLF2wLr0NiXs5vsY6GpfacucbU+31Np nQPt1oabETR+csEOLadsphb4ssvXOlGu6HWgpFLf/+QcsdR7rUCsapkBYcaXZG2MOU3h x/Ma8B/tAxpAKlN5d62ic/8m0reWbektIpu3GS2rQWGukMCBjPPPuwTn3r3PEmYv6jMJ d+ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680799558; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QiAl6Ch0KOiIEh1Fy2DsgpaNlC76KFCqH8xdLQ3jL9U=; b=ijatRExjS6220uS7U3JEImps9LKmU0QtmpaIcCEmYPFWlVswbXtBpKyIbH/QVmOUFh LCmVMdJFSbVQFjZgxXoI5i/oWcgQMhgo4ZjocBhK8h42m6g906PfnFyx15dyBaYlNwpC 2wdZz9LrxVGu26rT/giOrO1aa0vOkAhPy+qJnRad8K7AP0t69U5EefALPyB1EpVwRUaF tKr482K707Dr7L3uAELL+ZwmhBCE9x8VZkJAbCclcWbgx21bxa2bM5kF/opO9NiGnGIE c5APnqcXrUrSLEgeDuAGIXkN+0g9PpSy9ArKw4qI10lf2BDeF9CwnukPPV/uXozB3vpc +wWA== X-Gm-Message-State: AAQBX9fYJMvA+lyyHXxTY/djbAB0HRJzo7ADLg5krLMLb1mk5JgN/o5X 1KI3/AFhA1PN5FcvSyjW7rmFdhDLT21D0qALaBTvkMSGSCaGZA== X-Google-Smtp-Source: AKy350Z00yktIIF0fdm77wFmUvWVAm9hpwqvKJG6jyZOzONT6iYwzt/0frdRpdNDLaSs2dGre/eEHaa+vniMgV2Vs6c= X-Received: by 2002:a17:906:80cf:b0:92f:fc27:8ea0 with SMTP id a15-20020a17090680cf00b0092ffc278ea0mr3639599ejx.9.1680799557924; Thu, 06 Apr 2023 09:45:57 -0700 (PDT) In-Reply-To: <837curszqy.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259334 Archived-At: --00000000000096b95505f8ada422 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Practically, the concern I see in this additional `ls` call here is a slowdown when dired is used for remote locations. It is an added delay to the delay already incurred with read-file-name when called interactively. On that note, dired-goto-file could just use the files already inserted in the buffer to provide options to the user to pick from. That could obviate the need to convert the read-file-name choice to what dired originally got from the insert-directory-program. Listing the missing control characters is another option, but placing this conversion in dired is making it more complex when the insert-directory-program like "ls" is already handling it. We could call here insert-directory-program instead of "ls", unless the escape option is not supported in this program. I don't know how we can find that out. On Wed, Apr 5, 2023 at 12:45=E2=80=AFAM Eli Zaretskii wrote: > > From: Charles El Hourani > > Date: Tue, 4 Apr 2023 21:52:39 +0300 > > > > Here is a way to solve the issue by calling `ls` directly, without > re-implementing the "-b" functionality of ls in > > elisp. > > > > From 22962ffd84370ac05017ed05cca88286d010aa0e Mon Sep 17 00:00:00 2001 > > From: Charlie El Hourani > > Date: Tue, 4 Apr 2023 21:26:07 +0300 > > Subject: [PATCH] Fix dired goto file when -b is provided to ls > (bug#10607) > > > > This fixes the goto file in dired mode for: > > - files containing a control character > > - and when dired uses ls with the "-b" flag > > > > The goto file function calls 'ls' to give it the escaped name. > > Thanks, but is it really a good idea to invoke a program each time we > move in Dired? dired-goto-file is a function that is used very > frequently. > > In any case, calling literally "ls" is not TRT, IMO, since the user > could have modified the value of insert-directory-program. > --00000000000096b95505f8ada422 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Practically, the concern I see in this additional `ls` cal= l here is a slowdown when dired is used for remote locations. It is an adde= d delay to the delay already incurred with read-file-name when called inter= actively.

On that note, dired-goto-file could just use the files alr= eady inserted in the buffer to provide options to the user to pick from. Th= at could obviate the need to convert the read-file-name choice to what dire= d originally got from the insert-directory-program.

Listing the miss= ing control characters is another option, but placing this conversion in di= red is making it more complex when the insert-directory-program like "= ls" is already handling it.

We could call here insert-directory= -program instead of "ls", unless the escape option is not support= ed in this program. I don't know how we can find that out.
On Wed, A= pr 5, 2023 at 12:45=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Charles El Hourani <charlie.eh@gmail.com>
> Date: Tue, 4 Apr 2023 21:52:39 +0300
>
> Here is a way to solve the issue by calling `ls` directly, without re-= implementing the "-b" functionality of ls in
> elisp.
>
> From 22962ffd84370ac05017ed05cca88286d010aa0e Mon Sep 17 00:00:00 2001=
> From: Charlie El Hourani <charlie.eh@gmail.com>
> Date: Tue, 4 Apr 2023 21:26:07 +0300
> Subject: [PATCH] Fix dired goto file when -b is provided to ls (bug#10= 607)
>
> This fixes the goto file in dired mode for:
> - files containing a control character
> - and when dired uses ls with the "-b" flag
>
> The goto file function calls 'ls' to give it the escaped name.=

Thanks, but is it really a good idea to invoke a program each time we
move in Dired?=C2=A0 dired-goto-file is a function that is used very
frequently.

In any case, calling literally "ls" is not TRT, IMO, since the us= er
could have modified the value of insert-directory-program.
--00000000000096b95505f8ada422--