From: James TD Smith <ahktenzero@mohorovi.cc>
To: emacs-orgmode@gnu.org
Subject: [PATCH 4/7] Fix link display in imenus and the refile interface
Date: Fri, 25 Jul 2008 00:46:24 +0100 [thread overview]
Message-ID: <20080724234624.23478.13311.stgit@nyarlathotep.internal.mohorovi.cc> (raw)
In-Reply-To: <20080724234608.23478.48564.stgit@nyarlathotep.internal.mohorovi.cc>
Replace links with their descriptions in when generating the items for imenus
and the refile interface.
---
lisp/ChangeLog | 4 ++++
lisp/org.el | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e63503a..ea6e60e 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2008-07-25 James TD Smith <ahktenzero@mohorovi.cc>
+ * org.el (org-get-refile-targets): Replace links with their
+ descriptions
+ (org-imenu-get-tree): Replace links with their descriptions
+
* org-agenda.el (org-agenda-get-closed): show durations of clocked
items as well as the start and end times.
diff --git a/lisp/org.el b/lisp/org.el
index 77a859b..cbce370 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7740,7 +7740,10 @@ on the system \"/user@host:\"."
(while (re-search-forward descre nil t)
(goto-char (point-at-bol))
(when (looking-at org-complex-heading-regexp)
- (setq txt (match-string 4)
+ (setq txt (save-match-data
+ (replace-regexp-in-string
+ org-bracket-link-analytic-regexp "\\5"
+ (match-string 4)))
re (concat "^" (regexp-quote
(buffer-substring (match-beginning 1)
(match-end 4)))))
@@ -14470,6 +14473,9 @@ Show the heading too, if it is currently invisible."
(looking-at org-complex-heading-regexp)
(setq head (org-match-string-no-properties 4)
m (org-imenu-new-marker))
+ (setq head (replace-regexp-in-string
+ org-bracket-link-analytic-regexp
+ "\\5" head))
(org-add-props head nil 'org-imenu-marker m 'org-imenu t)
(if (>= level last-level)
(push (cons head m) (aref subs level))
next prev parent reply other threads:[~2008-07-24 23:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 23:46 [PATCH 1/7] Some improvements to the modeline clock display James TD Smith
2008-07-24 23:46 ` [PATCH 2/7] Fix X clipboard handling in emacs21 James TD Smith
2008-07-24 23:46 ` [PATCH 3/7] Show durations of clocked times in timeline James TD Smith
2008-07-24 23:46 ` James TD Smith [this message]
2008-07-24 23:46 ` [PATCH 5/7] Fix note insertion in entries with drawers James TD Smith
2008-07-24 23:46 ` [PATCH 6/7] Add some functions for handling checklists James TD Smith
2008-07-24 23:46 ` [PATCH 7/7] Add some new interaction between remember and clocked tasks James TD Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080724234624.23478.13311.stgit@nyarlathotep.internal.mohorovi.cc \
--to=ahktenzero@mohorovi.cc \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.