Subject: RE: bug#29423: 27.0.50; ls-lisp does not handle -F switch properly

From: Drew Adams <[email-masked]>
Date: Fri, 24 Nov 2017 08:30:47 -0800 (PST)

> Goto the *scratch* buffer, and perform
> M-: (ls-lisp-insert-directory "/tmp/" '(?F) nil nil nil)
> Move the cursor into the string /tmp/, and perform
> M-x describe-char
> 
> There is no text property 'dired-filename, as it should.

I think you're talking (only) about the final / char.
That seems to be the only place where the property is not
present.

Is that / part of the (directory as) file name?  Dunno
whether that consideration helps here - probably not.
What to cover by the property really depends on what the
property is used for.

Unfortunately perhaps, unlike the case for functions and
variables, there is no doc string for text properties.
Unless something is called out for this in some doc string
or in code comments, only the current uses of the property
can guide what it should apply to.

I don't know whether the / should have that property.
I have checked and see that in Emacs 22 it has it, and
thereafter it does not.  Regression?  Intentional change?

The current uses of the property, as I quickly check them
don't suggest that it matters whether / has the property.

Do you have something (e.g. some use case) particular in
mind, where you think that the / should have the property?

Should we consider code that expects the result of checking
for that property to give the same position regardless of
whether switch `F' is used?  Should the file name be
considered to be the same, regardless of whether a / is
appended?

In sum, is this a bug to be fixed, a design question, or
design that was already changed intentionally for Emacs 23?

(I have no idea, and no code of mine depends on what is
decided, AFAIK.)