From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KOZTDBr4E2F1LQAAgWs5BA (envelope-from ) for ; Wed, 11 Aug 2021 18:17:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yLIOCBr4E2F6dwAAbx9fmQ (envelope-from ) for ; Wed, 11 Aug 2021 16:17:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 79BF59DFE for ; Wed, 11 Aug 2021 18:17:29 +0200 (CEST) Received: from localhost ([::1]:58558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDqv2-0003tv-D1 for larch@yhetil.org; Wed, 11 Aug 2021 12:17:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDqtv-0003tO-Fk for emacs-orgmode@gnu.org; Wed, 11 Aug 2021 12:16:19 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:37745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDqtt-0007T9-V2 for emacs-orgmode@gnu.org; Wed, 11 Aug 2021 12:16:19 -0400 Received: by mail-lf1-x12d.google.com with SMTP id g30so6907347lfv.4 for ; Wed, 11 Aug 2021 09:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:newsgroups:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uUn2o1P0H3672Nr4PqBPFjEww8736WpaL4AwKJxeEwU=; b=Ym6j4iKqR3YAzCfzJ+MSbUiohyFCjQgZ48Sgdcqd50h3AwMwo0c0L8Io0uZZmES3Ju 1TgLrfMxjKZqnlF0lAkDSbw2RwU1e7gmNXDb0CC5XHzIWwuPUa69Yn3am0vpZ4X0VpSt /rDswSwMYNPLJkjwkaE5Fl0yCgJDRuugLhQSrr4+HmkDA2uoxgEzCtB74xYnHjcboQ+P xt/H3A1xHxn8g+xEPOBytRkz4kKnwrws0lwwEJCzXzypuukuVPaaNs9frO1L81/4qYyG xDFa14xCvqjMaL1X2NRGuNLn58QPcyemIBde/LEGgmwqd2rR6TrR9vEB5VqEaJBQR/VO l36w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:newsgroups:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=uUn2o1P0H3672Nr4PqBPFjEww8736WpaL4AwKJxeEwU=; b=JNE0P9nQuheS1c27DgrVxgC8+lfc60aLNR9j/1NCzTKN+aS29QQU9lpdKdcXwrSuMz WAxCAwZ6WIfy/FdMTHLVqLSy3jtZRTFidYwZ3LE8mY4DwFAo4aYBeMP3yxpV8OUB5pGg f/GERCH6KjnalasMQjfCoptJBza9uyjFKPdOQ3bM5I+LSgdJ/a5AysLp4oHaZe+Y44jj HtcLw6JXNUCjgeva0oVzGwxcNc4D+OWkPeR8JlRdU7Vx6efuom4TzqzklriFqoc1kDwC hG9+D0lOvyy4mh4FfSydI+8xmf/A20tRG+3mB716uwAOAHvI+01TOTqp8SkGk8juJvUE svlQ== X-Gm-Message-State: AOAM530NAbiAwSUtvKcvlw0c5UDZz+icxPyDqimXZwQjDG60zvaVyR1u u3XoCSQeK+ZHncnrGksjsuecJibTDSz5yg== X-Google-Smtp-Source: ABdhPJx2DgIX3KW/JaavvfarKYCtcJxLXHZOxsUnoCrhWOLMfnvspJe5wMhdgcLi0CNT2lQ+msJ63g== X-Received: by 2002:ac2:58e7:: with SMTP id v7mr3155170lfo.234.1628698575093; Wed, 11 Aug 2021 09:16:15 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id w9sm1308534ljw.81.2021.08.11.09.16.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 09:16:14 -0700 (PDT) Subject: Re: org-attach-sync uses directory-empty-p (new in Emacs 28) To: Marco Wahl Newsgroups: gmane.emacs.orgmode References: <87pmun8t2o.fsf@kyleam.com> <87lf593tv0.fsf@gmail.com> From: Maxim Nikulin Message-ID: <9dd6d3bf-46cc-31a2-aead-3af7d53e741c@gmail.com> Date: Wed, 11 Aug 2021 23:16:06 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87lf593tv0.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628698649; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=uUn2o1P0H3672Nr4PqBPFjEww8736WpaL4AwKJxeEwU=; b=q1EQvhq5/30dzrGNcfX74o2tK4MXLOY2dNiEgIOLFf6/+DoL7pmdyJIkerHt16265cCI8s 4ap0BUEoOD/93SLjWpJkDoE5mqBg4mVfVlve3U/XaTSptbCXYlPM6+4Hw0KeSLllWm3Af+ QVp2g6r2rtTpTUOXmdfbfTuZo/p/ImDiodNhRDssO+wIHD1P5/LTemmXEH22k1L9LX8MgL mi6RdakJy24G5VtJouorgbDXL2zdjTBJgUz8Ktx4tqIywGHv9Z3Z5uwWPY2MSun7ZIB4Rg AsxlwHzczvISCBp9v5qb9H3F5ajBoLi93CoDtGfx92y18WAVNUM19QJacQPxcA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628698649; a=rsa-sha256; cv=none; b=pi8rPwqW0XzFon6xxBLn+ik1EBVEXxzKh3oYZ2+KDsGNoEd3zmrAVAzmzTqrZakM8Dmpsr fD+AM5eylxDG7nc6rd+ckmvJ+P3yQ82mvrgZmsAERctva2wgkb5b75oN6nd0+7QixnoM2e /W3EpNBmGoI3K6ooOFKabJJVtV9NsMoHsoGjkF4vSRGlIj+oAJRRHyxwlDEIUCUjWK/twu 4MJB9JmPj5CSSUbRA4M4XEcfbngGaccuuc3b99stINqvDeHu5kz0LYVTd1HQNabgXrqEzL RIcpoiTwK48KpM0/GW0XEaL2KIK1flXgVS/C9doVO29oElrXTOZBnX09FtHX2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Ym6j4iKq; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Ym6j4iKq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 79BF59DFE X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: tbfWn0UUpOmh On 11/08/2021 03:52, Marco Wahl wrote: >> Kyle Meyer writes: >> >>> 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)? > > Starting from Arthur's suggestion and Kyle's hint to the compatibility > alias I put org-directory-empty-p into org-compat.el. So there is > org-directory-empty-p now which provides the functionality of > directory-empty-p from Emacs 28 for smaller version Emacsen. Unfortunately current code causes a compiler warning at least when Emacs-25.2 is used: 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.