[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] em-cmpl: fix completion of command paths

From: Eli Zaretskii
Subject: Re: [PATCH] em-cmpl: fix completion of command paths
Date: Wed, 25 Jan 2023 19:15:12 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Wed, 25 Jan 2023 12:03:38 -0500
> Hi Nicolas,
> Terribly sorry for the long delay to answer.
> > The use of `completion-table-dynamic' was introduced in 899055e to fix
> > bug#48995. However the following issue remains: when completing a command
> > path, absolute ("/usr/bin/") or relative ("./subdir/"), a space is
> > automatically added at the end.
> > Bypassing `completion-table-dynamic' for filenames containing a directory
> > part fixes the final space bug and does not reintroduce bug#48995.
> This looks very good.
> IIUC this fixes a regression w.r.t Emacs-28, so it would be nice to
> install it into `emacs-29`.
> Eli, what do you think?

Yes, this is okay for emacs-29.  Just one nit:

> > +    ;; Do not use `completion-table-dynamic' when completing a command path
> > +    ;; (absolute or relative): doing so assumes that the subpath in the 
> > input
> > +    ;; string is always a command, and appends a space character, which is
> > +    ;; incorrect (i.e. "/usr/bi" should yield "/usr/bin/" after completion,
> > +    ;; not "/usr/bin/ ").

Please use "file name", not "path", when referring to file or
directory names.  If you need to make it clear you are talking about
absolute file name, use "absolute file name" or "file name with
leading directories".  GNU coding standards frown on using "path" for
anything but PATH-style lists of directories.  (Yes, I know that most
of this text came from a comment in the original code.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]