Georg C. F. Greve [EMAIL PROTECTED] writes:
I've taken a little bit of time to clean up the integration of Mairix
with Org.
Great!
The weakest point right now is the selection of the Gnus group upon
matching, as I am still looking for a way to do this in Gnus that will
not generate zombies.
Please have a look at the patch below and tell me if it solves the issue
above. Look for the small FIXME: (bzg) cookies in the patch.
But overall I'm quite happy now: By default, this will pull an entire
thread into the search group and automatically select the mail that
was linked to.
BTW, this might be just personal taste, but I would prefer a shorter
syntax for thread searches (like mairix:t).
Right now --thread in the link is converted as %20--thread and this
is not parsed by the (split-string ... ) part of your code.
Please test, help debug and extend. I don't have the time to maintain
this actively, but would be happy if people found it useful.
This *is* definitely very useful!
diff -u /home/guerry/elisp/testing/org-mairix.el /home/guerry/elisp/testing/bzg/org-mairix.el
--- /home/guerry/elisp/testing/org-mairix.el 2007-09-26 16:45:30.0 +0200
+++ /home/guerry/elisp/testing/bzg/org-mairix.el 2007-09-26 16:43:03.0 +0200
@@ -35,31 +35,31 @@
(defcustom org-mairix-threaded-links t
Should new links be created as threaded links?
- If t, links will be stored as threaded searches.
- If nil, links will be stored as non-threaded searches.
+If t, links will be stored as threaded searches.
+If nil, links will be stored as non-threaded searches.
:group 'org-mairix
:type 'boolean)
(defcustom org-mairix-augmented-links nil
Should new links be created as augmenting searches?
- If t, links will be stored as augmenting searches.
- If nil, links will be stored as normal searches.
+If t, links will be stored as augmenting searches.
+If nil, links will be stored as normal searches.
- Attention: When activating this option, you will need
- to remove old articles from your mairix results group
- in some other way, mairix will not do it for you.
+Attention: When activating this option, you will need
+to remove old articles from your mairix results group
+in some other way, mairix will not do it for you.
:group 'org-mairix
:type 'boolean)
(defcustom org-mairix-display-hook 'org-mairix-gnus-display-results
Hook to call to display the results of a successful mairix search.
- Defaults to Gnus, feel free to add your own MUAs or methods.
+Defaults to Gnus, feel free to add your own MUAs or methods.
:group 'org-mairix
:type 'hook)
(defcustom org-mairix-executable mairix
The mairix executable to call. If your paths are set up
- correctly, you should not need to change this.
+correctly, you should not need to change this.
:group 'org-mairix
:type 'string)
@@ -70,8 +70,8 @@
(defcustom org-mairix-gnus-results-group nnmaildir:mairix
The group that is configured to hold the mairix search results,
- which needs to be setup independently of the org-mairix integration,
- along with general mairix configuration.
+which needs to be setup independently of the org-mairix integration,
+along with general mairix configuration.
:group 'org-mairix-gnus
:type 'string)
@@ -85,7 +85,8 @@
;;; Generic org-mairix functions
(defun org-mairix-store-link ()
- Store a link to the current message as a Mairix search for its Message ID.
+ Store a link to the current message as a Mairix search for its
+Message ID.
;; gnus integration
(when (memq major-mode '(gnus-summary-mode gnus-article-mode))
@@ -94,10 +95,11 @@
(header (gnus-summary-article-header article))
(from (mail-header-from header))
(message-id (mail-header-id header))
- (date (mail-header-date header))
+ ;; FIXME: (bzg) we don't need the date
+ (date (mail-header-date header))
(subject (gnus-summary-subject-string)))
(org-store-link-props :type mairix :from from :subject subject
- :message-id message-id )
+ :message-id message-id)
(setq cpltxt (org-email-link-description))
(org-store-link-props :link (concat mairix: (org-remove-angle-brackets message-id)
(if org-mairix-threaded-links --thread)
@@ -107,11 +109,12 @@
(defun org-mairix-open (path)
Function to open mairix link.
- We first need to split it into its individual parts, and then extract the
- message-id to be passed on to the display function before call mairix, evaluate
- the number of matches returned, and make sure to only call display of mairix
- succeeded in matching.
-
+We first need to split it into its individual parts, and then
+extract the message-id to be passed on to the display function
+before call mairix, evaluate the number of matches returned, and
+make sure to only call display of mairix succeeded in matching.
+ ;; FIXME (bzg) mhh... better use let* construct for arguments,
+ ;; message-id and cmdline.
(setq