From: "David Kågedal" <davidk@lysator.liu.se>
To: kha@treskal.com, catalin.marinas@gmail.com
Cc: git@vger.kernel.org
Subject: [StGit PATCH] stgit.el: Try to make the point stay on the coalesced patch.
Date: Thu, 06 Nov 2008 11:27:14 +0100 [thread overview]
Message-ID: <20081106102655.32048.21145.stgit@krank> (raw)
It might not be spot on if all the coalesced patches were unapplied.
---
This fixes a small annoyance with the 'c' command.
contrib/stgit.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/contrib/stgit.el b/contrib/stgit.el
index d0f19c3..971ecd1 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -193,6 +193,9 @@ Commands:
(let ((patchsym (intern patch)))
(setq stgit-marked-patches (delq patchsym stgit-marked-patches))))
+(defun stgit-clear-marks ()
+ (setq stgit-marked-patches '()))
+
(defun stgit-marked-patches ()
"Return the names of the marked patches."
(mapcar 'symbol-name stgit-marked-patches))
@@ -406,8 +409,15 @@ With numeric prefix argument, pop that many patches."
(write-region (point-min) (point-max) file)
(stgit-capture-output nil
(apply 'stgit-run "coalesce" "-f" file stgit-patches))
+ (stgit-clear-marks)
(with-current-buffer log-edit-parent-buffer
- (stgit-refresh))))
+ ;; Go to first marked patch and stay there
+ (goto-char (point-min))
+ (re-search-forward (concat "^[>+-]\\*") nil t)
+ (move-to-column goal-column)
+ (let ((pos (point)))
+ (stgit-refresh)
+ (goto-char pos)))))
(defun stgit-help ()
"Display help for the StGit mode."
reply other threads:[~2008-11-06 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081106102655.32048.21145.stgit@krank \
--to=davidk@lysator.liu.se \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.