From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Dividers in File Date: Thu, 20 Nov 2008 08:26:48 +0100 Message-ID: <1A2217CC-1EA6-4B87-878D-0E8FA86C9530@uva.nl> References: <20081118193453.F32BC320057@mail.dagertech.net> <87y6zgbyur.fsf@gmail.com> <87r658k74d.fsf@kassiopeya.MSHEIMNETZ> <49243916.1020607@diplan.de> <87ljvfd4up.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============1190818528==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L33wE-0002A9-35 for emacs-orgmode@gnu.org; Thu, 20 Nov 2008 02:26:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L33wD-00029a-6i for emacs-orgmode@gnu.org; Thu, 20 Nov 2008 02:26:53 -0500 Received: from [199.232.76.173] (port=45911 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L33wD-00029V-3W for emacs-orgmode@gnu.org; Thu, 20 Nov 2008 02:26:53 -0500 Received: from ug-out-1314.google.com ([66.249.92.172]:27852) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L33wC-0000Zr-59 for emacs-orgmode@gnu.org; Thu, 20 Nov 2008 02:26:52 -0500 Received: by ug-out-1314.google.com with SMTP id 36so219586uga.17 for ; Wed, 19 Nov 2008 23:26:51 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eddward DeVilla Cc: "news.gmane.org" , orgmode --===============1190818528== Content-Type: multipart/alternative; boundary=Apple-Mail-10--249294232 --Apple-Mail-10--249294232 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Nov 20, 2008, at 4:51 AM, Eddward DeVilla wrote: > > > On Wed, Nov 19, 2008 at 11:04 AM, Matthew Lundin > wrote: > "news.gmane.org" 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 --Apple-Mail-10--249294232 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
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:
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

------------------    <=3D buffer or wrap = wide, doesn't fold into foo2

* bar 1
*** bar 1.1
  = --------------    <=3D buffer or wrap wide, doesn't = fold into Bar 1.1 but does fold into Bar 1

* bar 2
=
------------------    <=3D 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
= --Apple-Mail-10--249294232-- --===============1190818528== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1190818528==--