From: Carsten Dominik <dominik@science.uva.nl>
To: Eddward DeVilla <eddward@gmail.com>
Cc: "news.gmane.org" <rainer.stengele@diplan.de>,
orgmode <emacs-orgmode@gnu.org>
Subject: Re: Re: Dividers in File
Date: Thu, 20 Nov 2008 08:26:48 +0100 [thread overview]
Message-ID: <1A2217CC-1EA6-4B87-878D-0E8FA86C9530@uva.nl> (raw)
In-Reply-To: <b71b18520811191951u33b894cx3bf4f39de007346a@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2013 bytes --]
On Nov 20, 2008, at 4:51 AM, Eddward DeVilla wrote:
>
>
> On Wed, Nov 19, 2008 at 11:04 AM, Matthew Lundin <mdl@imapmail.org>
> wrote:
> "news.gmane.org" <rainer.stengele@diplan.de> writes:
>
> When I need quick dividers for better visibility, I adopt the approach
> Eric mentions above. E.g.,
>
> * ----section one------
> * Heading one
> * Heading two
> * ----section two------
> * Heading one
> * Heading two
>
> I've considered that myself, but I just don't like the look of it.
> More than once I've wished I could use something like the hline
> markup and get a horizontal line that was scoped with the reset of
> the outline in the org-buffer and on export. So something like the
> following
>
> #################
>
> * foo 1
> * foo 2
>
> -----
>
> * bar 1
> *** bar 1.1
> -----
> * bar 2
>
> -----
>
> * Baz!
>
> ################
>
> would display as
>
> ################
>
> * foo 1
> * foo2
>
> ------------------ <= buffer or wrap wide, doesn't fold into foo2
>
> * bar 1
> *** bar 1.1
> -------------- <= buffer or wrap wide, doesn't fold into Bar
> 1.1 but does fold into Bar 1
>
> * bar 2
>
> ------------------ <= buffer or wrap wide, doesn't fold into foo2
>
> * Baz!
>
> ################
>
>
> I'd guess it might not be too hard with the right but I haven't been
> annoyed enough to look into it.
It is not too hard to hack this, using org-cycle-hook:
(defun org-cycle-show-hlines (state)
"Show hlines after visibility changes."
(let ((re "^-----+$") beg end)
(save-excursion
(cond
((memq state '(overview contents t))
(setq beg (point-min) end (point-max)))
((memq state '(children folded))
(setq beg (point) end (org-end-of-subtree t t))))
(when beg
(goto-char beg)
(while (re-search-forward re end t)
(outline-flag-region
(1- (match-beginning 0))
(progn (outline-next-heading) (point))
nil))))))
(eval-after-load "org"
'(add-hook 'org-cycle-hook 'org-cycle-show-hlines 'append))
HTH
- Carsten
[-- Attachment #1.2: Type: text/html, Size: 3655 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2008-11-20 7:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 19:34 Dividers in File David A. Gershman
2008-11-18 19:47 ` Eric Schulte
2008-11-18 22:21 ` Sebastian Rose
2008-11-19 16:04 ` news.gmane.org
2008-11-19 17:04 ` Matthew Lundin
2008-11-20 3:51 ` Eddward DeVilla
2008-11-20 7:26 ` Carsten Dominik [this message]
2008-11-19 20:50 ` Sebastian Rose
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=1A2217CC-1EA6-4B87-878D-0E8FA86C9530@uva.nl \
--to=dominik@science.uva.nl \
--cc=eddward@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rainer.stengele@diplan.de \
/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).