From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84617 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.orgmode,gmane.emacs.gnus.general Subject: Re: Capturing outgoing gnus e-mail Date: Sat, 14 Jun 2014 11:05:18 +0200 Message-ID: <87mwdfg8tt.fsf@bzg.ath.cx> References: <8761k3rivi.fsf@kanis.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402736767 19965 80.91.229.3 (14 Jun 2014 09:06:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Jun 2014 09:06:07 +0000 (UTC) Cc: org mode , Gnus General To: Ivan Kanis Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sat Jun 14 11:05:59 2014 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WvjuM-0007mO-9X for geo-emacs-orgmode@m.gmane.org; Sat, 14 Jun 2014 11:05:54 +0200 Original-Received: from localhost ([::1]:34645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvjuL-0001dt-TN for geo-emacs-orgmode@m.gmane.org; Sat, 14 Jun 2014 05:05:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvjtx-0001K6-0f for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 05:05:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wvjtq-0002JL-NT for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 05:05:28 -0400 Original-Received: from mail-s76.mailgun.info ([184.173.153.204]:43749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvjtq-0002J9-HI for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 05:05:22 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=bzg.fr; q=dns/txt; s=pic; t=1402736722; h=From: To: Cc: Subject: In-Reply-To: References: Date: Message-Id: Mime-Version: Content-Type: Sender; bh=5CdQml6vLxkrX21oucKqM5+O99ZXqUsE/zgeyjBa/c4=; b=DUOC1dLF3LixawWNqBWaOmDtks/i21bYLGpywZEd6h4kcv1DwwjuV446J198Bqy12Ezr/Nmd 0YApsszRHKE4OoxVAzK6L1pC5jYs22qZbGE7wuhuFNOwE23vM3wtn4QSZ2Mut1d5VCoSand4 /3ztrJxPBQdXRu/ikLN6AbkyWdg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bzg.fr; s=pic; q=dns; h=From: To: Cc: Subject: In-Reply-To: References: Date: Message-Id: Mime-Version: Content-Type: Sender; b=Xl1T2miSsiAdOaK+/gU2W1uIxTCHQP06TBKuu0owJwcoMcKsCSu4KKDjXuBL0UGs1JSCyX vXI4xkhpotOKIGGsxbqZhmjfsvJ6MBg04JWKT1+PpMXnk1A6t5HXw7fm8dLV/OLz25VBKIDa 0O4gumfixJYUOTRaE+BZ7/8PF72g8= Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net [81.56.68.112]) by mxa.mailgun.org with ESMTP id 539c1052.5293688-in3; Sat, 14 Jun 2014 09:05:22 -0000 (UTC) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id E3E051C20831; Sat, 14 Jun 2014 11:05:18 +0200 (CEST) In-Reply-To: <8761k3rivi.fsf@kanis.fr> (Ivan Kanis's message of "Sat, 14 Jun 2014 10:32:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Mailgun-Sid: WyI1MThmMiIsICJlbWFjcy1vcmdtb2RlQGdudS5vcmciLCAiYTUyYmEiXQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 184.173.153.204 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.orgmode:87547 gmane.emacs.gnus.general:84617 Archived-At: Hi Ivan, this is what I use : ======================================================================== ;; Hack to store Org links upon sending Gnus messages (defun bzg-message-send-and-org-gnus-store-link (&optional arg) "Send message with `message-send-and-exit' and store org link to message copy. If multiple groups appear in the Gcc header, the link refers to the copy in the last group." (interactive "P") (save-excursion (save-restriction (message-narrow-to-headers) (let ((gcc (car (last (message-unquote-tokens (message-tokenize-header (mail-fetch-field "gcc" nil t) " ,"))))) (buf (current-buffer)) (message-kill-buffer-on-exit nil) id to from subject desc link newsgroup xarchive) (message-send-and-exit arg) (or ;; gcc group found ... (and gcc (save-current-buffer (progn (set-buffer buf) (setq id (org-remove-angle-brackets (mail-fetch-field "Message-ID"))) (setq to (mail-fetch-field "To")) (setq from (mail-fetch-field "From")) (setq subject (mail-fetch-field "Subject")))) (org-store-link-props :type "gnus" :from from :subject subject :message-id id :group gcc :to to) (setq desc (org-email-link-description)) (setq link (org-gnus-article-link gcc newsgroup id xarchive)) (setq org-stored-links (cons (list link desc) org-stored-links))) ;; no gcc group found ... (message "Can not create Org link: No Gcc header found.")))))) (define-key message-mode-map [(control c) (control meta c)] 'bzg-message-send-and-org-gnus-store-link) ======================================================================== Then, in a message, I use C-c C-M-c instead of C-c C-c to send the message and create a link to it that I can reinsert later one. This is not really capturing, but it's good enough for my needs. HTH, -- Bastien