emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Avner Moshkovitz <avnermoshkovitz@lighthausvci.com>
To: Bernt Hansen <bernt@norang.ca>, Avner <avner@telus.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Org-agenda - show content outline from multiple org files
Date: Tue, 31 Jul 2012 17:12:49 -0700	[thread overview]
Message-ID: <D99DCE939A765644BCA10192DD977AED057E2655A2@tweety.yvr.lighthauslogic.com> (raw)
In-Reply-To: <87d34lmtq8.fsf@norang.ca>

Hi Bernt,

Sorry for the long delay - I couldn't find a way to edit the post (I don't have an account).

Yes, this is what I was looking for.
I also added the functions below to step through the headings and open them in different buffer

Thanks for the help.

Avner

-----------------------------------------------------

(defun org-agenda-show1 (&optional full-entry)
  "Display the Org-mode file which contains the item at point.
With prefix argument FULL-ENTRY, make the entire entry visible
if it was hidden in the outline."
  (interactive "P")
  (let ((win (selected-window)))
    (if full-entry
        (let ((org-show-entry-below t))
          (org-agenda-goto1 t))
      (org-agenda-goto1 t))
    )
  )

(defun org-agenda-goto1 (&optional highlight)
  "Go to the Org-mode file which contains the item at point."
  (interactive)
  (let* ((marker (or (org-get-at-bol 'org-marker)
                     (org-agenda-error)))
         (buffer (marker-buffer marker))
         (pos (marker-position marker)))
    (other-frame 1)
    (switch-to-buffer buffer)
    (widen)
    (goto-char pos)
    (when (org-mode-p)
      (org-show-context 'agenda)
      (save-excursion
        (and (outline-next-heading)
             (org-flag-heading nil)))) ; show the next heading
    (recenter (/ (window-height) 2))
    (run-hooks 'org-agenda-after-show-hook)
    (and highlight (org-highlight (point-at-bol) (point-at-eol)))))


(defun org-next-agenda-item2 ()
  (interactive)
  (setq display-buffer-reuse-frames t)
  (pop-to-buffer "*Org Agenda* headings")
  (next-line-nomark)
  (org-agenda-show1)
  (pop-to-buffer "*Org Agenda* headings")
  )

(defun org-prev-agenda-item2 ()
  (interactive)
  (setq display-buffer-reuse-frames t)
  (pop-to-buffer "*Org Agenda* headings")
  (previous-line-nomark)
  (org-agenda-show1)
  (pop-to-buffer "*Org Agenda* headings")
  )

(global-set-key [C-f11] 'org-next-agenda-item2)
(global-set-key [C-S-f11] 'org-prev-agenda-item2)



-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca]
Sent: June 26, 2012 6:25 PM
To: Avner
Cc: emacs-orgmode@gnu.org; Avner Moshkovitz
Subject: Re: Org-agenda - show content outline from multiple org files

"Avner" <avner@telus.net> writes:

> I have a list of org files associated with org-agenda.
>
> In the Org-Agenda buffer, I want to have a outline content view that
> shows the headings from all the files.
>
> In org-agenda, I can apply "search for keywords" (s) and "Multi-occur"
> (/) to present all the headings, which I can then visit in the org
> file buffer
>
> However, these headings are shown as regular strings. What I'm looking
> for, is a way to present them in color, and indentation according to
> the heading level, similar to the "contents" presentation in the org
> file itself.

Hi Avner,

Maybe this is close to what you are looking for?

(setq org-tags-match-list-sublevels t)
C-c a m LEVEL<4 RET

should show levels 1-3 in all files with sublevels indented.  Sorting by priorities and things is going to mess up the order in the list.

For me only the TODO keywords are coloured and indentation is done with leading dots in the agenda view but you can visit and modify the headings directly from the agenda.

HTH.

Regards,
Bernt

This e-mail may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable laws. Unauthorized use, reproduction or dissemination of the e-mail is strictly prohibited. If you have received this e-mail in error, please contact the sender immediately. [11EABB509DF]

      reply	other threads:[~2012-08-01  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 18:13 Org-agenda - show content outline from multiple org files Avner
2012-06-27  1:25 ` Bernt Hansen
2012-08-01  0:12   ` Avner Moshkovitz [this message]

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=D99DCE939A765644BCA10192DD977AED057E2655A2@tweety.yvr.lighthauslogic.com \
    --to=avnermoshkovitz@lighthausvci.com \
    --cc=avner@telus.net \
    --cc=bernt@norang.ca \
    --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).