emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/helm ec4ac8e646 3/5: Reset next-error-last-buffer when sav


From: ELPA Syncer
Subject: [nongnu] elpa/helm ec4ac8e646 3/5: Reset next-error-last-buffer when saving *-grep/occur-mode buffers
Date: Wed, 20 Jul 2022 13:58:34 -0400 (EDT)

branch: elpa/helm
commit ec4ac8e64628782cdc78ba1ae40ae59405b968b0
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Reset next-error-last-buffer when saving *-grep/occur-mode buffers
    
    and also when reusing a grep/occur-mode buffer and jumping somewhere.
---
 helm-grep.el  | 3 +++
 helm-occur.el | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/helm-grep.el b/helm-grep.el
index 6c508f86c3..8d45542959 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -914,6 +914,7 @@ If N is positive go forward otherwise go backward."
             (forward-line 1))))
       (helm-grep-mode))
     (pop-to-buffer buf)
+    (setq next-error-last-buffer (get-buffer buf))
     (message "Helm %s Results saved in `%s' buffer" src-name buf)))
 
 (defun helm-grep-mode-mouse-jump (event)
@@ -1042,6 +1043,7 @@ Special commands:
 
 (defun helm-grep-mode-jump ()
   (interactive)
+  (setq next-error-last-buffer (current-buffer))
   (helm-grep-action
    (buffer-substring (point-at-bol) (point-at-eol)))
   (helm-match-line-cleanup-pulse))
@@ -1069,6 +1071,7 @@ Special commands:
 
 (defun helm-grep-mode-jump-other-window ()
   (interactive)
+  (setq next-error-last-buffer (current-buffer))
   (let ((candidate (buffer-substring (point-at-bol) (point-at-eol))))
     (condition-case nil
         (progn (helm-grep-action candidate 'other-window)
diff --git a/helm-occur.el b/helm-occur.el
index 3c921dafc6..f3dc5acb76 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -475,11 +475,13 @@ persistent action."
 
 (defun helm-occur-mode-goto-line ()
   (interactive)
+  (setq next-error-last-buffer (current-buffer))
   (helm-aif (get-text-property (point) 'helm-realvalue)
     (progn (helm-occur-goto-line it) (helm-match-line-cleanup-pulse))))
 
 (defun helm-occur-mode-goto-line-ow ()
   (interactive)
+  (setq next-error-last-buffer (current-buffer))
   (helm-aif (get-text-property (point) 'helm-realvalue)
     (progn (helm-occur-goto-line-ow it) (helm-match-line-cleanup-pulse))))
 
@@ -565,6 +567,7 @@ persistent action."
       (buffer-enable-undo)
       (helm-occur-mode))
     (pop-to-buffer buf)
+    (setq next-error-last-buffer (get-buffer buf))
     (message "Helm occur Results saved in `%s' buffer" buf)))
 
 (defun helm-occur-mode-mouse-goto-line (event)



reply via email to

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