bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18716: Patch for this bug


From: Eli Zaretskii
Subject: bug#18716: Patch for this bug
Date: Thu, 10 Nov 2016 19:38:57 +0200

> From: Reuben Thomas <address@hidden>
> Date: Wed, 9 Nov 2016 22:00:22 +0000
> Cc: address@hidden
> 
>  Sorry, I don't understand what you mean by "these are not a problem".
>  With your change, *.JPG files will no longer be treated like *.jpg on
>  Posix systems. Won't people who want *.JPG hidden complain? IOW,
>  isn't this change backward-incompatible?
> 
> ​I'm confused.

So am I.

> I have not changed the behaviour of visiting files.

I wasn't talking about visiting files.  I was talking about
dired-omit-mode and related Dired issues.  I'm confused how visiting
files entered the scene, and why.

> When we talk about *.JPG files, we are not talking about dired-omit-mode, 
> because ".jpg" is not a suffix that
> would (normally) be omitted.​

I think it will be, if someone adds it to
completion-ignored-extensions, or some other variable used by
dired-omit-mode to set up its omitted files.

> What I was trying to explain is that unexpected case-insensitivity in 
> auto-mode-alist is not a problem, because
> the user immediately sees the effects. On the other hand, in dired-omit-mode 
> it is a problem, because the
> user might not see the effects (the effects are to hide things).

Yes, I understand.  I was asking what do we tell users who have files
they want to omit that currently are only matched because of case
insensitivity.

> I could add a parameter to dired-mark-unmarked-files, case-fold-p, defaulting 
> to nil, which would be set by its
> current callers. But I think you are saying that this change to the behavior 
> of dired-omit-mode, which I have
> suggested does not need a new preference, should indeed have a new 
> preference, so I can add that too. I
> think, though, that it should default to `t', i.e. dired-omit-mode behaving 
> case-sensitively by default.

Sounds like a good compromise.  I agree about the default, except that
it should default to case-insensitive matches on case-insensitive
filesystems (Windows etc.)

>  > + (case-fold-search (memq system-type '(windows-nt cygwin))))
> 
>  The list should include ms-dos as well.
> 
> ​OK, I will add a patch for files.el, since I got the list from there, where 
> it is used for the same purpose.

If you mean set-auto-mode, then it doesn't need such a change.  For
obscure historical reasons, the MS-DOS port wants to be case-sensitive
in that particular case (e.g., it wants to treat *.C files as C++, not
C).  In other places in files.el, ms-dos is already mentioned where
case-insensitive file name comparison is needed.

> Or perhaps there should be a global variable defined in files.el containing 
> the list?

I don't see the need.

>  > * lisp/dired-x.el (Commentary): Remove USAGE section explaining how to
>  > use dired-x from .emacs. It is now fully customizable.
>  > * lisp/dired-x.el (dired-guess-shell-alist-user): Remove explanation of
>  > how to set this custom variable in .emacs. It should be customized.
> 
>  Why remove these comments? The existence of Custom doesn't preclude
>  people from customizations in plain Lisp.
> 
> The documentation is a maintenance burden (since it is hand-written and 
> duplicate), few people will read it
> anyway, and further it is redundant, since it can be customized in plain Lisp 
> in the same way as any other
> defcustom. (I presume you're not implying that we should add documentation to 
> every Lisp source file to show
> how to customize each defcustom?) Further, the documentation as it is implies 
> that these variables *should*
> be customized in plain Lisp, since (unlike most cases), there is explicit 
> documentation about it.

I don't share your interpretation of the presence of these comments,
but I'm not going to start a dispute about this.

Thanks.





reply via email to

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