emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jebb Bungo <zixx999@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-return not being given 't' for INDENT parameter
Date: Thu, 31 Mar 2022 10:14:43 -0400	[thread overview]
Message-ID: <CAPErx+eWFN0UzRaTDXt50OJH3mOUfAe76vVMm6htdJzDkUhsyw@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2022-04-01  5:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 14:14 jebb Bungo [this message]
2022-10-20  8:57 ` org-return not being given 't' for INDENT parameter Ihor Radchenko
     [not found] <DM8P221MB0358DEF84717815E0CF53DBAAAE59@DM8P221MB0358.NAMP221.PROD.OUTLOOK.COM>
2022-04-04 23:58 ` jebb Bungo
2022-10-14  2:21   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPErx+eWFN0UzRaTDXt50OJH3mOUfAe76vVMm6htdJzDkUhsyw@mail.gmail.com \
    --to=zixx999@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).