Debbugs Internal Request <help-debbugs@HIDDEN>
to internal_control <at> debbugs.gnu.org
.
Full text available.Received: (at 60462) by debbugs.gnu.org; 2 Jan 2023 03:36:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 22:36:15 2023 Received: from localhost ([127.0.0.1]:42188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pCBcU-0003C7-TU for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 22:36:15 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:55877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bugs@HIDDEN>) id 1pCBcS-0003By-Fv for 60462 <at> debbugs.gnu.org; Sun, 01 Jan 2023 22:36:13 -0500 Received: from localhost ([::ffff:102.85.231.176]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D61.0000000063B2512D.00005755; Sun, 01 Jan 2023 20:36:13 -0700 Date: Mon, 2 Jan 2023 06:34:19 +0300 From: Jean Louis <bugs@HIDDEN> To: Ruijie Yu <ruijie@HIDDEN> Subject: Re: bug#60462: 30.0.50; [FR] avoid putting remote files to local trash Message-ID: <Y7JQu9ddeL5CEH3+@protected.localdomain> References: <sdv4jtb8cw6.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <sdv4jtb8cw6.fsf@HIDDEN> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60462 Cc: 60462 <at> debbugs.gnu.org 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: -1.0 (-) * Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs@HIDDEN> [2023-01-01 11:37]: > I have been organizing my files lately over multiple devices using > tramp. One issue I find with my current setup is that since I set > `delete-by-moving-to-trash' to t, all files, even the remote ones, are > moved to my trash directory. Which does not make sense, and which should be user option. Look at this bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56511 Where Lars said: > As the doc string of move-file-to-trash says: > If the function `system-move-file-to-trash' is defined, call it > with FILENAME as an argument. > So just define a function that checks whether FILENAME is a Tramp > file name or not, and delete the file if it is, but trash otherwise. IMHO, in my opinion there will be always more users that know how to use M-x customize, but not know how to define functions. I don't think that decision to delete remote files to trash is user friendly in the first place, and that people using M-x customize are supposed to even understand "only when the function `system-move-file-to-trash' is not defined". Defined by who? What would that mean for somebody who is not Emacs Lisp programmer?! Probably nothing. User remains helpless here. Hide Trash Directory: Choice: Value Menu Directory: /home/data1/protected/tmp/Wastebasket/ State : SAVED and set. Directory for ‘move-file-to-trash’ to move files and directories to. Hide This directory is used only when the function ‘system-move-file-to-trash’ is not defined. Relative paths are interpreted relative to ‘default-directory’. If the value is nil, Emacs uses a freedesktop.org-style trashcan. I have define my `system-move-file-to-trash' as following, so the problem is solved individually. (defun system-move-file-to-trash (filename) "Delete only local files. This is custom local function as recommended by `move-file-to-trash'." (cond ((file-remote-p filename) (delete-file filename)) ((and trash-directory (not (string-prefix-p (directory-file-name (file-name-nondirectory (expand-file-name filename))) trash-directory))) (make-directory (file-name-as-directory trash-directory) t) (rename-file filename (file-name-as-directory trash-directory) t)) (t (when (y-or-n-p (format "Delete `%s'? ")) (delete-file filename))))) However, as you have found out, and I have found out, this problem is likely to be discovered over and over again by new Tramp users who wish to use Wastebasket. > This, unfortunately, harms my workflow because the files I wanted to > delete include some random multi-gig files, as well as many .git > directories, both of which greatly bottleneck my file-deletion process. > I also don't want to disable trashing globally, because I think putting > local files to trash (which do not introduce a significant delay) is > still a good idea. That is how I work as well. > 1. Allow the user to disable "moving to local trash" only for remote > files. I imagine this would entail allowing the user to set > `delete-by-moving-to-trash' to 'local, and modifying `delete-file', > `delete-directory', `dired-internal-do-deletions' among other functions > accordingly. Alternatively we can have a dedicated variable for this > purpose. Good ideas, I wish it could be adopted to become user friendly, one mouse click and customization and user can be sure that remote files will not be moved to local Trash. However we have to think that some users may be using only remote files and that Trash could eventually be remote as well, right? -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
bug-gnu-emacs@HIDDEN
:bug#60462
; Package emacs
.
Full text available.Received: (at 60462-done) by debbugs.gnu.org; 1 Jan 2023 20:37:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 15:37:49 2023 Received: from localhost ([127.0.0.1]:41845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pC55Z-0000fr-4l for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 15:37:49 -0500 Received: from netyu.xyz ([152.44.41.246]:36996 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ruijie@HIDDEN>) id 1pBzJS-0006hD-57; Sun, 01 Jan 2023 09:27:47 -0500 Received: from fw.net.yu.netyu.xyz (<unknown> [73.133.126.255]) by netyu.xyz (OpenSMTPD) with ESMTPSA id a553274f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 1 Jan 2023 14:27:44 +0000 (UTC) References: <sdv4jtb8cw6.fsf@HIDDEN> User-agent: mu4e 1.8.13; emacs 30.0.50 From: Ruijie Yu <ruijie@HIDDEN> To: 60462 <at> debbugs.gnu.org Subject: Re: bug#60462: 30.0.50; [FR] avoid putting remote files to local trash Date: Sun, 01 Jan 2023 08:20:18 -0600 In-reply-to: <sdv4jtb8cw6.fsf@HIDDEN> Message-ID: <sdvzgb272l0.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60462-done X-Mailman-Approved-At: Sun, 01 Jan 2023 15:37:46 -0500 Cc: 60462-done <at> debbugs.gnu.org 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: 0.0 (/) Sorry about the duplicated bug. I sent the first email two days ago and the mail never showed up, so I figured I had forgotten to send it and sent again. The bug-tracker doc doesn't say whether the bug-opener (me) can close the bug, so I'll try to close it via CC. If I cannot close the bug, can someone who can close bugs close this? Closing in favor of bug#60460. Best, RY
Ruijie Yu <ruijie@HIDDEN>
:Ruijie Yu <ruijie@HIDDEN>
:Received: (at 60462-done) by debbugs.gnu.org; 1 Jan 2023 20:37:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 15:37:49 2023 Received: from localhost ([127.0.0.1]:41845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pC55Z-0000fr-4l for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 15:37:49 -0500 Received: from netyu.xyz ([152.44.41.246]:36996 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ruijie@HIDDEN>) id 1pBzJS-0006hD-57; Sun, 01 Jan 2023 09:27:47 -0500 Received: from fw.net.yu.netyu.xyz (<unknown> [73.133.126.255]) by netyu.xyz (OpenSMTPD) with ESMTPSA id a553274f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 1 Jan 2023 14:27:44 +0000 (UTC) References: <sdv4jtb8cw6.fsf@HIDDEN> User-agent: mu4e 1.8.13; emacs 30.0.50 From: Ruijie Yu <ruijie@HIDDEN> To: 60462 <at> debbugs.gnu.org Subject: Re: bug#60462: 30.0.50; [FR] avoid putting remote files to local trash Date: Sun, 01 Jan 2023 08:20:18 -0600 In-reply-to: <sdv4jtb8cw6.fsf@HIDDEN> Message-ID: <sdvzgb272l0.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60462-done X-Mailman-Approved-At: Sun, 01 Jan 2023 15:37:46 -0500 Cc: 60462-done <at> debbugs.gnu.org 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: 0.0 (/) Sorry about the duplicated bug. I sent the first email two days ago and the mail never showed up, so I figured I had forgotten to send it and sent again. The bug-tracker doc doesn't say whether the bug-opener (me) can close the bug, so I'll try to close it via CC. If I cannot close the bug, can someone who can close bugs close this? Closing in favor of bug#60460. Best, RY
Ruijie Yu <ruijie@HIDDEN>
:Ruijie Yu <ruijie@HIDDEN>
:Received: (at 60462) by debbugs.gnu.org; 1 Jan 2023 20:37:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 15:37:49 2023 Received: from localhost ([127.0.0.1]:41843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pC55Y-0000fk-RU for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 15:37:49 -0500 Received: from netyu.xyz ([152.44.41.246]:36996 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ruijie@HIDDEN>) id 1pBzJS-0006hD-57; Sun, 01 Jan 2023 09:27:47 -0500 Received: from fw.net.yu.netyu.xyz (<unknown> [73.133.126.255]) by netyu.xyz (OpenSMTPD) with ESMTPSA id a553274f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 1 Jan 2023 14:27:44 +0000 (UTC) References: <sdv4jtb8cw6.fsf@HIDDEN> User-agent: mu4e 1.8.13; emacs 30.0.50 From: Ruijie Yu <ruijie@HIDDEN> To: 60462 <at> debbugs.gnu.org Subject: Re: bug#60462: 30.0.50; [FR] avoid putting remote files to local trash Date: Sun, 01 Jan 2023 08:20:18 -0600 In-reply-to: <sdv4jtb8cw6.fsf@HIDDEN> Message-ID: <sdvzgb272l0.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60462 X-Mailman-Approved-At: Sun, 01 Jan 2023 15:37:46 -0500 Cc: 60462-done <at> debbugs.gnu.org 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: 0.0 (/) Sorry about the duplicated bug. I sent the first email two days ago and the mail never showed up, so I figured I had forgotten to send it and sent again. The bug-tracker doc doesn't say whether the bug-opener (me) can close the bug, so I'll try to close it via CC. If I cannot close the bug, can someone who can close bugs close this? Closing in favor of bug#60460. Best, RY
bug-gnu-emacs@HIDDEN
:bug#60462
; Package emacs
.
Full text available.Michael Albinus <michael.albinus@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at submit) by debbugs.gnu.org; 1 Jan 2023 08:35:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 01 03:35:38 2023 Received: from localhost ([127.0.0.1]:40257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBtof-0001Cv-Md for submit <at> debbugs.gnu.org; Sun, 01 Jan 2023 03:35:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:46382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ruijie@HIDDEN>) id 1pBjiY-0000sg-Br for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 16:48:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ruijie@HIDDEN>) id 1pBjiW-00053y-RT for bug-gnu-emacs@HIDDEN; Sat, 31 Dec 2022 16:48:38 -0500 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ruijie@HIDDEN>) id 1pBjiV-0001dS-2Y for bug-gnu-emacs@HIDDEN; Sat, 31 Dec 2022 16:48:36 -0500 Received: from fw.net.yu (<unknown> [73.133.126.255]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 8586743e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <bug-gnu-emacs@HIDDEN>; Sat, 31 Dec 2022 21:48:27 +0000 (UTC) From: Ruijie Yu <ruijie@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.0.50; [FR] avoid putting remote files to local trash Date: Sat, 31 Dec 2022 15:46:33 -0600 Message-ID: <sdv4jtb8cw6.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@HIDDEN; helo=mail.netyu.xyz X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.997, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 01 Jan 2023 03:35:31 -0500 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.4 (--) Hello, I have been organizing my files lately over multiple devices using tramp. One issue I find with my current setup is that since I set `delete-by-moving-to-trash' to t, all files, even the remote ones, are moved to my trash directory. This, unfortunately, harms my workflow because the files I wanted to delete include some random multi-gig files, as well as many .git directories, both of which greatly bottleneck my file-deletion process. I also don't want to disable trashing globally, because I think putting local files to trash (which do not introduce a significant delay) is still a good idea. In response to this, I want to propose a change to the logic under which trashing is performed rather than deletion. However, I am not sure which one of my following two ideas is more appropriate. 1. Allow the user to disable "moving to local trash" only for remote files. I imagine this would entail allowing the user to set `delete-by-moving-to-trash' to 'local, and modifying `delete-file', `delete-directory', `dired-internal-do-deletions' among other functions accordingly. Alternatively we can have a dedicated variable for this purpose. In this case, if `delete-by-moving-to-trash' is set to 'local, whenever a user deletes a remote file such as "/sudo::/etc/os-release", it is simply deleted as if via "/sudo:://bin/rm", whereas when the user deletes a local file ".bashrc", it is moved to trash as normal. 2. Use a dedicated local trash directory for each remote, optionally behind a toggle. E.g. for files under "/sudo::" remote, we might have the trash directory as "/sudo::.local/share/Trash". I am not sure how this would interact with `trash-directory', as I have this as nil and simply let Emacs use the XDG path for trash. This might additionally pose some challanges when multiple remotes are aliases to each other, for example, "/sshx:user@localhost:.bashrc" and "/sshx:user@HIDDEN:.bashrc" logically are the same file, but it might be hard to programmatically check that two hosts are equivalent. Best, RY
Ruijie Yu <ruijie@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#60462
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.