emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: stardiviner <numbchild@gmail.com>
Cc: emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines
Date: Tue, 14 Apr 2020 14:55:33 +0200	[thread overview]
Message-ID: <877dyi1b22.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87eesqmylz.fsf@gmail.com> (stardiviner's message of "Tue, 14 Apr 2020 13:21:12 +0800")

Hello,

stardiviner <numbchild@gmail.com> writes:

> I agree. As I described in my given example "org-contacts", which include person
> info in properties drawer. That's why I want to expand when I press "Tab" on
> expanding headline. If I see a contact's info with "C-u C-u C-u Tab" is not
> convenient.

You can rebind it.

> Is it possible to change "org-cycle-hide-drawers" to "org-cycle-toggle-drawers".
> Make it more extendable. Because that function only changed one argument of
> "org-flag-drawer". If so some user like me will be easy to toggle hide/show
> drawers. (Of course, I don't want to add redundant code in my Emacs init.) If
> this is fine, I will re-edit my patch. Remove defcustom option, and hook on
> cycle. Only keep changes in "org-cycle-hide-drawers".

I think something is wrong with `org-cycle-hide-drawers' at the moment.
This function was initially meant to be added to `org-cycle-hook' to
re-hide drawers. It should only re-hide properties drawers. In any case,
it is not needed to expand this function, it should be trimmed down to
only take care of property drawers.

What is needed, though, it a tooling similar to block visibility
functions, i.e., `org-hide-block-toggle', `org-hide-block-hall', and,
maybe, `org-hide-block-toggle-maybe'. Regular drawers should get the
same treatment as blocks.

If you look at `org-cycle' code, there is a comment

     ;; Drawers: delegate to `org-flag-drawer'.

This part should be extracted into a new function.

Regards,

-- 
Nicolas Goaziou


  reply	other threads:[~2020-04-14 12:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  8:43 [PATCH] Show hidden drawers when org-cycle on headlines stardiviner
2020-04-11 16:05 ` Nicolas Goaziou
2020-04-13  3:29   ` stardiviner
2020-04-13  8:06     ` Nicolas Goaziou
2020-04-13 16:28       ` stardiviner
2020-04-13  9:12     ` Ihor Radchenko
2020-04-13 16:31       ` [SOLVED] " stardiviner
2020-04-13 16:58         ` Ihor Radchenko
2020-04-13 20:00           ` Nicolas Goaziou
2020-04-13 23:19             ` Tim Cross
2020-04-14  3:18             ` Ihor Radchenko
2020-04-14 12:58               ` Nicolas Goaziou
2020-04-14 13:57                 ` Ihor Radchenko
2020-04-14  5:21             ` stardiviner
2020-04-14 12:55               ` Nicolas Goaziou [this message]
2020-04-15  1:13                 ` stardiviner
2020-04-18 17:48                   ` Nicolas Goaziou
2020-04-19  9:10                     ` stardiviner
2020-04-19 10:31                       ` Nicolas Goaziou
2020-04-19 11:31                         ` stardiviner
2020-04-13 20:52 ` Samuel Wales
2020-04-15  1:26 ` [SOLUTION] " stardiviner

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=877dyi1b22.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    --cc=yantar92@gmail.com \
    /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).