emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: Tom <adatgyujto@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: a new way to navigate your org files
Date: Sun, 24 Apr 2011 13:24:04 -0700	[thread overview]
Message-ID: <20110424132404.7d7f6a19@bhishma.homelinux.net> (raw)
In-Reply-To: <loom.20110424T175406-354@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

Hi Tom,

On Sun, 24 Apr 2011 16:06:05 +0000 (UTC)
Tom <adatgyujto@gmail.com> wrote:

> I use org goto to jump quckly to headings, but the other day
> I forgot the name of the heading, but I remembered its contents.
> I thought it could be useful if I could navigate org files by content
> too, so I quickly created this package as a sunday afternoon fun.
> 
> It is a wrapper around the multi-occur interface, so you can
> simply type your search pattern and the occur results from your org
> buffers are updated dynamically as you type.

This is very useful. I made some enhancements in the attached patches.
The first one adds a very basic minibuffer history. You can navigate the
history by the usual `M-p' and `M-n'. The second patch fixes an issue,
now you can go to the first match by just hitting `RET' instead of
`<down> RET'.

Thanks a lot for writing this. :)

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: 0001-Add-minibuffer-history-to-org-occur-goto.patch --]
[-- Type: text/x-patch, Size: 721 bytes --]

From 08c35bcf7cc3b290f8421236c4bc5e3345398ff0 Mon Sep 17 00:00:00 2001
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Date: Sun, 24 Apr 2011 12:20:27 -0700
Subject: [PATCH 1/2] Add minibuffer history to org-occur-goto

---
 lisp/org-occur-goto.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-occur-goto.el b/lisp/org-occur-goto.el
index e2af3fb..ccef330 100644
--- a/lisp/org-occur-goto.el
+++ b/lisp/org-occur-goto.el
@@ -90,7 +90,7 @@
 
      (unwind-protect
          (let ((minibuffer-local-map oog-map))
-           (read-string "string: "))
+           (read-string "string: " nil 'oog-history-list))
 
        (remove-hook 'post-command-hook 'oog-check-input))
 
-- 
1.7.3.4


[-- Attachment #3: 0002-oog-can-got-to-first-match-by-hitting-RET.patch --]
[-- Type: text/x-patch, Size: 908 bytes --]

From 1742551e8e19abaa272e444fa8c27afd76a7e6b8 Mon Sep 17 00:00:00 2001
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Date: Sun, 24 Apr 2011 13:10:19 -0700
Subject: [PATCH 2/2] oog: can got to first match by hitting RET

---
 lisp/org-occur-goto.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/org-occur-goto.el b/lisp/org-occur-goto.el
index ccef330..7398daf 100644
--- a/lisp/org-occur-goto.el
+++ b/lisp/org-occur-goto.el
@@ -98,7 +98,10 @@
        (if buf
            (with-current-buffer buf
              (unless (= (buffer-size) 0)
-               (setq marker (occur-mode-find-occurrence)))))))
+               (setq marker (if (eq (line-number-at-pos (point)) 1)
+				(progn (forward-line)
+				       (occur-mode-find-occurrence))
+			      (occur-mode-find-occurrence))))))))
 
    (switch-to-buffer (marker-buffer marker))
    (goto-char marker)
-- 
1.7.3.4


  parent reply	other threads:[~2011-04-24 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-24 16:06 a new way to navigate your org files Tom
2011-04-24 18:18 ` Matt Lundin
2011-04-24 20:24 ` Suvayu Ali [this message]
2011-04-25 19:25   ` Tom
2011-04-26 11:12     ` Suvayu Ali
2011-08-27 13:26     ` Nathan Neff
2011-08-28  8:44       ` Stelian Iancu
2011-08-28  8:53         ` suvayu ali

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=20110424132404.7d7f6a19@bhishma.homelinux.net \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=adatgyujto@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).