GNU bug report logs -
#26242
25.1; `dired-shrink-to-fit' warning
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 24 Mar 2017 18:11:01 UTC
Severity: wishlist
Tags: notabug
Found in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26242 in the body.
You can then email your comments to 26242 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Fri, 24 Mar 2017 18:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 24 Mar 2017 18:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
If code uses variable `dired-shrink-to-fit', this is the byte-compiler
warning you get:
Warning: ‘dired-shrink-to-fit’ is an obsolete variable (as of 24.3); use the Customization interface to add a new rule
to ‘display-buffer-alist’ where condition regexp is "^ \*Marked Files\*$",
action argument symbol is ‘window-height’ and its value is nil.
That is a _ridiculous_ warning.
This simple variable was defined this way, for decades:
(defvar dired-shrink-to-fit t
;; I see no reason ever to make this nil -- rms.
;; (> baud-rate search-slow-speed)
"Non-nil means Dired shrinks the display buffer to fit the marked files.")
IOW, the value should pretty much always be non-nil.
What on Earth is the point of the convoluted recipe given in that
warning?
`dired-shrink-to-fit' was never a user option. It is not necessarily
something that someone would set in their init file. It is just as
likely (if it is likely at all - see RMS's comment) that it would be
bound in some Lisp code.
Why should we tell users to customize `display-buffer-alist', perhaps
the most complex user option, and in such a way as to do the complicated
things the warning suggests?
What we should do is just restore the definition of
`dired-shrink-to-fit' (perhaps even making it a constant with value
`t'), or just replace occurrences of it with `t' and declare it obsolete
but without such a silly warning that tells you to customize
`display-buffer-alist'.
In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
of 2016-11-15 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
'configure --without-dbus --without-compress-install 'CFLAGS=-O2
-static -g3''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 15:09:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 26242 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> If code uses variable `dired-shrink-to-fit', this is the byte-compiler
> warning you get:
>
> Warning: ‘dired-shrink-to-fit’ is an obsolete variable (as of 24.3); use the Customization interface to add a new rule
> to ‘display-buffer-alist’ where condition regexp is "^ \*Marked Files\*$",
> action argument symbol is ‘window-height’ and its value is nil.
[...]
> What on Earth is the point of the convoluted recipe given in that
> warning?
Because the variable is going away and if somebody had a customisation
for that, it's nice to let them know how to change it. But it seems
unlikely that anybody would change that variable, as both you and the
comments point out.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) notabug.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Jun 2019 15:09:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
26242 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Jun 2019 15:09:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 15:23:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 26242 <at> debbugs.gnu.org (full text, mbox):
> > What on Earth is the point of the convoluted recipe given in that
> > warning?
>
> Because the variable is going away and if somebody had a customisation
> for that, it's nice to let them know how to change it. But it seems
> unlikely that anybody would change that variable, as both you and the
> comments point out.
No. That doesn't answer the question or respond to
the bug report. That just says what the status quo
is that the report reports should be fixed.
This is what should be done, as already pointed out:
What we should do is just restore the definition
of `dired-shrink-to-fit' (perhaps even making it
a constant with value `t'), or just replace
occurrences of it with `t' and declare it obsolete
but without such a silly warning that tells you to
customize `display-buffer-alist'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 15:34:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 26242 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> This is what should be done, as already pointed out:
>
> What we should do is just restore the definition
> of `dired-shrink-to-fit'
The definition of dired-shrink-to-fit was never changed, so what do you
mean by "restore"?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 15:42:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 26242 <at> debbugs.gnu.org (full text, mbox):
> > This is what should be done, as already pointed out:
> >
> > What we should do is just restore the definition
> > of `dired-shrink-to-fit'
>
> The definition of dired-shrink-to-fit was never changed, so what do you
> mean by "restore"?
Don't remove the variable.
From Lars:
> Because the variable is going away...
Don't issue that byte-compiler warning, but
instead do one or more of the things I suggested.
Don't close the bug, saying there is nothing to
change about the "fix" of adding the byte-comp
warning.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 15:49:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 26242 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> Don't issue that byte-compiler warning, but
> instead do one or more of the things I suggested.
> What we should do is just restore the definition of
> `dired-shrink-to-fit' (perhaps even making it a constant with value
> `t'), or just replace occurrences of it with `t' and declare it obsolete
> but without such a silly warning that tells you to customize
> `display-buffer-alist'.
So something like this (I don't see the benefit of replacing occurrences
with `t' before actually removing it completely)?
--- i/lisp/dired.el
+++ w/lisp/dired.el
@@ -299,9 +299,7 @@ dired-shrink-to-fit
;; (> baud-rate search-slow-speed)
"Non-nil means Dired shrinks the display buffer to fit the marked files.")
(make-obsolete-variable 'dired-shrink-to-fit
- "use the Customization interface to add a new rule
-to `display-buffer-alist' where condition regexp is \"^ \\*Marked Files\\*$\",
-action argument symbol is `window-height' and its value is nil." "24.3")
+ "stop using it." "24.3")
(defvar dired-file-version-alist)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26242
; Package
emacs
.
(Wed, 12 Jun 2019 16:17:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 26242 <at> debbugs.gnu.org (full text, mbox):
> > Don't issue that byte-compiler warning, but
> > instead do one or more of the things I suggested.
>
> > What we should do is just restore the definition of
> > `dired-shrink-to-fit' (perhaps even making it a constant with value
> > `t'), or just replace occurrences of it with `t' and declare it obsolete
> > but without such a silly warning that tells you to customize
> > `display-buffer-alist'.
>
> So something like this (I don't see the benefit of replacing occurrences
> with `t' before actually removing it completely)?
>
> + "stop using it." "24.3")
Better, yes.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 11 Jul 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.