Org-mode mailing list
 help / color / mirror / Atom feed
* Default fold state of property drawers?
@ 2020-10-28  9:57 Gustav Wikström
  2020-10-29  2:45 ` Kyle Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: Gustav Wikström @ 2020-10-28  9:57 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

This may be a stupid question but I didn't find anything conclusive in the manual or online after a (albeit fairly quick) scan.

Is there currently a way to declare that property drawers (and the file level property drawer in particular) should be hidden when opening a new Org file, no matter the startup keyword setting? I.e is it possible to control the open/closed state of the property drawer separate from the outline folding?

Thanks and best regards
Gustav

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

* Re: Default fold state of property drawers?
  2020-10-28  9:57 Default fold state of property drawers? Gustav Wikström
@ 2020-10-29  2:45 ` Kyle Meyer
  2020-10-29 12:25   ` Gustav Wikström
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2020-10-29  2:45 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: emacs-orgmode

Gustav Wikström writes:

> Hi,
>
> This may be a stupid question but I didn't find anything conclusive in
> the manual or online after a (albeit fairly quick) scan.
>
> Is there currently a way to declare that property drawers (and the
> file level property drawer in particular) should be hidden when
> opening a new Org file, no matter the startup keyword setting? I.e is
> it possible to control the open/closed state of the property drawer
> separate from the outline folding?

I may be missing something too, but I'm not aware of a way to do this
that's distinct from setting org-startup-folded and friends.  But
doesn't org-startup-folded's showall/showeverything distinction cover
your usecase?


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

* Re: Default fold state of property drawers?
  2020-10-29  2:45 ` Kyle Meyer
@ 2020-10-29 12:25   ` Gustav Wikström
  2020-11-01 18:21     ` Kyle Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: Gustav Wikström @ 2020-10-29 12:25 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

Hmm, maybe.. Didn't consider that one.

But maybe my issue rather lies in how the visibility toggling with S-TAB functions. The file property drawer is open in OVERVIEW and CONTENT but hidden in SHOW ALL. My intuition says that the file-property drawer should be closed for all toggle-states. Thoughts?

/Gustav

________________________________________
From: Kyle Meyer <kyle@kyleam.com>
Sent: Thursday, October 29, 2020 03:45
To: Gustav Wikström
Cc: emacs-orgmode@gnu.org
Subject: Re: Default fold state of property drawers?

Gustav Wikström writes:

> Hi,
>
> This may be a stupid question but I didn't find anything conclusive in
> the manual or online after a (albeit fairly quick) scan.
>
> Is there currently a way to declare that property drawers (and the
> file level property drawer in particular) should be hidden when
> opening a new Org file, no matter the startup keyword setting? I.e is
> it possible to control the open/closed state of the property drawer
> separate from the outline folding?

I may be missing something too, but I'm not aware of a way to do this
that's distinct from setting org-startup-folded and friends.  But
doesn't org-startup-folded's showall/showeverything distinction cover
your usecase?


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

* Re: Default fold state of property drawers?
  2020-10-29 12:25   ` Gustav Wikström
@ 2020-11-01 18:21     ` Kyle Meyer
  2020-11-04 23:55       ` Gustav Wikström
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2020-11-01 18:21 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: emacs-orgmode

Gustav Wikström writes:

> But maybe my issue rather lies in how the visibility toggling with
> S-TAB functions. The file property drawer is open in OVERVIEW and
> CONTENT but hidden in SHOW ALL. My intuition says that the
> file-property drawer should be closed for all toggle-states. Thoughts?

I agree.  While I've never used file-level property drawers, my
expectation would be for them to behave in the same way a heading's
would.

FWIW when you introduced file-level property drawers in 1bdff9f73 (Org
document property-drawers, 2019-05-26), it looks like cycling wasn't
considered and S-TAB would just ignore these drawers, preserving their
current state.

The cycling behavior you described above appears to come with 1aa095ccf
(Fix drawer invisibility, 2020-06-06).  I think that was in response to
<https://orgmode.org/list/87a71thwp2.fsf@fastmail.fm/T/#u>.  While I
haven't taken a close look, my guess is that the effect on file-level
property drawers was unintended, and that improvements here would be
welcomed.


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

* Re: Default fold state of property drawers?
  2020-11-01 18:21     ` Kyle Meyer
@ 2020-11-04 23:55       ` Gustav Wikström
  0 siblings, 0 replies; 5+ messages in thread
From: Gustav Wikström @ 2020-11-04 23:55 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

Hi Kyle,

And thanks for a second pair of eyes on this!

I've pushed a patch to the repo that should fix it.

--- commit 8d7a9b4ce
Hide drawers before first headline properly when cycling visibility

* lisp/org.el (org--hide-drawers): New internal function consolidating
  logic from two places currently.

  (org-cycle-hide-drawers): Hide drawers before first headline at
  appropriate times.  Refactor to use new internal function
  `org--hide-drawers'.

  (org-hide-drawer-all): Refactor to use new internal function
  `org--hide-drawers'.

Kind regards
Gustav

________________________________________
From: Kyle Meyer <kyle@kyleam.com>
Sent: Sunday, November 1, 2020 19:21
To: Gustav Wikström
Cc: emacs-orgmode@gnu.org
Subject: Re: Default fold state of property drawers?

Gustav Wikström writes:

> But maybe my issue rather lies in how the visibility toggling with
> S-TAB functions. The file property drawer is open in OVERVIEW and
> CONTENT but hidden in SHOW ALL. My intuition says that the
> file-property drawer should be closed for all toggle-states. Thoughts?

I agree.  While I've never used file-level property drawers, my
expectation would be for them to behave in the same way a heading's
would.

FWIW when you introduced file-level property drawers in 1bdff9f73 (Org
document property-drawers, 2019-05-26), it looks like cycling wasn't
considered and S-TAB would just ignore these drawers, preserving their
current state.

The cycling behavior you described above appears to come with 1aa095ccf
(Fix drawer invisibility, 2020-06-06).  I think that was in response to
<https://orgmode.org/list/87a71thwp2.fsf@fastmail.fm/T/#u>.  While I
haven't taken a close look, my guess is that the effect on file-level
property drawers was unintended, and that improvements here would be
welcomed.


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

end of thread, other threads:[~2020-11-05  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  9:57 Default fold state of property drawers? Gustav Wikström
2020-10-29  2:45 ` Kyle Meyer
2020-10-29 12:25   ` Gustav Wikström
2020-11-01 18:21     ` Kyle Meyer
2020-11-04 23:55       ` Gustav Wikström

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git