[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [PATCH] Open single link immediately
From: |
Tim O'Callaghan |
Subject: |
Re: [Orgmode] [PATCH] Open single link immediately |
Date: |
Sun, 30 Aug 2009 16:27:38 +0200 |
FWIW it should be back up on monday.
http://article.gmane.org/gmane.comp.version-control.git/85019
Tim.
2009/8/30 Carsten Dominik <address@hidden>:
> 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. If 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 | 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."
>> (push (match-string 0) links))
>> (setq links (reverse links))
>> (unless links (error "No links"))
>> -
>> - (unless (and (integerp nth) (>= (length links) nth))
>> - (save-excursion
>> - (save-window-excursion
>> - (delete-other-windows)
>> - (with-output-to-temp-buffer "*Select Link*"
>> - (princ "Select link\n\n")
>> - (mapc (lambda (l) (princ (format "[%d] %s\n" (incf cnt) l)))
>> - links))
>> - (org-fit-window-to-buffer (get-buffer-window "*Select Link*"))
>> - (message "Select link to open:")
>> - (setq c (read-char-exclusive))
>> - (and (get-buffer "*Select Link*") (kill-buffer "*Select
>> Link*"))))
>> - (setq nth (- c ?0)))
>> -
>> + (if (eq 1 (length links))
>> + (setq c 1)
>> + (unless (and (integerp nth) (>= (length links) nth))
>> + (save-excursion
>> + (save-window-excursion
>> + (delete-other-windows)
>> + (with-output-to-temp-buffer "*Select Link*"
>> + (princ "Select link\n\n")
>> + (mapc (lambda (l) (princ (format "[%d] %s\n" (incf cnt)
>> l)))
>> + links))
>> + (org-fit-window-to-buffer (get-buffer-window "*Select
>> Link*"))
>> + (message "Select link to open:")
>> + (setq c (read-char-exclusive))
>> + (and (get-buffer "*Select Link*") (kill-buffer "*Select
>> Link*"))))))
>> + (setq nth (- c ?0))
>> +
>> (unless (and (integerp nth) (>= (length links) nth))
>> (error "Invalid link selection"))
>> (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.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>