Worked as expected

Sent from my iPhone

> On Dec 26, 2025, at 10:29 AM, Ihor Radchenko <[email protected]> wrote:
> 
> Naresh Gurbuxani <[email protected]> writes:
> 
>> At the time of export, my default is not to evaluate code blocks.  But I
>> want some code blocks to be evaluated.  For example:
>> 
>> #+TITLE: Worg Setup
>> #+PROPERTY: header-args :eval never-export
>> 
>> #+name: years-since
>> #+begin_src emacs-lisp :exports none :var when=1985 :eval yes
>>  (number-to-string (- (string-to-number
>>                (format-time-string "%Y" (current-time))) when))
>> #+end_src
>> 
>> GNU Emacs has been flourishing for call_years-since() years.
>> 
>> Export to latex (C-c C-c l p) ignores ":eval yes" setting.  Commenting
>> out PROPERTY line, then reexporting does evaluate the call and replaces
>> it with 40.  My org-confirm-babel-evaluate variable value is t.
>> 
>> What changes are needed in above org document?
> 
> Header argument value in src block are distinct from your call. See 16.5
> Evaluating Code Blocks section of the manual. You need
> 
>    GNU Emacs has been flourishing for call_years-since[:eval yes]() years.
> 
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> 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>

Reply via email to