emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: 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: Wed, 04 Aug 2021 11:41:43 +1000	[thread overview]
Message-ID: <87im0mq77j.fsf@gmail.com> (raw)
In-Reply-To: <09a29a60-b254-9207-0d44-eaf0b1ba964b@ya.ru>

Вячеслав Гришин <w201403@ya.ru> writes:

> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
>      https://orgmode.org/manual/Feedback.html#Feedback
> Your bug report will be posted to the Org mailing list.
> ------------------------------------------------------------------------
> 	1.
>  I updated orgmode package and trying to org-agenda-list, as usual. But failed with mistake  — org-agenda-list was empty.
>  After investigation, I took advice to put this:
> 	;; NB If you want to use this library, it's almost always correct to use:
> 	(eval-when-compile (require 'subr-x))
>  in the beginning of .emacs. And it worked. Org-agenda-list was fine.

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

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	other threads:[~2021-08-04  2:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 15:24 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/)] Вячеслав Гришин
2021-08-04  1:41 ` Tim Cross [this message]
2021-08-04 21:36   ` Вячеслав Гришин
2021-08-04 15:20 ` [PATCH] org-agenda.el: Avoid dependency on subr-x Maxim Nikulin
2021-08-04 21:41   ` Вячеслав Гришин
2021-08-05 17:04     ` Maxim Nikulin
2021-08-04 22:11   ` Tim Cross
2021-08-05 11:55     ` Maxim Nikulin
2021-08-05 12:59   ` Timothy
2021-08-06 17:10     ` Maxim Nikulin
2021-08-06 20:30       ` Timothy

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87im0mq77j.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).