all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-return not being given 't' for INDENT parameter
@ 2022-03-31 14:14 jebb Bungo
  2022-10-20  8:57 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: jebb Bungo @ 2022-03-31 14:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1922 bytes --]

Hello,

I am having an odd behavior with org-return. I use hard indents, and I have
set 'org-adapt-indentation' to t in my .emacs file. However, I have noticed
that sometimes when I press RET under a heading, instead of getting an
indent to match the indentation of the heading after the *'s, point is set
right at 0. For example, the expected behavior of pressing RET at the end
of the line '* Heading' would be that point is placed on the next line
below the heading, at column 2.

I am having an issue pinpointing what is causing the error, however, as I
haven't found any consistency. Sometimes RET works as expected in my files,
othertimes it does not. The bug does seem to only 'fix' in between
instances of Emacs. I run Emacs as a daemon, and I noticed that sometimes
the files will work and other times not work, but only between instances of
the daemon/between system boots.

I have tried restarting org mode through the menu-bar option "restart
org-mode (new version)", as well as disabling and renabling org-mode, as
well as simply calling org-mode. No avail.

When I tried to debug the function, I really didn't have a clue what I was
doing, but I think I narrowed the issue down to org-mode not getting the
right context on where point is. I think this because org-return functions
as expected when called with 't' as an argument, such as (org-return t),
but I get the issue when calling just (org-return), which is bound to RET.

My work-around, for the time being, has just been to disable
electric-indent-mode, and use C-J to get the desired behavior, as that
calls (org-return-and-maybe-indent), and gives t if org-adapt-indentation
is t and electric-indent-mode is disabled.

I apologize if my bug report is not up to scratch, but I have tried my best
to give as much detail as I can, and this is my first time trying a bug
report, as I am unsure how to proceed with this on my own.

Thank you,
Kevan B.

[-- Attachment #2: Type: text/html, Size: 2195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-20  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DM8P221MB0358DEF84717815E0CF53DBAAAE59@DM8P221MB0358.NAMP221.PROD.OUTLOOK.COM>
2022-04-04 23:58 ` org-return not being given 't' for INDENT parameter jebb Bungo
2022-10-14  2:21   ` Ihor Radchenko
2022-03-31 14:14 jebb Bungo
2022-10-20  8:57 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.