emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dired-mark-plain-files


From: Andreas Schwab
Subject: dired-mark-plain-files
Date: Thu, 26 Oct 2000 15:02:11 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.90

IMHO this would be a nice addition for dired:

--- dired.el.~1.191~    Fri Oct 20 10:58:34 2000
+++ dired.el    Thu Oct 26 15:00:58 2000
@@ -236,6 +236,7 @@
 ;; DOS/Windows-style drive letters in directory names, like in "d:/foo".
 (defvar dired-re-dir (concat dired-re-maybe-mark dired-re-inode-size "d[^:]"))
 (defvar dired-re-sym (concat dired-re-maybe-mark dired-re-inode-size "l[^:]"))
+(defvar dired-re-plain (concat dired-re-maybe-mark dired-re-inode-size "-"))
 (defvar dired-re-exe;; match ls permission string of an executable file
   (mapconcat (function
              (lambda (x)
@@ -913,6 +914,7 @@
     (define-key map "**" 'dired-mark-executables)
     (define-key map "*/" 'dired-mark-directories)
     (define-key map "*@" 'dired-mark-symlinks)
+    (define-key map "*f" 'dired-mark-plain-files)
     (define-key map "*%" 'dired-mark-files-regexp)
     (define-key map "*c" 'dired-change-marks)
     (define-key map "*s" 'dired-mark-subdir-files)
@@ -2400,6 +2402,13 @@
   (interactive "P")
   (let ((dired-marker-char (if unflag-p ?\040 dired-marker-char)))
     (dired-mark-if (looking-at dired-re-exe) "executable file")))
+
+(defun dired-mark-plain-files (unflag-p)
+  "Mark all plain files.
+With prefix argument, unflag all those files."
+  (interactive "P")
+  (let ((dired-marker-char (if unflag-p ?\040 dired-marker-char)))
+    (dired-mark-if (looking-at dired-re-plain) "plain file")))
 
 ;; dired-x.el has a dired-mark-sexp interactive command: mark
 ;; files for which PREDICATE returns non-nil.

OK to install?

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
address@hidden
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]