From unknown Sun Aug 10 00:25:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47135 <47135@debbugs.gnu.org> To: bug#47135 <47135@debbugs.gnu.org> Subject: Status: 28.0.50; move to trash does not work if symlink is in Trash Reply-To: bug#47135 <47135@debbugs.gnu.org> Date: Sun, 10 Aug 2025 07:25:21 +0000 retitle 47135 28.0.50; move to trash does not work if symlink is in Trash reassign 47135 emacs submitter 47135 Jean Louis severity 47135 minor tag 47135 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 14 05:09:37 2021 Received: (at submit) by debbugs.gnu.org; 14 Mar 2021 09:09:37 +0000 Received: from localhost ([127.0.0.1]:32954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLMkj-0002Yz-7q for submit@debbugs.gnu.org; Sun, 14 Mar 2021 05:09:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:35590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLMkd-0002Yo-Re for submit@debbugs.gnu.org; Sun, 14 Mar 2021 05:09:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLMkd-0005IW-88 for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 05:09:31 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:43761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLMkb-00031p-3H for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 05:09:30 -0400 Received: from localhost ([::ffff:41.210.141.35]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E079.00000000604DD2C5.00004C80; Sun, 14 Mar 2021 02:09:24 -0700 From: Jean Louis To: bug-gnu-emacs@gnu.org Subject: 28.0.50; move to trash does not work if symlink is in Trash X-Hashcash: 1:20:210314:bug-gnu-emacs@gnu.org::S6flTMTqk1YJE8rF:00000000000000000000000000000000000000009MNo Date: Sun, 14 Mar 2021 12:06:37 +0300 Message-ID: <86im5udrz6.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.170.207.13; envelope-from=admin@protected.rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) IMHO, deleting file with the variable `delete-by-moving-to-trash' as T should always work. Here I have discovered condition when it does not work. In my trash there is this file: lrwxrwxrwx 1 175 Jun 18 2019 Rock-and-Mineral-Identification.pdf -> /ho= me/admin/Books/Geology/Rock-and-Mineral-Identification.pdf And then I have the directory, /home/admin/other/ where one can see this file: D -rw------- 1 5.6M Aug 13 2018 Rock-and-Mineral-Identification.pdf if I try to delete with x, I get this message: file-already-exists: File already exists: /home/data1/protected/tmp/Trash/Rock-and-Mineral-Identification.pdf But it is irrelevant, it should move the deleted file to trash. In GNU Emacs 28.0.50 (build 8, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.14.8, Xaw3d scroll bars) of 2021-03-07 built on protected.rcdrun.com Repository revision: 468bb5ab7f949441f68c4133fcd5292dfbbfd83d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11907000 System Description: Hyperbola GNU/Linux-libre Configured using: 'configure --with-x-toolkit=3Dlucid PKG_CONFIG_PATH=3D/home/data1/protected/GNUstep/Library/Libraries/pkgconfi= g:/usr/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=3Dexwm-xim locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort hashcash mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar 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 button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 54147 7034) (symbols 48 7205 0) (strings 32 20233 1994) (string-bytes 1 646570) (vectors 16 13617) (vector-slots 8 230403 16423) (floats 8 26 42) (intervals 56 240 0) (buffers 992 11)) --=20 Thanks, Jean Louis =E2=8E=94 =CE=BB =F0=9F=84=AF =F0=9D=8D=84 =F0=9D=8C=A1 =F0=9D=8C=9A From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 18 02:16:22 2021 Received: (at 47135) by debbugs.gnu.org; 18 Mar 2021 06:16:22 +0000 Received: from localhost ([127.0.0.1]:44689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMlxG-0005E7-I7 for submit@debbugs.gnu.org; Thu, 18 Mar 2021 02:16:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMlxB-0005Dd-Op for 47135@debbugs.gnu.org; Thu, 18 Mar 2021 02:16:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IHpIyCAjgRr4EXRhEVxV0x5r4bnOC29jX4se9q9kuLA=; b=AFDuZv/zKCgWqJQ30bntte8XlR 6fI+6+acrsbEOvx0fdceTCrYdSDSqWk132aVlWtRMBk6ASw3Ak8c1wryn2+3NMJPh+aK7GilXwPOL WAJBOM1SH7ixUyVPtU0ys65FrTbKhZ1VRS5U53JAsR5oonRt9nqsSMTo6eHF6tUHD5iI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMlx2-0000Rb-N8; Thu, 18 Mar 2021 07:16:11 +0100 From: Lars Ingebrigtsen To: Jean Louis Subject: Re: bug#47135: 28.0.50; move to trash does not work if symlink is in Trash References: <86im5udrz6.fsf@protected.rcdrun.com> X-Now-Playing: =?utf-8?Q?A=CE=A3TYTEKK=2C?= Levadian Hater's _Natural Sciences: Age in Decline_: "Bich Contest" Date: Thu, 18 Mar 2021 07:16:07 +0100 In-Reply-To: <86im5udrz6.fsf@protected.rcdrun.com> (Jean Louis's message of "Sun, 14 Mar 2021 12:06:37 +0300") Message-ID: <87o8fhrnq0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Jean Louis writes: > Here I have discovered condition when it does not work. > > In my trash there is this file: > > lrwxrwxrwx 1 175 Jun 18 2019 Rock-and-Mineral-Identification.pdf -> /home/admin/Books/Geology/Rock-and [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47135 Cc: 47135@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jean Louis writes: > Here I have discovered condition when it does not work. > > In my trash there is this file: > > lrwxrwxrwx 1 175 Jun 18 2019 Rock-and-Mineral-Identification.pdf -> /home/admin/Books/Geology/Rock-and-Mineral-Identification.pdf > > And then I have the directory, /home/admin/other/ where one can see this > file: > > D -rw------- 1 5.6M Aug 13 2018 Rock-and-Mineral-Identification.pdf > > if I try to delete with x, I get this message: > > file-already-exists: File already exists: > /home/data1/protected/tmp/Trash/Rock-and-Mineral-Identification.pdf The problem is more general -- any file that exists already in the trash directory leads to this problem. To test: touch /home/larsi/.local/share/Trash/files/foo touch /tmp/foo Then "d" the file in dired, and x, and then you'll get the error. That's because the code in move-file-to-trash only checks whether the .trashinfo file exists: ;; Make a .trashinfo file. Use O_EXCL, as per trash-spec 1.0. (let* ((files-base (file-name-nondirectory fn)) (info-fn (expand-file-name (concat files-base ".trashinfo") trash-info-dir))) (condition-case nil (write-region nil nil info-fn nil 'quiet info-fn 'excl) (file-already-exists ;; Uniquify new-fn. Some file managers do not ;; like Emacs-style backup file names. E.g.: ;; https://bugs.kde.org/170956 (setq info-fn (make-temp-file (expand-file-name files-base trash-info-dir) nil ".trashinfo")) (setq files-base (substring (file-name-nondirectory info-fn) 0 (- (length ".trashinfo")))) And then creates a new, unique name. A .trashinfo file should exist, of course, but here the Trash directory is out of sync, and Emacs should handle that better, I guess. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 18 02:36:42 2021 Received: (at 47135) by debbugs.gnu.org; 18 Mar 2021 06:36:42 +0000 Received: from localhost ([127.0.0.1]:44749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMmGw-0005l6-DY for submit@debbugs.gnu.org; Thu, 18 Mar 2021 02:36:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMmGu-0005ko-AX for 47135@debbugs.gnu.org; Thu, 18 Mar 2021 02:36:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=m8BNJ5JYHhfZ7ck9bM+RRKcVS5HC9UDk7GhwaKH0JQ0=; b=EChQsRB2mqIpl0hJPDcIBoY9cn 862tS2pTnnBS+QHKVjm/xT9ZDhioXG+PyJRF2PL1nYQRA2skRcvT7+DaVZBMUaCgMVG7D/NX0JEb/ yI7QRRAhU0SWsyWZZ4l5K9cEIUoRACAiYRHNWoZtXNSeSvD2o5ZQZIbEe2F7/6ANi1mM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMmGl-0000cm-M1; Thu, 18 Mar 2021 07:36:34 +0100 From: Lars Ingebrigtsen To: Jean Louis Subject: Re: bug#47135: 28.0.50; move to trash does not work if symlink is in Trash References: <86im5udrz6.fsf@protected.rcdrun.com> <87o8fhrnq0.fsf@gnus.org> X-Now-Playing: NASTYTEKK's _Natural Sciences: Age in Decline_: "God Got Gun" Date: Thu, 18 Mar 2021 07:36:30 +0100 In-Reply-To: <87o8fhrnq0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 18 Mar 2021 07:16:07 +0100") Message-ID: <87ft0trms1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > And then creates a new, unique name. A .trashinfo file should exist, of > course, but here the Trash directory is out of sync, and Emacs should > handle that better, I guess. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47135 Cc: 47135@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > And then creates a new, unique name. A .trashinfo file should exist, of > course, but here the Trash directory is out of sync, and Emacs should > handle that better, I guess. This should now be fixed in Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 18 02:36:49 2021 Received: (at control) by debbugs.gnu.org; 18 Mar 2021 06:36:49 +0000 Received: from localhost ([127.0.0.1]:44752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMmH3-0005lP-JJ for submit@debbugs.gnu.org; Thu, 18 Mar 2021 02:36:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMmH1-0005lC-T5 for control@debbugs.gnu.org; Thu, 18 Mar 2021 02:36:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J3MRXIrcUdok7uvNhgr81FiHylqfBJdh8inuKUZDzHs=; b=jhqpNYgVOBpIbxyHfET6PtN19j BhbKy1yctAGd4KESAciLU5/5PfJFzM6BgkEk0+gsB5XxTgm+UkoqCyMFqwrpdcHY+B6tb7XxOkB0A FKHLCQK2u0L90k8PSn/Jr4TioS3KlnDMCNPImmTnq/cZcytRcpL90oU8qLdyNoO2Se1c=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMmGu-0000cs-9C for control@debbugs.gnu.org; Thu, 18 Mar 2021 07:36:42 +0100 Date: Thu, 18 Mar 2021 07:36:39 +0100 Message-Id: <87eegdrmrs.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47135 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47135 fixed close 47135 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47135 fixed close 47135 28.1 quit From unknown Sun Aug 10 00:25:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 15 Apr 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator