GNU bug report logs -
#51459
29.0.50; org-return and org-return-and-maybe-indent
Previous Next
Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Date: Thu, 28 Oct 2021 10:18:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51459 in the body.
You can then email your comments to 51459 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51459
; Package
emacs
.
(Thu, 28 Oct 2021 10:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Oct 2021 10:18:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
With cursor at EOL at some org-mode buffer with
* Foo
neither RET (org-return &optional INDENT ARG INTERACTIVE)
nor C-j (org-return-and-maybe-indent) does indent
Doing M-x electric-indent-mode RET don't change that.
When calling C-u RET, get "org--newline: Wrong type argument:
number-or-marker-p, (4)"
When at start of second line now, TAB doesn't indent either.
When in init-file
(add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
(setq org-adapt-indentation t)
C-j would indent.
However, IMO doesn't make sense to require these extra config in order
to get a reasonable behavior.
‘org-return-and-maybe-indent’ and ‘org-return’ should not provide the same,.
One of them should indent, suggesting that with "indent" in its name.
^^+In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
2.24.32, cairo version 1.16.0)
of 2021-10-14 built on affe
Repository revision: 64f9fdc812bb2e1f533ae294355d33396985e469
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Ubuntu 20.04.3 LTS
Configured using:
'configure --with-modules --with-mailutils'
Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK2
ZLIB
Important settings:
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Org
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr dabbrev emacsbug sendmail shortdoc help-fns
radix-tree org-element avl-tree generator ol-eww eww xdg url-queue
thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt cl-extra help-mode speedbar ezimage dframe
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku
svg dom browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse url-vars mailcap
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map rfc2047 rfc2045 ietf-drums
text-property-search mail-utils mm-util mail-prsvr wid-edit ol-docview
doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex
iso8601 ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities time-date noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table ol rx org-keys oc seq gv subr-x
byte-opt bytecomp byte-compile cconv org-compat advice org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads inotify dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)
Memory information:
((conses 16 275176 16564)
(symbols 48 43130 6)
(strings 32 115505 2450)
(string-bytes 1 2708623)
(vectors 16 37688)
(vector-slots 8 413290 29577)
(floats 8 295 99)
(intervals 56 310 0)
(buffers 992 12))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51459
; Package
emacs
.
(Thu, 28 Oct 2021 13:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 51459 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> When in init-file
>
> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
> (setq org-adapt-indentation t)
>
> C-j would indent.
>
> However, IMO doesn't make sense to require these extra config in order
> to get a reasonable behavior.
And everything hinges on what one finds "reasonable".
As discussed in bug#51167, in the wake of electric-indent-mode being
honored in Org 9.4, plenty of people have come to emacs-orgmode to
express that they did not expect RET to indent. Thus Org maintainers
chose to change the default value of org-adapt-indentation for Org 9.5.
Note that by default (electric-indent-mode t, org-adapt-indentation nil)
RET *does* indent in some specific scenarios, e.g. "- list item RET"
will indent (resp. with electric-indent-mode nil, "- list item C-j"),
because Org assumes that you want to add a paragraph to your list item.
To recap:
- electric-indent-mode is enabled by default in Org, as it is globally
in Emacs: hence RET indents, C-j does not.
- org-adapt-indentation tells Org whether you want your documents to be
hard-indented or not: starting with 9.5, they won't be by default.
> When calling C-u RET, get "org--newline: Wrong type argument:
> number-or-marker-p, (4)"
That does look like a bug, however.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51459
; Package
emacs
.
(Thu, 28 Oct 2021 14:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 51459 <at> debbugs.gnu.org (full text, mbox):
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
>> When calling C-u RET, get "org--newline: Wrong type argument:
>> number-or-marker-p, (4)"
>
> That does look like a bug, however.
And it's not tied to Org, AFAICT. C-u RET borks in fundamental-mode as
well, since ARG is (1) interactively obtained as a raw prefix argument
(2) used in a numeric comparison:
(defun newline (&optional arg interactive)
[…]
(interactive "*P\np")
(barf-if-buffer-read-only)
(when (and arg
(< arg 0))
IIUC this comparison comes from 2021-09-30 "Make `newline' check the
argument earlier" (d1aacceae9); Lars, should there be a
prefix-numeric-value or something thrown in there somewhere?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51459
; Package
emacs
.
(Thu, 28 Oct 2021 17:55:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 51459 <at> debbugs.gnu.org (full text, mbox):
On 28.10.21 15:40, Kévin Le Gouguec wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> When in init-file
>>
>> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
>> (setq org-adapt-indentation t)
>>
>> C-j would indent.
>>
>> However, IMO doesn't make sense to require these extra config in order
>> to get a reasonable behavior.
> And everything hinges on what one finds "reasonable".
>
> As discussed in bug#51167, in the wake of electric-indent-mode being
> honored in Org 9.4, plenty of people have come to emacs-orgmode to
> express that they did not expect RET to indent. Thus Org maintainers
> chose to change the default value of org-adapt-indentation for Org 9.5.
>
> Note that by default (electric-indent-mode t, org-adapt-indentation nil)
> RET *does* indent in some specific scenarios, e.g. "- list item RET"
> will indent (resp. with electric-indent-mode nil, "- list item C-j"),
> because Org assumes that you want to add a paragraph to your list item.
>
> To recap:
>
> - electric-indent-mode is enabled by default in Org, as it is globally
> in Emacs: hence RET indents, C-j does not.
>
> - org-adapt-indentation tells Org whether you want your documents to be
> hard-indented or not: starting with 9.5, they won't be by default.
Censored as bug was making RET und C-j behave likewise, i.e. not
indenting either.
>> When calling C-u RET, get "org--newline: Wrong type argument:
>> number-or-marker-p, (4)"
> That does look like a bug, however.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51459
; Package
emacs
.
(Thu, 28 Oct 2021 21:40:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 51459 <at> debbugs.gnu.org (full text, mbox):
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
> IIUC this comparison comes from 2021-09-30 "Make `newline' check the
> argument earlier" (d1aacceae9); Lars, should there be a
> prefix-numeric-value or something thrown in there somewhere?
Yes indeed. This should now be fixed in emacs-28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
51459 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 28 Oct 2021 21:40:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 26 Nov 2021 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.