From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#25942: 26.0.50; dired-mark-extension prepend '.' to suffix if not present Date: Mon, 27 Mar 2017 01:40:28 +0300 Organization: LINKOV.NET Message-ID: <87bmsn1x2d.fsf@localhost> References: <87d1dzjadq.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490568326 25449 195.159.176.226 (26 Mar 2017 22:45:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Mar 2017 22:45:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) Cc: 25942@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 27 00:45:22 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 1csGuW-0005vv-Hv for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Mar 2017 00:45:20 +0200 Original-Received: from localhost ([::1]:43125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csGuc-0004hX-JB for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Mar 2017 18:45:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csGuJ-0004VU-Fy for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2017 18:45:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csGuE-0004Fg-Jy for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2017 18:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48206) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csGuE-0004FZ-GJ for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2017 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1csGuE-0002J1-7I for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2017 18:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Mar 2017 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25942 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25942-submit@debbugs.gnu.org id=B25942.14905682758813 (code B ref 25942); Sun, 26 Mar 2017 22:45:02 +0000 Original-Received: (at 25942) by debbugs.gnu.org; 26 Mar 2017 22:44:35 +0000 Original-Received: from localhost ([127.0.0.1]:46405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csGtn-0002I5-9A for submit@debbugs.gnu.org; Sun, 26 Mar 2017 18:44:35 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:56080 helo=homiemail-a11.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csGtk-0002Hp-7c for 25942@debbugs.gnu.org; Sun, 26 Mar 2017 18:44:32 -0400 Original-Received: from homiemail-a11.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTP id A3313314C069; Sun, 26 Mar 2017 15:44:31 -0700 (PDT) Original-Received: from localhost.linkov.net (m213-102-69-42.cust.tele2.ee [213.102.69.42]) (Authenticated sender: jurta@jurta.org) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTPA id D47B0314C062; Sun, 26 Mar 2017 15:44:30 -0700 (PDT) In-Reply-To: <87d1dzjadq.fsf@calancha-pc> (Tino Calancha's message of "Fri, 03 Mar 2017 12:40:33 +0900") 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:130996 Archived-At: > emacs -Q /tmp > > (require 'dired-x) > (require 'ert) > ;; Evaluate following sexp: > (let ((dirs '("Public" "Music")) > (files '(".bashrc" "bar.c" "foo.c")) > (dir (make-temp-file "Bug25942" 'dir))) > (unwind-protect > (progn > (dolist (d dirs) > (make-directory (expand-file-name d dir))) > (dolist (f files) > (write-region nil nil (expand-file-name f dir))) > (dired dir) > (dired-mark-extension "c") > (should (=3D 2 (length (dired-get-marked-files))))) > (delete-directory dir 'recursive))) > > IMO, in this example looks better if just those files ending with > '.c' are marked i.e., to not mark 'Public' or 'Music'. Is this a backward-compatible change? If not, then maybe better prepend =E2=80=98.=E2=80=99 only to the default value for interactive use= s? So users will get the right result when using =E2=80=98M-x dired-mark-extension RE= T RET=E2=80=99. But for the programmatic uses it's the responsibility of the caller to supply the right suffix in =E2=80=98(dired-mark-extension ".c")=E2=80=99