emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-up-heading-safe behaves different in v9.7 [9.7 (9.7-??-d6f3aed @ /home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)]
@ 2023-08-27  5:12 zhaoyiyu
  2023-08-27  8:26 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: zhaoyiyu @ 2023-08-27  5:12 UTC (permalink / raw)
  To: emacs-orgmode



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

When I track down a issue about org-journal, with org v9.7
I noticed that when execute
(org-up-heading-safe)
it's different with org v9.6, which would caused the org-journal issue.
In detail as follows org file. After execution the cursor position will
change to


File Header                 <-- v9.7, return nil and cursor here
* heading lv 1             <-- v9.6, return nil and cursor here
some contents and your prev cursor is here I


Personaly, I write a advice to fix the issue


(defun myfunc/org-up-heading-safe ()
(let* ((heading (org-element-lineage
(org-element-at-point)
'(headline inlinetask) 'with-self))
(parent (org-element-parent heading))
(ret (and parent
(org-element-property :level parent)
(<= (point-min) (org-element-begin parent)))))
(if ret
(goto-char (org-element-begin parent))
(when heading
(goto-char (org-element-begin heading))))
ret))
(advice-add 'org-up-heading-safe :override #'myfunc/org-up-heading-safe)

However, Since I didn't get the purpose for the org v9.7 changes, I
submit this issue here.


Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.33, cairo version 1.16.0)
of 2022-05-31
Package: Org mode version 9.7 (9.7-??-d6f3aed @ 
/home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)



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

* Re: [BUG] org-up-heading-safe behaves different in v9.7 [9.7 (9.7-??-d6f3aed @ /home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)]
  2023-08-27  5:12 [BUG] org-up-heading-safe behaves different in v9.7 [9.7 (9.7-??-d6f3aed @ /home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)] zhaoyiyu
@ 2023-08-27  8:26 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-08-27  8:26 UTC (permalink / raw)
  To: zhaoyiyu; +Cc: emacs-orgmode

zhaoyiyu <zhyznd@163.com> writes:

> When I track down a issue about org-journal, with org v9.7
> I noticed that when execute
> (org-up-heading-safe)
> it's different with org v9.6, which would caused the org-journal issue.
> In detail as follows org file. After execution the cursor position will
> change to
>
>
> File Header                 <-- v9.7, return nil and cursor here
> * heading lv 1             <-- v9.6, return nil and cursor here
> some contents and your prev cursor is here I
>
>...
> Package: Org mode version 9.7 (9.7-??-d6f3aed @ 
> /home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)

Duplicate of https://orgmode.org/list/CAG=u__pAT9k_AsRG6cpyPPUt0__5S7o=3a8WWkAijuPPuGc7Cg@mail.gmail.com
Already fixed.
Handled.

-- 
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] 2+ messages in thread

end of thread, other threads:[~2023-08-27  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27  5:12 [BUG] org-up-heading-safe behaves different in v9.7 [9.7 (9.7-??-d6f3aed @ /home/zhaoyiyu/.config/emacs/.local/straight/build-28.1/org/)] zhaoyiyu
2023-08-27  8:26 ` Ihor Radchenko

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