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

* Re: org-return not being given 't' for INDENT parameter
       [not found] <DM8P221MB0358DEF84717815E0CF53DBAAAE59@DM8P221MB0358.NAMP221.PROD.OUTLOOK.COM>
@ 2022-04-04 23:58 ` jebb Bungo
  2022-10-14  2:21   ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: jebb Bungo @ 2022-04-04 23:58 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

From: jebb Bungo <zixx999@gmail.com>
Sent: Thu, 31 Mar 2022 10:14:43 -0400
To: ZIXX999@GMAIL.COM <zixx999@gmail.com>
Subject: org-return not being given 't' for INDENT parameter

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.



UPDATE: it seems to be caused by a double quote character. Upon continuing to type my notes in my journal, I noticed that I had a quote and hit RET before I remembered to close the quote, and suddenly RET worked as expected! Then, after collecting my wits and after the end of my happy dance, I moved point up and away, to the heading preceding the one I was working under, and RET didn't indent properly.

It seems that the open double quote might be masking the correct context.

My apologies for not specifying originally, but I am on org 9.5.2 from melpa, using emacs 27.2.

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

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

* Re: org-return not being given 't' for INDENT parameter
  2022-04-04 23:58 ` org-return not being given 't' for INDENT parameter jebb Bungo
@ 2022-10-14  2:21   ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-10-14  2:21 UTC (permalink / raw)
  To: jebb Bungo; +Cc: emacs-orgmode@gnu.org

jebb Bungo <zixx999@gmail.com> writes:

> 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.

Sorry for the late reply.
Are you still experiencing the problem?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: 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, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-10-20  8:57 UTC (permalink / raw)
  To: jebb Bungo; +Cc: emacs-orgmode

jebb Bungo <zixx999@gmail.com> writes:

> 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.

Sorry for the late reply.
Are you still seeing the problem?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ 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.