From: Allen Li <darkfeline@felesatra.moe>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] ob-tangle overrides user customization of org-id-link-to-org-use-id [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]
Date: Fri, 14 Jan 2022 01:50:06 -0800 [thread overview]
Message-ID: <80ilumeje9.fsf@felesatra.moe> (raw)
In-Reply-To: <878rvj5aa2.fsf@localhost> (Ihor Radchenko's message of "Fri, 14 Jan 2022 10:19:33 +0800")
Ihor Radchenko <yantar92@gmail.com> writes:
> Allen Li <darkfeline@felesatra.moe> writes:
>
>>> I agree. The question is whether changing to
>>> (defvar org-id-link-to-org-use-id)
>>> solves your problem.
>>
>> Thanks for your concern. By editing ob-tangle.el, I can confirm that
>> changing this does solve my problem.
>>
>> If I must, I could provide a reproducible example, but I feel like
>> that costs unnecessary effort on the part of everyone involved if we
>> agree on the above point.
>
> Let me clarify what I am worrying about.
> We have 132 occurrences of (defvar foo nil) in the code.
> I am genuinely surprised that changing defvar fixed the problem for you
> and at the same time nobody reported similar issues with the other 131
> defvars. That's why I really want to get a reproducer and understand
> what is going on there. So far, I don't understand how defvar can break
> anything except in case of some strange compilation/mixed installation
> problems.
I see. In my opinion those occurrences should be fixed even if no one
is reporting issues because it is bad/improper code, and it is not
especially surprising that no one has reported it yet; there is always a
first person who reports a bug, and there are always more old bugs to be
found in a big project like Emacs/Org mode.
This is annoying to reproduce because it relies on the normal Emacs
startup process, which loads packages. Anyway, I have found a reproduction.
This is using the Emacs install on Arch Linux.
GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
of 2021-03-26
Have the packages org-9.5.2 and org-contrib-0.3 installed in
~/.emacs.d/elpa. I have these installed from
https://elpa.gnu.org/packages/ and https://elpa.nongnu.org/nongnu/
respectively.
Start emacs by loading a tmp.el file with the contents provided below.
1. emacs -Q --load tmp.el
2. C-h v org-id-link-to-org-use-id
Note that the value is nil instead of the expected
'create-if-interactive
3. Press RET on the customize link.
Note that the Customize UI says "CHANGED outside Customize."
Expected behavior:
User sees org-id-link-to-org-use-id set to the value they saved in
Customize.
Personal aside:
It is easy to get subtle bugs in between autoloading, package activation
and Customize when some bit of code is not following all of the right
conventions. I suspect most Emacs users are adding setqs to their init
file until things work. Meanwhile I foolishly read and follow all of
the conventions and thus I make the above claim ("It is easy to get
subtle bugs...") from my experience running into other bugs like this one.
Hence my stance on fixing the aforementioned 132 occurrences, lest they
cause yet another subtle bug later on.
;; tmp.el starts here.
;; This is usually called by Emacs before loading init.el.
;; It is skipped when using -Q so we call it manually.
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html
(package-activate-all)
;; This is added to init.el and is the standard way user
;; customizations are saved/loaded.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-id-link-to-org-use-id 'create-if-interactive)
'(org-babel-load-languages '((emacs-lisp . t) (python . t) (shell . t))))
;; tmp.el ends here.
next prev parent reply other threads:[~2022-01-14 9:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 11:03 [BUG] ob-tangle overrides user customization of org-id-link-to-org-use-id [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)] Allen Li
2022-01-11 11:42 ` Ihor Radchenko
2022-01-11 18:53 ` Allen Li
2022-01-12 14:41 ` Ihor Radchenko
2022-01-13 7:43 ` Allen Li
2022-01-14 2:19 ` Ihor Radchenko
2022-01-14 9:50 ` Allen Li [this message]
2022-01-15 12:00 ` Ihor Radchenko
2022-01-25 5:20 ` Allen Li
2022-01-30 8:56 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80ilumeje9.fsf@felesatra.moe \
--to=darkfeline@felesatra.moe \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.