[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 056a767 442/449: [gnorb] Improvements to gnorb-or
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 056a767 442/449: [gnorb] Improvements to gnorb-org-setup-message |
Date: |
Fri, 27 Nov 2020 23:16:29 -0500 (EST) |
branch: externals/gnorb
commit 056a767b4785447b8cb5886ed00a6e228c7dff02
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
[gnorb] Improvements to gnorb-org-setup-message
* packages/gnorb/gnorb-org.el (gnorb-org-setup-message): Accept an
optional NOPROMPT argument that will attach all files unconditionally.
Do a better job of adding extra headers correctly, without snarfing
newlines. Don't add a newline before inserting text (why was I doing
that?).
---
gnorb-org.el | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/gnorb-org.el b/gnorb-org.el
index 7f51bb2..9c97af2 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -297,7 +297,7 @@ subtree (or REGION) for links, and use those instead."
(defvar message-beginning-of-line)
(defun gnorb-org-setup-message
- (&optional messages mails from cc bcc attachments text ids)
+ (&optional messages mails from cc bcc attachments text ids noprompt)
"Common message setup routine for other gnorb-org commands.
MESSAGES is a list of gnus links pointing to messages -- we
currently only use the first of the list. MAILS is a list of
@@ -334,25 +334,26 @@ headings."
(funcall (intern (format "message-goto-%s" (car h))))
(let ((message-beginning-of-line t)
(show-trailing-whitespace t))
- (message-beginning-of-line)
- (unless (bolp)
- (kill-line))
+ (message-beginning-of-header t)
(insert (cdr h))))))
(dolist (h `((from . ,from) (cc . ,cc) (bcc . ,bcc)))
(sh h)))
;; attach ATTACHMENTS
- (map-y-or-n-p
- (lambda (a) (format "Attach %s to outgoing message? "
- (file-name-nondirectory a)))
- (lambda (a)
- (mml-attach-file a (mm-default-file-encoding a)
- nil "attachment"))
- attachments
- '("file" "files" "attach"))
+ (if noprompt
+ (dolist (a attachments)
+ (mml-attach-file a (mm-default-file-encoding a)
+ nil "attachment"))
+ (map-y-or-n-p
+ (lambda (a) (format "Attach %s to outgoing message? "
+ (file-name-nondirectory a)))
+ (lambda (a)
+ (mml-attach-file a (mm-default-file-encoding a)
+ nil "attachment"))
+ attachments
+ '("file" "files" "attach")))
;; insert text, if any
(when text
(message-goto-body)
- (insert "\n")
(if (bufferp text)
(insert-buffer-substring text)
(insert text)))
- [elpa] externals/gnorb 840093b 411/449: [gnorb] Don't use string-trim with optional args, (continued)
- [elpa] externals/gnorb 840093b 411/449: [gnorb] Don't use string-trim with optional args, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5e8b0c2 414/449: [gnorb] Fix handling of region-bounds return value, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 183cf9c 435/449: [gnorb] Fix dumb typo in 07214d9e4, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f383a7e 416/449: [gnorb] Require gnorb-org within gnorb-trigger-todo-action, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9adc9dd 427/449: [gnorb] Add nnselect method of getting an article's "real" group, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3fb0aed 438/449: [gnorb] Fixes to link scanning, bump to 1.6.6, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5692b47 448/449: [gnorb] Finish refactoring for nnselect, bump to 1.6.9, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6174d5a 410/449: [gnorb] More little tweaks to registry searching, bump to 1.5.2, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 46b72b2 415/449: [gnorb] Bump version to 1.5.3, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c4aa1d5 441/449: [gnorb] Improve customization type for gnorb-gnus-sent-groups, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 056a767 442/449: [gnorb] Improvements to gnorb-org-setup-message,
Stefan Monnier <=
- [elpa] externals/gnorb b2138dd 437/449: [gnorb] Update to use org-link-any-re, bump to 1.6.5, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a0f32ad 444/449: [gnorb] Don't allow creation of new headings for incoming trigger, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 78fe298 426/449: [gnorb] Move location of gnorb-gnus-summary-mode-hook, bump to 1.6.1, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3940f46 431/449: [gnorb] Fix to previous commit, bump to 1.6.3, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5f9611b 449/449: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 15726f0 419/449: [gnorb] Missing quote in nested `eval-after-load', bump to 1.5.5, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d5aafc5 445/449: [gnorb] Bump version to 1.6.8, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a512de8 422/449: gnorb: Remove weird group-name guard, bump to 1.5.7, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb be4c245 425/449: [gnorb] New option gnorb-gnus-refile-use-outline-path, bump to 1.6.0, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 66c2847 447/449: [gnorb] Random unimportant pokings-about, Stefan Monnier, 2020/11/27