* bug#51459: 29.0.50; org-return and org-return-and-maybe-indent
@ 2021-10-28 10:17 Andreas Röhler
2021-10-28 13:40 ` Kévin Le Gouguec
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2021-10-28 10:17 UTC (permalink / raw)
To: 51459
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))
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#51459: 29.0.50; org-return and org-return-and-maybe-indent
2021-10-28 10:17 bug#51459: 29.0.50; org-return and org-return-and-maybe-indent Andreas Röhler
@ 2021-10-28 13:40 ` Kévin Le Gouguec
2021-10-28 14:53 ` bug#51459: C-u RET fails with "Wrong type argument" (was: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent) Kévin Le Gouguec
2021-10-28 17:54 ` bug#51459: 29.0.50; org-return and org-return-and-maybe-indent Andreas Röhler
0 siblings, 2 replies; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-10-28 13:40 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 51459
Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#51459: C-u RET fails with "Wrong type argument" (was: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent)
2021-10-28 13:40 ` Kévin Le Gouguec
@ 2021-10-28 14:53 ` Kévin Le Gouguec
2021-10-28 21:39 ` bug#51459: C-u RET fails with "Wrong type argument" Lars Ingebrigtsen
2021-10-28 17:54 ` bug#51459: 29.0.50; org-return and org-return-and-maybe-indent Andreas Röhler
1 sibling, 1 reply; 5+ messages in thread
From: Kévin Le Gouguec @ 2021-10-28 14:53 UTC (permalink / raw)
To: Andreas Röhler; +Cc: Lars Ingebrigtsen, 51459
Kévin Le Gouguec <kevin.legouguec@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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#51459: 29.0.50; org-return and org-return-and-maybe-indent
2021-10-28 13:40 ` Kévin Le Gouguec
2021-10-28 14:53 ` bug#51459: C-u RET fails with "Wrong type argument" (was: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent) Kévin Le Gouguec
@ 2021-10-28 17:54 ` Andreas Röhler
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2021-10-28 17:54 UTC (permalink / raw)
To: Kévin Le Gouguec; +Cc: 51459
On 28.10.21 15:40, Kévin Le Gouguec wrote:
> Andreas Röhler <andreas.roehler@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-28 21:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28 10:17 bug#51459: 29.0.50; org-return and org-return-and-maybe-indent Andreas Röhler
2021-10-28 13:40 ` Kévin Le Gouguec
2021-10-28 14:53 ` bug#51459: C-u RET fails with "Wrong type argument" (was: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent) Kévin Le Gouguec
2021-10-28 21:39 ` bug#51459: C-u RET fails with "Wrong type argument" Lars Ingebrigtsen
2021-10-28 17:54 ` bug#51459: 29.0.50; org-return and org-return-and-maybe-indent Andreas Röhler
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).