From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Markert Subject: Re: Re: Completing with anything Date: Sun, 27 Mar 2011 00:40:07 +0100 Message-ID: <87bp0xxxgo.wl%markert.michael@googlemail.com> References: <87r5bhysp6.fsf@keller.adm.naquadah.org> <87vd0romky.fsf@keller.adm.naquadah.org> <87mxm2na63.fsf@member.fsf.org> <87vd0qfhu3.fsf@member.fsf.org> <87lj08fxge.fsf@member.fsf.org> <87wrjr7t9e.fsf@ericabrahamsen.net> <87oc53meeh.fsf@ucl.ac.uk> <87pqpi9b7s.fsf@pinto.chemeng.ucl.ac.uk> <87d3lfh5ee.fsf@keller.adm.naquadah.org> <87fwq9fsf4.wl%markert.michael@googlemail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Mar_27_00:40:06_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=58363 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3d5d-0006sv-36 for emacs-orgmode@gnu.org; Sat, 26 Mar 2011 19:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q3d5Y-00033d-KK for emacs-orgmode@gnu.org; Sat, 26 Mar 2011 19:40:16 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:36622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q3d5Y-00033X-9W for emacs-orgmode@gnu.org; Sat, 26 Mar 2011 19:40:12 -0400 Received: by fxm18 with SMTP id 18so2312164fxm.0 for ; Sat, 26 Mar 2011 16:40:11 -0700 (PDT) In-Reply-To: <87fwq9fsf4.wl%markert.michael@googlemail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Julien Danjou Cc: emacs-orgmode@gnu.org --pgp-sign-Multipart_Sun_Mar_27_00:40:06_2011-1 Content-Type: multipart/mixed; boundary="Multipart_Sun_Mar_27_00:40:06_2011-1" --Multipart_Sun_Mar_27_00:40:06_2011-1 Content-Type: text/plain; charset=US-ASCII On 26 Mar 2011, Michael Markert wrote: > Because Wanderlust keeps several message buffers you have to start > capture from within a message buffer, not a summary buffer. But I'll > look into it. Attached code handles both capturing from summary and message buffer. Michael --Multipart_Sun_Mar_27_00:40:06_2011-1 Content-Type: text/plain; type=emacs-lisp; charset=US-ASCII Content-Disposition: attachment; filename="org-contacts-wl.el" Content-Transfer-Encoding: 7bit (require 'std11) (require 'elmo) (require 'wl-address) (require 'wl-summary) (defun wl-get-from-header-content () (save-excursion (set-buffer (org-capture-get :original-buffer)) (cond ((eq major-mode 'wl-summary-mode) (when wl-summary-buffer-elmo-folder (elmo-message-field wl-summary-buffer-elmo-folder (wl-summary-message-number) 'from))) ((eq major-mode 'mime-view-mode) (std11-narrow-to-header) (prog1 (std11-fetch-field "From") (widen)))))) (defun org-contacts-template-wl-name (&optional return-value) (let ((from (wl-get-from-header-content))) (or (and from (wl-address-header-extract-realname from)) return-value "%^{Name}"))) (defun org-contacts-template-wl-email (&optional return-value) (let ((from (wl-get-from-header-content))) (or (and from (wl-address-header-extract-address from)) return-value (concat "%^{" org-contacts-email-property "}p")))) --Multipart_Sun_Mar_27_00:40:06_2011-1 Content-Type: text/plain; charset=US-ASCII --Multipart_Sun_Mar_27_00:40:06_2011-1-- --pgp-sign-Multipart_Sun_Mar_27_00:40:06_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJNjnlWAAoJEHHMVUK0UjKVXvIQAIAR4LVmwfjm5m7wCQbO6Qh1 ATeCVZXK2tckUdOYOR6hu70+HcoFZOqqYnfj5U0a0sNt6fnA+es7+yRhunPLtSJN NR+OJcCQlBlr0n95A1GQS3cNyOYqkroHAe5bZsZvVbcIc366LqeQpw7TXLCPTvku QIV7HPfRRkQBquw+LPeldCFLSor6wL1MaRY+WWXsrQSz74ZE2NGLqTHlP3scPLbL 7I4jhzwZSIgr9osSW98r2jeHn8DjuI0g/mfKst1e2A2LWoOy9C728/L+iZ0XMjUp YIuRHodSVMiBMRwRt7q9dZ6SbAYd7aMgrxmMkm4Qi66PlCUQ54h0Wy+Kz1kyH7AO SIvrG+9BxROX7wA1cN/mZhy98UJaB/C6x0Gi9FEALzJF0GZGheS/hz3gLHGDicTZ 2Qh/1VEWdyTGgbQCvmgg+zIIoaCIAlqDzrdDTGbwv1u+wYNMqZYPBuYLQoz9uV8N 9tSlJXQiUCa1VRkTFd/B4NDvZyJH0JnbqxxUg1/WpUj9L2nzzbVGuEl6FveFeGwU 24usotmA0PIgoxSJKR2978mqNKc9VCSAypC2AOwzJ74+4kHSTboOgtW1nfzbpLUf k85l7ffUPoNfPNbSm0tIwjYMoNI2HiElMLQL9LP0Dd627spzTGURtVvx6Kho2jZu 2XzC9fREnfqCIny/GRy1 =SCQq -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Mar_27_00:40:06_2011-1--