[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7513: 24.0.50; shell-command-default-error-buffer should always appe
bug#7513: 24.0.50; shell-command-default-error-buffer should always append to the bottom
Wed, 21 Aug 2019 15:05:36 -0700
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
> (info "(emacs) Single Shell") and
> (describe-variable 'shell-command-default-error-buffer)
> should mention that the errors accumulate in that buffer, and are not
> wiped clean at each new command. Also mention they are separate by
> form-feeds (^L).
> Also the main reason I'm writing this bug report is currently
> `M-!' and `M-|' insert error output before point in that buffer.
> But that often leads to jumbled output. They should always append to the
> bottom! Like the view-echo-area-messages *Message* buffer.
Yes, the output in that buffer as it stands isn't very useful, I think.
However, great care has been taken to try to insert the error message
wherever point is, and restoring the buffer:
(with-current-buffer (get-buffer-create error-buffer)
(let ((pos-from-end (- (point-max) (point))))
;; Do no formatting while reading error file,
;; because that can run a shell command, and we
;; don't want that to cause an infinite recursion.
(format-insert-file error-file nil)
;; Put point after the inserted errors.
(goto-char (- (point-max) pos-from-end)))
I looked at the commit history, and it doesn't seem to explain why we
don't just append:
Author: Karl Heuer <address@hidden>
Date: Mon Mar 1 03:19:32 1999 +0000
(shell-command-default-error-buffer): Renamed from
(shell-command-on-region): Mention in echo area when there
is some error output. Mention success or failure, too.
Accumulate multiple error outputs
going forward, with formfeed in between. Display the error buffer
when we have put something in it.
Does anybody object to rewriting it to just append the error messages to
the end of the buffer?
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#7513: 24.0.50; shell-command-default-error-buffer should always append to the bottom,
Lars Ingebrigtsen <=