all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Bug] incorrect indent of next heading after org-paste-subtree
@ 2021-11-30 11:42 Max Nikulin
  2022-05-01  2:31 ` Ihor Radchenko
  2022-05-02  1:54 ` Samuel Wales
  0 siblings, 2 replies; 9+ messages in thread
From: Max Nikulin @ 2021-11-30 11:42 UTC (permalink / raw)
  To: emacs-orgmode

Another old bug with org-paste-subtree.

It make indentation of next heading wrong.

Consider the following document and follow described steps:

---- >8 ----
#+STARTUP: indent
Enable soft indent mode

Put to kill ring some text *without trailing newline*
that represents a subtree. In my case it is generated
by a browser extension.
#+begin_src elisp :results silent
   (kill-new "* Pasted Header\nPasted body")
#+end_src

Several levels of heading to make the problem apparent:
* H1
** H2
Ensure that the following "H3" heading is expanded,
put cursor to this line and try =C-c C-x C-y=
or [[elisp:(org-paste-subtree)]]
*** H3
:PROPERTIES:
:CUSTOM_ID: h3
:END:
Body
---- 8< ----

Actual result:

---- >8 ----
Several levels of heading to make the problem apparent:
* H1
*** H2
     Ensure that the following "H3" heading is expanded,
     put cursor to this line and try =C-c C-x C-y=
     or elisp:(org-paste-subtree)
***** Pasted Header
       Pasted body
***** H3
   :PROPERTIES:
   :CUSTOM_ID: h3
   :END:
   Body
---- 8< ----

Expected result

---- >8 ----
Several levels of heading to make the problem apparent:
* H1
*** H2
     Ensure that the following "H3" heading is expanded,
     put cursor to this line and try =C-c C-x C-y=
     or elisp:(org-paste-subtree)
***** Pasted Header
       Pasted body
***** H3
       :PROPERTIES:
       :CUSTOM_ID: h3
       :END:
       Body
---- 8< ----

Org mode version 9.5 (release_9.5-225-g494c20



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

end of thread, other threads:[~2022-07-17  8:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-30 11:42 [Bug] incorrect indent of next heading after org-paste-subtree Max Nikulin
2022-05-01  2:31 ` Ihor Radchenko
2022-05-01 11:09   ` Max Nikulin
2022-05-02  4:00     ` Ihor Radchenko
2022-05-02  7:29       ` Max Nikulin
2022-05-02 23:32       ` Samuel Wales
2022-05-03  1:21         ` Ihor Radchenko
2022-07-17  8:52       ` Ihor Radchenko
2022-05-02  1:54 ` Samuel Wales

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.