X-Loop: help-debbugs@HIDDEN Subject: bug#49644: 27.2; copy-directory fails when Unix socket file is present in the source directory tree Resent-From: Pierre Rouleau <prouleau001@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 19 Jul 2021 15:05:01 +0000 Resent-Message-ID: <handler.49644.B.162670709132578 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 49644 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 49644 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.162670709132578 (code B ref -1); Mon, 19 Jul 2021 15:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jul 2021 15:04:51 +0000 Received: from localhost ([127.0.0.1]:59788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1m5Up9-0008TO-1p for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 11:04:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:40112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <prouleau001@HIDDEN>) id 1m5Up6-0008TG-N8 for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 11:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <prouleau001@HIDDEN>) id 1m5Up6-000709-Hd for bug-gnu-emacs@HIDDEN; Mon, 19 Jul 2021 11:04:48 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:36410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <prouleau001@HIDDEN>) id 1m5Up4-0008Jt-5A for bug-gnu-emacs@HIDDEN; Mon, 19 Jul 2021 11:04:48 -0400 Received: by mail-qt1-x836.google.com with SMTP id k9so1505165qtx.3 for <bug-gnu-emacs@HIDDEN>; Mon, 19 Jul 2021 08:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=d9OEU+JIv2MjFaP/kXNSr5hWpHZ80CPy2QdZhS9LWN8=; b=B8SwqRLl7XUDYJMSxXmfUSQFhX8N6O6lt02Uq/dcZL61qTv1m8F2+J4z85fB8TwN0o LZCEiVPV+YP9VQ1mhuP0q9ITon0jnsMgLojym/VzaSXgmPLB2nGSy72R2YbXo3gzJFdy 8g3FeLprNyuA7XFngRW+/n4ziO+NacWi4LGQFoKn3ehPCOFdE1N1KjKAz1ik6vbvN7bw Pt2tl0Fd0PqBRRXp7ssX1VjUy+2tZeIA3i+UAyXOpnJg9HzaXn7UYMQep65ppaJh+HiA Zt/ZE/4u+KuNu495d3q9hY65/81pJZy+aRhuQNO0VWfes2aofcWuoMMKRE4nxREVrNuO vYfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=d9OEU+JIv2MjFaP/kXNSr5hWpHZ80CPy2QdZhS9LWN8=; b=ZStoyhkBJXMdGXSk9qX/U7egOtIrWXepkv8DRf9wwgWamxZe01zEO0AiIZtlRgAkb3 bUPQXXJ5+5HdnIeTSQzNxOzbnqGKVprvXnu9sXMbSxSZL6eY2onqVi05QoDk8grpgir+ sSFxfHEfxc+LxAtJc7NXmcJZnldbOpAN9MEbub6W6b7TVb4w07wGN3CjQlhivXf3XOGN PdT1I/ys31V+YJSVc/6qjx1kbvf8pPhyd0KMIsGTYUlHEbRV9f6LFFQnoT/iJMtp9TjT csPViX7MAlCwSrDYqL8u79GD5W/57Q04uxkPRoRFhcmFXlAmAkVtWkajuaekxYhV4QUz q49Q== X-Gm-Message-State: AOAM532reAjb82Z+JnETga49E4X6mJtnL+emILJ8E6rLgJwYgplGr2Bd 4YlmJAJJkDs+16QEd4pOaTr6I02idtg= X-Google-Smtp-Source: ABdhPJynqkQYx5+Yrg5sYNZNktvDW72kwJhNDO04cpJVWntBdItTUkPhMYsioObw8ftzP55Ak/prSA== X-Received: by 2002:ac8:5752:: with SMTP id 18mr13613100qtx.298.1626707082546; Mon, 19 Jul 2021 08:04:42 -0700 (PDT) Received: from [192.168.0.158] (modemcable082.211-161-184.mc.videotron.ca. [184.161.211.82]) by smtp.gmail.com with ESMTPSA id a24sm6845347qtj.43.2021.07.19.08.04.41 for <bug-gnu-emacs@HIDDEN> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jul 2021 08:04:41 -0700 (PDT) From: Pierre Rouleau <prouleau001@HIDDEN> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Message-Id: <EDC76903-A7BE-445C-904A-CF0B6D22ED37@HIDDEN> Date: Mon, 19 Jul 2021 11:04:39 -0400 X-Mailer: Apple Mail (2.3445.104.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=prouleau001@HIDDEN; helo=mail-qt1-x836.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) There is no Emacs crash involved here. It's just a feature request. Try `copy-directory' on a directory tree that contains one Unix socket. Something like "~/elpa/gnupg" which often contains Unix socket files. This will fail with an error stating that the Unix socket cannot be copied. Although its true that Unix sockets cannot be copied, it would be nice to offer the users the ability to copy the directory tree anyway, skipping the Unix socket files. The function `copy-directory' does not provide a mechanism to skip the copy of such files, so it becomes impossible to copy a directory tree that contains such a file. It would be useful to add argument to provide the ability to skip such files. Currently, the only way is to override or advise the function `copy-file' when using `copy-directory'. The cond clause at the end of `copy-directory' only supports directories, symbolic links and normal files. It does not support Unix socket, which cannot be copied. In some conditions users may want to copy the directory tree even in the presence of Unix socket files. Adding an optional argument for that would increase the usefulness of the function while allowing user's code to document the fact that they want (or don't want) to skip things like Unix sockets. The latest version of files.el code in https://github.com/emacs-mirror/emacs/blob/master/lisp/files.el#L6148=20 still behaves like this. In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0) of 2021-03-25 built on Mojave System Description: Mac OS X 10.14.6 Recent messages: Generating autoloads for ztree-view.el...done INFO Scraping files for pel-bundle-autoloads.el...100%=20 Generating autoloads for ztree.el...done INFO Scraping files for pel-bundle-autoloads.el...done Wrote /Users/roup/.emacs.d/pel-bundle/pel-bundle-autoloads.el [2 times] Restart Emacs to complete the process! Type "q" in help window to delete it. mouse-2, RET: find function's definition \ is undefined uncompressing files.el.gz...done Configured using: 'configure --disable-silent-rules --enable-locallisppath=3D/usr/local/share/emacs/site-lisp --infodir=3D/usr/local/Cellar/emacs/27.2/share/info/emacs --prefix=3D/usr/local/Cellar/emacs/27.2 --with-gnutls --without-x --with-xml2 --without-dbus --with-modules --without-ns --without-imagemagick --without-selinux' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB MODULES THREADS JSON PDUMPER GMP Important settings: value of $LANG: en_CA.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: ido-everywhere: t which-key-mode: t winner-mode: t key-chord-mode: t lispy-mode: t flyspell-mode: t superword-mode: t global-anzu-mode: t anzu-mode: t recentf-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /Users/roup/.emacs.d/utils/origami hides = /Users/roup/.emacs.d/elpa/origami-20200331.1019/origami /Users/roup/.emacs.d/utils/origami-parsers hides = /Users/roup/.emacs.d/elpa/origami-20200331.1019/origami-parsers /Users/roup/.emacs.d/utils/sr-speedbar hides = /Users/roup/.emacs.d/elpa/sr-speedbar-20161025.831/sr-speedbar /Users/roup/.emacs.d/elpa/lispy-20210121.926/elpa hides = /Users/roup/.emacs.d/elpa/ivy-20210602.1349/elpa /Users/roup/.emacs.d/elpa/lfe-mode-20210603.1241/lfe-indent hides = /usr/local/share/emacs/site-lisp/lfe/lfe-indent /Users/roup/.emacs.d/elpa/lfe-mode-20210603.1241/lfe-mode hides = /usr/local/share/emacs/site-lisp/lfe/lfe-mode /Users/roup/.emacs.d/elpa/lfe-mode-20210603.1241/inferior-lfe hides = /usr/local/share/emacs/site-lisp/lfe/inferior-lfe /Users/roup/.emacs.d/elpa/rtags-20210313.1541/rtags hides = /usr/local/share/emacs/site-lisp/rtags/rtags /Users/roup/.emacs.d/elpa/rtags-xref-20200310.1909/rtags-xref hides = /usr/local/share/emacs/site-lisp/rtags/rtags-xref /Users/roup/.emacs.d/elpa/seq-2.22/seq hides = /usr/local/Cellar/emacs/27.2/share/emacs/27.2/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils jka-compr windmove eieio-opt warnings emacros autoload lisp-mnt pel-setup pel-package pel-elpa pel-filedir smex time benchmark-init-modes pel-benchmark ace-link pel-skels-generic counsel xdg dired-x dired dired-loaddefs compile comint ansi-color ido-grid ido pel-completion pel-seq which-key winner pel-xref pel-text-transform pel-read pel-navigate pel-scroll key-seq pel-key-chord key-chord term/xterm xterm tempo pel-skels-elisp pel-text-insert pel-window pel-tempo pel-skels pel-prompt lispy pcase swiper cl-extra ivy flx ivy-faces ivy-overlay colir color delsel lispy-inline avy noutline outline easy-mmode etags fileloop generator xref project edebug backtrace help-fns radix-tree help-mode lispy-tags mode-local find-func pel__hydra hydra ring lv pel-lispy regexp-opt flyspell pel-spell ispell cap-words superword subword imenu+ pel-imenu imenu pel_keys anzu advice thingatpt recentf tree-widget wid-edit speedbar sb-image ezimage image dframe pel-autoload pel--keys-macros pel--options pel--macros pel--base pel finder-inf info tool-bar edmacro kmacro package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue multi-tty make-network-process emacs) Memory information: ((conses 16 443285 23771) (symbols 48 29623 1) (strings 32 142354 5578) (string-bytes 1 4079491) (vectors 16 39237) (vector-slots 8 884160 78722) (floats 8 267 653) (intervals 56 762 0) (buffers 1000 16))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Pierre Rouleau <prouleau001@HIDDEN> Subject: bug#49644: Acknowledgement (27.2; copy-directory fails when Unix socket file is present in the source directory tree) Message-ID: <handler.49644.B.162670709132578.ack <at> debbugs.gnu.org> References: <EDC76903-A7BE-445C-904A-CF0B6D22ED37@HIDDEN> X-Gnu-PR-Message: ack 49644 X-Gnu-PR-Package: emacs Reply-To: 49644 <at> debbugs.gnu.org Date: Mon, 19 Jul 2021 15:05:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 49644 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 49644: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49644 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#49644: 27.2; copy-directory fails when Unix socket file is present in the source directory tree Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 19 Jul 2021 16:12:01 +0000 Resent-Message-ID: <handler.49644.B49644.16267110659007 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 49644 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Pierre Rouleau <prouleau001@HIDDEN> Cc: 49644 <at> debbugs.gnu.org Received: via spool by 49644-submit <at> debbugs.gnu.org id=B49644.16267110659007 (code B ref 49644); Mon, 19 Jul 2021 16:12:01 +0000 Received: (at 49644) by debbugs.gnu.org; 19 Jul 2021 16:11:05 +0000 Received: from localhost ([127.0.0.1]:60095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1m5VrF-0002LC-2H for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 12:11:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1m5VrE-0002Kk-3o for 49644 <at> debbugs.gnu.org; Mon, 19 Jul 2021 12:11:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47890) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1m5Vr8-0002rN-KR; Mon, 19 Jul 2021 12:10:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3450 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1m5Vr8-0003b7-6T; Mon, 19 Jul 2021 12:10:58 -0400 Date: Mon, 19 Jul 2021 19:10:52 +0300 Message-Id: <83zgui5lo3.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <EDC76903-A7BE-445C-904A-CF0B6D22ED37@HIDDEN> (message from Pierre Rouleau on Mon, 19 Jul 2021 11:04:39 -0400) References: <EDC76903-A7BE-445C-904A-CF0B6D22ED37@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Pierre Rouleau <prouleau001@HIDDEN> > Date: Mon, 19 Jul 2021 11:04:39 -0400 > > There is no Emacs crash involved here. It's just a feature request. > > Try `copy-directory' on a directory tree that contains one Unix socket. > Something like "~/elpa/gnupg" which often contains Unix socket files. > This will fail with an error stating that the Unix socket cannot be > copied. > > Although its true that Unix sockets cannot be copied, it would be nice > to offer the users the ability to copy the directory tree anyway, > skipping the Unix socket files. > > The function `copy-directory' does not provide a mechanism to skip the > copy of such files, so it becomes impossible to copy a directory tree > that contains such a file. It would be useful to add argument to > provide the ability to skip such files. Currently, the only way is to > override or advise the function `copy-file' when using `copy-directory'. I think it would be more useful to add an optional behavior whereby any file that cannot be copied for some reason would not terminate the copy. There's no need to allow such tolerance only for sockets. I could imagine a huge file that cannot be copied because the target directory doesn't have enough space, for example. Perhaps ask the user whether to continue, when a copy fails, or provide a user option
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.