[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 27988f1: Put error output from M-! at the end of th
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 27988f1: Put error output from M-! at the end of the error buffer |
Date: |
Fri, 23 Aug 2019 04:10:21 -0400 (EDT) |
branch: master
commit 27988f136c35396e0ef1e865f5a0c0a0bf20358a
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Put error output from M-! at the end of the error buffer
* lisp/simple.el (shell-command-on-region): Put the error output
at the end of the buffer instead of wherever point is (bug#7513).
This avoids interleaving error output.
---
lisp/simple.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 9f86d70..358b6a4 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3944,15 +3944,14 @@ interactively, this is t."
(when (and error-file (file-exists-p error-file))
(if (< 0 (file-attribute-size (file-attributes error-file)))
(with-current-buffer (get-buffer-create error-buffer)
- (let ((pos-from-end (- (point-max) (point))))
- (or (bobp)
- (insert "\f\n"))
- ;; 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)))
+ (goto-char (point-max))
+ ;; Insert a separator if there's already text here.
+ (unless (bobp)
+ (insert "\f\n"))
+ ;; 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)
(and display-error-buffer
(display-buffer (current-buffer)))))
(delete-file error-file))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 27988f1: Put error output from M-! at the end of the error buffer,
Lars Ingebrigtsen <=