all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* refiling heading onto itself
@ 2023-05-09 12:46 Oliver Epper
  2023-05-10 15:22 ` Ruijie Yu via General discussions about Org-mode.
  2023-05-11 10:10 ` Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Epper @ 2023-05-09 12:46 UTC (permalink / raw)
  To: emacs-orgmode

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

When choosing the very same heading that is going to be refiled as its
target the message buffer states success but the heading is gone. This is
version 9.5.5 of org-mode with emacs 28.2

-*- mode: org -*-
* one
* two
* three

Try refiling two and choose two as the target. Result when started with
emacs -Q is:

* one
* three

no error message.

greetings
Oliver Epper

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

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

* Re: refiling heading onto itself
  2023-05-09 12:46 refiling heading onto itself Oliver Epper
@ 2023-05-10 15:22 ` Ruijie Yu via General discussions about Org-mode.
  2023-05-11 10:12   ` Ihor Radchenko
  2023-05-11 10:10 ` Ihor Radchenko
  1 sibling, 1 reply; 4+ messages in thread
From: Ruijie Yu via General discussions about Org-mode. @ 2023-05-10 15:22 UTC (permalink / raw)
  To: Oliver Epper; +Cc: emacs-orgmode


Oliver Epper <oliver.epper@gmail.com> writes:

> When choosing the very same heading that is going to be refiled as its target the message buffer states success but the heading is gone. This is
> version 9.5.5 of org-mode with emacs 28.2
>
> -*- mode: org -*-
> * one
> * two
> * three
>
> Try refiling two and choose two as the target. Result when started with emacs -Q is:
>
> * one
> * three
>
> no error message.
>
> greetings
> Oliver Epper

Reproducible in built-in Org from 28.2 ("Org mode version 9.5.5
(release_9.5.5 @ /opt/src/emacs/base/emacs-28.2/lisp/org/)").

Also reproducible in built-in Org from recent master ("Org mode version
9.6.5 (release_9.6.5-3-g2993f4 @ /usr/share/emacs/30.0.50/lisp/org/)").

Didn't test the main branch -- haven't pulled in a few days and it is
too late today.  HTH.

Two problems I found in a hurry: (1) refiling "two" into "two" make the
entire thing gone.  (2) the completiong system shouldn't even provide
"two" as a completion candidate.

-- 
Best,


RY


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

* Re: refiling heading onto itself
  2023-05-09 12:46 refiling heading onto itself Oliver Epper
  2023-05-10 15:22 ` Ruijie Yu via General discussions about Org-mode.
@ 2023-05-11 10:10 ` Ihor Radchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-05-11 10:10 UTC (permalink / raw)
  To: Oliver Epper; +Cc: emacs-orgmode

Oliver Epper <oliver.epper@gmail.com> writes:

> When choosing the very same heading that is going to be refiled as its
> target the message buffer states success but the heading is gone. This is
> version 9.5.5 of org-mode with emacs 28.2

Thanks for reporting!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=30b790f42

-- 
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: refiling heading onto itself
  2023-05-10 15:22 ` Ruijie Yu via General discussions about Org-mode.
@ 2023-05-11 10:12   ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-05-11 10:12 UTC (permalink / raw)
  To: Ruijie Yu; +Cc: Oliver Epper, emacs-orgmode

Ruijie Yu via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:

> ... (2) the completiong system shouldn't even provide
> "two" as a completion candidate.

Maybe. The current implementation of refile target selection is not
aware about the context. One might try to temporarily extend
`org-refile-target-verify-function', but we currently approach this
differently and check (in `org-refile') the selected refile target only,
throwing an error when attempting to refile into the child subtree.

-- 
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:[~2023-05-11 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 12:46 refiling heading onto itself Oliver Epper
2023-05-10 15:22 ` Ruijie Yu via General discussions about Org-mode.
2023-05-11 10:12   ` Ihor Radchenko
2023-05-11 10:10 ` 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.