Re: org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Guillaume MULLER writes: > I'm not sure what did the trick, but if someone is looking for a solution, > it's probably a mix of: > - disabling org in Doom's init.el and/or > - manually pulling & compiling the versions in > ~/.emacs.d/.local/straight/{repos,build-27.1}/org and/or > - changing the :pin setup in ~/.emacs.d/modules/lang/org/packages.el to point > to the latest commit. AFAIU, :pin should be the right way that will not break updates. > FWIW, "list-packages" only shows the 9.3 builtin version of org, so my > current working 9.5.4 org version seems to actually be loaded from the code > previously installed by Doom and manually (re)compiled by me, even if org is > disabled in init.el ... This is because list-packages is not used by Doom. list-packages is a built-in Vanilla Emacs package manager, while Doom uses straight.el package manager. >> What do you mean by "breaks too many other things in org"? > > When calling some functions (e.g. org-meta-return or org-ctrl-c-ctrl-c in a > code block or hitting C-x C-c to quit Emacs) I got errors like "function xxx > is void" or "wrong arguments listp, xxx". That sounds like "mixed" installation of built-in and Doom's versions of Org. Should not be an issue as long as you manage to find the proper way to configure Doom. Best, Ihor
Re: org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Hi again, > I am using Vanilla Emacs. > Note that Doom is known for carelessly advising some Org functions and > can sometimes break things. Such issues should be reported to Doom > developers. Thanks for your help & pointers. Yes I agree, the problem must come from Doom's config (the commit version it uses seems 24k+ commits behind your HEAD!!). I reported the problem directly to them: https://github.com/doomemacs/doomemacs/issues/6544 I did some more tests within Doom's config (see the issue for details) but couldn't find the proper way to get it running the latest org release (9.5.4). Fortunately, I ended up with a working config. I'm not sure what did the trick, but if someone is looking for a solution, it's probably a mix of: - disabling org in Doom's init.el and/or - manually pulling & compiling the versions in ~/.emacs.d/.local/straight/{repos,build-27.1}/org and/or - changing the :pin setup in ~/.emacs.d/modules/lang/org/packages.el to point to the latest commit. FWIW, "list-packages" only shows the 9.3 builtin version of org, so my current working 9.5.4 org version seems to actually be loaded from the code previously installed by Doom and manually (re)compiled by me, even if org is disabled in init.el ... This will probably break at next Doom sync/upgrade, but since it works, I won't touch it anymore :) > What do you mean by "breaks too many other things in org"? When calling some functions (e.g. org-meta-return or org-ctrl-c-ctrl-c in a code block or hitting C-x C-c to quit Emacs) I got errors like "function xxx is void" or "wrong arguments listp, xxx". Have a nice day Guillaume OpenPGP_signature Description: OpenPGP digital signature
Re: org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Guillaume MULLER writes: >> I tried to set org-M-RET-may-split-line to nil first followed by setting >> it to either t or '((default . t)). For both values, I am seeing >> >> * heading number >> * <>one >> >> which is expected behavior. > > Are you using DoomEmacs or Vanilla Emacs? I am using Vanilla Emacs. Note that Doom is known for carelessly advising some Org functions and can sometimes break things. Such issues should be reported to Doom developers. > More precisely, are you using org-mode "9.6-??-e9da29b6f" as I do? (This is > the only version that gives me the strange behavior) There is no such Org version. Our latest version tag is 9.5.4. If you are seeing 9.6-..., it indicates some problem with your package manager. I suggest to purge your local downloaded Org copy and re-install Org. >> Please, try to reproduce starting from emacs -Q (without Doom). >> See https://orgmode.org/manual/Feedback.html > What I tried: > > - Getting an as-vanilla-as-possible DoomInstall, by removing my config.org > and sync'ing Doom. I get the same "9.6-??-e9da29b6f" org version and > erroneous behavior. 9.6 means that your Doom is not clean enough. There is some problem with your Org source code used by Doom. > - Changing the version of org-mode used in Doom, by removing the directory > and installing the one from MELPA (9.5.4). This gives me the correct behavior > for org-meta-return, but it breaks too many other things in org to be usable. What do you mean by "breaks too many other things in org"? > - Using "vanilla" "emacs -Q" and running only org "9.6". > > 1. I've tried to manually load the org-version that comes with Doom, by > writing & executing "(add-to-list 'load-path > "/home/user/.emacs.d/modules/lang/org/lisp/autoload") (load "org")" from > scratch buffer, then running org-reload >+ but I get org-version 9.3 >+ and I can't find a way to edit the "load-path" "variable" to remove the > native path ("/usr/share/emacs/27.1/lisp/org") from the list (sorry newbie > here...) I do not think that "/home/user/.emacs.d/modules/lang/org/lisp/autoload" contains Org source. AFAIK, Doom using using straight.el, which puts the packages sources into .emacs.d/straight/repos/ and .emacs/straight/build/. Though Doom might use different paths. You can try to watch the video I recorded on testing Org issues: https://open.tube/videos/watch/4d819114-43bf-42df-af94-f94fc53dd0d9 There, I showcased how to get a clean Org setup + vanilla Emacs. > 2. I've tried to git clone the org-mode repo in /tmp, but don't see any > tag/branch that would correspond to a "9.6" version of org. > + I do see a commit matching e9da29b6f > (e9da29b6fafe63abbc2774e9d485ac13d2811b65) > * I've tried to recover the code from this version "git checkout > e9da29b6f ." > * Compiled it (make) > * Opened emacs -Q > * Wrote and executed "(add-to-list 'load-path "/tmp/org-mode/lisp/") > (load "org")" in the scratch buffer > * Ran M-x org-reload > + But "M-x org-version" still returns "Org mode version 9.5.4", and it > works as expected > > If you have any more hints on how I could setup an environment where I could > test just org-mode "9.6-??-e9da29b6f" on a raw/vanilla emacs, I vwould be > glad to test that. Again, there is no such tag. There is official release version, which is 9.5.4; and there are two development branches: bugfix and main. The bugfix is WIP minor release branch for 9.5.5 and main is the development branch for next major release. Note that Doom is using the development (main) branch, AFAIK. Best, Ihor
Re: org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Hi again, Thanks for your answer and sorry for the duplicate. I would be glad to help find if/where is the bug. > Note that '(default . t) is _not_ the correct value. It should be '((default . t)). Just in case. Yes indeed. I had it right in my config. I made the mistake when I copied into the email. > I tried to set org-M-RET-may-split-line to nil first followed by setting > it to either t or '((default . t)). For both values, I am seeing > > * heading number > * <>one > > which is expected behavior. Are you using DoomEmacs or Vanilla Emacs? More precisely, are you using org-mode "9.6-??-e9da29b6f" as I do? (This is the only version that gives me the strange behavior) > Please, try to reproduce starting from emacs -Q (without Doom). > See https://orgmode.org/manual/Feedback.html I've tried several things, but it's not very clear to me how to get/test the specific version of org-mode that is comes with doom ("9.6-??-e9da29b6f"). What I tried: - Getting an as-vanilla-as-possible DoomInstall, by removing my config.org and sync'ing Doom. I get the same "9.6-??-e9da29b6f" org version and erroneous behavior. - Changing the version of org-mode used in Doom, by removing the directory and installing the one from MELPA (9.5.4). This gives me the correct behavior for org-meta-return, but it breaks too many other things in org to be usable. - Using "vanilla" "emacs -Q" and running only org "9.6". 1. I've tried to manually load the org-version that comes with Doom, by writing & executing "(add-to-list 'load-path "/home/user/.emacs.d/modules/lang/org/lisp/autoload") (load "org")" from scratch buffer, then running org-reload + but I get org-version 9.3 + and I can't find a way to edit the "load-path" "variable" to remove the native path ("/usr/share/emacs/27.1/lisp/org") from the list (sorry newbie here...) 2. I've tried to git clone the org-mode repo in /tmp, but don't see any tag/branch that would correspond to a "9.6" version of org. + I do see a commit matching e9da29b6f (e9da29b6fafe63abbc2774e9d485ac13d2811b65) * I've tried to recover the code from this version "git checkout e9da29b6f ." * Compiled it (make) * Opened emacs -Q * Wrote and executed "(add-to-list 'load-path "/tmp/org-mode/lisp/") (load "org")" in the scratch buffer * Ran M-x org-reload + But "M-x org-version" still returns "Org mode version 9.5.4", and it works as expected If you have any more hints on how I could setup an environment where I could test just org-mode "9.6-??-e9da29b6f" on a raw/vanilla emacs, I vwould be glad to test that. Thanks in advance -- Guillaume MULLER OpenPGP_signature Description: OpenPGP digital signature
Re: org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Guillaume MULLER writes: > I thought I already reported this bug, but I cannot find it anymore in the > mailing list archives > (https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-meta-return&submit=Search%21&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Alate) > nor in the accepted bugs > (https://updates.orgmode.org/?sort-bugs-by=date#bugs) so I'm reporting it > (again?). Please forgive me if I'm duplicating it, but FYI it is still > present today. It is https://list.orgmode.org/41f10572-03d0-8c7a-341a-26c031575...@alolise.org/ and it is not listed in updates.orgmode.org because your bug report has never been confirmed. I recommend using https://list.orgmode.org/ to search our mailing list. Our website frontend has a bit more reliable search engine. > By default, on my config org-M-RET-may-split-line is set to 'nil', but > changing to whatever ("Always" or (default . t)) results in the same behavior. Note that '(default . t) is _not_ the correct value. It should be '((default . t)). Just in case. I tried to set org-M-RET-may-split-line to nil first followed by setting it to either t or '((default . t)). For both values, I am seeing * heading number * <>one which is expected behavior. Please, try to reproduce starting from emacs -Q (without Doom). See https://orgmode.org/manual/Feedback.html Best, Ihor
org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set
Hi, I thought I already reported this bug, but I cannot find it anymore in the mailing list archives (https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-meta-return&submit=Search%21&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Alate) nor in the accepted bugs (https://updates.orgmode.org/?sort-bugs-by=date#bugs) so I'm reporting it (again?). Please forgive me if I'm duplicating it, but FYI it is still present today. I'm using DoomEmacs (latest), which uses "Org mode version 9.6 (9.6-??-e9da29b6f)". When the cursor is in the middle of a heading (<> denots the cursor): * heading number<> one Hiting Meta-Ret results in: * heading number one * <> Whereas it should result in: * heading number * <>one At least if org-M-RET-may-split-line is set correctly. By default, on my config org-M-RET-may-split-line is set to 'nil', but changing to whatever ("Always" or (default . t)) results in the same behavior. The documentation for org-meta-return points to org-insert-heading which says: "If point is in the middle of a line, split it and create a new headline with the text in the current line after point (see org-M-RET-may-split-line on how to modify this behavior)." So this is actually a bug. Cheers, keep up the good work! GM OpenPGP_signature Description: OpenPGP digital signature