* how to indent (or refill) properties
@ 2021-10-21 14:52 Uwe Brauer
2021-10-21 17:48 ` Kévin Le Gouguec
0 siblings, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2021-10-21 14:52 UTC (permalink / raw)
To: emacs-orgmode
Hi
I have for example
** DONE G1 :H1:G1:
:PROPERTIES:
:ID: G1
:User1: John
:email1: john@gmail.com
:Start: <2021-02-16 mar>
:End: <2021-05-24 lun>
:STATUS: [ ]
:ST1: [ ]
:Sheet: H1
:Ex: E2
:Ex: E1
:END:
But I would like them to be indented like this
** DONE G1 :H1:G1:
:PROPERTIES:
:ID: G1
:User1: John
:email1: john@gmail.com
:Start: <2021-02-16 mar>
:End: <2021-05-24 lun>
:STATUS: [ ]
:ST1: [ ]
:Sheet: H1
:Ex: E2
:Ex: E1
:END:
Or similar. Is there any function I oversee, that I could use?
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: how to indent (or refill) properties
2021-10-21 14:52 how to indent (or refill) properties Uwe Brauer
@ 2021-10-21 17:48 ` Kévin Le Gouguec
2021-10-22 6:31 ` [BUG in org master?] (was: how to indent (or refill) properties) Uwe Brauer
0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2021-10-21 17:48 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> But I would like them to be indented like this
>
> ** DONE G1 :H1:G1:
> :PROPERTIES:
In Org 9.5, setting org-adapt-indentation to 'headline-data makes
:DRAWERS: indented (setting it to t makes everything but headlines
indented).
If your drawers are already written and you want to mass-reindent them
with e.g. C-x h TAB, either make sure point is not on a headline (or TAB
will just cycle visibility) or tweak org-cycle-emulate-tab. Or use
C-x h M-: (indent-for-tab-command).
Not sure how to tell Org how wide indentation should be though.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [BUG in org master?] (was: how to indent (or refill) properties)
2021-10-21 17:48 ` Kévin Le Gouguec
@ 2021-10-22 6:31 ` Uwe Brauer
2021-10-22 13:55 ` Tim Cross
2021-10-22 15:50 ` Kévin Le Gouguec
0 siblings, 2 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-10-22 6:31 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
>>> "KLG" == Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
Thanks
> Uwe Brauer <oub@mat.ucm.es> writes:
>> But I would like them to be indented like this
>>
>> ** DONE G1 :H1:G1:
>> :PROPERTIES:
> In Org 9.5, setting org-adapt-indentation to 'headline-data makes
> :DRAWERS: indented (setting it to t makes everything but headlines
> indented).
Thanks, but it did not work. I set the variable
org-adapt-indentation to 'headline-data makes
But when I opened my org file in question I still saw
* TODO G1 <2021-10-21 jue 17:10> :H1:G1: Uwe Brauer
:PROPERTIES:
:ID:
:EMAIL: oub@mat.ucm.es
:Grp1: G1
:Usuario1: Uwe Brauer
:email1: oub@mat.ucm.es
:Speaker: Uwe
:End:
Even restarting emacs did not help.
I am running emacs 28 (master)
83a915d3dfafd5f3d737afe1e13b75e4dd3aef96
And org master compiled two days ago.
So is this a BUG?
Setting the variable to t seems to be the same case using
org-indent-mode, which is usually try to avoid.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?] (was: how to indent (or refill) properties)
2021-10-22 6:31 ` [BUG in org master?] (was: how to indent (or refill) properties) Uwe Brauer
@ 2021-10-22 13:55 ` Tim Cross
2021-10-22 16:14 ` [BUG in org master?] Kévin Le Gouguec
2021-10-22 16:34 ` Uwe Brauer
2021-10-22 15:50 ` Kévin Le Gouguec
1 sibling, 2 replies; 9+ messages in thread
From: Tim Cross @ 2021-10-22 13:55 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> [[S/MIME Signed Part:Undecided]]
>>>> "KLG" == Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
>
> Thanks
>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>>> But I would like them to be indented like this
>>>
>>> ** DONE G1 :H1:G1:
>>> :PROPERTIES:
>
>> In Org 9.5, setting org-adapt-indentation to 'headline-data makes
>> :DRAWERS: indented (setting it to t makes everything but headlines
>> indented).
>
> Thanks, but it did not work. I set the variable
> org-adapt-indentation to 'headline-data makes
>
>
> But when I opened my org file in question I still saw
>
> * TODO G1 <2021-10-21 jue 17:10> :H1:G1: Uwe Brauer
> :PROPERTIES:
> :ID:
> :EMAIL: oub@mat.ucm.es
> :Grp1: G1
> :Usuario1: Uwe Brauer
> :email1: oub@mat.ucm.es
> :Speaker: Uwe
> :End:
>
> Even restarting emacs did not help.
>
> I am running emacs 28 (master)
> 83a915d3dfafd5f3d737afe1e13b75e4dd3aef96
>
> And org master compiled two days ago.
>
> So is this a BUG?
>
>
>
> Setting the variable to t seems to be the same case using
> org-indent-mode, which is usually try to avoid.
>
What is the setting for electric-indent-mode in the org buffer?
Also, does org-lint give any warnings about your org file?
The effect of org-adapt-indentation is somewhat confusing to say the
least. The effect of that setting is also dependent on the setting for
electric-indent-mode. Getting the desired result often depends on having
the right setting for both that variable and electric-indent-mode. I've
also found that in some cases, if there are errors in your org file (as
found by org-lint) then everything can go a bit weird as well.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?]
2021-10-22 13:55 ` Tim Cross
@ 2021-10-22 16:14 ` Kévin Le Gouguec
2021-10-22 16:34 ` Uwe Brauer
1 sibling, 0 replies; 9+ messages in thread
From: Kévin Le Gouguec @ 2021-10-22 16:14 UTC (permalink / raw)
To: Tim Cross; +Cc: emacs-orgmode
Tim Cross <theophilusx@gmail.com> writes:
> The effect of org-adapt-indentation is somewhat confusing to say the
> least. The effect of that setting is also dependent on the setting for
> electric-indent-mode. Getting the desired result often depends on having
> the right setting for both that variable and electric-indent-mode.
In case that can clear things up:
- org-adapt-indentation dictates what the "canonical" indentation should
be, i.e. what happens when you select the whole text and M-:
(indent-for-tab-command):
- nil (default as of 9.5): nothing is indented;
- t (default before 9.5): drawers and text are indented;
- 'headline-data: drawers are indented.
- electric-indent-mode dictates *what key* causes automatic indentation:
- nil: C-j indents, RET does not,
- t: C-j does not indent, RET does.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?]
2021-10-22 13:55 ` Tim Cross
2021-10-22 16:14 ` [BUG in org master?] Kévin Le Gouguec
@ 2021-10-22 16:34 ` Uwe Brauer
2021-10-22 22:36 ` Tim Cross
1 sibling, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2021-10-22 16:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
> Uwe Brauer <oub@mat.ucm.es> writes:
> What is the setting for electric-indent-mode in the org buffer?
,----
| electric-indent-mode is a variable defined in ‘electric.el’.
|
| Its value is nil
| Original value was t
`----
Not sure why its original value was t, I don't remember to have used
that, but I might be mistaken.
> Also, does org-lint give any warnings about your org file?
No, I just checked.
> The effect of org-adapt-indentation is somewhat confusing to say the
> least. The effect of that setting is also dependent on the setting for
> electric-indent-mode. Getting the desired result often depends on having
> the right setting for both that variable and electric-indent-mode. I've
> also found that in some cases, if there are errors in your org file (as
> found by org-lint) then everything can go a bit weird as well.
Very odd, maybe I will turn org-indent-mode on just in this buffer.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?]
2021-10-22 16:34 ` Uwe Brauer
@ 2021-10-22 22:36 ` Tim Cross
0 siblings, 0 replies; 9+ messages in thread
From: Tim Cross @ 2021-10-22 22:36 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
> [[S/MIME Signed Part:Undecided]]
>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>
>> What is the setting for electric-indent-mode in the org buffer?
>
> ,----
> | electric-indent-mode is a variable defined in ‘electric.el’.
> |
> | Its value is nil
> | Original value was t
> `----
>
> Not sure why its original value was t, I don't remember to have used
> that, but I might be mistaken.
>
>
Electric indent mode was set to t in emacs 26 or 25. At the time, org
did not honour the setting of electric indent mode. A lot of the
confusion around changes to indentation and org-adapt-indentation has
arisen due to changes in org mode to make it compatible with other emacs
modes i.e. make it honour the setting of electric-indent-mode. While
I think this was the right move for the long-term as it makes org mode
behave like other modes, I don't think the impact from this change was
fully understood at the time. This has led to considerable confusion and
changes in default settings for org-adapt-indentation to reduce the
friction for users. While the outcome has likely made org mode more
consistent for new users, it has caused some issues for existing users
and it may take some time for the shock waves to dissipate.
>
>> Also, does org-lint give any warnings about your org file?
>
> No, I just checked.
>
>> The effect of org-adapt-indentation is somewhat confusing to say the
>> least. The effect of that setting is also dependent on the setting for
>> electric-indent-mode. Getting the desired result often depends on having
>> the right setting for both that variable and electric-indent-mode. I've
>> also found that in some cases, if there are errors in your org file (as
>> found by org-lint) then everything can go a bit weird as well.
>
> Very odd, maybe I will turn org-indent-mode on just in this buffer.
>
>
There has been a number of threads about this and org-adapt-indentation
over the last 12 months or so. You might find some help looking through
some of those threads.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?]
2021-10-22 6:31 ` [BUG in org master?] (was: how to indent (or refill) properties) Uwe Brauer
2021-10-22 13:55 ` Tim Cross
@ 2021-10-22 15:50 ` Kévin Le Gouguec
2021-10-23 6:38 ` Uwe Brauer
1 sibling, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2021-10-22 15:50 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>> In Org 9.5, setting org-adapt-indentation to 'headline-data makes
>> :DRAWERS: indented (setting it to t makes everything but headlines
>> indented).
>
> Thanks, but it did not work. I set the variable
> org-adapt-indentation to 'headline-data makes
>
>
> But when I opened my org file in question I still saw
>
> * TODO G1 <2021-10-21 jue 17:10> :H1:G1: Uwe Brauer
> :PROPERTIES:
> :ID:
> :EMAIL: oub@mat.ucm.es
> :Grp1: G1
> :Usuario1: Uwe Brauer
> :email1: oub@mat.ucm.es
> :Speaker: Uwe
> :End:
>
> Even restarting emacs did not help.
>
> I am running emacs 28 (master)
> 83a915d3dfafd5f3d737afe1e13b75e4dd3aef96
>
> And org master compiled two days ago.
Just to make sure I'm not misundertanding: did you try to re-indent the
whole file? You say "when I opened my org file in question I still
saw…", so I'm not sure if you tried to re-indent, or if you merely set
org-adapt-indentation and expected the file to be automatically
re-indented after opening it again.
If the :PROPERTIES: drawer is not indented after doing the following:
M-: (setq org-adapt-indentation 'headline-data)
C-x h
M-: (indent-for-tab-command)
… then yes, there is a bug.
> Setting the variable to t seems to be the same case using
> org-indent-mode, which is usually try to avoid.
Sure, the reason why it is (now) nil by default is because a fair number
of users on this list have told Org maintainers that they dislike
indented text.
Note that there is a difference between org-adapt-indentation set to t,
and org-indent-mode:
- org-adapt-indentation uses *hard* indentation (Emacs inserts
whitespace which is written to the file),
- org-indent-mode uses *soft* or "visual" indentation (Emacs adds text
properties to shift the text, but no whitespace is written to the
file).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG in org master?]
2021-10-22 15:50 ` Kévin Le Gouguec
@ 2021-10-23 6:38 ` Uwe Brauer
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2021-10-23 6:38 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
> Uwe Brauer <oub@mat.ucm.es> writes:
> Just to make sure I'm not misundertanding: did you try to re-indent the
> whole file? You say "when I opened my org file in question I still
> saw…", so I'm not sure if you tried to re-indent, or if you merely set
> org-adapt-indentation and expected the file to be automatically
> re-indented after opening it again.
> If the :PROPERTIES: drawer is not indented after doing the following:
> M-: (setq org-adapt-indentation 'headline-data)
> C-x h
> M-: (indent-for-tab-command)
> … then yes, there is a bug.
I did all this and it *did not* indent!
So I shall write a BUG report
> Sure, the reason why it is (now) nil by default is because a fair number
> of users on this list have told Org maintainers that they dislike
> indented text.
> Note that there is a difference between org-adapt-indentation set to t,
> and org-indent-mode:
> - org-adapt-indentation uses *hard* indentation (Emacs inserts
> whitespace which is written to the file),
> - org-indent-mode uses *soft* or "visual" indentation (Emacs adds text
> properties to shift the text, but no whitespace is written to the
> file).
Thanks for clarifying
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-10-23 6:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-21 14:52 how to indent (or refill) properties Uwe Brauer
2021-10-21 17:48 ` Kévin Le Gouguec
2021-10-22 6:31 ` [BUG in org master?] (was: how to indent (or refill) properties) Uwe Brauer
2021-10-22 13:55 ` Tim Cross
2021-10-22 16:14 ` [BUG in org master?] Kévin Le Gouguec
2021-10-22 16:34 ` Uwe Brauer
2021-10-22 22:36 ` Tim Cross
2021-10-22 15:50 ` Kévin Le Gouguec
2021-10-23 6:38 ` Uwe Brauer
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).