[Top][All Lists]

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

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

From: Maxim Nikulin
Subject: Re: org-attach-sync uses directory-empty-p (new in Emacs 28)
Date: Sun, 15 Aug 2021 23:27:35 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 15/08/2021 16:11, Marco Wahl wrote:
Maxim Nikulin <manikulin@gmail.com> writes:

Compiling single /home/ubuntu/org-mode/lisp/org-compat.el...

In end of data:
org-compat.el:1255:1:Warning: the function ‘directory-empty-p’ is not
known to
      be defined.

I have never fought with this kind of problem. After looking at the
other constructs in the org-compat.el file, I have tried

(if (fboundp 'directory-empty-p)
     (defalias 'org-directory-empty-p #'directory-empty-p)
   (defun org-directory-empty-p (dir)
     ; ...

The latter suggestion landed in master a few minutes ago.

Thank you. The warning has disappeared for current master HEAD and Emacs-25.2.

Maybe a brief comment in org-compat.el clarifying usage of version comparison vs. `fboundp' would be helpful to avoid similar issues in future. E.g. I am unsure concerning simple < vs. version< (whether attempt of version check could cause a compatibility issue). Fortunately latest change does not use any of them.

reply via email to

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