Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-19 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Nicolas Goaziou  writes:

> Hello,
>
> stardiviner  writes:
>
>> I thought intuitively that property drawers "mostly expanded" and regular
>> drawers like :LOGBOOK: drawer "mostly folded".
>
> There is no such thing as ":LOGBOOK:" drawers. There are property
> drawers, and regular drawers. "LOGBOOK" belongs to the latter.
>
>>> Another (better?) option would be: "don't mess with folding state" for
>>> regular drawers and blocks, i.e., what is open stays open, what is
>>> closed stays closed. But that's more difficult to achieve. Any taker?
>>
>> This indeed will be more difficult. I agree. It's not worth to be more
>> complicated.
>
> I think it is worth it, because it is a sane way to handle different
> needs.

That's will be great.

>
>>> In any case, I think property drawers need to be "mostly folded".
>>
>> In my opinion, this design is decided by the usage of properties drawers and
>> other regular drawers. For now, I only used this two drawers.
>
> Property drawers are _internal_ to Org, which means the contents are to
> be hidden. You can use property drawers, but think of them as
> a database. Seeing the guts of a database is hardly useful. However, Org
> provides tooling to read and write it, and even display it (e.g., Org
> Colview) without having to expand them.

Yes, I use it as a very tiny database. :)

> You may want to expand them to edit them, or simply retrieve
> information, it is all text after all, but that's not the intended use
> case, so there is no incentive to expand them automatically.

Sure. I have already got the new added functions. I can define a custom advice
on my own Emacs init file.

Thanks, Nicolas.

- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6cNqkUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsNpcAf9FnINJuSxq5JFcBiSHzQDuZe0oZfz
l6wd/rqRg7HpyVi/YJaUrQp+L+8md/YQpK+pt4+YIVWjK8Z6wpBvY0DCCtysiI2w
0MlJD7lq5Yuet+l0JsIN2lBApVaiVXaN61T2/mVdBQrTIw0mQVqiwMb8nUrBEi8q
kA7UdTuwdAiP/uwtC22+lG0lRvxYfCwfulCA+zemLNvnmN5xBJwdXN9O/pdDeAcS
nA0dQZYp/udkQ5EZcmkjFLRRBElCdxUqwYjiztWTuA+klGgKVzNQYo9H0mwsMo4P
uyG7JnP+I8pnH43UeSMNmFiQdpM7k3fJT2xUAbkoP97ol5QVLB2e51cOCg==
=02DA
-END PGP SIGNATURE-



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-19 Thread Nicolas Goaziou
Hello,

stardiviner  writes:

> I thought intuitively that property drawers "mostly expanded" and regular
> drawers like :LOGBOOK: drawer "mostly folded".

There is no such thing as ":LOGBOOK:" drawers. There are property
drawers, and regular drawers. "LOGBOOK" belongs to the latter.

>> Another (better?) option would be: "don't mess with folding state" for
>> regular drawers and blocks, i.e., what is open stays open, what is
>> closed stays closed. But that's more difficult to achieve. Any taker?
>
> This indeed will be more difficult. I agree. It's not worth to be more
> complicated.

I think it is worth it, because it is a sane way to handle different
needs.

>> In any case, I think property drawers need to be "mostly folded".
>
> In my opinion, this design is decided by the usage of properties drawers and
> other regular drawers. For now, I only used this two drawers.

Property drawers are _internal_ to Org, which means the contents are to
be hidden. You can use property drawers, but think of them as
a database. Seeing the guts of a database is hardly useful. However, Org
provides tooling to read and write it, and even display it (e.g., Org
Colview) without having to expand them.

You may want to expand them to edit them, or simply retrieve
information, it is all text after all, but that's not the intended use
case, so there is no incentive to expand them automatically.


Regards,

-- 
Nicolas Goaziou



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-19 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Nicolas Goaziou  writes:

> Hello,
>
> stardiviner  writes:
>
>> This sounds reasonable. (I deleted my patch on my local fork, I think your 
>> solution is better.)
>
> I pushed the changes. Now drawers folding is on par with blocks. You can
> hide or show a drawer with `org-hide-drawer-toggle', which is similar to
> `org-hide-block-toggle'. You may want to use it.

I today update Org Mode source code, found this change. Thanks for your work.

>
> Now, visibility behaviour of drawers might be discussed. Currently, all
> drawers are "mostly folded", which means that Org tries to fold them
> whenever it can. OTOH, blocks are "mostly expanded", i.e., most
> operations of the structure of the document opens the blocks. An
> alternative would be to have property drawers "mostly folded" and
> regular drawers "mostly expanded", i.e., like regular blocks. But that
> would partly defeat the "tuck stuff away" feature from drawers.

I thought intuitively that property drawers "mostly expanded" and regular
drawers like :LOGBOOK: drawer "mostly folded".

>
> Another (better?) option would be: "don't mess with folding state" for
> regular drawers and blocks, i.e., what is open stays open, what is
> closed stays closed. But that's more difficult to achieve. Any taker?

This indeed will be more difficult. I agree. It's not worth to be more 
complicated.

>
> In any case, I think property drawers need to be "mostly folded".

In my opinion, this design is decided by the usage of properties drawers and
other regular drawers. For now, I only used this two drawers.

For properties drawer, I use them to store meta data. Like org-contacts info,
and URL, Git path, Magit revision link, Author, Email, IMDb, DATE, TIME,
CUSTOM_ID etc. I record those info for review in case of I want to know related
info about current headline's content. For examples:

- - the "DATE" property :: I want to know when I record this headline and 
content.
- - the "AUTHOR", "EMAIL" property :: I want to know the author name and email.
- - the "URL" property :: I might want to open it if I only record a part of 
original web page content.
- - the Magit revision link :: I might want to open it when I read the Org 
content.

About the "LOGBOOK" drawer, I usually record one log entry, or many log entries.
The log entry can be multiple lines, so I can be very long. This long drawer
"should be folder". Instead, the properties drawer is strict to one line as
value, It will not be very long, so should "keep it expanded". This is one
reason too.

I just checked out insert regular drawer keybinding [C-c C-x d]. I think this
should be hidden. Because it is user defined drawers, no one will know how long
it is, and what purpose it is used for. And it's format similar with LOGBOOK.
Not like properties drawer which has property key and value.

On the other side, this properties drawer might be used by some Org related
extensions, like org-contacts, org-drill etc. For org-contacts, the properties
drawer should be expanded, for org-drill, this properties drawer should be
hidden.

At the end, I know this is just my usage experience, this should consider most
Org user's habit of how to use those drawers.

- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6cFXQUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPCWgf9F0Za1sfg26LoCOH+gbHwlUEkCFKh
4Q6w8e1qb0Onwf7VP167WGq1ooQBkb2S4K/A8t+ZnepKjLasKM3j7x48Og4kAgCp
4aU3HN1q1z5dQKlcmPSFwTw4hmFXohQa/5+8nnKaPMZExuD427qdLtIRWKUiK7lO
vwI+E0oAGroVG+auUk/iH3hxKQrd4GCVIo93nVR7pG3agR+1Ql1acuVSXmFwqhUF
nO6qmiVzA2EWXaqtpWwQzagpc3hzRbqi3TP8yMaMM6nldyai5wsGFIl2LjDFF1Tk
rgE9diGs2ZX+wPS+H5A/Ty97EeigPI1PjchErneZQDnEfiuclezqnJhhTA==
=4m2J
-END PGP SIGNATURE-



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-18 Thread Nicolas Goaziou
Hello,

stardiviner  writes:

> This sounds reasonable. (I deleted my patch on my local fork, I think your 
> solution is better.)

I pushed the changes. Now drawers folding is on par with blocks. You can
hide or show a drawer with `org-hide-drawer-toggle', which is similar to
`org-hide-block-toggle'. You may want to use it.

Now, visibility behaviour of drawers might be discussed. Currently, all
drawers are "mostly folded", which means that Org tries to fold them
whenever it can. OTOH, blocks are "mostly expanded", i.e., most
operations of the structure of the document opens the blocks. An
alternative would be to have property drawers "mostly folded" and
regular drawers "mostly expanded", i.e., like regular blocks. But that
would partly defeat the "tuck stuff away" feature from drawers.

Another (better?) option would be: "don't mess with folding state" for
regular drawers and blocks, i.e., what is open stays open, what is
closed stays closed. But that's more difficult to achieve. Any taker?

In any case, I think property drawers need to be "mostly folded".

Regards,

-- 
Nicolas Goaziou



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-14 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Nicolas Goaziou  writes:

> Hello,
>
> stardiviner  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.

This sounds reasonable. (I deleted my patch on my local fork, I think your 
solution is better.)

- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6WX64UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMKJggAzKm3lD0NTcG4eak7khuzw5bbt9W6
MNi8kkK61LWaPfW+BgCGxJz+RAYnKnPca7JDZ15xEwcVc1/UIFZ4bFTmeH25/yjp
49KsTVR4E8mgueAgm+Js1uNTj2GUXhvBpiu8RjPe6578GHzopLUbBgvTgPtZVswa
A9Mr3ecu3lFMja3KfjoB73w3sa6UncwQ3zqhiV6zqVFAcrO02YYfgLAFhmYjKQ5h
b5hkdxliZsL6H6kgLG7TQFwu1S1vpgGZNaZvz6sS9h3PO3UwglbCGxWo8EFsYHiz
+YFJMw3FcGxdXygp9l+ypG1Zhpwr7arZE8Zuq4ypduxmjWkUyOG7O6dbdA==
=haRH
-END PGP SIGNATURE-



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-14 Thread Ihor Radchenko
> It makes sense if point is on the drawer, and Org does this already.
>
> If point is on a headline, possibly a zillion lines above, it doesn't,
> at least not as a common operation.

Well. It's hard to judge for me if my use case is common or not. Since
there are no many other replies in the thread, I have to agree that it
is indeed uncommon. 

Nicolas Goaziou  writes:

> Hello,
>
> Ihor Radchenko  writes:
>
>> In some of my entries, I have long tables storing historical data.
>> These tables tend to be extremely long and I sometimes hide them inside
>> a drawer. Opening these drawers (or a customised list of drawers) on
>>  would actually make sense for me. 
>
> It makes sense if point is on the drawer, and Org does this already.
>
> If point is on a headline, possibly a zillion lines above, it doesn't,
> at least not as a common operation.
>
> Regards,
>
> -- 
> Nicolas Goaziou


-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-14 Thread Nicolas Goaziou
Hello,

Ihor Radchenko  writes:

> In some of my entries, I have long tables storing historical data.
> These tables tend to be extremely long and I sometimes hide them inside
> a drawer. Opening these drawers (or a customised list of drawers) on
>  would actually make sense for me. 

It makes sense if point is on the drawer, and Org does this already.

If point is on a headline, possibly a zillion lines above, it doesn't,
at least not as a common operation.

Regards,

-- 
Nicolas Goaziou



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-14 Thread Nicolas Goaziou
Hello,

stardiviner  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



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Nicolas Goaziou  writes:

> Hello,
>
> Ihor Radchenko  writes:
>
>>> Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
>>> similar functionality in my patch.
>>
>> Oh. I somehow missed your first message...
>>
>> Now, actually adding something to the discussion.
>>
>> FYI, there is org-cycle-include-plain-lists variable. If it is set to
>> 'integrate, plain lists will be included into cycling with point at
>> headline. This is against the logic that org-cycle only needs to be
>> dealing with headlines. So, I don't see your patch breaking the present
>> conventions in org.
>
> Yes, this `integrate' value is not great, IMO. However, plain lists have
> much more in common with headlines than with drawers.
>
> I still think basic cycling should not include drawers whatsoever. This
> is even more true for properties drawers.
>
> Note that you can already display drawers with `org-cycle', using three
> prefix arguments.

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.

As for this negation, I can accept.

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

- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6VSEgUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMFWAgAlhqnLF0PByf0k2Au3v7Ge4kj+BeF
U/S0XL+U3t8sjGSvXpR50AFEH9wPsp2Hr0yguJ2/WJDYDAO8dvzphcMgwP/q5EfZ
25hmKWQOP25rBMiHyXVcws6lVWLcsZ55l9k5ff/3mR2j5qV5dsA37G4gosbfTwMn
a29FXHyLBxMZMZgKGfK3cDY+W7F0tZ+XO4+E6TTZzu6OD8EmUwptbkmBd5XyiomQ
C7R1lBSR2xOYxFgdqy9sEp88lcRufN0tK3dun0hIotfabGq2HVv7lvsfD9DOC+IF
jaJKBzVzIAfvFCJVIUksW+DKvB4CiwL/Wm3NbzRaQmM4XZ66Emn1CaPYjQ==
=xMZt
-END PGP SIGNATURE-



[SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Ihor Radchenko  writes:

>> I try to record into under headline. For example, I use "org-contacts.el" 
>> which
>> record people personalized info. I want to see all properties drawer under a
>> headline when I press [Tab] (org-cycle) to expand it. It's more intuitive.
>
> I recall seeing something similar in stackoverflow.
> Here it is:
> https://stackoverflow.com/questions/17478260/completely-hide-the-properties-drawer-in-org-mode
>
> The accepted answer has a hint how to achieve what your want.
>

Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
similar functionality in my patch.

> Best,
> Ihor
>
>
> stardiviner  writes:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>>
>> Nicolas Goaziou  writes:
>>
>>> Hello,
>>>
>>> stardiviner  writes:
>>>
 I think the hidden drawers info is useful for users, this should be
 shown when org-cycle on headlines.
>>>
>>> Doesn't this defeat the whole purpose of drawers? What problem do you
>>> want to solve?
>>
>> Hmm, you're right, my patch seems against the purpose of drawers.
>>
>> I try to record into under headline. For example, I use "org-contacts.el" 
>> which
>> record people personalized info. I want to see all properties drawer under a
>> headline when I press [Tab] (org-cycle) to expand it. It's more intuitive.
>>
>> I agree your opinion. I wonder is it possible to define a buffer local 
>> variable
>> so that user can control this behavior. WDYT?
>>
>>>
>>> Regards,
>>
>>
>> - -- 
>> [ stardiviner ]
>>I try to make every word tell the meaning what I want to express.
>>
>>Blog: https://stardiviner.github.io/
>>IRC(freenode): stardiviner, Matrix: stardiviner
>>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>>   
>> -BEGIN PGP SIGNATURE-
>>
>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6T3JAUHG51bWJjaGls
>> ZEBnbWFpbC5jb20ACgkQG13xyVromsPm0Af+JPZpVaz0GBhs3TS4rbKA58fO5RNS
>> lBbL0oaLpua9sBIh2erwLCnVff6hDcXW9tZp9CCXkFMlvx/kHJ8izGf8Sq59rPsa
>> X7N7szot6W+KJXLEsy+v3VwYcvKX5um8BBh+FrfUguLuCInUy03ZXquiruxHVZun
>> eKc67YBi5KpDJVyhkBD3NGSzuhmP8kiJ2hx05dh9PpLB9+YUeUX+8bb82biEu/O0
>> ynWItysHG7t116+UuSQ0ShHE2yJffZqa0ygKfIukdPw7hLqBKSrudZX0Zp9yyPHh
>> SKh+olNHbOyQCpSZRjrMzhDETBP/g+FjiCMlmO2024F3FOZtyhQF+ALCfw==
>> =0jTv
>> -END PGP SIGNATURE-
>>


- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6Uk+MUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPYmAf/X0l7OXFrPUR86aGuKdppM+uk3/t1
edt3uCt1C2LCUZ2wiiCbCdmXgtTpwQumJjUnUM1WK9viNlMZq5FkmuWSZMwVwhc9
mR7f4QFHGPfjJF02YEWjAOpR27do5N+jZrsH8u2hcSaf9IpdL0bxA/n5nLTXpmpB
+ghOSAT186LqWCCDcxhNFH7vUOKrE2gtrWPo5LeedWiHgfuMJuvhESSbWGfHFHL4
ptxWlrEovDXZKZwsxVxZ578o27p8WgTkoRtfZjv3++lTG0BBg8DuOEfOWuZYDvf2
98OX2JnFoo57rL5KU9JFU8Y170RvRxDQF2ND7tg1e5RQcPoGFEKG+tfMaQ==
=kaPH
-END PGP SIGNATURE-



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread Ihor Radchenko
> Yes, this `integrate' value is not great, IMO. However, plain lists have
> much more in common with headlines than with drawers.
>
> I still think basic cycling should not include drawers whatsoever. This
> is even more true for properties drawers.

I tend to agree about the properties drawers. Cannot come up with a
reasonable use-case for such kind of behaviour.
However, I have some use-case for cycling user-defined property drawers.

In some of my entries, I have long tables storing historical data.
These tables tend to be extremely long and I sometimes hide them inside
a drawer. Opening these drawers (or a customised list of drawers) on
 would actually make sense for me. 


Nicolas Goaziou  writes:

> Hello,
>
> Ihor Radchenko  writes:
>
>>> Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
>>> similar functionality in my patch.
>>
>> Oh. I somehow missed your first message...
>>
>> Now, actually adding something to the discussion.
>>
>> FYI, there is org-cycle-include-plain-lists variable. If it is set to
>> 'integrate, plain lists will be included into cycling with point at
>> headline. This is against the logic that org-cycle only needs to be
>> dealing with headlines. So, I don't see your patch breaking the present
>> conventions in org.
>
> Yes, this `integrate' value is not great, IMO. However, plain lists have
> much more in common with headlines than with drawers.
>
> I still think basic cycling should not include drawers whatsoever. This
> is even more true for properties drawers.
>
> Note that you can already display drawers with `org-cycle', using three
> prefix arguments.
>
> Regards,
>
> -- 
> Nicolas Goaziou

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread Tim Cross


Nicolas Goaziou  writes:

> I still think basic cycling should not include drawers whatsoever. This
> is even more true for properties drawers.
>
> Note that you can already display drawers with `org-cycle', using three
> prefix arguments.
>

I agree. I use drawers precisely because they contain information I
don't want to see when cycling. Drawers contain 'meta', which is often
tangential to the main content. 


-- 
Tim Cross



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread Nicolas Goaziou
Hello,

Ihor Radchenko  writes:

>> Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
>> similar functionality in my patch.
>
> Oh. I somehow missed your first message...
>
> Now, actually adding something to the discussion.
>
> FYI, there is org-cycle-include-plain-lists variable. If it is set to
> 'integrate, plain lists will be included into cycling with point at
> headline. This is against the logic that org-cycle only needs to be
> dealing with headlines. So, I don't see your patch breaking the present
> conventions in org.

Yes, this `integrate' value is not great, IMO. However, plain lists have
much more in common with headlines than with drawers.

I still think basic cycling should not include drawers whatsoever. This
is even more true for properties drawers.

Note that you can already display drawers with `org-cycle', using three
prefix arguments.

Regards,

-- 
Nicolas Goaziou



Re: [SOLVED] Re: [PATCH] Show hidden drawers when org-cycle on headlines

2020-04-13 Thread Ihor Radchenko
> Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
> similar functionality in my patch.

Oh. I somehow missed your first message...

Now, actually adding something to the discussion.

FYI, there is org-cycle-include-plain-lists variable. If it is set to
'integrate, plain lists will be included into cycling with point at
headline. This is against the logic that org-cycle only needs to be
dealing with headlines. So, I don't see your patch breaking the present
conventions in org.


stardiviner  writes:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
>
> Ihor Radchenko  writes:
>
>>> I try to record into under headline. For example, I use "org-contacts.el" 
>>> which
>>> record people personalized info. I want to see all properties drawer under a
>>> headline when I press [Tab] (org-cycle) to expand it. It's more intuitive.
>>
>> I recall seeing something similar in stackoverflow.
>> Here it is:
>> https://stackoverflow.com/questions/17478260/completely-hide-the-properties-drawer-in-org-mode
>>
>> The accepted answer has a hint how to achieve what your want.
>>
>
> Thanks Ihor, I indeed found related code in Org Mode source. I implemented a
> similar functionality in my patch.
>
>> Best,
>> Ihor
>>
>>
>> stardiviner  writes:
>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA256
>>>
>>>
>>> Nicolas Goaziou  writes:
>>>
 Hello,

 stardiviner  writes:

> I think the hidden drawers info is useful for users, this should be
> shown when org-cycle on headlines.

 Doesn't this defeat the whole purpose of drawers? What problem do you
 want to solve?
>>>
>>> Hmm, you're right, my patch seems against the purpose of drawers.
>>>
>>> I try to record into under headline. For example, I use "org-contacts.el" 
>>> which
>>> record people personalized info. I want to see all properties drawer under a
>>> headline when I press [Tab] (org-cycle) to expand it. It's more intuitive.
>>>
>>> I agree your opinion. I wonder is it possible to define a buffer local 
>>> variable
>>> so that user can control this behavior. WDYT?
>>>

 Regards,
>>>
>>>
>>> - -- 
>>> [ stardiviner ]
>>>I try to make every word tell the meaning what I want to express.
>>>
>>>Blog: https://stardiviner.github.io/
>>>IRC(freenode): stardiviner, Matrix: stardiviner
>>>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>>>   
>>> -BEGIN PGP SIGNATURE-
>>>
>>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6T3JAUHG51bWJjaGls
>>> ZEBnbWFpbC5jb20ACgkQG13xyVromsPm0Af+JPZpVaz0GBhs3TS4rbKA58fO5RNS
>>> lBbL0oaLpua9sBIh2erwLCnVff6hDcXW9tZp9CCXkFMlvx/kHJ8izGf8Sq59rPsa
>>> X7N7szot6W+KJXLEsy+v3VwYcvKX5um8BBh+FrfUguLuCInUy03ZXquiruxHVZun
>>> eKc67YBi5KpDJVyhkBD3NGSzuhmP8kiJ2hx05dh9PpLB9+YUeUX+8bb82biEu/O0
>>> ynWItysHG7t116+UuSQ0ShHE2yJffZqa0ygKfIukdPw7hLqBKSrudZX0Zp9yyPHh
>>> SKh+olNHbOyQCpSZRjrMzhDETBP/g+FjiCMlmO2024F3FOZtyhQF+ALCfw==
>>> =0jTv
>>> -END PGP SIGNATURE-
>>>
>
>
> - -- 
> [ stardiviner ]
>I try to make every word tell the meaning what I want to express.
>
>Blog: https://stardiviner.github.io/
>IRC(freenode): stardiviner, Matrix: stardiviner
>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>   
> -BEGIN PGP SIGNATURE-
>
> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6Uk+MUHG51bWJjaGls
> ZEBnbWFpbC5jb20ACgkQG13xyVromsPYmAf/X0l7OXFrPUR86aGuKdppM+uk3/t1
> edt3uCt1C2LCUZ2wiiCbCdmXgtTpwQumJjUnUM1WK9viNlMZq5FkmuWSZMwVwhc9
> mR7f4QFHGPfjJF02YEWjAOpR27do5N+jZrsH8u2hcSaf9IpdL0bxA/n5nLTXpmpB
> +ghOSAT186LqWCCDcxhNFH7vUOKrE2gtrWPo5LeedWiHgfuMJuvhESSbWGfHFHL4
> ptxWlrEovDXZKZwsxVxZ578o27p8WgTkoRtfZjv3++lTG0BBg8DuOEfOWuZYDvf2
> 98OX2JnFoo57rL5KU9JFU8Y170RvRxDQF2ND7tg1e5RQcPoGFEKG+tfMaQ==
> =kaPH
> -END PGP SIGNATURE-

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg