GNU bug report logs -
#46611
Variables grep-window-height grep-scroll-output unused since Emacs 22.1?
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Thu, 18 Feb 2021 05:21:01 UTC
Severity: minor
Tags: notabug
Done: Stefan Kangas <stefan <at> marxist.se>
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 46611 in the body.
You can then email your comments to 46611 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#46611
; Package
emacs
.
(Thu, 18 Feb 2021 05:21:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Kangas <stefan <at> marxist.se>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Thu, 18 Feb 2021 05:21:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: minor
The new variables `grep-window-height' and `grep-scroll-output' were
announced in NEWS.22:
*** The new variables `grep-window-height' and `grep-scroll-output' override
the corresponding compilation mode settings, for grep commands only.
But if I'm not missing something, they were never actually part of Emacs
22.1, due to this commit:
commit ab55f76f9ca670e3f41e4cfabeb35426f6b24fb6
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Thu Mar 11 22:56:19 2004 +0000
(kill-grep): Move here from compile.el
(grep-error, grep-hit-face, grep-error-face)
(grep-mode-font-lock-keywords): New variables.
(grep-regexp-alist): Simplify regexp and add `binary' case.
(grep-mode): New mode.
(grep-process-setup): Simplify.
[...]
- (if grep-window-height
- (set (make-local-variable 'compilation-window-height)
- grep-window-height))
- (set (make-local-variable 'compile-auto-highlight)
- grep-auto-highlight)
- (set (make-local-variable 'compilation-scroll-output)
- grep-scroll-output)
Stefan, do you remember any of this? Were they removed intentionally?
Should we re-add the above lines? Or, given that no one seems to have
noticed their absence in 16 years, perhaps it is better to just declare
them obsolete?
Or better yet, maybe we should:
1) Declare `grep-window-height' obsolete (as I'm not sure how useful it
is).
2) Keep `grep-scroll-output' (it seems more useful) but change it from a
boolean, and set it to the symbol 'default', which is taken to mean
to just use whatever value 'compilation-scroll-output is set to. That
way, we don't break existing configuration and behavior, plus we also
allow for configuring this specifically, as was probably originally
intended. (I don't necessarily see the use for configuring it
separately for grep, but at least the existence of an option
documents that the behavior can be changed and how.)
Any opinions or comments here?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46611
; Package
emacs
.
(Thu, 18 Feb 2021 13:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 46611 <at> debbugs.gnu.org (full text, mbox):
> *** The new variables `grep-window-height' and `grep-scroll-output' override
> the corresponding compilation mode settings, for grep commands only.
>
> But if I'm not missing something, they were never actually part of Emacs
> 22.1, due to this commit:
>
> commit ab55f76f9ca670e3f41e4cfabeb35426f6b24fb6
> Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Thu Mar 11 22:56:19 2004 +0000
>
> (kill-grep): Move here from compile.el
> (grep-error, grep-hit-face, grep-error-face)
> (grep-mode-font-lock-keywords): New variables.
> (grep-regexp-alist): Simplify regexp and add `binary' case.
> (grep-mode): New mode.
> (grep-process-setup): Simplify.
> [...]
> - (if grep-window-height
> - (set (make-local-variable 'compilation-window-height)
> - grep-window-height))
> - (set (make-local-variable 'compile-auto-highlight)
> - grep-auto-highlight)
> - (set (make-local-variable 'compilation-scroll-output)
> - grep-scroll-output)
>
> Stefan, do you remember any of this? Were they removed intentionally?
I think so, yes. It's because `define-compilation-mode` should take
care of them:
(defmacro define-compilation-mode (mode name doc &rest body)
"This is like `define-derived-mode' without the PARENT argument.
The parent is always `compilation-mode' and the customizable `compilation-...'
variables are also set from the name of the mode you have chosen,
by replacing the first word, e.g., `compilation-scroll-output' from
`grep-scroll-output' if that variable exists."
(let ((mode-name (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))
`(define-derived-mode ,mode compilation-mode ,name
,doc
,@(mapcar (lambda (v)
(let ((mv (intern (replace-regexp-in-string
"\\`compilation" mode-name
(symbol-name v)))))
`(if (boundp ',mv) (setq-local ,v ,mv))))
'(compilation-directory-matcher
compilation-error
compilation-error-regexp-alist
compilation-error-regexp-alist-alist
compilation-error-screen-columns
compilation-finish-functions
compilation-first-column
compilation-mode-font-lock-keywords
compilation-page-delimiter
compilation-parse-errors-filename-function
compilation-process-setup-function
compilation-scroll-output
compilation-search-path
compilation-skip-threshold
compilation-window-height))
,@body)))
-- Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46611
; Package
emacs
.
(Thu, 04 Mar 2021 03:03:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 46611 <at> debbugs.gnu.org (full text, mbox):
tags 46611 notabug
close 46611
thanks
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Stefan, do you remember any of this? Were they removed intentionally?
>
> I think so, yes. It's because `define-compilation-mode` should take
> care of them:
Oh, okay. I had missed that part...
Closing this bug, sorry for the noise.
Added tag(s) notabug.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Thu, 04 Mar 2021 03:03:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
46611 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se>
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Thu, 04 Mar 2021 03:03:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 01 Apr 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 362 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.