[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug: org-agenda-highlight-todo: Symbol’s function definition is void: st

From: Вячеслав Гришин
Subject: Bug: org-agenda-highlight-todo: Symbol’s function definition is void: string-empty-p [9.4.6 (9.4.6-11-g1ee52c-elpa @ /home/vmg/.emacs.d/elpa/org-20210726/)]
Date: Thu, 5 Aug 2021 00:36:55 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

I am grateful to you for your explanations and patience with my inexperience.
I made several mistakes, the main one being haste. I should have checked my 
emacs first..
The fact is that, in addition to the built-in version of orgmode, for some 
reason I installed another one.
Your recommendation helped: when I removed the extra (newer) version of Orgmode 
and removed the extraneous code from .emacs, everything worked.
Thank you for helping me master emacs — it is incredibly useful and hardly 

> I suspect that adding that line has actually hidden a larger problem.
> The above line is essentially telling emacs to load the subr-x package
> when your compiling an emacs-lisp file. However, your not compiling your
> .emacs file, so this will not have any effect unless your compiling your
> .emacs file. It is rarely worthwhile compiling your init file. Far
> better off to keep your init file relatively small and pushing
> complex/large configuration stuff into separate files which can be
> compiled. There are a number of complications you often need to deal
> with when compiling your init file and dealing with these often adds
> enough complexity to outweigh the any benefits to startup time, which
> are typically very small anyway.  
> The symptoms you are seeing are frequently seen with a broken org
> install. This can easily happen if you attempt to upgrade org when you
> already have org functions loaded. Basic problem is that you end up with
> a broken mixed installation with parts from the old version and parts
> from the upgraded version.
> Note that if the issue was as you described, many people would be
> experiencing this bug, but they aren't. This suggests the problem is
> local to your setup.  
> I would remove the upgraded org package and try re-installing. However,
> it is really important to make sure your .emacs does not call any org
> functions because this will load org during startup and then when you
> attempt to upgrade the package, you will get the same issue. This may
> require some re-organisation of your .emacs file - possibly wrapping org
> related code in an eval-after-load or using something like use-package
> etc.
> An easy way to verify which avoids large refactoring of your init file
> would be to comment out any org related configuration from your init
> file, restart emacs. upgrade org, uncomment what you commented and then
> restart emacs. 
>>  The org-agenda-highlight-todo function (org-agenda.el file) uses the
>>  string-empty-p function from the emacs-lisp/subr-x.el module, but
>>  somewhere is not done (require ' subr-x), so when calling the
>>  org-agenda-highlight-todo function, string-empty-p is not defined,
>>  which leads to an error — org-agenda-highlight-todo: Symbol’s function
>>  definition is void: string-empty-p
>>      2.
>>  For checking I called the emacs -Q and put in it scratch:
>>      (string-empty-p "test")
>>      (require 'subr-x)
>>  Then I executed the command
>>      C-x C-e
>>  on
>>      (require 'subr-x)
>>  output was
>>      Debugger entered--Lisp error: (void-function string-empty-p)
>>      (string-empty-p "test")
> When you did C-x C-e, either you evaluated the first sexp or it tried to
> evaluate all sexps in the scratch buffer, calling string-empty-p first
> and before require 'subr-x, so the library was not yet loaded and the
> function was not found. the require needs to be before functions from
> the required library are called. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]