From mboxrd@z Thu Jan 1 00:00:00 1970 From: tftorrey@tftorrey.com (T.F. Torrey) Subject: [PATCH] Fixes org-rmail-follow-link Date: Wed, 08 Aug 2012 16:00:39 -0600 Message-ID: <87vcgtxcvs.fsf@lapcat.tftorrey.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzhOZ-0004Qy-Ds for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 01:04:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzhOX-0000lc-Mj for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 01:04:23 -0400 Received: from slow3-v.mail.gandi.net ([217.70.178.89]:38293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzhOX-0000lJ-Ep for emacs-orgmode@gnu.org; Fri, 10 Aug 2012 01:04:21 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by slow3-v.mail.gandi.net (Postfix) with ESMTP id 04338397DE for ; Fri, 10 Aug 2012 07:01:47 +0200 (CEST) Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 5C12F172077 for ; Fri, 10 Aug 2012 07:01:46 +0200 (CEST) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id lwYRYNQHic4v for ; Fri, 10 Aug 2012 07:01:44 +0200 (CEST) Received: from lapcat.tftorrey.com.tftorrey.com (50-79-222-230-static.hfc.comcastbusiness.net [50.79.222.230]) (Authenticated sender: tftorrey@tftorrey.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 106C1172098 for ; Fri, 10 Aug 2012 07:01:43 +0200 (CEST) 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 Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain With creating links working in Rmail, now I see that following links fails with the error "Message not found". The error comes from the use of the function widen in org-rmail-follow-link. In an RMAIL buffer, the widen function only widens to the current message. The function to widen to the entire buffer is rmail-widen. The attached patch replaces widen with rmail-widen and also removes the following two lines (added by Bastien as part of the previous patch re Rmail), because rmail-widen already displays full headers, so testing and toggling them on has no effect. GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-07-29 on doubah, modified by Debian Org-mode version 7.8.11 (release_7.8.11-392-g9dae6f-git @ mixed installation! /usr/local/share/emacs/site-lisp/ and /home/tftorrey/.emacs.d/src/org-mode/lisp/) Best to all, Terry -- T.F. Torrey --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: Patch for org-rmail-follow-link diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el index 9148a8e..d28a420 100644 --- a/lisp/org-rmail.el +++ b/lisp/org-rmail.el @@ -101,9 +101,7 @@ (rmail (if (string= folder "RMAIL") rmail-file-name folder)) (setq message-number (save-restriction - (widen) - (when (eq rmail-header-style 'normal) - (rmail-toggle-header -1)) + (rmail-widen) (goto-char (point-max)) (if (re-search-backward (concat "^Message-ID:\\s-+" (regexp-quote --=-=-=--