[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#38738] [PATCH WIP v2] etc: Add "tarball" snippet
From: |
Pierre Neidhardt |
Subject: |
[bug#38738] [PATCH WIP v2] etc: Add "tarball" snippet |
Date: |
Thu, 27 Feb 2020 11:14:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Looks good to me!
If you want to print only one "[source]:" I suggest the following,
untested:
* `(car (magit-staged-files))` ($1): Modify package to use stable git
references.
`(with-temp-buffer
(magit-git-wash #'magit-diff-wash-diffs
"diff" "--staged")
(let ((source-block "[source]: ")
(wrote-source-block? nil))
(beginning-of-buffer)
(when (search-forward "(method git-fetch" nil 'noerror)
(setq wrote-source-block? t)
(print (format "%sUse GIT-FETCH." source-block)))
(beginning-of-buffer)
(when (search-forward "(file-name (git-file-name" nil 'noerror)
(print (format "%sUse GIT-FILE-NAME." (if wrote-source-block? ""
"[source]:"))))))`
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#38738] [PATCH WIP v2] etc: Add "tarball" snippet,
Pierre Neidhardt <=