emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-agenda - show content outline from multiple org files
@ 2012-06-26 18:13 Avner
  2012-06-27  1:25 ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Avner @ 2012-06-26 18:13 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: 'Avner Moshkovitz'

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

Hello,

 

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.

 

Regards,

 

Avner Moshkovitz

 


[-- Attachment #2: Type: text/html, Size: 21116 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-agenda - show content outline from multiple org files
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2012-06-27  1:25 UTC (permalink / raw)
  To: Avner; +Cc: 'Avner Moshkovitz', emacs-orgmode

"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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-agenda - show content outline from multiple org files
  2012-06-27  1:25 ` Bernt Hansen
@ 2012-08-01  0:12   ` Avner Moshkovitz
  0 siblings, 0 replies; 3+ messages in thread
From: Avner Moshkovitz @ 2012-08-01  0:12 UTC (permalink / raw)
  To: Bernt Hansen, Avner; +Cc: emacs-orgmode@gnu.org

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]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-01  0:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).