From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#24518: 25.2.50; dired-mark-extension with prefix arg fails Date: Fri, 23 Sep 2016 23:13:52 +0900 (JST) Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1474640196 28637 195.159.176.226 (23 Sep 2016 14:16:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2016 14:16:36 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: tino.calancha@gmail.com To: 24518@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 23 16:16:25 2016 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 1bnRH0-0005Pm-IH for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Sep 2016 16:16:18 +0200 Original-Received: from localhost ([::1]:46755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRGy-0007bd-U4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Sep 2016 10:16:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRGp-0007Zk-D0 for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnRGk-00085u-8i for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:16:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRGk-00085q-5b for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bnRGk-0008Vj-1F for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2016 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24518 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.147464011532657 (code B ref -1); Fri, 23 Sep 2016 14:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2016 14:15:15 +0000 Original-Received: from localhost ([127.0.0.1]:33600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnRFz-0008Uf-CX for submit@debbugs.gnu.org; Fri, 23 Sep 2016 10:15:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnRFx-0008UR-Vo for submit@debbugs.gnu.org; Fri, 23 Sep 2016 10:15:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnRFr-0007qI-Rx for submit@debbugs.gnu.org; Fri, 23 Sep 2016 10:15:08 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRFr-0007oU-OJ for submit@debbugs.gnu.org; Fri, 23 Sep 2016 10:15:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRFp-0006oN-Fk for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnRFi-0007li-Ks for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:15:04 -0400 Original-Received: from mail-pf0-f193.google.com ([209.85.192.193]:34780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRFi-0007lA-F3 for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2016 10:14:58 -0400 Original-Received: by mail-pf0-f193.google.com with SMTP id 21so5382065pfy.1 for ; Fri, 23 Sep 2016 07:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:user-agent:mime-version; bh=YS1CMQiPHCKNoqaXM8srHy/3NzQJ/nQwD7qN8IaBucw=; b=wa4FRS/oSk9Jnbh3uVSpyhFUHkwfR/WxlexUTpPOz10dt7zys617e6MXei4of8MTM3 wy8KxjY/KTvuEWN2h1Qj0tIjiglxikze2lhH2P5Erehm2G3i7p4BMNn4VjvynZOBIo8c bpXXP6Z5PG1LvXaV57TrJWTsc/BOh3OLxnyr/ApHktIwrrrFlr/j+yxk0Z7AWKZayNSh C5cFBj5L3DMkBsoyAX5jbiefwhEgfPntKpxA1VnwHCAD9DMQB8/rWvHlF/3DxUuGtvvj UCdm2GyxR5PPL7sr1NqppbxE4dGnuZUDcnWoZxGFr90YUVPI1A+Y1ECRPw4Zet4CH882 1rGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:user-agent :mime-version; bh=YS1CMQiPHCKNoqaXM8srHy/3NzQJ/nQwD7qN8IaBucw=; b=liGki9ZLHNx3DjBdPGqNXpEOaop4UhTKCBs/c1UeGU7khO0/bVQRKLjUyhXnKtGAf5 iq7dG1YiqbG5CTsapDDr1y+A68RrS3oelxQ3JyKBzCOdHWpfY8JDyCm3bBgJ1huH/lIH PWrIUyHl7sVFpAS9VC4z0BY5Nvz6qdoFb97Z4P6EzyQkQntIugk6FuKFSrDaU3bVKGlf sIpo/RNILXgXpx3nRXcXecyCe9Rbmq5CGKif7XTHykHKcH2gRj0SzdT79KmWzNf1xA6T 5KWQZEG1v3E/+FWv9nBourmlnfE/Gcm9cJk9ncIzBp1tnGh1A01zfD+CpAyVg8dKaIFN ScZw== X-Gm-Message-State: AE9vXwNOra+jE4Jykk3lniPIWZV3rExCmACa+eRcgNIhISl0pw2xg5JLTGbJoMHaaa4Cag== X-Received: by 10.98.152.69 with SMTP id q66mr12610959pfd.176.1474640035870; Fri, 23 Sep 2016 07:13:55 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id t1sm12039191pfd.57.2016.09.23.07.13.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 07:13:55 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:123600 Archived-At: emacs -Q ~ -eval "(require 'dired-x)" C-u * . el RET ;; signal error: Wrong type argument: char-or-string-p, (4) Because the interactive specification read MARKER-CHAR using 'P'. That would be sensical if prefix argument has the meaning of unmark files. That behaviour is found elsewhere in Dired, for instance, `dired-mark-executables', `dired-mark-directories', `dired-mark-files-regexp'. In following patch, `dired-mark-extension' with a prefix argument unmark files: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 8f24f389b19a700b6cf48c187273234ae889aae4 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Fri, 23 Sep 2016 23:06:28 +0900 Subject: [PATCH] dired-mark-extension: With prefix arg unmark files * lisp/dired-x.el (dired-mark-extension): When called interactively with prefix argument, then unmark files (Bug#24518). --- lisp/dired-x.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 41c2256..834c0de 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -331,10 +331,13 @@ dired-extra-startup ;; Mark files with some extension. (defun dired-mark-extension (extension &optional marker-char) "Mark all files with a certain EXTENSION for use in later commands. +A prefix argument means to unmark them instead. A `.' is *not* automatically prepended to the string entered. EXTENSION may also be a list of extensions instead of a single one. Optional MARKER-CHAR is marker to use." - (interactive "sMarking extension: \nP") + (interactive + (list (read-string "Marking extension: ") + (and current-prefix-arg ?\s))) (or (listp extension) (setq extension (list extension))) (dired-mark-files-regexp -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.2.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.0) of 2016-09-23 Repository revision: 65dc67c87553bec4c8b36432246b13f09d653118