From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] org-remember: Ignore gnus link if not on a message Date: Tue, 20 Jan 2009 11:37:49 -0500 Message-ID: <1232469469-10629-1-git-send-email-bernt@norang.ca> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPJc3-0003Oz-N9 for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 11:38:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPJc2-0003On-6S for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 11:38:02 -0500 Received: from [199.232.76.173] (port=57643 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPJc1-0003Ok-Un for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 11:38:02 -0500 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:54817) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPJc1-0006gz-Kz for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 11:38:01 -0500 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.148.180] helo=mail.norang.ca) by mho-02-bos.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LPJbu-000Bao-LD for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 16:37:54 +0000 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: emacs-orgmode@gnu.org Cc: Bernt Hansen This allows you to use org-remember in any gnus buffer - even when not on a location that will create a usable link. Instead of failing with the error "Not on a group" just create a remember note with no link instead. This makes org-remember more user-friendly - we don't have to change buffers to a non-gnus buffer to create a remember note. --- Carsten: This patch is available at git://git.norang.ca/org-mode for-carsten lisp/org-gnus.el | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index 23b2809..7826eba 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -111,12 +111,12 @@ If `org-store-link' was called with a prefix arg the meaning of (gnus-group-name)) (t "???"))) desc link) - (unless group (error "Not on a group")) - (org-store-link-props :type "gnus" :group group) - (setq desc (org-gnus-group-link group) - link desc) - (org-add-link-props :link link :description desc) - link)) + (when group + (org-store-link-props :type "gnus" :group group) + (setq desc (org-gnus-group-link group) + link desc) + (org-add-link-props :link link :description desc) + link))) ((memq major-mode '(gnus-summary-mode gnus-article-mode)) (and (eq major-mode 'gnus-summary-mode) (gnus-summary-show-article)) -- 1.6.1.28.gc32f76