git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGit PATCH 5/5] Emacs mode: use "stg new --file"

From
David Kågedal <davidk@lysator.liu.se>
Date
Feb 11, 2008, 09:25 UTC
Message-ID
<87zlu7sv3b.fsf@lysator.liu.se>
In-Reply-To
<20080210204434.17683.61684.stgit@yoghurt>
Karl Hasselström <kha@treskal.com> writes:
Show 10 quoted lines
> Creating a new patch is a great deal easier now that "stg new" has a
> --file flag.
>
> Signed-off-by: Karl Hasselström <kha@treskal.com>
>
> ---
>
> David, will you sanity-check this? I don't really speak elisp, so I
> might have done something insane without knowing it. But it does seem
> to work. :-)
Looks sane to me.
Show 28 quoted lines
>  contrib/stgit.el |   10 ++--------
>  1 files changed, 2 insertions(+), 8 deletions(-)
>
>
> diff --git a/contrib/stgit.el b/contrib/stgit.el
> index bef41c7..30c1cd1 100644
> --- a/contrib/stgit.el
> +++ b/contrib/stgit.el
> @@ -316,16 +316,10 @@ Commands:
>  
>  (defun stgit-confirm-new ()
>    (interactive)
> -  (let ((file (make-temp-file "stgit-edit-"))
> -        (patch (stgit-create-patch-name
> -                (buffer-substring (point-min)
> -                                  (save-excursion (goto-char (point-min))
> -                                                  (end-of-line)
> -                                                  (point))))))
> +  (let ((file (make-temp-file "stgit-edit-")))
>      (write-region (point-min) (point-max) file)
>      (stgit-capture-output nil
> -      (stgit-run "new" "-m" "placeholder" patch)
> -      (stgit-run "edit" "-f" file patch))
> +      (stgit-run "new" "-f" file))
>      (with-current-buffer log-edit-parent-buffer
>        (stgit-refresh))))
>  
>
-- 
David Kågedal
Previous: Karl HasselströmNext: Karl Hasselström
Message 11 of 21 in “StGit: kha/safe and kha/experimental updated”
  1. Karl HasselströmFeb 10, 2008
  2. 0/5 Convert "stg new" to the new infrastructureKarl Hasselström, Feb 10, 2008
  3. 1/5 Disable patchlog test for "stg new"Karl Hasselström, Feb 10, 2008
  4. 2/5 Convert "stg new" to the new infrastructureKarl Hasselström, Feb 10, 2008
  5. 3/5 Refactor --author/--committer optionsKarl Hasselström, Feb 10, 2008
  6. Subject: [PATCH] fix stg edit commandPeter Oberndorfer, Feb 12, 2008
  7. Karl HasselströmFeb 12, 2008
  8. Refactor --author/--committer optionsKarl Hasselström, Feb 12, 2008
  9. 4/5 Let "stg new" support more message optionsKarl Hasselström, Feb 10, 2008
  10. 5/5 Emacs mode: use "stg new --file"Karl Hasselström, Feb 10, 2008
  11. David KågedalFeb 11, 2008
  12. Karl HasselströmFeb 11, 2008
  13. 0/2 Convert "stg delete" to the new infrastructureKarl Hasselström, Feb 10, 2008
  14. 1/2 Convert "stg delete" to the new infrastructureKarl Hasselström, Feb 10, 2008
  15. 2/2 Emacs mode: delete patchesKarl Hasselström, Feb 10, 2008
  16. David KågedalFeb 11, 2008
  17. Karl HasselströmFeb 11, 2008
  18. David KågedalFeb 11, 2008
  19. 1/2 Emacs mode: change "stg repair" bindingKarl Hasselström, Feb 11, 2008
  20. 2/2 Emacs mode: delete patchesKarl Hasselström, Feb 11, 2008
  21. Catalin MarinasFeb 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.