From d017cdb0aee24b4c9e5017f76019d3cc1ccfe4bd Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 30 Mar 2021 23:43:05 -0400 Subject: [PATCH] NEWS: Group and move up electric-indent/adapt-indentation entries Put the entry for "respecting electric-indent-mode" and the new value of org-adapt-indentation near each other given that honoring electric-indent-mode is likely to make many users aware of the behavior that org-adapt-indentation controls (even if they weren't aware that the option existed). Also move these entries up in hopes of making them easier to discover. Suggested-by: Tim Cross Ref: https://orgmode.org/list/87pmzhi7wp.fsf@gmail.com --- etc/ORG-NEWS | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 2e3ce506b..71ce6743e 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -102,6 +102,40 @@ Also, ~org-startup-folded~ now defaults to ~showeverything~. ** New features +*** =RET= and =C-j= now obey ~electric-indent-mode~ + +Since Emacs 24.4, ~electric-indent-mode~ is enabled by default. In +most major modes, this causes =RET= to reindent the current line and +indent the new line, and =C-j= to insert a newline without indenting. + +Org mode now obeys this minor mode: when ~electric-indent-mode~ is +enabled, and point is neither in a table nor on a timestamp or a link: + +- =RET= (bound to ~org-return~) reindents the current line and indents + the new line; +- =C-j= (bound to the new command ~org-return-and-maybe-indent~) + merely inserts a newline. + +To get the previous behaviour back, disable ~electric-indent-mode~ +explicitly: + +#+begin_src emacs-lisp +(add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1))) +#+end_src + +Alternatively, if you wish to keep =RET= as the "smart-return" key, +but dislike Org's default indentation of sections, you may prefer to +customize ~org-adapt-indentation~ to either =nil= or ='headline-data=. + +*** New allowed value for ~org-adapt-indentation~ + +~org-adapt-indentation~ now accepts a new value, ='headline-data=. + +When set to this value, Org will only adapt indentation of headline +data lines, such as planning/clock lines and property/logbook drawers. +Also, with this setting, =org-indent-mode= will keep these data lines +correctly aligned with the headline above. + *** Looping agenda commands over headlines ~org-agenda-loop-over-headlines-in-active-region~ allows you to loop @@ -135,15 +169,6 @@ call ~org-toggle-radio-button~. You can also add =#+ATTR_ORG: :radio t= right before the list to tell Org to use radio buttons for this list only. -*** New allowed value for ~org-adapt-indentation~ - -~org-adapt-indentation~ now accepts a new value, ='headline-data=. - -When set to this value, Org will only adapt indentation of headline -data lines, such as planning/clock lines and property/logbook drawers. -Also, with this setting, =org-indent-mode= will keep these data lines -correctly aligned with the headline above. - *** Numeric priorities are now allowed (up to 65) You can now set ~org-priority-highest/lowest/default~ to integers to @@ -213,31 +238,6 @@ can now be inserted with this prefix argument. Source code block header argument =:file-mode= can set file permissions if =:file= argument is provided. -*** =RET= and =C-j= now obey ~electric-indent-mode~ - -Since Emacs 24.4, ~electric-indent-mode~ is enabled by default. In -most major modes, this causes =RET= to reindent the current line and -indent the new line, and =C-j= to insert a newline without indenting. - -Org mode now obeys this minor mode: when ~electric-indent-mode~ is -enabled, and point is neither in a table nor on a timestamp or a link: - -- =RET= (bound to ~org-return~) reindents the current line and indents - the new line; -- =C-j= (bound to the new command ~org-return-and-maybe-indent~) - merely inserts a newline. - -To get the previous behaviour back, disable ~electric-indent-mode~ -explicitly: - -#+begin_src emacs-lisp -(add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1))) -#+end_src - -Alternatively, if you wish to keep =RET= as the "smart-return" key, -but dislike Org's default indentation of sections, you may prefer to -customize ~org-adapt-indentation~ to either =nil= or ='headline-data=. - *** =ob-C.el= allows the inclusion of non-system header files In C and C++ blocks, ~:includes~ arguments that do not start with a