From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mathieu Basille Newsgroups: gmane.emacs.bugs Subject: bug#25609: 25.1; Dired: Copy folder with 'dired-dwim-target t' results in nested copy Date: Thu, 2 Feb 2017 11:54:00 -0500 Message-ID: <4cee1f04-3644-ba9f-1542-d29108cd2472@basille.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1486057276 17763 195.159.176.226 (2 Feb 2017 17:41:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 17:41:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 To: 25609@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 18:41:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZLNd-0004QN-LZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 18:41:09 +0100 Original-Received: from localhost ([::1]:58187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZLNj-0005en-19 for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 12:41:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZLNb-0005eU-HN for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:41:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZLNW-0005DR-I4 for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:41:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZLNW-0005DB-EJ for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZLNV-0001rS-U7 for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 12:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mathieu Basille Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Feb 2017 17:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14860572047083 (code B ref -1); Thu, 02 Feb 2017 17:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Feb 2017 17:40:04 +0000 Original-Received: from localhost ([127.0.0.1]:54238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZLMZ-0001q8-Ev for submit@debbugs.gnu.org; Thu, 02 Feb 2017 12:40:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZKeI-0000ma-W6 for submit@debbugs.gnu.org; Thu, 02 Feb 2017 11:54:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZKeC-0006Qu-7y for submit@debbugs.gnu.org; Thu, 02 Feb 2017 11:54:13 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZKeC-0006Qo-4b for submit@debbugs.gnu.org; Thu, 02 Feb 2017 11:54:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZKeA-0005k5-Di for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 11:54:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZKe5-0006OR-V3 for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 11:54:10 -0500 Original-Received: from sender163-mail.zoho.com ([74.201.84.163]:21011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZKe5-0006Nh-MP for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 11:54:05 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zoho; d=basille.net; h=to:subject:from:message-id:date:user-agent:mime-version:content-type; b=TSOcsHCd2MKiCBAOrvnqjO6MPpDs/pU/Gh1wIEaW67wxuYdpTnMztGh1OEZV0VmWQHw0f57+3uUP 9sBYwop71B71HGV42xzJ3CD3OLxotcl3ZXsmrzcpflnDm5fIM0XRbw7tlit9gRJQfbEXHsg3dPdf PnkgF5UYmXhWJ+9GnWQ= Original-Received: from [10.228.2.149] (host-128-227-153-22.xlate.ufl.edu [128.227.153.22]) by mx.zohomail.com with SMTPS id 1486054441887212.6764929487682; Thu, 2 Feb 2017 08:54:01 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Thu, 02 Feb 2017 12:40:02 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128888 Archived-At: Dear Emacs maintainers, The behavior I have is odd at best, but the situation is simple: given a folder 'test', I want to make a copy of it in another folder. In practice (keyboard commands are between <>): * Open Emacs, in any folder. * <+ test> to create a folder 'test'. * <+ target> to create a folder 'target'. * Move on 'test' then to copy it in 'target', to copy recursively. So far so good, the empty 'test' folder is copied as expected. Assuming there is some change in this folder, we want to copy it again to the same place: * Move on 'test' then to copy it in 'target'. * Dired asks for confirmation to overwrite it, and if yes copies it again. Now the weird behavior. With '(setq dired-dwim-target t)': * Open a second window . * Move to 'target' in this window, as to have 'target' on the right window, but the initial folder on the left window. * In the left window, move on 'test' and to copy it again, DWIM will suggest directly 'target/', so all that is needed is . Note that there is no question to overwrite it or not. Visiting 'target' now shows the 'test' folder, but inside it a second copy of 'test'! Even weirder: * Create an empty file in the original folder (, then to save it, and to kill it). * Select in the left window both 'test' and 'bla' with . * to copy them, DWIM will suggest directly 'target/', so all that is needed is . Now it asks for confirmation to overwrite and copies 'test' together with 'bla' in 'target' as expected! (of course, this example mostly uses empty files/folders, but that's really just for the demonstration.) Mathieu. In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5) of 2016-12-31, modified by Debian built on binet Windowing system distributor 'The X.Org Foundation', version 11.0.11900000 System Description: Debian GNU/Linux 9.0 (stretch) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs25-4Gc0bO/emacs25-25.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-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-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)... Loading cjk-enc...done Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done Saving file /home/mathieu/.emacs.d/init.el... Wrote /home/mathieu/.emacs.d/init.el [2 times] For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... ad-handle-definition: ‘ido-completing-read’ got redefined Load-path shadows: /usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs25/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/25.1/lisp/language/thai-word Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils finder-inf tex-site edmacro kmacro advice info vc-git diff-mode easy-mmode package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 113475 4970) (symbols 48 23037 0) (miscs 40 89 207) (strings 32 26429 5656) (string-bytes 1 819950) (vectors 16 15640) (vector-slots 8 474307 2835) (floats 8 202 18) (intervals 56 314 0) (buffers 976 20)) -- Ce message est signé pour en assurer l'authenticité. Pour une correspondance avec moi réellement privée, utilisez ma clé publique pour chiffrer vos messages : http://mathieu.basille.net/pub.asc Plus d'infos : http://mzl.la/1BsOGiZ