From: "Piotr Zielinski" <piotr.zielinski@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Added backward isearch support for headings
Date: Sun, 3 Aug 2008 20:41:04 +0100 [thread overview]
Message-ID: <3c12eb8d0808031241w5e9fd842k753853abc4f4c520@mail.gmail.com> (raw)
Changed org-goto-local-search-forward-headings to support backward
search, and renamed it to org-goto-local-search-headings.
---
lisp/org.el | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 57c6dae..62ad9ea 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4350,7 +4350,7 @@ or nil."
(let ((isearch-mode-map org-goto-local-auto-isearch-map)
(isearch-hide-immediately nil)
(isearch-search-fun-function
- (lambda () 'org-goto-local-search-forward-headings))
+ (lambda () 'org-goto-local-search-headings))
(org-goto-selected-point org-goto-exit-command))
(save-excursion
(save-window-excursion
@@ -4391,10 +4391,12 @@ or nil."
(define-key org-goto-local-auto-isearch-map "\C-i" 'isearch-other-control-char)
(define-key org-goto-local-auto-isearch-map "\C-m" 'isearch-other-control-char)
-(defun org-goto-local-search-forward-headings (string bound noerror)
+(defun org-goto-local-search-headings (string bound noerror)
"Search and make sure that anu matches are in headlines."
(catch 'return
- (while (search-forward string bound noerror)
+ (while (if isearch-forward
+ (search-forward string bound noerror)
+ (search-backward string bound noerror))
(when (let ((context (mapcar 'car (save-match-data (org-context)))))
(and (member :headline context)
(not (member :tags context))))
--
1.5.2.5
next reply other threads:[~2008-08-03 19:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-03 19:41 Piotr Zielinski [this message]
2008-09-03 9:36 ` [PATCH] Added backward isearch support for headings Carsten Dominik
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c12eb8d0808031241w5e9fd842k753853abc4f4c520@mail.gmail.com \
--to=piotr.zielinski@gmail.com \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).