From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sLv3IwnVEGHvRAAAgWs5BA (envelope-from ) for ; Mon, 09 Aug 2021 09:11:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yA+uHwnVEGGQZgAA1q6Kng (envelope-from ) for ; Mon, 09 Aug 2021 07:11:05 +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 B8B2B17F9C for ; Mon, 9 Aug 2021 09:11:04 +0200 (CEST) Received: from localhost ([::1]:53212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCzR9-0003Xj-Gx for larch@yhetil.org; Mon, 09 Aug 2021 03:11:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCzQc-0003S6-3L for emacs-orgmode@gnu.org; Mon, 09 Aug 2021 03:10:30 -0400 Received: from mail-vi1eur05olkn2069.outbound.protection.outlook.com ([40.92.90.69]:2176 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCzQZ-00064R-6z for emacs-orgmode@gnu.org; Mon, 09 Aug 2021 03:10:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZM8WirQ+9Z9sW+NfTAO0JRoXgzZDDPJ3a6gRK2YPCvRTDC23cKDzjVs4J288fX7E283Sn2fe9lcTbFIXV+m+IPdmHg+G0CwcF5hIaj6WWkq7Bf4FLdM2xLCd29XA0+HVgq73qxKRBZ5q/qHXqgCppbMSpY7NXJyIyKeHSUUNJWL2hItyw7AclKpz/8gFiGHDwPMUvW+mbGNYmKM7SuoWzBfNy3s3S+HJfaG+0vgsDQ3QJFxPV40HbsKz6C92CJea5+QVJwzKuBd3EibePHf+LP0egfH7fWrVJLJUbuqstiFnJ2CLQP8NLuNl9RbCr731xCt5lT+BU2pJJo0HFxhrIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CsmfJDKDiyCVDXAUyIw1mlCEIb51ndjSZ21ekpE7WZA=; b=WLteiKERhNzyb6m10kmQah3lhNHcuAxrcog1wdK6Tl2DgMyse/ydY1oEnd6HKtk1O+KkvfbpwBS4+mBFoINlOIU8kttxCbkIeeLwko+6ORoiQfliaQ5N11N7Oc9qE/Q6pUqUdIOuOSIazwyAp/Mw4JKTLUGNsEy/6nQ9FzQdW+To0OCFReOAxl/3zxqQ2L6InVZdJHAudrnyX4XrfLmg9+g4djuxoLP97AQ3W7a6twkEc9XDzeEVRf+Kgt35fOIj/2D+ypHUi7n3GnKyAaudDzja0neh0c70+YO3JhTZZVgwf14zborKsyIQBXFZ5mp2lU1waAPpcNy8FtmU0wlmiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CsmfJDKDiyCVDXAUyIw1mlCEIb51ndjSZ21ekpE7WZA=; b=JG41Or8F7M+Yr487LQ7LsygRMMpYQvBsFQtTR0oLgAx0pdsPWCyzaNvybPSP5kPc+DqafarVvXvfM8ndRz9eIJ1oBIYCa5buNUz1Ybzo+GxPAjAntKGJpZDJjLtgRgmRMigd3vhVaRodDxRku3sh+/FwgpCWR3m41au7he2oJdy9L6rGMM+99cdWpWfjbxYKEnofkrEK115CC9D0cTBCa+oUNRSqt1YBLgzOSLhzW/RnEsvarE5xgOq6cjYWZXZESsLxEjyTCrUGdFtwz3VTsm6K1wwSRn2XJ+Lhj2dgcEAtPkW9xYD2oj+oP1b6ZHVzL1ZP94Xm7vkymzv8L3P3nQ== Received: from AM6EUR05FT066.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::52) by AM6EUR05HT181.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16; Mon, 9 Aug 2021 07:10:23 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc11::51) by AM6EUR05FT066.mail.protection.outlook.com (2a01:111:e400:fc11::108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16 via Frontend Transport; Mon, 9 Aug 2021 07:10:23 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:AB1E5EA9EEA51E5529170985CE10CD3C1E6FE7A140180B603E3D6FEBDD430F73; UpperCasedChecksum:F2638E8B12CA668EB72471ED6B30C9859A5FE3B7E427FC0AA734EF4BAC2A6B5D; SizeAsReceived:7431; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6558:f201:6d1a:3f39]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::6558:f201:6d1a:3f39%2]) with mapi id 15.20.4394.023; Mon, 9 Aug 2021 07:10:23 +0000 From: Arthur Miller To: Kyle Meyer Subject: Re: org-attach-sync uses directory-empty-p (new in Emacs 28) References: <87pmun8t2o.fsf@kyleam.com> Date: Mon, 09 Aug 2021 09:10:22 +0200 In-Reply-To: <87pmun8t2o.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 08 Aug 2021 18:33:51 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [MzwqJpAqGwLhbhIaLjmqvh0N6q+Ksd59] X-ClientProxiedBy: AM6P192CA0078.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::19) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87a6lrxfdt.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (81.232.177.30) by AM6P192CA0078.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Mon, 9 Aug 2021 07:10:22 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8510b0bc-9a14-4c26-1714-08d95b04c148 X-MS-TrafficTypeDiagnostic: AM6EUR05HT181: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KJJ3OtU86B+Mu6OThD8BMRVmG41PZCgcDraHTrNdpB2R8A3n2OH0o4upWiVOkSuGyVmSz9CjGPOe7ZuG2ruiDxNEdlrXRn1LXfL6Z0P/tWApnOUeCOwqNnMU6KYK9FX6jQihAKu1JX+oOkv7HZ/lrZslfz1wCVKMYd6H40zeY0uDcKZa0pNHq3uKWgvXVImcpMoUQ9xNswZLNDz2TN4XjMLBXxWGzeXFbmw5QqT0IH0SiOk3T2ORGmvlYOl3a/EZkqCFcXVGFK6qei2PEv0pKizO0m2AvmFKSjyAjvLJpD6w8RjhgJwmxHY/caI2Uh9kjdIwREfGGQOfbrUM0Yug3Dk7OG6n2ZOyCqDcNEprvaQ7g5A7ALHfvz2KIygJQ/gGQ1ZklRf8AO/yp+IoWtkeuUOTTe3QmTpkDM31eUs1D+TALfE7wiHKiGKzO9u9lyVS X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EvmjIB2lQfBvH481NwNHVxfT+uRW7EtN3x/PHiIg1HTl3eibnXz38qjQ0Ekhiews0KxfAzSdYEQPG5Pio/OTdeUMi2Ba7+fOC94YO+UqzFqREBrm063gCEqBL2ur/BuYGXfbamYEO7Rnuv2wQquqPw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8510b0bc-9a14-4c26-1714-08d95b04c148 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2021 07:10:23.4670 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT066.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT181 Received-SPF: pass client-ip=40.92.90.69; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: Marco Wahl , 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628493065; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CsmfJDKDiyCVDXAUyIw1mlCEIb51ndjSZ21ekpE7WZA=; b=tZX316YAAbwJ+4nSoyNIXa7UMWAZT9qDwivUcG1az7lii5lkFngOMn9eq7dEwEEmhRGcuT gUk/NrlvJysHimIt0kjMrNStFSU2gYpucCUVa9ZeuM+ULeHQ4fCABLR40LtjcBx+xfYBvo aPocu2tMuGYhAdPeCR56s2lZEfdY3HlFZJRSUYxyd3JkAKg6xp63eT55sEmZsCUBiwKgl5 dvBLaaVDRRUXtf6NdCpaA70gnlE6MRxJfsEisDZZNJ1dW0FGhS/xFUtMPIAB047t9E1l6M IZ0FqMzrVu49PnH5slplcA5QrTFLuZwzoo4AZKCADVClaVuL5TYHtdxF+XEkAg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1628493065; a=rsa-sha256; cv=pass; b=EhF8IirF6zJoYihbR4z00WEqE3PnigG5rMzRGbzlhRKiJQwRKmXEbfc9vGPGCrSUPIodaV sHeEL+gUczNXk0hcxF4KFXKO2SK0ooXB5/lJnecXnL6kBGasztbf2ISwPEM26FozA2L2pH dC3KnN+ODrszRM0EuTpsZKuQwSlWsAkEqAd2vPcMj8yisc9qEuZvakgbxuBSGCA6LjyTKo hvjZqrtToTSkM3jYoM1WTBY3bAageeAKJwthY12ud1vpz195OFV+cfMhwXsFmAOJ7/nwi/ 4D0R/5Q+JHKp3/Mwi+rn06/qcllWm/8M5nUM5Oypd67bG9Cuz8Cl71txaZlDUw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=JG41Or8F; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.com; 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: -4.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=live.com header.s=selector1 header.b=JG41Or8F; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=live.com; 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: B8B2B17F9C X-Spam-Score: -4.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: RRQfsNtFiRaE Kyle Meyer 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