From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] org-remember: Ignore gnus link if not on a message Date: Tue, 20 Jan 2009 18:17:19 +0100 Message-ID: <3DB917C3-A151-4FE3-BB2A-A64DCC0D196B@uva.nl> References: <1232469469-10629-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPKGD-0008LU-Eu for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 12:19:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPKGA-0008H5-He for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 12:19:32 -0500 Received: from [199.232.76.173] (port=39432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPKGA-0008Gp-Ak for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 12:19:30 -0500 Received: from mail-ew0-f20.google.com ([209.85.219.20]:57496) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPKG9-0003Vy-EE for emacs-orgmode@gnu.org; Tue, 20 Jan 2009 12:19:30 -0500 Received: by ewy13 with SMTP id 13so1208410ewy.18 for ; Tue, 20 Jan 2009 09:19:28 -0800 (PST) In-Reply-To: <1232469469-10629-1-git-send-email-bernt@norang.ca> 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: Bernt Hansen Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Jan 20, 2009, at 5:37 PM, Bernt Hansen wrote: > 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 > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode