emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* hide #+ lines?
@ 2011-03-19 21:27 Filippo A. Salustri
  2011-03-19 22:06 ` Juan Pechiar
  0 siblings, 1 reply; 8+ messages in thread
From: Filippo A. Salustri @ 2011-03-19 21:27 UTC (permalink / raw)
  To: emacs-orgmode

Hi,
I've started using #+ blocks here and there, and (meaning no
disrespect) I find them a bit ugly.  I would much rather there were
some way to hide the #+ directives (without, of course, impeding their
functionality).
I believe I've done my due diligence, checking doc & google, but I
can't find anything to help.

Anyone got something to offer?
Cheers.
Fil

-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

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

* Re: hide #+ lines?
  2011-03-19 21:27 hide #+ lines? Filippo A. Salustri
@ 2011-03-19 22:06 ` Juan Pechiar
  2011-03-19 22:26   ` Nick Dokos
  0 siblings, 1 reply; 8+ messages in thread
From: Juan Pechiar @ 2011-03-19 22:06 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: emacs-orgmode

Hi,

If you are referring to directives such as export templates, etc.,
these can in general be placed anywhere in the document. For example,
inside a COMMENT'ed heading at the end of the document, with folded
view as default.

You can also have all that in another file and use #+setupfile or
#include for inclusion.

Other things such as #+category have their equivalent as properties,
which are normally folded.

Regards,
.j.

On Sat, Mar 19, 2011 at 05:27:23PM -0400, Filippo A. Salustri wrote:
> I've started using #+ blocks here and there, and (meaning no
> disrespect) I find them a bit ugly.  I would much rather there were
> some way to hide the #+ directives (without, of course, impeding their
> functionality).
> I believe I've done my due diligence, checking doc & google, but I
> can't find anything to help.
>
> Anyone got something to offer?

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

* Re: hide #+ lines?
  2011-03-19 22:06 ` Juan Pechiar
@ 2011-03-19 22:26   ` Nick Dokos
  2011-03-19 22:38     ` Filippo A. Salustri
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-03-19 22:26 UTC (permalink / raw)
  To: Juan Pechiar; +Cc: Filippo A. Salustri, nicholas.dokos, emacs-orgmode

Juan Pechiar <juan@pechiar.com> wrote:

> On Sat, Mar 19, 2011 at 05:27:23PM -0400, Filippo A. Salustri wrote:
> > I've started using #+ blocks here and there, and (meaning no
> > disrespect) I find them a bit ugly.  I would much rather there were
> > some way to hide the #+ directives (without, of course, impeding their
> > functionality).
> > I believe I've done my due diligence, checking doc & google, but I
> > can't find anything to help.
> >
> > Anyone got something to offer?
> 
> If you are referring to directives such as export templates, etc.,
> these can in general be placed anywhere in the document. For example,
> inside a COMMENT'ed heading at the end of the document, with folded
> view as default.
> 
> You can also have all that in another file and use #+setupfile or
> #include for inclusion.
> 
> Other things such as #+category have their equivalent as properties,
> which are normally folded.

Another similar solution (cribbed from this list, but I don't remember
who suggested it) is to define a drawer and put all that stuff in it -
isn't that what drawers are for? :-) Keep the drawer closed and the mess
is hidden - and it is not affected by general visibility cycling: you
have to open the drawer deliberately.

The top of one of my org files looks like this:

--8<---------------cut here---------------start------------->8---
:SETUP:
#+STARTUP: showall lognotedone
#+SEQ_TODO: TODO(t) STARTED(s) WAITING(w) | DONE(d) DEFERRED CANCELLED(c)
#+TAGS: { FINANCES(f) HOME(h) PACC(p) SCHOOL(s) WORK(w) } CALL(c) ERRAND(e)
:END:
--8<---------------cut here---------------end--------------->8---

You need to set up the variable org-drawers - see section 2.8 of the Org manual.

Nick

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

* Re: hide #+ lines?
  2011-03-19 22:26   ` Nick Dokos
@ 2011-03-19 22:38     ` Filippo A. Salustri
  2011-03-20  1:42       ` Nick Dokos
  0 siblings, 1 reply; 8+ messages in thread
From: Filippo A. Salustri @ 2011-03-19 22:38 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Juan Pechiar, emacs-orgmode

Juan & Nick,
I like your ideas, but my case is a little different.  I only want to
hide the BEGIN/END statements, not what comes between them.
That is, I'm using a trick Ido Magal suggested
(http://permalink.gmane.org/gmane.emacs.orgmode/39226).
It works fine, except I see all the distracting block directives.

Cheers.
Fil'


On 19 March 2011 18:26, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Juan Pechiar <juan@pechiar.com> wrote:
>
>> On Sat, Mar 19, 2011 at 05:27:23PM -0400, Filippo A. Salustri wrote:
>> > I've started using #+ blocks here and there, and (meaning no
>> > disrespect) I find them a bit ugly.  I would much rather there were
>> > some way to hide the #+ directives (without, of course, impeding their
>> > functionality).
>> > I believe I've done my due diligence, checking doc & google, but I
>> > can't find anything to help.
>> >
>> > Anyone got something to offer?
>>
>> If you are referring to directives such as export templates, etc.,
>> these can in general be placed anywhere in the document. For example,
>> inside a COMMENT'ed heading at the end of the document, with folded
>> view as default.
>>
>> You can also have all that in another file and use #+setupfile or
>> #include for inclusion.
>>
>> Other things such as #+category have their equivalent as properties,
>> which are normally folded.
>
> Another similar solution (cribbed from this list, but I don't remember
> who suggested it) is to define a drawer and put all that stuff in it -
> isn't that what drawers are for? :-) Keep the drawer closed and the mess
> is hidden - and it is not affected by general visibility cycling: you
> have to open the drawer deliberately.
>
> The top of one of my org files looks like this:
>
> --8<---------------cut here---------------start------------->8---
> :SETUP:
> #+STARTUP: showall lognotedone
> #+SEQ_TODO: TODO(t) STARTED(s) WAITING(w) | DONE(d) DEFERRED CANCELLED(c)
> #+TAGS: { FINANCES(f) HOME(h) PACC(p) SCHOOL(s) WORK(w) } CALL(c) ERRAND(e)
> :END:
> --8<---------------cut here---------------end--------------->8---
>
> You need to set up the variable org-drawers - see section 2.8 of the Org manual.
>
> Nick
>



-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

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

* Re: hide #+ lines?
  2011-03-19 22:38     ` Filippo A. Salustri
@ 2011-03-20  1:42       ` Nick Dokos
  2011-03-20  1:58         ` Filippo A. Salustri
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-03-20  1:42 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: Juan Pechiar, emacs-orgmode, nicholas.dokos

Filippo A. Salustri <salustri@ryerson.ca> wrote:

> 
> On 19 March 2011 18:26, Nick Dokos <nicholas.dokos@hp.com> wrote:
> ...
> > Another similar solution (cribbed from this list, but I don't remember
> > who suggested it) is to define a drawer and put all that stuff in it -

That was Carsten: see http://thread.gmane.org/gmane.emacs.orgmode/2722/focus=2732
and there is another bit of setup needed to keep the drawer closed to begin
with. Carsten suggested

(add-hook 'org-mode-hook
       (lambda () (org-cycle-hide-drawers 'all)))

> 
> Juan & Nick,
> I like your ideas, but my case is a little different.  I only want to
> hide the BEGIN/END statements, not what comes between them.
> That is, I'm using a trick Ido Magal suggested
> (http://permalink.gmane.org/gmane.emacs.orgmode/39226).
> It works fine, except I see all the distracting block directives.
> 

The first line in the posting you point to is not org-mode related at
all: it asks emacs to eval the form when the file is visited. Since
emacs requires that to be the *first* line you cannot do anything about
that. However, there is another way to specify local variables: in a
"Local variables" section at the end of the file. That *can* be put into a
drawer:

:SETUP:
# Local variables:
# eval: (org-update-all-dblocks)
# End:
:END:

but it becomes the "personal property" of the last headline, so if that
is folded, the drawer is completely invisible and if it's deep in the
tree it becomes difficult to find. I would put it under its own
headline, perhaps "* COMMENT setup".

The #+BEGIN: ... / #+END surrounding the output of the dblock cannot be
hidden afaik, but are they really distracting? I find them helpful in
focusing my eyes on the output.

Nick

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

* Re: hide #+ lines?
  2011-03-20  1:42       ` Nick Dokos
@ 2011-03-20  1:58         ` Filippo A. Salustri
  2011-03-20  2:19           ` Nick Dokos
  0 siblings, 1 reply; 8+ messages in thread
From: Filippo A. Salustri @ 2011-03-20  1:58 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Juan Pechiar, emacs-orgmode

You're right of course.  Sorry about the mixup with the attribution.
Nick, your previous post that mentioned org-drawers helped my hide the
eval line.  Thanks for that.

As for the #+BEGIN block, my installation shows these lines in a
rather gaudy orange, which I do find distracting.
I found that those lines do have their own face, so I made 'em dark
grey (my background is black).  I can still see them, but it's the
text in the block that stands out now.

Cheers.
Fil

On 19 March 2011 21:42, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Filippo A. Salustri <salustri@ryerson.ca> wrote:
>
>>
>> On 19 March 2011 18:26, Nick Dokos <nicholas.dokos@hp.com> wrote:
>> ...
>> > Another similar solution (cribbed from this list, but I don't remember
>> > who suggested it) is to define a drawer and put all that stuff in it -
>
> That was Carsten: see http://thread.gmane.org/gmane.emacs.orgmode/2722/focus=2732
> and there is another bit of setup needed to keep the drawer closed to begin
> with. Carsten suggested
>
> (add-hook 'org-mode-hook
>       (lambda () (org-cycle-hide-drawers 'all)))
>
>>
>> Juan & Nick,
>> I like your ideas, but my case is a little different.  I only want to
>> hide the BEGIN/END statements, not what comes between them.
>> That is, I'm using a trick Ido Magal suggested
>> (http://permalink.gmane.org/gmane.emacs.orgmode/39226).
>> It works fine, except I see all the distracting block directives.
>>
>
> The first line in the posting you point to is not org-mode related at
> all: it asks emacs to eval the form when the file is visited. Since
> emacs requires that to be the *first* line you cannot do anything about
> that. However, there is another way to specify local variables: in a
> "Local variables" section at the end of the file. That *can* be put into a
> drawer:
>
> :SETUP:
> # Local variables:
> # eval: (org-update-all-dblocks)
> # End:
> :END:
>
> but it becomes the "personal property" of the last headline, so if that
> is folded, the drawer is completely invisible and if it's deep in the
> tree it becomes difficult to find. I would put it under its own
> headline, perhaps "* COMMENT setup".
>
> The #+BEGIN: ... / #+END surrounding the output of the dblock cannot be
> hidden afaik, but are they really distracting? I find them helpful in
> focusing my eyes on the output.
>
> Nick
>
>
>



-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

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

* Re: hide #+ lines?
  2011-03-20  1:58         ` Filippo A. Salustri
@ 2011-03-20  2:19           ` Nick Dokos
  2011-03-20 14:46             ` Filippo A. Salustri
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-03-20  2:19 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: Juan Pechiar, emacs-orgmode, nicholas.dokos

Filippo A. Salustri <salustri@ryerson.ca> wrote:

> You're right of course.  Sorry about the mixup with the attribution.

There was nothing wrong with your attribution.

I was just adding some information to my previous posting about who
suggested the drawer solution, but more importantly, adding the bit
of setup needed: I think it's important to make each thread complete
or provide enough references so that future wanderers can find their
way without too much trouble.

> Nick, your previous post that mentioned org-drawers helped my hide the
> eval line.  Thanks for that.
> 
> As for the #+BEGIN block, my installation shows these lines in a
> rather gaudy orange, which I do find distracting.
> I found that those lines do have their own face, so I made 'em dark
> grey (my background is black).  I can still see them, but it's the
> text in the block that stands out now.
> 
That sounds like a good solution.

Nick

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

* Re: hide #+ lines?
  2011-03-20  2:19           ` Nick Dokos
@ 2011-03-20 14:46             ` Filippo A. Salustri
  0 siblings, 0 replies; 8+ messages in thread
From: Filippo A. Salustri @ 2011-03-20 14:46 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Juan Pechiar, emacs-orgmode

I gotta admit, I find the general tone of attention to detail and
professional respect on this list quite refreshing.
There's few lists to which I subscribe that's as consistently helpful
and polite.

Compliments to all.
Cheers.
Fil

On 19 March 2011 22:19, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Filippo A. Salustri <salustri@ryerson.ca> wrote:
>
>> You're right of course.  Sorry about the mixup with the attribution.
>
> There was nothing wrong with your attribution.
>
> I was just adding some information to my previous posting about who
> suggested the drawer solution, but more importantly, adding the bit
> of setup needed: I think it's important to make each thread complete
> or provide enough references so that future wanderers can find their
> way without too much trouble.
>
>> Nick, your previous post that mentioned org-drawers helped my hide the
>> eval line.  Thanks for that.
>>
>> As for the #+BEGIN block, my installation shows these lines in a
>> rather gaudy orange, which I do find distracting.
>> I found that those lines do have their own face, so I made 'em dark
>> grey (my background is black).  I can still see them, but it's the
>> text in the block that stands out now.
>>
> That sounds like a good solution.
>
> Nick
>
>



-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

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

end of thread, other threads:[~2011-03-20 14:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-19 21:27 hide #+ lines? Filippo A. Salustri
2011-03-19 22:06 ` Juan Pechiar
2011-03-19 22:26   ` Nick Dokos
2011-03-19 22:38     ` Filippo A. Salustri
2011-03-20  1:42       ` Nick Dokos
2011-03-20  1:58         ` Filippo A. Salustri
2011-03-20  2:19           ` Nick Dokos
2011-03-20 14:46             ` Filippo A. Salustri

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