[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: |
Arthur Miller |
Subject: |
Re: org-attach-sync uses directory-empty-p (new in Emacs 28) |
Date: |
Mon, 09 Aug 2021 09:10:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Kyle Meyer <kyle@kyleam.com> writes:
> Hi Marco,
>
> In 61e083732 (org-attach: Possibly delete empty attach directory,
> 2021-07-09), you added a call to directory-empty-p. This function was
> introduced in Emacs's 0806075520 (Add directory-empty-p and new argument
> COUNT for directory-files-*, 2020-11-02) and hasn't yet made it into a
> release.
>
> Could you update org-attach-sync to avoid using directory-empty-p (e.g.,
> by inlining it or by adding a compatibility alias)?
>
> Thanks.
Can this help:
#+begin_src emacs-lisp
(when (version< emacs-version "28")
(defun directory-empty-p (file-name)
"Check if a directory contains any other files then dot-files"
(when (file-directory-p file-name)
(null (directory-files file-name nil
directory-files-no-dot-files-regexp t)))))
#+end_src
- org-attach-sync uses directory-empty-p (new in Emacs 28), Kyle Meyer, 2021/08/08
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28),
Arthur Miller <=
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Marco Wahl, 2021/08/10
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Maxim Nikulin, 2021/08/11
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Marco Wahl, 2021/08/11
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Maxim Nikulin, 2021/08/12
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Marco Wahl, 2021/08/15
- Re: org-attach-sync uses directory-empty-p (new in Emacs 28), Maxim Nikulin, 2021/08/15