Ihor Radchenko <yanta...@gmail.com> writes:

> Allen Li <darkfel...@felesatra.moe> writes:
>
>> In ob-tangle.el, the line
>>
>> (defvar org-id-link-to-org-use-id nil) ; Dynamically scoped
>>
>> appears to override the user's customization of
>> org-id-link-to-org-use-id.
>
> Have you seen this happening?

Yes, that's why I filed the bug.

> FYI, defvar does not overwrite variable value that is already set.
> Try the following:
> (setq foo 'my-value) ;; foo = 'my-value
> (defvar foo 'value) ;; foo = 'my-value !!
> foo ;; foo still = 'my-value
>
> defvar only matters if the variable is not yet defined:
> bar ;; => error void-variable
> (defvar bar 'value) ;; bar = 'value

Yes, that is so.

Even if org-id-link-to-org-use-id were always set at this point, there
would be no reason to use

(defvar org-id-link-to-org-use-id nil)

instead of

(defvar org-id-link-to-org-use-id)

>
> Best,
> Ihor

Reply via email to