From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tim O'Callaghan" Subject: Re: [PATCH] Open single link immediately Date: Sun, 30 Aug 2009 16:27:38 +0200 Message-ID: <3d6808890908300727k110dceefy7410d7abf778af04@mail.gmail.com> References: <1251480180-9815-1-git-send-email-bernt@norang.ca> <9906B72A-15D5-4795-BE2F-0BFD799582D1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhlNo-0002mN-1g for emacs-orgmode@gnu.org; Sun, 30 Aug 2009 10:27:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhlNj-0002lT-3c for emacs-orgmode@gnu.org; Sun, 30 Aug 2009 10:27:51 -0400 Received: from [199.232.76.173] (port=37566 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhlNi-0002lQ-Rt for emacs-orgmode@gnu.org; Sun, 30 Aug 2009 10:27:46 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:42549) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhlNh-000295-Ec for emacs-orgmode@gnu.org; Sun, 30 Aug 2009 10:27:46 -0400 Received: by bwz22 with SMTP id 22so2912554bwz.42 for ; Sun, 30 Aug 2009 07:27:38 -0700 (PDT) In-Reply-To: <9906B72A-15D5-4795-BE2F-0BFD799582D1@gmail.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: org-mode FWIW it should be back up on monday. http://article.gmane.org/gmane.comp.version-control.git/85019 Tim. 2009/8/30 Carsten Dominik : > This will be in the next push, when our repository is online again. > > Thanks! > > - Carsten > > On Aug 28, 2009, at 7:23 PM, Bernt Hansen wrote: > >> C-c C-o on a headline or in the agenda displays a menu of links to >> choose from. =A0If there is only a single link then go there directly >> skipping the menu. >> --- >> This patch is available at git://git.norang.ca/org-mode.git for-carsten >> >> lisp/org.el | =A0 31 ++++++++++++++++--------------- >> 1 files changed, 16 insertions(+), 15 deletions(-) >> >> diff --git a/lisp/org.el b/lisp/org.el >> index a5181ab..f3d8976 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -8073,21 +8073,22 @@ needed for the interpretation of abbreviated >> links." >> =A0 =A0 =A0 =A0(push (match-string 0) links)) >> =A0 =A0 =A0(setq links (reverse links)) >> =A0 =A0 =A0(unless links (error "No links")) >> - >> - =A0 =A0 =A0(unless (and (integerp nth) (>=3D (length links) nth)) >> - =A0 =A0 =A0 (save-excursion >> - =A0 =A0 =A0 =A0 (save-window-excursion >> - =A0 =A0 =A0 =A0 =A0 (delete-other-windows) >> - =A0 =A0 =A0 =A0 =A0 (with-output-to-temp-buffer "*Select Link*" >> - =A0 =A0 =A0 =A0 =A0 =A0 (princ "Select link\n\n") >> - =A0 =A0 =A0 =A0 =A0 =A0 (mapc (lambda (l) (princ (format "[%d] %s\n" (= incf cnt) l))) >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 links)) >> - =A0 =A0 =A0 =A0 =A0 (org-fit-window-to-buffer (get-buffer-window "*Sel= ect Link*")) >> - =A0 =A0 =A0 =A0 =A0 (message "Select link to open:") >> - =A0 =A0 =A0 =A0 =A0 (setq c (read-char-exclusive)) >> - =A0 =A0 =A0 =A0 =A0 =A0 (and (get-buffer "*Select Link*") (kill-buffer= "*Select >> Link*")))) >> - =A0 =A0 =A0 (setq nth (- c ?0))) >> - >> + =A0 =A0 =A0(if (eq 1 (length links)) >> + =A0 =A0 =A0 =A0 (setq c 1) >> + =A0 =A0 =A0 (unless (and (integerp nth) (>=3D (length links) nth)) >> + =A0 =A0 =A0 =A0 (save-excursion >> + =A0 =A0 =A0 =A0 =A0 (save-window-excursion >> + =A0 =A0 =A0 =A0 =A0 =A0 (delete-other-windows) >> + =A0 =A0 =A0 =A0 =A0 =A0 (with-output-to-temp-buffer "*Select Link*" >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 (princ "Select link\n\n") >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 (mapc (lambda (l) (princ (format "[%d] %s\= n" (incf cnt) >> l))) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 links)) >> + =A0 =A0 =A0 =A0 =A0 =A0 (org-fit-window-to-buffer (get-buffer-window "= *Select >> Link*")) >> + =A0 =A0 =A0 =A0 =A0 =A0 (message "Select link to open:") >> + =A0 =A0 =A0 =A0 =A0 =A0 (setq c (read-char-exclusive)) >> + =A0 =A0 =A0 =A0 =A0 =A0 (and (get-buffer "*Select Link*") (kill-buffer= "*Select >> Link*")))))) >> + =A0 =A0 =A0(setq nth (- c ?0)) >> + >> =A0 =A0 =A0(unless (and (integerp nth) (>=3D (length links) nth)) >> =A0 =A0 =A0 =A0(error "Invalid link selection")) >> =A0 =A0 =A0(setq link (nth (1- nth) links) >> -- >> 1.6.4.1.331.gda1d56 >> >> >> >> _______________________________________________ >> 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 > > > > _______________________________________________ > 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 >