From: Kyle Meyer <kyle@kyleam.com> To: piem@inbox.kyleam.com Cc: Xinglu Chen <public@yoctocell.xyz> Subject: [PATCH 2/5] piem-dispatch: Add command for copying public-inbox URLs Date: Sun, 7 Feb 2021 02:57:35 -0500 [thread overview] Message-ID: <20210207075738.8752-3-kyle@kyleam.com> (raw) In-Reply-To: <20210207075738.8752-1-kyle@kyleam.com> piem-notmuch configures notmuch-show-stash-mlarchive-link-alist with a custom piem function that's useful for grabbing the pubic-inbox URL. Add a command to piem-dispatch that provides similar functionality. --- piem.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/piem.el b/piem.el index 24d252e..0ed288a 100644 --- a/piem.el +++ b/piem.el @@ -467,6 +467,16 @@ (defun piem-mid-url (mid &optional inbox) (or inbox "current buffer")))) (piem-escape-mid mid))) +(defun piem-copy-mid-url () + "Copy public-inbox URL for the current buffer's message." + (interactive) + (kill-new + (message "%s" + (piem-mid-url + (or (piem-mid) + (user-error "No message ID found for the current buffer")) + (piem-inbox))))) + \f ;;;; Download helpers @@ -787,9 +797,10 @@ (defun piem-am (mbox &optional format info coderepo toggle-worktree) ;;;###autoload (autoload 'piem-dispatch "piem" nil t) (define-transient-command piem-dispatch () "Invoke a piem command." - [("a" "apply patch" piem-am) - ("b" "call b4-am" piem-b4-am) - ("i" "inject thread into maildir" piem-inject-thread-into-maildir)]) + [[("a" "apply patch" piem-am) + ("b" "call b4-am" piem-b4-am)] + [("i" "inject thread into maildir" piem-inject-thread-into-maildir) + ("l" "copy public-inbox link" piem-copy-mid-url)]]) \f -- 2.30.0
next prev parent reply other threads:[~2021-02-07 7:57 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-07 7:57 [PATCH 0/5] New " Kyle Meyer 2021-02-07 7:57 ` [PATCH 1/5] piem: Add helper to construct message ID link Kyle Meyer 2021-02-07 7:57 ` Kyle Meyer [this message] 2021-02-07 7:57 ` [PATCH 3/5] piem-copy-mid-url: Add support for browsing url Kyle Meyer 2021-02-07 7:57 ` [PATCH 4/5] piem-copy-mid-url: Allow overriding browse-url-browser-function Kyle Meyer 2021-02-07 7:57 ` [PATCH 5/5] manual: Add section on "copy public-inbox link" functionality Kyle Meyer 2021-02-07 12:38 ` [PATCH 0/5] New command for copying public-inbox URLs Xinglu Chen 2021-02-07 16:57 ` Kyle Meyer 2021-02-07 17:35 ` Kyle Meyer 2021-02-07 20:25 ` Xinglu Chen
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 List information: https://git.kyleam.com/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210207075738.8752-3-kyle@kyleam.com \ --to=kyle@kyleam.com \ --cc=piem@inbox.kyleam.com \ --cc=public@yoctocell.xyz \ --subject='Re: [PATCH 2/5] piem-dispatch: Add command for copying public-inbox URLs' \ /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
Code repositories for project(s) associated with this inbox: https://git.kyleam.com/piem/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).