[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 4fc1075 172/449: Rename gnorb-org-window-conf to
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 4fc1075 172/449: Rename gnorb-org-window-conf to gnorb-window-conf |
Date: |
Fri, 27 Nov 2020 23:15:32 -0500 (EST) |
branch: externals/gnorb
commit 4fc1075b756e19ed1a2726d933d79ab2aff4d8cd
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Rename gnorb-org-window-conf to gnorb-window-conf
Should be saved as a more central value.
* lisp/gnorb-utils.el: Add gnorb-window-conf, and use new var
* lisp/gnorb-org.el: Remove gnorb-org-window-conf
* lisp/gnorb-gnus.el: Use new var
---
lisp/gnorb-gnus.el | 4 ++--
lisp/gnorb-org.el | 24 ++++++++++--------------
lisp/gnorb-utils.el | 6 +++++-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index 34fe4bd..0fc2fcd 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -349,7 +349,7 @@ the outgoing message will still be available -- nothing
else will
work."
(interactive "P")
(let ((org-refile-targets gnorb-gnus-trigger-refile-targets)
- header-ids ref-ids rel-headings gnorb-org-window-conf
+ header-ids ref-ids rel-headings gnorb-window-conf
reply-id reply-group)
(when arg
(setq rel-headings
@@ -512,7 +512,7 @@ to t (it is, by default)."
;; `org-stored-links'. There's some duplicate storage, at
;; present. Take a look at calling it non-interactively.
(call-interactively 'org-store-link)
- (setq gnorb-org-window-conf (current-window-configuration))
+ (setq gnorb-window-conf (current-window-configuration))
(let* ((msg-id (mail-header-id headers))
(sender (mail-header-from headers))
(subject (mail-header-subject headers))
diff --git a/lisp/gnorb-org.el b/lisp/gnorb-org.el
index d8d32a1..336ee7c 100644
--- a/lisp/gnorb-org.el
+++ b/lisp/gnorb-org.el
@@ -185,10 +185,6 @@ future!"
(insert (format "[[%s][%s]]" link name))
link)))
-(defvar gnorb-org-window-conf nil
- "Save org-buffer window configuration here, for restoration
- after the mail is sent.")
-
(defun gnorb-org-restore-after-send ()
"After an email is sent, clean up the gnus summary buffer, put
us back where we came from, and go through all the org ids that
@@ -196,12 +192,12 @@ might have been in the outgoing message's headers and call
`gnorb-org-do-restore-action' on each one."
(when (eq major-mode 'gnus-summary-mode)
(gnus-summary-exit nil t))
- (when (window-configuration-p gnorb-org-window-conf)
- (set-window-configuration gnorb-org-window-conf))
+ (when (window-configuration-p gnorb-window-conf)
+ (set-window-configuration gnorb-window-conf))
(dolist (id gnorb-message-org-ids)
(gnorb-trigger-todo-action nil id))
;; this is a little unnecessary, but it may save grief
- (setq gnorb-org-window-conf nil)
+ (setq gnorb-window-conf nil)
(setq gnorb-gnus-sending-message-info nil)
(setq gnorb-message-org-ids nil))
@@ -421,8 +417,8 @@ headings."
(message-goto-to)
(insert ", ")
(insert (mapconcat 'identity mails ", "))))
- (error (when (window-configuration-p gnorb-org-window-conf)
- (set-window-configuration gnorb-org-window-conf))
+ (error (when (window-configuration-p gnorb-window-conf)
+ (set-window-configuration gnorb-window-conf))
(signal (car err) (cdr err)))))
;; Return us after message is sent.
(add-to-list 'message-exit-actions
@@ -492,7 +488,7 @@ current heading."
(defun gnorb-org-handle-mail (&optional arg text file)
"Handle current headline as a mail TODO."
(interactive "P")
- (setq gnorb-org-window-conf (current-window-configuration))
+ (setq gnorb-window-conf (current-window-configuration))
(when (eq major-mode 'org-agenda-mode)
(org-agenda-check-type t 'agenda 'timeline 'todo 'tags)
(org-agenda-check-no-diary)
@@ -712,7 +708,7 @@ default set of parameters."
,@opts
,gnorb-org-email-subtree-file-parameters))))
text file)
- (setq gnorb-org-window-conf (current-window-configuration))
+ (setq gnorb-window-conf (current-window-configuration))
(if (bufferp result)
(setq text result)
(setq file result))
@@ -838,7 +834,7 @@ This won't work unless you've added a \"nngnorb\" server to
your gnus select methods."
;; this should also work on the active region, if there is one.
(interactive)
- (setq gnorb-org-window-conf (current-window-configuration))
+ (setq gnorb-window-conf (current-window-configuration))
(when (eq major-mode 'org-agenda-mode)
(org-agenda-check-type t 'agenda 'timeline 'todo 'tags)
(org-agenda-check-no-diary)
@@ -855,8 +851,8 @@ your gnus select methods."
(setq id (concat "id+" (org-id-get-create t))))
(gnorb-gnus-search-messages
id
- `(when (window-configuration-p gnorb-org-window-conf)
- (set-window-configuration gnorb-org-window-conf)))))
+ `(when (window-configuration-p gnorb-window-conf)
+ (set-window-configuration gnorb-window-conf)))))
(provide 'gnorb-org)
;;; gnorb-org.el ends here
diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index d197d43..650b1f5 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -79,7 +79,11 @@
;; on whether the message in question has an Org id header. Then
;; `gnorb-org-restore-after-send' checks for it and acts
;; appropriately, then sets it to nil.
-)
+ )
+
+(defvar gnorb-window-conf nil
+ "Save window configurations here, for restoration after mails
+are sent, or Org headings triggered.")
(defcustom gnorb-mail-header "X-Org-ID"
"Name of the mail header used to store the ID of a related Org
- [elpa] externals/gnorb 9a76fad 226/449: Use org-element-interpret-data to get paragraph text, (continued)
- [elpa] externals/gnorb 9a76fad 226/449: Use org-element-interpret-data to get paragraph text, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 09346e0 141/449: BBDB message link list needs closing newline, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 69980d3 143/449: Improvements to nnir-run-gnorb, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ebce811 144/449: Also check for nnir when storing BBDB message links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5101731 150/449: Improvements to TODOs made from outgoing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b841d17 146/449: Wishlist changes, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8958546 155/449: Backquote escape fail, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 38df7d0 166/449: Ignore a notes.org file, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 44f8d23 165/449: Begin shift to using the registry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c280ea4 160/449: Only add relevant sent messages in the registry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 4fc1075 172/449: Rename gnorb-org-window-conf to gnorb-window-conf,
Stefan Monnier <=
- [elpa] externals/gnorb bb44a8c 174/449: Don't force id creation!, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b596ee7 157/449: Check for success when following gnus links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 43fbd55 176/449: New function for restoring window layout, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb fe7d814 179/449: Provide initialization of gnorb email tracking, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b95f371 186/449: That's not how you use condition-case, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6653b6c 187/449: Fix gnorb-tracking-initialize, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f0cfa7b 191/449: Improvements to gnorb-registry-make-entry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bdbc96f 195/449: Rename gnorb-gnus-sending-message-info, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ca85930 197/449: First draft of trigger action reworking, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9e880eb 200/449: Improve Gnus summary hinting, Stefan Monnier, 2020/11/27