From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#5436: 23.1.91; Deleting directories causes unusable file layout in freedesktop trashcan Date: Thu, 21 Jan 2010 13:50:49 +0100 Message-ID: <87d413k4eu.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264079391 1078 80.91.229.12 (21 Jan 2010 13:09:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 13:09:51 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 21 14:09:43 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXwn8-0006Ci-2x for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 14:09:43 +0100 Original-Received: from localhost ([127.0.0.1]:42464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXwn8-0002Wi-UY for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 08:09:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXwn4-0002Va-Ab for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 08:09:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXwmz-0002UE-1e for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 08:09:37 -0500 Original-Received: from [199.232.76.173] (port=51382 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXwmy-0002UB-VU for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 08:09:32 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45049) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXwmy-0006Ie-FY for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 08:09:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NXwYv-0000x3-PG; Thu, 21 Jan 2010 07:55:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Tassilo Horn , 5436@debbugs.gnu.org Resent-From: Tassilo Horn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jan 2010 12:55:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5436 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12640784563641 (code B ref -1); Thu, 21 Jan 2010 12:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2010 12:54:16 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXwYA-0000wd-K5 for submit@debbugs.gnu.org; Thu, 21 Jan 2010 07:54:15 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXwVC-0000uG-4L for submit@debbugs.gnu.org; Thu, 21 Jan 2010 07:51:12 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:38791) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXwV7-0000xu-0d for submit@debbugs.gnu.org; Thu, 21 Jan 2010 07:51:05 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NXwV2-0001ef-Np for submit@debbugs.gnu.org; Thu, 21 Jan 2010 07:51:04 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:51767) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXwV2-0001eW-Fe for submit@debbugs.gnu.org; Thu, 21 Jan 2010 07:51:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXwV1-0006I2-TJ for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 07:50:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXwUx-0006Ez-2h for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 07:50:59 -0500 Original-Received: from [199.232.76.173] (port=58300 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXwUw-0006Es-Ts for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 07:50:54 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:6326) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXwUw-0001dM-92 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 07:50:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 5630F78A408D for ; Thu, 21 Jan 2010 13:50:53 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25023-07-2 for ; Thu, 21 Jan 2010 13:50:50 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (unknown [141.26.94.68]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 149B678A4103 for ; Thu, 21 Jan 2010 13:50:49 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Thu, 21 Jan 2010 07:54:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -6.6 (------) Resent-Date: Thu, 21 Jan 2010 07:55:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34596 Archived-At: I have `delete-by-moving-to-trash' enabled. When I delete a directory with `M-x delete-directory' or using `D' in dired on a directory and say that I want to delete it recursively, the freedesktop trashcan contains entries for each file deleted, and not only one entry for the whole directory. For example, I delete the directory ~/foo with these contents: ~/foo/ ~/foo/bar/ ~/foo/bar/test.txt After that, the freedesktop trashcan contains these Entries: --8<---------------cut here---------------start------------->8--- /home/horn/.local/share/Trash/files: total used in directory 20K available 70801444 drwx------ 4 horn horn 4.0K Jan 21 13:42 . drwxr-xr-x 4 horn horn 4.0K Jan 21 13:42 .. drwxr-xr-x 2 horn horn 4.0K Jan 21 13:42 bar ### drwxr-xr-x 2 horn horn 4.0K Jan 21 13:42 foo -rw-r--r-- 1 horn horn 1 Jan 21 13:42 test.txt ### /home/horn/.local/share/Trash/info: total used in directory 20K available 70801444 drwx------ 2 horn horn 4.0K Jan 21 13:42 . drwxr-xr-x 4 horn horn 4.0K Jan 21 13:42 .. -rw-r--r-- 1 horn horn 74 Jan 21 13:42 bar.trashinfo ### -rw-r--r-- 1 horn horn 70 Jan 21 13:42 foo.trashinfo -rw-r--r-- 1 horn horn 83 Jan 21 13:42 test.txt.trashinfo ### --8<---------------cut here---------------end--------------->8--- The lines marked with ### are wrong. `delete-directory' should keep the structure of the deleted directory and move it as a whole to the trash. Else, it's nearly impossible to restore the top level dir foo including all contents again, and that's what the trashcan if for, right? In GNU Emacs 23.1.91.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-01-19 on thinkpad Windowing system distributor `The X.Org Foundation', version 11.0.10704000 configured using `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23-vcs' '--infodir=/usr/share/info/emacs-23-vcs' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--with-libotf' '--with-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=core2 -O2 -pipe' 'LDFLAGS=-Wl,-z,now'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Dired by name Minor modes in effect: gnus-dired-mode: t auto-revert-mode: t diff-auto-refine-mode: t rcirc-track-minor-mode: t dired-omit-mode: t recentf-mode: t window-number-meta-mode: t window-number-mode: t exec-abbrev-cmd-mode: t global-undo-tree-mode: t undo-tree-mode: t global-subword-mode: t subword-mode: t global-hl-line-mode: t savehist-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-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-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-h f M-. C-g M-2 C-x k C-x C-b m m m D y + t e s t C-x C-f f o o . t x t C-x C-s C-x k g g g g ^ C-x C-f f o o . t x t C-x C-s C-x C-s C-x k ^ ^ C-x d . l e o c s m m D y y y C-x x d e l e d i r e y ^ C-x b D y y C-x b ^ ^ ^ M-x t r q r e b Recent messages: Omitting... (Nothing to omit) Omitting... (Nothing to omit) Omitting... (Nothing to omit) Omitting... (Nothing to omit) Omitting... (Nothing to omit) Load-path shadows: ~/repos/el/org-mode/lisp/org-bbdb hides /usr/share/emacs/23.1.91/lisp/org/org-bbdb ~/repos/el/org-mode/lisp/org-habit hides /usr/share/emacs/23.1.91/lisp/org/org-habit ~/repos/el/org-mode/lisp/org-colview hides /usr/share/emacs/23.1.91/lisp/org/org-colview ~/repos/el/org-mode/lisp/org-footnote hides /usr/share/emacs/23.1.91/lisp/org/org-footnote ~/repos/el/org-mode/lisp/org-freemind hides /usr/share/emacs/23.1.91/lisp/org/org-freemind ~/repos/el/org-mode/lisp/org-compat hides /usr/share/emacs/23.1.91/lisp/org/org-compat ~/repos/el/org-mode/lisp/org-icalendar hides /usr/share/emacs/23.1.91/lisp/org/org-icalendar ~/repos/el/org-mode/lisp/org-clock hides /usr/share/emacs/23.1.91/lisp/org/org-clock ~/repos/el/org-mode/lisp/org-bibtex hides /usr/share/emacs/23.1.91/lisp/org/org-bibtex ~/repos/el/org-mode/lisp/org-indent hides /usr/share/emacs/23.1.91/lisp/org/org-indent ~/repos/el/org-mode/lisp/org-faces hides /usr/share/emacs/23.1.91/lisp/org/org-faces ~/repos/el/org-mode/lisp/org-timer hides /usr/share/emacs/23.1.91/lisp/org/org-timer ~/repos/el/org-mode/lisp/org-vm hides /usr/share/emacs/23.1.91/lisp/org/org-vm ~/repos/el/org-mode/lisp/org-list hides /usr/share/emacs/23.1.91/lisp/org/org-list ~/repos/el/org-mode/lisp/org-gnus hides /usr/share/emacs/23.1.91/lisp/org/org-gnus ~/repos/el/org-mode/lisp/org-crypt hides /usr/share/emacs/23.1.91/lisp/org/org-crypt ~/repos/el/org-mode/lisp/org-exp hides /usr/share/emacs/23.1.91/lisp/org/org-exp ~/repos/el/org-mode/lisp/org-protocol hides /usr/share/emacs/23.1.91/lisp/org/org-protocol ~/repos/el/org-mode/lisp/org-inlinetask hides /usr/share/emacs/23.1.91/lisp/org/org-inlinetask ~/repos/el/org-mode/lisp/org-wl hides /usr/share/emacs/23.1.91/lisp/org/org-wl ~/repos/el/org-mode/lisp/org-plot hides /usr/share/emacs/23.1.91/lisp/org/org-plot ~/repos/el/org-mode/lisp/org-w3m hides /usr/share/emacs/23.1.91/lisp/org/org-w3m ~/repos/el/org-mode/lisp/org-agenda hides /usr/share/emacs/23.1.91/lisp/org/org-agenda ~/repos/el/org-mode/lisp/org-archive hides /usr/share/emacs/23.1.91/lisp/org/org-archive ~/repos/el/org-mode/lisp/org-attach hides /usr/share/emacs/23.1.91/lisp/org/org-attach ~/repos/el/org-mode/lisp/org-latex hides /usr/share/emacs/23.1.91/lisp/org/org-latex ~/repos/el/org-mode/lisp/org-mhe hides /usr/share/emacs/23.1.91/lisp/org/org-mhe ~/repos/el/org-mode/lisp/org-irc hides /usr/share/emacs/23.1.91/lisp/org/org-irc ~/repos/el/org-mode/lisp/org-table hides /usr/share/emacs/23.1.91/lisp/org/org-table ~/repos/el/org-mode/lisp/org-info hides /usr/share/emacs/23.1.91/lisp/org/org-info ~/repos/el/org-mode/lisp/org-docbook hides /usr/share/emacs/23.1.91/lisp/org/org-docbook ~/repos/el/org-mode/lisp/org-ascii hides /usr/share/emacs/23.1.91/lisp/org/org-ascii ~/repos/el/org-mode/lisp/org-jsinfo hides /usr/share/emacs/23.1.91/lisp/org/org-jsinfo ~/repos/el/org-mode/lisp/org-id hides /usr/share/emacs/23.1.91/lisp/org/org-id ~/repos/el/org-mode/lisp/org-feed hides /usr/share/emacs/23.1.91/lisp/org/org-feed ~/repos/el/org-mode/lisp/org-xoxo hides /usr/share/emacs/23.1.91/lisp/org/org-xoxo ~/repos/el/org-mode/lisp/org-publish hides /usr/share/emacs/23.1.91/lisp/org/org-publish ~/repos/el/org-mode/lisp/org-exp-blocks hides /usr/share/emacs/23.1.91/lisp/org/org-exp-blocks ~/repos/el/org-mode/lisp/org-mew hides /usr/share/emacs/23.1.91/lisp/org/org-mew ~/repos/el/org-mode/lisp/org-mobile hides /usr/share/emacs/23.1.91/lisp/org/org-mobile ~/repos/el/org-mode/lisp/org-datetree hides /usr/share/emacs/23.1.91/lisp/org/org-datetree ~/repos/el/org-mode/lisp/org-remember hides /usr/share/emacs/23.1.91/lisp/org/org-remember ~/repos/el/org-mode/lisp/org-macs hides /usr/share/emacs/23.1.91/lisp/org/org-macs ~/repos/el/org-mode/lisp/org-mouse hides /usr/share/emacs/23.1.91/lisp/org/org-mouse ~/repos/el/org-mode/lisp/org-html hides /usr/share/emacs/23.1.91/lisp/org/org-html ~/repos/el/org-mode/lisp/org-install hides /usr/share/emacs/23.1.91/lisp/org/org-install ~/repos/el/org-mode/lisp/org-src hides /usr/share/emacs/23.1.91/lisp/org/org-src ~/repos/el/org-mode/lisp/org hides /usr/share/emacs/23.1.91/lisp/org/org ~/repos/el/org-mode/lisp/org-rmail hides /usr/share/emacs/23.1.91/lisp/org/org-rmail ~/repos/el/org-mode/lisp/org-mac-message hides /usr/share/emacs/23.1.91/lisp/org/org-mac-message Features: (shadow emacsbug ibuf-ext ibuffer gnus-dired autorevert cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs mule-util cal-move find-func diff-mode diff org-colview mailalias arc-mode archive-mode etags url-cache newst-plainview newst-ticker newst-reader newst-backend gnus-fun rs-info bbdb-gui gnus-cite ansi-color flow-fill gnus-async gnus-bcklg sort gnus-ml vc-dispatcher vc-svn newcomment help-mode hippie-exp multi-isearch gnus-topic parse-time pop3 nnml utf-7 utf7 auth-source nnimap imap trace nndraft nnmh nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache notmuch bbdb-hooks bbdb-gnus bbdb-snarf mail-extr spam spam-stat bbdb-com gnus-uu yenc gnus-msg smiley gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int gnus-range gnus-win view solar cal-dst holidays hol-loaddefs cal-iso garak elim warnings lui tracking flyspell ispell incomplete rcirc-late-fix rcirc greqlscript-mode greql-mode tg-mode generic th-latex swank-clojure clojure-mode slime-repl slime apropos hideshow paredit wtf cus-edit cus-start cus-load rdictcc appt diary-lib diary-loaddefs vc-git org-w3m org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-info org-gnus org-docview org-bibtex org-bbdb org-protocol org-attach org-id org-agenda remember org-remember org-datetree org org-footnote org-src org-list org-faces org-compat org-macs org-install cal-menu calendar cal-loaddefs dired-x dired-aux pcomplete em-term term ehelp electric esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-util esh-module esh-mode lisppaste xml-rpc xml th-boxquote boxquote rect highlight-symbol hi-lock footnote smtpmail message idna sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader canlock sha1 hex-util hashcash info server yasnippet dropdown-list noutline outline highlight-parentheses browse-kill-ring derived filesets recentf tree-widget sr-speedbar speedbar sb-image ezimage dframe ido anything-config compile comint ring semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp byte-compile mode-local cedet imenu w3m-bookmark w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util bookmark pp ffap dired rx thingatpt anything woman easymenu man assoc window-number uniquify exec-abbrev-cmd undo-tree easy-mmode cl cl-19 subword hl-line saveplace savehist paren th-private edmacro kmacro th-common mm-url gnus gnus-ems nnheader gnus-util netrc mail-utils wid-edit url-http tls url url-proxy url-privacy url-expand url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums time-date url-cookie url-util url-parse url-gw url-vars mm-util mail-prsvr windmove disp-table swank-clojure-autoloads advice help-fns advice-preload clojure-mode-autoloads slime-repl-autoloads slime-autoloads package reporter site-gentoo w3m-load bbdb-autoloads bbdb regexp-opt timezone tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs)