[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb f44a797 286/350: New function ebdb-mua-in-ebdb-buf
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb f44a797 286/350: New function ebdb-mua-in-ebdb-buffer |
Date: |
Mon, 14 Aug 2017 11:46:55 -0400 (EDT) |
branch: externals/ebdb
commit f44a797d952d12ea872824ecb9bc84ec2cee28f7
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New function ebdb-mua-in-ebdb-buffer
* ebdb-mua.el (ebdb-mua-in-ebdb-buffer): New function, a bit
experimental. Call it to temporarily move point to the pop-up EBDB
buffer associated with the current MUA. Re-wires "q" to return to
the previous window configuration. Don't document or bind for now.
---
ebdb-mua.el | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/ebdb-mua.el b/ebdb-mua.el
index 10872f2..63cc7a1 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -1031,6 +1031,35 @@ bind `ebdb-message-all-addresses' to ALL."
(interactive)
(ebdb-mua-display-records 'recipients t))
+(defun ebdb-mua-in-ebdb-buffer ()
+ "From an MUA, temporarily move point to the corresponding EBDB buffer.
+
+All further operations will take place within the EBDB buffer as
+per normal, with the exception that \"q\" will return point to
+where it was in the MUA, rather than quitting the EBDB buffer."
+ (interactive)
+ (let* ((buf (get-buffer (ebdb-make-buffer-name)))
+ (w-conf (current-window-configuration))
+ (w-win (selected-window))
+ (w-point (window-point))
+ (e-win (if (window-live-p (get-buffer-window buf))
+ (get-buffer-window buf)
+ (ebdb-pop-up-window buf t (ebdb-popup-window))))
+ (key-m (make-sparse-keymap)))
+ (define-key key-m (kbd "q")
+ (lambda ()
+ (interactive)
+ (when (window-live-p w-win)
+ (set-window-configuration w-conf)
+ (goto-char w-point))))
+ (select-window e-win t)
+ (set-transient-map
+ key-m
+ (lambda ()
+ ;; Keep the transient map active until the user hits "q".
+ (null
+ (equal (this-command-keys-vector)
+ [?q]))))))
;;;###autoload
(defun ebdb-mua-edit-field (&optional field header-class)
- [elpa] externals/ebdb 6f8d59b 254/350: Fix record citation, (continued)
- [elpa] externals/ebdb 6f8d59b 254/350: Fix record citation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 3106b45 256/350: Require ebdb-format in ebdb-vcard, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7549366 259/350: New method: ebdb-db-load-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b37356a 270/350: Fix docstring of ebdb-create-record, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5135645 260/350: Split out ebdb-notice-record and ebdb-notice-field methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 71a93f5 268/350: Put a load protection in ebdb-mua-update-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb cacb97b 271/350: Fix bug in MUA record creation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e5bdee2 278/350: Rework ebdb-mail-yank, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8dd1600 273/350: Change type of anniversary field dates, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 57b2514 276/350: Use ebdb-with-record-edits in more places, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f44a797 286/350: New function ebdb-mua-in-ebdb-buffer,
Eric Abrahamsen <=
- [elpa] externals/ebdb 4ce353e 237/350: Migrate more search routines to the ebdb-search-display thing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7040cad 247/350: Expand ebdb-helm to complete on mails as well, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a6bc423 249/350: Remove unused customization groups, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4ded53d 250/350: All vCard lines should be delimited with CRLF, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a776d37 248/350: Don't use copy-sequence plus add-text-properties on strings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 96b113d 251/350: New functions for folding/unfolding long vCard lines, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b52cdc0 265/350: Record-insert|delete-field methods can find their own slots, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fcee6ab 267/350: Protect against no current record when redisplaying, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f3b9525 269/350: Temporarily abandon having record-change-name accept strings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1a31515 274/350: Fixes to record loading, Eric Abrahamsen, 2017/08/14