-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
dired+.el
11024 lines (10013 loc) · 559 KB
/
dired+.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; dired+.el --- Extensions to Dired.
;;
;; Filename: dired+.el
;; Description: Extensions to Dired.
;; Author: Drew Adams
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
;; Copyright (C) 1999-2017, Drew Adams, all rights reserved.
;; Created: Fri Mar 19 15:58:58 1999
;; Version: 2013.07.23
;; Package-Requires: ()
;; Last-Updated: Sun Feb 19 07:28:12 2017 (-0800)
;; By: dradams
;; Update #: 9729
;; URL: http://www.emacswiki.org/dired+.el
;; Doc URL: http://www.emacswiki.org/DiredPlus
;; Keywords: unix, mouse, directories, diredp, dired
;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x, 25.x
;;
;; Features that might be required by this library:
;;
;; `apropos', `apropos+', `autofit-frame', `avoid', `bookmark',
;; `bookmark+', `bookmark+-1', `bookmark+-bmu', `bookmark+-key',
;; `bookmark+-lit', `dired', `dired+', `dired-aux', `dired-x',
;; `easymenu', `ffap', `fit-frame', `frame-fns', `help+20',
;; `highlight', `image-dired', `image-file', `info', `info+20',
;; `menu-bar', `menu-bar+', `misc-cmds', `misc-fns', `naked', `pp',
;; `pp+', `second-sel', `strings', `subr-21', `thingatpt',
;; `thingatpt+', `unaccent', `w32-browser', `w32browser-dlgopen',
;; `wid-edit', `wid-edit+', `widget'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; Extensions to Dired.
;;
;; This file extends functionalities provided by standard GNU Emacs
;; files `dired.el', `dired-aux.el', and `dired-x.el'.
;;
;; Key bindings changed. Menus redefined. `diredp-mouse-3-menu'
;; popup menu added. New commands. Some commands enhanced.
;;
;; All of the new functions, variables, and faces defined here have
;; the prefix `diredp-' (for Dired Plus) in their names.
;;
;;
;; Wraparound Navigation
;; ---------------------
;;
;; In vanilla Dired, `dired-next-marked-file' (`M-}' or `* C-n') and
;; `dired-previous-marked-file' (`M-{' or `* C-p') wrap around when
;; you get to the end or the beginning of the Dired buffer. Handy.
;;
;; But the other navigation commands do not wrap around. In `Dired+'
;; they do, provided option `diredp-wrap-around-flag' is non-nil,
;; which it is by default. This means the following commands:
;;
;; `diredp-next-line' - `n', `C-n', `down', `SPC'
;; `diredp-previous-line' - `p', `C-p', `up'
;; `diredp-next-dirline' - `>'
;; `diredp-prev-dirline' - `<'
;; `diredp-next-subdir' - `C-M-n'
;; `diredp-prev-subdir' - `C-M-p'
;;
;;
;; Fontification
;; -------------
;;
;; If you want a maximum or minimum fontification for Dired mode,
;; then customize option `font-lock-maximum-decoration'. If you want
;; a different fontification level for Dired than for other modes,
;; you can do this too by customizing
;; `font-lock-maximize-decoration'.
;;
;; A few of the user options defined here have an effect on
;; font-locking, and this effect is established only when Dired+ is
;; loaded, which defines the font-lock keywords for Dired. These
;; options include `diredp-compressed-extensions',
;; `diredp-ignore-compressed-flag', and `dired-omit-extensions'.
;; This means that if you change the value of such an option then you
;; will see the change only in a new Emacs session.
;;
;; (You can see the effect in the same session if you use `C-M-x' on
;; the `defvar' sexp for `diredp-font-lock-keywords-1', and then you
;; toggle font-lock off and back on.)
;;
;;
;; Act on All Files
;; ----------------
;;
;; Most of the commands (such as `C' and `M-g') that operate on the
;; marked files have the added feature here that multiple `C-u' use
;; not the files that are marked or the next or previous N files, but
;; *all* of the files in the Dired buffer. Just what "all" files
;; means changes with the number of `C-u', as follows:
;;
;; `C-u C-u' - Use all files present, but no directories.
;; `C-u C-u C-u' - Use all files and dirs except `.' and `..'.
;; `C-u C-u C-u C-u' - use all files and dirs, `.' and `..'.
;;
;; (More than four `C-u' act the same as two.)
;;
;; This feature can be particularly useful when you have a Dired
;; buffer with files chosen from multiple directories.
;;
;; Note that in most cases this behavior is described only in the doc
;; string of function `dired-get-marked-files'. It is generally
;; *not* described in the doc strings of the various commands,
;; because that would require redefining each command separately
;; here. Instead, we redefine macro `dired-map-over-marks' and
;; function `dired-get-filename' in order to achieve this effect.
;;
;; Commands such as `dired-do-load' for which it does not make sense
;; to act on directories generally treat more than two `C-u' the same
;; as two `C-u'.
;;
;; Exceptions to the general behavior described here are called out
;; in the doc strings. In particular, the behavior of a prefix arg
;; for `dired-do-query-replace-regexp' is different, so that you can
;; use it also to specify word-delimited replacement.
;;
;;
;; Act on Marked (or All) Files Here and Below
;; -------------------------------------------
;;
;; The prefix argument behavior just described does not apply to the
;; `diredp-*-recursive' commands. These commands act on the marked
;; files in the current Dired buffer or on all files in the directory
;; if none are marked.
;;
;; But these commands also handle marked subdirectories recursively,
;; in the same way. That is, they act also on the marked files in
;; any marked subdirectories, found recursively. If there is no
;; Dired buffer for a given marked subdirectory then all of its files
;; and subdirs are acted on.
;;
;; With a prefix argument, all marks are ignored. The commands act
;; on all files in the current Dired buffer and all of its
;; subdirectories, recursively.
;;
;; All of the `diredp-*-recursive' commands are on prefix key `M-+',
;; and they are available on submenu `Marked Here and Below' of the
;; `Multiple' menu-bar menu.
;;
;; If you use library `Icicles' then you have these additional
;; commands/keys that act recursively on marked files. They are in
;; the `Icicles' submenu of menu `Multiple' > `Marked Here and
;; Below'.
;;
;; * `M-+ M-s M-s' or `M-s M-s m' - Use Icicles search (and its
;; on-demand replace) on the marked files.
;;
;; * Save the names of the marked files:
;;
;; `M-+ C-M->' - Save as a completion set, for use during
;; completion (e.g. with `C-x C-f').
;;
;; `M-+ C->' - Add marked names to the names in the current saved
;; completion set.
;;
;; `M-+ C-}' - Save persistently to an Icicles cache file, for
;; use during completion in another session.
;;
;; `icicle-dired-save-marked-to-fileset-recursive' - Like `M-+
;; C-}', but save persistently to an Emacs fileset.
;;
;; `M-+ C-M-}' - Save to a Lisp variable.
;;
;;
;; In the other direction, if you have a saved set of file names then
;; you can use `C-M-<' (`icicle-dired-chosen-files-other-window') in
;; Dired to open a Dired buffer for just those files. So you can
;; mark some files and subdirs in a hierarchy of Dired buffers, use
;; `M-+ C-}' to save their names persistently, then later use `C-{'
;; to retrieve them, and `C-M-<' (in Dired) to open Dired on them.
;;
;;
;; Image Files
;; -----------
;;
;; `Dired+' provides several enhancements regarding image files.
;; Most of these require standard library `image-dired.el'. One of
;; them, command `diredp-do-display-images', which displays all of
;; the marked image files, requires standard library `image-file.el'.
;;
;; `Dired+' loads these libraries automatically, if available, which
;; means an Emacs version that supports image display (Emacs 22 or
;; later). (You must of course have installed whatever else your
;; Emacs version needs to display images.)
;;
;; Besides command `diredp-do-display-images', see the commands whose
;; names have prefix `diredp-image-'. And see options
;; `diredp-image-preview-in-tooltip' and
;; `diredp-auto-focus-frame-for-thumbnail-tooltip-flag'.
;;
;;
;; Inserted Subdirs, Multiple Dired Buffers, Files from Anywhere,...
;; -----------------------------------------------------------------
;;
;; These three standard Dired features are worth pointing out. The
;; third in particular is little known because (a) it is limited in
;; vanilla Dired and (b) you cannot use it interactively.
;;
;; * You can pass a glob pattern with wildcards to `dired'
;; interactively, as the file name.
;;
;; * You can insert multiple subdirectory listings into a single
;; Dired buffer using `i' on each subdir line. Use `C-u i' to
;; specify `ls' switches. Specifying switch `R' inserts the
;; inserted subdirectory's subdirs also, recursively. You can
;; also use `i' to bounce between a subdirectory line and its
;; inserted-listing header line. You can delete a subdir listing
;; using `C-u k' on its header line. You can hide/show an
;; inserted subdir using `$'. You can use `C-_' to undo any of
;; these operations.
;;
;; * You can open a Dired buffer for an arbitrary set of files from
;; different directories. You do this by invoking `dired'
;; non-interactively, passing it a cons of a Dired buffer name and
;; the file names. Relative file names are interpreted relative
;; to the value of `default-directory'. Use absolute file names
;; when appropriate.
;;
;; `Dired+' makes these features more useful.
;;
;; `$' is improved: It is a simple toggle - it does not move the
;; cursor forward. `M-$' advances the cursor, in addition to
;; toggling like `$'. `C-u $' does hide/show all (what `M-$' does in
;; vanilla Dired).
;;
;; `i' is improved in these ways:
;;
;; * Once a subdir has been inserted, `i' bounces between the subdir
;; listing and the subdir line in the parent listing. If the
;; parent dir is hidden, then `i' from a subdir opens the parent
;; listing so it can move to the subdir line there (Emacs 24+).
;;
;; * Vanilla Dired lets you create a Dired listing with files and
;; directories from arbitrary locations, but you cannot insert
;; (`i') such a directory if it is not in the same directory tree
;; as the `default-directory' used to create the Dired buffer.
;; `Dired+' removes this limitation; you can insert any non-root
;; directories (that is, not `/', `c:/', etc.).
;;
;; `Dired+' lets you create Dired buffers that contain arbitrary
;; files and directories interactively, not just using Lisp. Just
;; use a non-positive prefix arg (e.g., `C--') when invoking `dired'.
;;
;; You are then prompted for the Dired buffer name (anything you
;; like, not necessarily a directory name) and the individual files
;; and directories that you want listed.
;;
;; A non-negative prefix arg still prompts you for the `ls' switches
;; to use. (So `C-0' does both: prompts for `ls' switches and for
;; the Dired buffer name and the files to list.)
;;
;; `Dired+' adds commands for combining and augmenting Dired
;; listings:
;;
;; * `diredp-add-to-dired-buffer', bound globally to `C-x E' ("E"
;; for extra files), lets you add arbitrary file and directory
;; names to an existing Dired buffer.
;;
;; * `diredp-dired-union', bound globally to `C-x D', lets you take
;; the union of multiple Dired listings, or convert an ordinary
;; Dired listing to an explicit list of absolute file names. With
;; a non-positive prefix arg, you can add extra file and directory
;; names, just as for `diredp-add-to-dired-buffer'.
;;
;; You can optionally add a header line to a Dired buffer using
;; toggle command `diredp-breadcrumbs-in-header-line-mode'. (A
;; header line remains at the top of the window - no need to scroll
;; to see it.) If you want to show the header line automatically in
;; all Dired buffers, you can do this:
;;
;; (add-hook 'dired-before-readin-hook
;; 'diredp-breadcrumbs-in-header-line-mode)
;;
;; Some other libraries, such as `Bookmark+' and `Icicles', make it
;; easy to create or re-create Dired buffers that list specific files
;; and have a particular set of markings. `Bookmark+' records Dired
;; buffers persistently, remembering `ls' switches, markings, subdir
;; insertions, and hidden subdirs. If you use `Icicles' then `dired'
;; is a multi-command: you can open multiple Dired buffers with one
;; `dired' invocation.
;;
;; Dired can help you manage projects. You might have multiple Dired
;; buffers with quite specific contents. You might have some
;; subdirectories inserted in the same Dired buffer, and you might
;; have separate Dired buffers for some subdirectories. Sometimes it
;; is useful to have both for the same subdirectory. And sometimes
;; it is useful to move from one presentation to the other.
;;
;; This is one motivation for the `Dired+' `diredp-*-recursive'
;; commands, which act on the marked files in marked subdirectories,
;; recursively. In one sense, these commands are an alternative to
;; using a single Dired buffer with inserted subdirectories. They
;; let you use the same operations on the files in a set of Dired
;; directories, without inserting those directories into an ancestor
;; Dired buffer.
;;
;; You can use command `diredp-dired-inserted-subdirs' to open a
;; separate Dired buffer for each of the subdirs that is inserted in
;; the current Dired buffer. Markings and Dired switches are
;; preserved.
;;
;; In the opposite direction, if you use `Icicles' then you can use
;; multi-command `icicle-dired-insert-as-subdir', which lets you
;; insert any number of directories you choose interactively into a
;; Dired ancestor directory listing. If a directory you choose to
;; insert already has its own Dired buffer, then its markings and
;; switches are preserved for the new, subdirectory listing in the
;; ancestor Dired buffer.
;;
;;
;; Hide/Show Details
;; -----------------
;;
;; Starting with Emacs 24.4, listing details are hidden by default.
;; Note that this is different from the vanilla Emacs behavior, which
;; is to show details by default.
;;
;; Use `(' anytime to toggle this hiding. You can use option
;; `diredp-hide-details-initially-flag' to change the default/initial
;; state. See also option `diredp-hide-details-propagate-flag'.
;;
;; NOTE: If you do not want to hide details initially then you must
;; either (1) change `diredp-hide-details-initially-flag' using
;; Customize (recommended) or (2) set it to `nil' (e.g., using
;; `setq') *BEFORE* loading `dired+.el'.
;;
;; If you have an Emacs version older than 24.4, you can use library
;; `dired-details+.el' (plus `dired-details.el') to get similar
;; behavior.
;;
;;
;; Faces defined here:
;;
;; `diredp-autofile-name', `diredp-compressed-file-suffix',
;; `diredp-date-time', `diredp-deletion',
;; `diredp-deletion-file-name', `diredp-dir-heading',
;; `diredp-dir-priv', `diredp-exec-priv', `diredp-executable-tag',
;; `diredp-file-name', `diredp-file-suffix', `diredp-flag-mark',
;; `diredp-flag-mark-line', `diredp-get-file-or-dir-name',
;; `diredp-ignored-file-name', `diredp-link-priv',
;; `diredp-mode-line-flagged', `diredp-mode-line-marked'
;; `diredp-no-priv', `diredp-number', `diredp-other-priv',
;; `diredp-rare-priv', `diredp-read-priv', `diredp-symlink',
;; `diredp-tagged-autofile-name', `diredp-write-priv'.
;;
;; Commands defined here:
;;
;; `diredp-add-to-dired-buffer', `diredp-add-to-this-dired-buffer',
;; `diredp-do-apply-function',
;; `diredp-do-apply-function-recursive',
;; `diredp-async-shell-command-this-file',
;; `diredp-bookmark-this-file',
;; `diredp-breadcrumbs-in-header-line-mode' (Emacs 22+),
;; `diredp-byte-compile-this-file', `diredp-capitalize',
;; `diredp-capitalize-recursive', `diredp-capitalize-this-file',
;; `diredp-chgrp-this-file', `diredp-chmod-this-file',
;; `diredp-chown-this-file',
;; `diredp-compilation-files-other-window' (Emacs 24+),
;; `diredp-compress-this-file',
;; `diredp-copy-filename-as-kill-recursive',
;; `diredp-copy-tags-this-file', `diredp-copy-this-file',
;; `diredp-decrypt-this-file', `diredp-delete-this-file',
;; `diredp-describe-autofile', `diredp-describe-file',
;; `diredp-describe-marked-autofiles', `diredp-describe-mode',
;; `diredp-dired-for-files', `diredp-dired-for-files-other-window',
;; `diredp-dired-inserted-subdirs', `diredp-dired-plus-help',
;; `diredp-dired-recent-dirs',
;; `diredp-dired-recent-dirs-other-window',
;; `diredp-dired-this-subdir', `diredp-dired-union',
;; `diredp-do-async-shell-command-recursive', `diredp-do-bookmark',
;; `diredp-do-bookmark-dirs-recursive',
;; `diredp-do-bookmark-in-bookmark-file',
;; `diredp-do-bookmark-in-bookmark-file-recursive',
;; `diredp-do-bookmark-recursive', `diredp-do-chmod-recursive',
;; `diredp-do-chgrp-recursive', `diredp-do-chown-recursive',
;; `diredp-do-copy-recursive', `diredp-do-decrypt-recursive',
;; `diredp-do-delete-recursive', `diredp-do-display-images' (Emacs
;; 22+), `diredp-do-encrypt-recursive',
;; `diredp-do-find-marked-files-recursive', `diredp-do-grep',
;; `diredp-do-grep-recursive', `diredp-do-hardlink-recursive',
;; `diredp-do-isearch-recursive',
;; `diredp-do-isearch-regexp-recursive',
;; `diredp-do-move-recursive', `diredp-do-paste-add-tags',
;; `diredp-do-paste-replace-tags', `diredp-do-print-recursive',
;; `diredp-do-query-replace-regexp-recursive',
;; `diredp-do-redisplay-recursive',
;; `diredp-do-relsymlink-recursive', `diredp-do-remove-all-tags',
;; `diredp-do-search-recursive', `diredp-do-set-tag-value',
;; `diredp-do-shell-command-recursive', `diredp-do-sign-recursive',
;; `diredp-do-symlink-recursive', `diredp-do-tag',
;; `diredp-do-touch-recursive', `diredp-do-untag',
;; `diredp-do-verify-recursive', `diredp-downcase-recursive',
;; `diredp-downcase-this-file', `diredp-ediff',
;; `diredp-encrypt-this-file', `diredp-fileset',
;; `diredp-fileset-other-window', `diredp-find-a-file',
;; `diredp-find-a-file-other-frame',
;; `diredp-find-a-file-other-window',
;; `diredp-find-file-other-frame',
;; `diredp-find-file-reuse-dir-buffer',
;; `diredp-find-line-file-other-window',
;; `diredp-flag-region-files-for-deletion',
;; `diredp-grepped-files-other-window', `diredp-grep-this-file',
;; `diredp-hardlink-this-file', `diredp-highlight-autofiles-mode',
;; `diredp-image-dired-comment-file',
;; `diredp-image-dired-comment-files-recursive',
;; `diredp-image-dired-copy-with-exif-name',
;; `diredp-image-dired-create-thumb',
;; `diredp-image-dired-delete-tag',
;; `diredp-image-dired-delete-tag-recursive',
;; `diredp-image-dired-display-thumb',
;; `diredp-image-dired-display-thumbs-recursive',
;; `diredp-image-dired-edit-comment-and-tags',
;; `diredp-image-dired-tag-file',
;; `diredp-image-dired-tag-files-recursive',
;; `diredp-image-show-this-file', `diredp-insert-as-subdir',
;; `diredp-insert-subdirs', `diredp-insert-subdirs-recursive',
;; `diredp-kill-this-tree', `diredp-list-marked-recursive',
;; `diredp-load-this-file', `diredp-mark-autofiles',
;; `diredp-marked', `diredp-marked-other-window',
;; `diredp-marked-recursive',
;; `diredp-marked-recursive-other-window',
;; `diredp-mark-files-regexp-recursive',
;; `diredp-mark-files-tagged-all', `diredp-mark-files-tagged-none',
;; `diredp-mark-files-tagged-not-all',
;; `diredp-mark-files-tagged-some',
;; `diredp-mark-files-tagged-regexp', `diredp-mark-region-files',
;; `diredp-mark/unmark-autofiles', `diredp-mark/unmark-extension',
;; `diredp-mouse-3-menu', `diredp-mouse-backup-diff',
;; `diredp-mouse-copy-tags', `diredp-mouse-describe-autofile',
;; `diredp-mouse-describe-file', `diredp-mouse-diff',
;; `diredp-mouse-do-bookmark', `diredp-mouse-do-byte-compile',
;; `diredp-mouse-do-chgrp', `diredp-mouse-do-chmod',
;; `diredp-mouse-do-chown', `diredp-mouse-do-compress',
;; `diredp-mouse-do-copy', `diredp-mouse-do-delete',
;; `diredp-mouse-do-grep', `diredp-mouse-do-hardlink',
;; `diredp-mouse-do-load', `diredp-mouse-do-print',
;; `diredp-mouse-do-remove-all-tags', `diredp-mouse-do-rename',
;; `diredp-mouse-do-set-tag-value',
;; `diredp-mouse-do-shell-command', `diredp-mouse-do-symlink',
;; `diredp-mouse-do-tag', `diredp-mouse-do-untag',
;; `diredp-mouse-downcase', `diredp-mouse-ediff',
;; `diredp-mouse-find-file',
;; `diredp-mouse-find-line-file-other-window',
;; `diredp-mouse-find-file-other-frame',
;; `diredp-mouse-find-file-reuse-dir-buffer',
;; `diredp-mouse-flag-file-deletion', `diredp-mouse-mark',
;; `diredp-mouse-mark-region-files', `diredp-mouse-mark/unmark',
;; `diredp-mouse-unmark', `diredp-mouse-upcase',
;; `diredp-mouse-view-file',
;; `diredp-multiple-w32-browser-recursive',
;; `diredp-nb-marked-in-mode-name', `diredp-next-dirline',
;; `diredp-next-line', `diredp-next-subdir', `diredp-omit-marked',
;; `diredp-omit-unmarked', `diredp-paste-add-tags-this-file',
;; `diredp-paste-replace-tags-this-file', `diredp-prev-dirline',
;; `diredp-previous-line', `diredp-prev-subdir',
;; `diredp-print-this-file', `diredp-relsymlink-this-file',
;; `diredp-remove-all-tags-this-file', `diredp-rename-this-file',
;; `diredp-send-bug-report',
;; `diredp-set-bookmark-file-bookmark-for-marked',
;; `diredp-set-bookmark-file-bookmark-for-marked-recursive',
;; `diredp-set-tag-value-this-file',
;; `diredp-shell-command-this-file', `diredp-show-metadata',
;; `diredp-show-metadata-for-marked', `diredp-sign-this-file',
;; `diredp-symlink-this-file', `diredp-tag-this-file',
;; `diredp-toggle-find-file-reuse-dir',
;; `diredp-toggle-marks-in-region', `diredp-touch-this-file',
;; `diredp-unmark-autofiles', `diredp-unmark-files-tagged-all',
;; `diredp-unmark-files-tagged-none',
;; `diredp-unmark-files-tagged-not-all',
;; `diredp-unmark-files-tagged-some', `diredp-unmark-region-files',
;; `diredp-untag-this-file', `diredp-upcase-recursive',
;; `diredp-up-directory', `diredp-up-directory-reuse-dir-buffer',
;; `diredp-upcase-this-file', `diredp-verify-this-file',
;; `diredp-w32-drives', `diredp-w32-drives-mode',
;; `global-dired-hide-details-mode' (Emacs 24.4+),
;; `toggle-diredp-find-file-reuse-dir'.
;;
;; User options defined here:
;;
;; `diredp-auto-focus-frame-for-thumbnail-tooltip-flag',
;; `diredp-compressed-extensions', `diredp-dwim-any-frame-flag'
;; (Emacs 22+), `diredp-image-preview-in-tooltip', `diff-switches',
;; `diredp-hide-details-initially-flag' (Emacs 24.4+),
;; `diredp-highlight-autofiles-mode',
;; `diredp-hide-details-propagate-flag' (Emacs 24.4+),
;; `diredp-ignore-compressed-flag',
;; `diredp-image-show-this-file-use-frame-flag' (Emacs 22+),
;; `diredp-max-frames', `diredp-prompt-for-bookmark-prefix-flag',
;; `diredp-w32-local-drives', `diredp-wrap-around-flag'.
;;
;; Non-interactive functions defined here:
;;
;; `derived-mode-p' (Emacs < 22), `diredp-all-files',
;; `diredp-ancestor-dirs', `diredp-bookmark',
;; `diredp-create-files-non-directory-recursive',
;; `diredp-delete-dups', `diredp-directories-within',
;; `diredp-dired-plus-description',
;; `diredp-dired-plus-description+links',
;; `diredp-dired-plus-help-link', `diredp-dired-union-1',
;; `diredp-dired-union-interactive-spec', `diredp-display-image'
;; (Emacs 22+), `diredp-do-chxxx-recursive',
;; `diredp-do-create-files-recursive', `diredp-do-grep-1',
;; `diredp-ensure-bookmark+', `diredp-ensure-mode',
;; `diredp-existing-dired-buffer-p', `diredp-fewer-than-2-files-p',
;; `diredp-fileset-1', `diredp-find-a-file-read-args',
;; `diredp-file-for-compilation-hit-at-point' (Emacs 24+),
;; `diredp-files-within', `diredp-files-within-1',
;; `diredp-fit-frame-unless-buffer-narrowed' (Emacs 24.4+),
;; `diredp-get-confirmation-recursive', `diredp-get-files',
;; `diredp-get-files-for-dir', `diredp-get-subdirs',
;; `diredp-hide-details-if-dired' (Emacs 24.4+),
;; `diredp-hide/show-details' (Emacs 24.4+),
;; `diredp-highlight-autofiles', `diredp-image-dired-required-msg',
;; `diredp-get-image-filename', `diredp-internal-do-deletions',
;; `diredp-list-files', `diredp-looking-at-p',
;; `diredp-make-find-file-keys-reuse-dirs',
;; `diredp-make-find-file-keys-not-reuse-dirs', `diredp-maplist',
;; `diredp-marked-here', `diredp-mark-files-tagged-all/none',
;; `diredp-mark-files-tagged-some/not-all',
;; `diredp-nonempty-region-p', `diredp-parent-dir',
;; `diredp-paste-add-tags', `diredp-paste-replace-tags',
;; `diredp-read-bookmark-file-args', `diredp-read-include/exclude',
;; `diredp-recent-dirs', `diredp-refontify-buffer',
;; `diredp-remove-if', `diredp-remove-if-not',
;; `diredp-root-directory-p', `diredp-set-header-line-breadcrumbs'
;; (Emacs 22+), `diredp-set-tag-value', `diredp-set-union',
;; `diredp-string-match-p', `diredp-tag',
;; `diredp-this-file-marked-p', `diredp-this-file-unmarked-p',
;; `diredp-this-subdir', `diredp-untag', `diredp-y-or-n-files-p'.
;;
;; Variables defined here:
;;
;; `diredp-bookmark-menu', `diredp-file-line-overlay',
;; `diredp-files-within-dirs-done', `diredp-font-lock-keywords-1',
;; `diredp-hide-details-last-state' (Emacs 24.4+),
;; `diredp-hide-details-toggled' (Emacs 24.4+),
;; `diredp-hide/show-menu', `diredp-list-files-map',
;; `diredp-loaded-p', `diredp-menu-bar-encryption-menu',
;; `diredp-menu-bar-images-menu.',
;; `diredp-menu-bar-immediate-menu',
;; `diredp-menu-bar-immediate-bookmarks-menu',
;; `diredp-menu-bar-immediate-encryption-menu',
;; `diredp-menu-bar-mark-menu', `diredp-menu-bar-operate-menu',
;; `diredp-menu-bar-operate-bookmarks-menu',
;; `diredp-menu-bar-operate-recursive-menu',
;; `diredp-menu-bar-regexp-menu',
;; `diredp-menu-bar-regexp-recursive-menu',
;; `diredp-menu-bar-subdir-menu', `diredp-navigate-menu',
;; `diredp-re-no-dot', `diredp-w32-drives-mode-map'.
;;
;; Macros defined here:
;;
;; `diredp-with-help-window'.
;;
;;
;; ***** NOTE: The following macros defined in `dired.el' have
;; been REDEFINED HERE:
;;
;; `dired-map-over-marks' - Treat multiple `C-u' specially.
;; `dired-mark-if' - Better initial msg - Emacs bug #8523.
;;
;;
;; ***** NOTE: The following functions defined in `dired.el' have
;; been REDEFINED or ADVISED HERE:
;;
;; `dired' - Handle non-positive prefix arg.
;; `dired-do-delete' - Display message to warn that marked,
;; not flagged, files will be deleted.
;; `dired-do-flagged-delete' - Display message to warn that flagged,
;; not marked, files will be deleted.
;; `dired-dwim-target-directory' - Uses `diredp-dwim-any-frame-flag'.
;; `dired-find-file' - Allow `.' and `..' (Emacs 20 only).
;; `dired-get-filename' - Test `./' and `../' (like `.', `..').
;; `dired-goto-file' - Fix Emacs bug #7126.
;; Remove `/' from dir before compare.
;; (Emacs < 24 only.)
;; `dired-hide-details-mode' - Respect new user options:
;; * `diredp-hide-details-initially-flag'
;; * `diredp-hide-details-propagate-flag'
;; (Emacs 24.4+)
;; `dired-insert-directory' - Compute WILDCARD arg for
;; `insert-directory' for individual file
;; (don't just use nil). (Emacs 23+, and
;; only for MS Windows)
;; `dired-insert-set-properties' - `mouse-face' on whole line.
;; `dired-mark-files-regexp' - Add regexp to `regexp-search-ring'.
;; More matching possibilities.
;; Added optional arg LOCALP.
;; `dired-mark-pop-up' - Delete the window or frame popped up,
;; afterward, and bury its buffer. Do not
;; show a menu bar for pop-up frame.
;; `dired-other-frame' - Handle non-positive prefix arg.
;; `dired-other-window' - Handle non-positive prefix arg.
;; `dired-pop-to-buffer' - Put window point at bob (bug #12281).
;; (Emacs 22-24.1)
;; `dired-read-dir-and-switches' - Non-positive prefix arg behavior.
;;
;;; NOT YET:
;;; ;; `dired-readin-insert' - Use t as WILDCARD arg to
;;; ;; `dired-insert-directory'. (Emacs 23+,
;;; ;; and only for MS Windows)
;;
;; `dired-revert' - Reset `mode-line-process' to nil.
;; `dired-switches-escape-p' - Made compatible with Emacs 20, 21.
;;
;;
;; ***** NOTE: The following functions are included here with little
;; or no change to their definitions. They are here to
;; take advantage of the new definition of macro
;; `dired-map-over-marks':
;;
;; `dired-do-redisplay', `dired-get-marked-files',
;; `dired-map-over-marks-check',
;; `image-dired-dired-insert-marked-thumbs',
;; `image-dired-dired-toggle-marked-thumbs'.
;;
;;
;; ***** NOTE: The following functions defined in `dired-aux.el' have
;; been REDEFINED HERE:
;;
;; `dired-do-byte-compile', `dired-do-compress', `dired-do-load' -
;; Redisplay only if at most one file is being treated.
;; `dired-do-isearch', `dired-do-isearch-regexp',
;; `dired-do-query-replace-regexp', `dired-do-search' -
;; Use new `dired-get-marked-files'.
;; `dired-insert-subdir-newpos' - If not a descendent, put at eob.
;; `dired-insert-subdir-validate' - Do nothing: no restrictions.
;; `dired-maybe-insert-subdir' - Go back to subdir line if in listing.
;;
;;
;; ***** NOTE: The following functions defined in `dired-x.el' have
;; been REDEFINED HERE:
;;
;; `dired-do-find-marked-files' -
;; Doc string reflects new `dired-simultaneous-find-file'.
;; `dired-do-run-mail' - Require confirmation.
;; `dired-mark-sexp' - 1. Variable `s' -> `blks'.
;; 2. Fixes to `uid' and `gid'.
;; `dired-mark-unmarked-files' (Emacs < 24 only) - Emacs 24+ version.
;; `dired-simultaneous-find-file' -
;; Use separate frames instead of windows if `pop-up-frames' is
;; non-nil, or if prefix arg < 0.
;;
;; ***** NOTE: (Emacs 20 only) The following variable defined in
;; `dired.el' has been REDEFINED HERE:
;;
;; `dired-move-to-filename-regexp' - Recognize file size in k etc.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change Log:
;;
;; 2017/01/12 dadams
;; dired-mark-files-regexp: Swapped prefix-arg behavior for relative and absolute name matching.
;; 2017/01/01 dadams
;; dired-mark-files-regexp: Fix to prompt for no prefix arg.
;; 2016/12/28 dadams
;; dired-mark-files-regexp: Corrected prompt string for Mark/UNmark. Thx to Tino Calancha.
;; 2016/11/20 dadams
;; diredp-menu-bar-operate-search-menu: Added dired-do-find-regexp and dired-do-find-regexp-and-replace.
;; Bind dired-do-search to M-a and dired-do-query(-replace)-regexp to M-q.
;; diredp-dired-plus-description: Added dired-do-find-regexp and dired-do-find-regexp-and-replace.
;; 2016/10/12 dadams
;; diredp-compressed-extensions: Added extensions .xz and .lzma. Thx to xuhdev (https://www.topbug.net/).
;; 2016/09/20 dadams
;; Emacs 25.1: Bind M-z to dired-do-compress-to (replaces c). (Emacs bug #24484.)
;; diredp-menu-bar-operate-menu: Added item: Compress to (dired-do-compress-to).
;; 2016/09/15 dadams
;; Added: diredp-max-frames.
;; dired-do-find-marked-files: Pass non-nil ARG to dired-get-marked-files only if it is a cons.
;; Clarified doc string wrt prefix arg.
;; dired-simultaneous-find-file: Require confirmation if more files than diredp-max-frames.
;; diredp-do-find-marked-files-recursive: Clarified doc string wrt prefix arg.
;; Thx to Tino Calancha.
;; 2016/09/14 dadams
;; diredp-dired-plus-description: Added entry for dired-hide-details-mode - ( key.
;; 2016/08/26 dadams
;; diredp-y-or-n-files-p: pop-to-buffer only when the buffer was created.
;; Update wrt vanilla (scroll actions).
;; diredp-do-query-replace-regexp-recursive:
;; Call diredp-get-confirmation-recursive.
;; Use only diredp-get-files, not dired-get-marked-files.
;; Non-positive prefix arg means DELIMITED.
;; 2016/08/08 dadams
;; diredp-menu-bar-mark-menu:
;; Added: dired-mark-files-containing-regexp, dired-mark-sexp, image-dired-mark-tagged-files,
;; 2016/05/28 dadams
;; diredp-mark-files-regexp-recursive: Use nil for dired-get-filename LOCALP arg.
;; dired-mark-files-regexp: Corrected doc string: absolute filename matching by default.
;; 2016/05/24 dadams
;; dired-mark-files-regexp: Added optional arg LOCALP, so can mark/unmark matching different file-name forms.
;; 2016/05/15 dadams
;; Added: diredp-bookmark-menu, diredp-hide/show-menu, diredp-navigate-menu.
;; Move insert after revert and rename it to Insert/Move-To This Subdir. Move create-directory before revert.
;; 2016/04/29 dadams
;; diredp-next-line: Respect goal-column.
;; 2016/01/24 dadams
;; Added: diredp-ensure-bookmark+, diredp-mark-autofiles, diredp-unmark-autofiles,
;; diredp-mark/unmark-autofiles, diredp-describe-autofile, diredp-show-metadata,
;; diredp-mouse-describe-autofile, diredp-describe-marked-autofiles, diredp-show-metadata-for-marked
;; Soft-require help-fns+.el (Emacs 22+) or help+20.el (Emacs 20-21).
;; Add to menu-bar menus:
;; diredp-(un)mark-autofiles, diredp-describe-autofile, diredp-describe-marked-autofiles.
;; diredp-menu-bar-immediate-menu: Add diredp-describe-file only if defined.
;; Bind diredp-describe-file to keys only if defined.
;; Use diredp-ensure-bookmark+ everywhere, instead of its definition.
;; diredp(-mouse)-describe-file: Define only if describe-file is defined. Removed raising error if not.
;; diredp-mouse-3-menu: Use diredp-describe-autofile if diredp-describe-file is not defined.
;; diredp-dired-plus-description: Add diredp-mouse-describe-autofile, when bound.
;; dired-mark-if: Do not count non-changes.
;; 2015/12/15 dadams
;; diredp-font-lock-keywords-1: Follow # with optional [/ ], for face diredp-number. Thx to Tino Calancha.
;; 2015/11/10 dadams
;; diredp-fileset(-other-window): Separate error msgs for unloaded filesets.el and empty filesets-data.
;; 2015/10/02 dadams
;; dired-mark-sexp: Like vanilla, skip extended attributes marker before setting NLINK. Thx to Tino Calancha.
;; 2015/09/29 dadams
;; diredp-delete-this-file: Redefined to use delete-file instead of dired-do-delete.
;; 2015/09/07 dadams
;; diredp-font-lock-keywords-1: Do not test diredp-ignore-compressed-flag when highlighting file names.
;; Use separate entries for compressed and non-compressed file names.
;; Added missing \\| before ignored compressed extensions.
;; 2015/09/06 dadams
;; diredp-compressed-extensions: Added .tgz. Removed duplicate .gz.
;; diredp-font-lock-keywords-1: Use regexp-opt where possible, instead of mapcar regexp-quote.
;; 2015/09/05 dadams
;; Added: diredp-compressed-extensions, diredp-ignore-compressed-flag, diredp-compressed-file-name,
;; diredp-dir-name.
;; diredp-font-lock-keywords-1:
;; Allow spaces in symlink names. Highlight compressed-file names, if diredp-ignore-compressed-flag.
;; Use diredp-compressed-extensions instead of hardcoding extensions.
;; Highlight d with diredp-dir-priv (fix).
;; Treat l in third column the same as - and d there.
;; Highlight whole line for D-flagged files, with face diredp-deletion-file-name.
;; Thx to Nick Helm.
;; 2015/08/30 dadams
;; dired-mark-sexp: Updated per Emacs 25 code.
;; 2015/07/30 dadams
;; diredp-fileset(-other-window): Changed key binding from C-x F to C-x C-M-f (conflicted with find-function).
;; 2015/06/24 dadams
;; Added: diredp-parent-dir, diredp-breadcrumbs-in-header-line-mode, diredp-set-header-line-breadcrumbs.
;; 2015/06/06 dadams
;; Added dired-other-(frame|window).
;; diredp-font-lock-keywords-1:
;; Use dired-re-maybe-mark and dired-re-inode-size for permission matchings and directory names.
;; dired(-other-(frame|window)) advice:
;; Add interactive spec, to handle arg <= 0 (broken by change to dired-read-dir-and-switches 2015/02/02).
;; diredp-dired-for-files: Typo: pass empy string.
;; 2015/06/05 dadams
;; Added: diredp-grepped-files-other-window as alias for diredp-compilation-files-other-window.
;; diredp-compilation-files-other-window: Added SWITCHES optional arg (prefix arg).
;; 2015/06/04 dadams
;; diredp-dired-for-files(-other-window):
;; Updated to fit change to dired-read-dir-and-switches made 2015/02/02: addition of READ-EXTRA-FILES-P.
;; Use prefix arg to prompt for switches.
;; 2015/05/31 dadams
;; Added: diredp-image-show-this-file,diredp-image-show-this-file-use-frame-flag, diredp-get-image-filename.
;; image-dired-dired-toggle-marked-thumbs, diredp-menu-bar-immediate-menu [image]:
;; Use diredp-get-image-filename.
;; Bound diredp-image-show-this-file to C-t I.
;; diredp-menu-bar-immediate-image-menu: Added diredp-image-show-this-file and dired-find-file.
;; Added autoload cookies for image commands.
;; 2015/04/16 dadams
;; Added: diredp-do-apply-function, diredp-do-apply-function-recursive. Added to menus. Bind to @, M-+ @.
;; dired-do-query-replace-regexp: Handle nil ARG properly.
;; 2015/03/26 dadams
;; Added: redefinitions of dired-do-isearch, dired-do-isearch-regexp, dired-do-query-replace-regexp,
;; dired-do-search, to handle multi-C-u.
;; Added: dired-nondirectory-p (Emacs 20), diredp-refontify-buffer.
;; dired-do-byte-compile, dired-do-load, : Corrected interactive spec, to treat more than two C-u as two.
;; dired-after-readin-hook: Add diredp-refontify-buffer. In particular, this ensures that reverting Dired
;; for a listing of explicit file names gets refontified. (Just turn-on-font-lock does not refontify.)
;; 2015/03/24 dadams
;; Added: diredp-compilation-files-other-window, diredp-file-for-compilation-hit-at-point.
;; 2015/03/06 dadams
;; Renamed: diredp-menu-bar-recursive-marked-menu to diredp-menu-bar-operate-recursive-menu.
;; Added: diredp-do-delete-recursive: M-+ D. Added to diredp-menu-bar-operate-recursive-menu.
;; Added: diredp-mark-files-regexp-recursive: M-+ % m. Added to diredp-menu-bar-regexp-recursive-menu.
;; 2015/03/04 dadams
;; Added: diredp-dwim-any-frame-flag, (redefinition of) dired-dwim-target-directory.
;; 2015/02/22 dadams
;; diredp-bookmark: Corrected for use without Bookmark+ - bookmark-store signature.
;; Pass correct value to bmkp-autofile-set for its MSG-P arg.
;; diredp-mouse-do-bookmark: Do not pass non-nil NO-MSG-P arg to diredp-bookmark.
;; 2015/02/03 dadams
;; Added: diredp-add-to-this-dired-buffer.
;; Removed: diredp-add-to-dired-buffer-other-window, diredp-dired-union-other-window.
;; diredp-dired-union-1: Removed optional arg OTHER-WINDOW-P.
;; diredp-menu-bar-subdir-menu: Added diredp-add-to-this-dired-buffer.
;; dired-read-dir-and-switches, diredp-dired-union-interactive-spec:
;; Added optional arg DIRED-BUFFER. If nil, use current buffer name as default when reading buffer name.
;; 2015/02/02 dadams
;; Added: diredp-add-to-dired-buffer, diredp-add-to-dired-buffer-other-window, diredp-set-union,
;; diredp-existing-dired-buffer-p.
;; Bind diredp-add-to-dired-buffer(-other-window) globally to C-x E, C-x 4 E.
;; diredp-dired-union(-other-window):
;; Added args DIRNAME and EXTRA. Pass them to diredp-dired-union-1. Moved "UNION" to *-interactive-spec.
;; Pass values for new args NO-DIRED-BUFS and READ-EXTRA-FILES-P to diredp-dired-union-interactive-spec.
;; diredp-dired-union-interactive-spec:
;; Added args NO-DIRED-BUFS and READ-EXTRA-FILES-P. Use (updated) dired-read-dir-and-switches.
;; Delete dead buffers from dired-buffers. Remove DIRNAME buffer as candidate.
;; Apply expand-file-name to default-directory. Return list of DIRNAME BUFS SWITCHES EXTRA-FILES.
;; diredp-dired-union-1:
;; Added args DIRED-NAME and EXTRA.
;; For existing Dired buffer whose dired-directory is a cons:
;; Include its current listing. Replace buffer with new one of same name, after deleting its window.
;; dired-read-dir-and-switches:
;; Added arg READ-EXTRA-FILES-P.
;; If chosen Dired buffer exists and is an ordinary listing then start out with its directory-files.
;; diredp-dired-union, diredp-fileset, diredp-dired-recent-dirs: Bind globally, not just in Dired mode.
;; 2015/01/30 dadams
;; dired-read-dir-and-switches: Remove any killed buffers from dired-buffers, before using for completion.
;; 2014/10/25 dadams
;; diredp-dired-union-interactive-spec: Typo: quote buffer-name-history. Pass other-window STRING.
;; diredp-dired-union-other-window: Pass other-window STRING.
;; dired-read-dir-and-switches: Include STRING for reading buffer name also.
;; dired (defadvice): Corrected doc string for prefix arg >= and <= 0.
;; 2014/10/15 dadams
;; diredp-hide-details-initially-flag:
;; Added :set, to ensure that diredp-hide-details-last-state is kept up-to-date.
;; 2014/09/28 dadams
;; Added: diredp-recent-dirs, diredp-read-include/exclude, diredp-root-directory-p, diredp-remove-if.
;; diredp-dired-recent-dirs(-other-window): Added optional ARG. Use diredp-recent-dirs. Pass SWITCHES.
;; dired-read-dir-and-switches: Use diredp-root-directory-p.
;; Bound diredp-dired-recent-dirs(-other-window) to C-x R and C-x 4 R.
;; Added diredp-dired-recent-dirs to Dir menu.
;; 2014/09/27 dadams
;; Added: diredp-dired-recent-dirs, diredp-dired-recent-dirs-other-window, diredp-delete-dups.
;; 2014/09/26 dadams
;; diredp-mouseover-help: dired-get-filename etc. has to be inside the save-excursion.
;; diredp-image-dired-create-thumb: Added FILE arg. Use numeric prefix arg as the new thumbnail size.
;; 2014/09/22 dadams
;; diredp-mouse-3-menu: Do not place overlay unless on a file/dir name (i.e., dired-get-filename).
;; 2014/09/15 dadams
;; dired-read-dir-and-switches: Made it (thus dired too) an Icicles multi-command.
;; dired (defadvice): Added doc about using it with Icicles.
;; 2014/09/14 dadams
;; Added: diredp-kill-this-tree.
;; Removed: diredp-dired-files(-other-window), diredp-dired-files-interactive-spec.
;; dired-read-dir-and-switches:
;; Based on diredp-dired-files-interactive-spec implementation now, but:
;; Moved unwind-protect outside call to list. completing-read, not read-string, for DIRBUF.
;; Do not allow inclusion of root directories. Protected icicle-sort-comparer with boundp.
;; dired-insert-subdir-validate: Make it a no-op.
;; dired advice (doc string): Mention wildcards, Icicles.
;; diredp-dired-for-files(-other-window):
;; Use dired-read-dir-and-switches and dired, not diredp-dired-files-interactive-spec and
;; diredp-dired-files.
;; diredp-menu-bar-immediate-menu, diredp-mouse-3-menu:
;; Added item for diredp-kill-this-tree.
;; Corrected visible condition: expand-file-name, so ~/ compares with its expansion.
;; diredp-font-lock-keywords-1: Include period (.) for diredp(-compressed)-file-suffix.
;; 2014/09/09 dadams
;; Added: dired-read-dir-and-switches.
;; Advise dired, for doc string.
;; dired-get-filename: Hack for Emacs 20-22, to expand ~/...
;; 2014/09/07 dadams
;; Added: redefinitions of dired-insert-subdir-newpos, dired-insert-subdir-validate.
;; 2014/07/26 dadams
;; diredp-do-find-marked-files-recursive:
;; Only ARG >= 0 ignores marks now. And ARG <= 0 means find but do not display.
;; 2014/07/13 dadams
;; diredp-mouseover-help: Wrap (goto-char pos) in save-excursion (Emacs bug #18011).
;; 2014/07/12 dadams
;; Faces diredp(-tagged)-autofile-name: Made paler/darker (less saturated).
;; Moved diredp-highlight-autofiles before diredp-highlight-autofiles-mode, so will be
;; defined for first revert.
;; diredp-mouse-3-menu: Renamed items Tag, Untag to Add Tags, Remove Tags.
;; diredp-dired-plus-description: Updated.
;; 2014/07/11 dadams
;; Added: diredp-highlight-autofiles-mode, diredp-highlight-autofiles,
;; diredp-autofile-name, diredp-tagged-autofile-name.
;; Soft-require bookmark+.el. Soft-require highlight.el if bookmark+.el is provided.
;; diredp-menu-bar-subdir-menu: Added item Toggle Autofile Highlighting.
;; Removed unused face: diredp-display-msg.
;; 2014/06/29 dadams
;; dired-get-marked-files, diredp-internal-do-deletions:
;; Remove nils from dired-map-over-marks result.
;; 2014/05/28 dadams
;; diredp-mode-line-marked: Use DarkViolet for both light and dark background modes.
;; 2014/05/23 dadams
;; Added: diredp-with-help-window.
;; diredp-list-files, diredp-dired-plus-help:
;; Use diredp-with-help-window, not with-output-to-temp-buffer. See Emacs bug #17109.
;; 2014/05/06 dadams
;; Added: diredp-image-dired-required-msg, diredp-list-files-map,
;; diredp-find-line-file-other-window, diredp-mouse-find-line-file-other-window,
;; image-dired-dired-toggle-marked-thumbs, diredp-list-marked.
;; Soft-require image-dired.el and image-file.el.
;; diredp-image-dired-create-thumb: Define unconditionally.
;; image-dired-dired-insert-marked-thumbs, diredp-image-dired-comment-file,
;; diredp-image-dired-tag-file, diredp-image-dired-delete-tag,
;; diredp-image-dired-display-thumb, diredp-image-dired-copy-with-exif-name,
;; diredp-image-dired-edit-comment-and-tags, diredp-do-display-images:
;; Define unconditionally and raise error if no image-(dired|file).el.
;; diredp-menu-bar-immediate-image-menu, diredp-menu-bar-images-menu,
;; diredp-menu-bar-images-recursive-menu, image-dired-mark-tagged-files:
;; Define unconditionally and use :enable.
;; diredp-menu-bar-images-menu, diredp-menu-bar-images-recursive-menu:
;; Add defalias so can use menu-item with :enable.
;; diredp-list-files: Add properties mouse-face, keymap, and help-echo.
;; diredp-mouseover-help: Make it work also for diredp-list-files listings.
;; image-dired-dired-insert-marked-thumbs: Add autoload cookie.
;; dired-get-marked-files: Pass non-nil 2nd arg to dired-get-filename, to include . and .. .
;; Bind diredp-list-marked to C-M-l and diredp-list-marked-recursive to M+ C-M-l.
;; diredp-insert-subdirs: Exclude . and .., as dired-get-marked-files can now include them.
;; diredp-menu-bar-operate-menu: Add diredp-menu-bar-operate-menu to menu.
;; diredp-dired-plus-description: Mention diredp-list-marked*.
;; 2014/05/03 dadams
;; dired-switches-escape-p: Use dired-switches-check if available, based on bug #17218 fix.
;; 2014/04/25 dadams
;; diredp-image-dired-create-thumb:
;; Do not call diredp-image-dired-create-thumb twice: reuse THUMB-NAME.
;; 2014/04/24 dadams
;; Added: diredp-mouseover-help, diredp-auto-focus-frame-for-thumbnail-tooltip-flag,
;; diredp-image-preview-in-tooltip.
;; dired-insert-set-properties: Show image-file preview in tooltip.
;; diredp-image-dired-create-thumb: Return thumbnail file name or nil.
;; 2014/04/23 dadams
;; Added: diredp-looking-at-p.
;; dired-insert-set-properties: Applied fix for bug #17228.
;; 2014/04/05 dadams
;; Added: diredp-do-bookmark-dirs-recursive.
;; Renamed from bmkp-create-dired-bookmarks-recursive in bookmark+-1.el (removed).
;; Bound to M-B (M-S-b).
;; Added to menus *-subdir-menu, *-operate-bookmarks-menu, *-bookmarks-menu.
;; diredp-get-confirmation-recursive: Added optional TYPE arg.
;; diredp-insert-subdirs-recursive: Call diredp-get-confirmation-recursive with TYPE arg.
;; 2014/02/16 dadams
;; dired-pop-to-buffer: Do not redefine for Emacs > 24.1.
;; dired-mark-pop-up: Updated doc string.
;; 2014/02/13 dadams
;; Added: diredp-fileset-other-window, diredp-fileset-1.
;; diredp-fileset: Use diredp-fileset-1.
;; Bind diredp-dired-union(-other-window) to C-x D, C-x 4 D,
;; diredp-fileset(-other-window) to C-x F, C-x 4 F.
;; Use diredp-fileset-other-window, not diredp-fileset, in menu.
;; 2014/02/03 dadams
;; Added: diredp-hide-subdir-nomove.
;; Added: dired-goto-file for Emacs 24+ - open hidden parent dir, so can goto destination.
;; Replace bindings for dired-hide-subdir with diredp-hide-subdir-nomove.
;; Bind dired-hide-subdir to M-$ (not $).
;; 2014/02/02 dadams
;; dired-goto-file: Redefine only for Emacs < 24.
;; 2014/01/15 dadams
;; Bind diredp-toggle-find-file-reuse-dir to C-M-R (aka C-M-S-r).
;; 2014/01/05 dadams
;; Bind dired-omit-mode (aka dired-omit-toggle) to C-x M-o.
;; 2013/12/05 dadams
;; diredp-do-grep-1: Call grep-default-command with arg, if grep+.el is loaded.
;; 2013/11/05 dadams
;; Added: diredp-get-subdirs.
;; diredp-get-files, diredp-get-files-for-dir, diredp-marked-here:
;; Added optional arg NIL-IF-NONE-P.
;; diredp-get-files: Pass INCLUDE-DIRS-P to diredp-files-within.
;; 2013/11/04 dadams
;; Renamed Bookmarks submenus to Bookmark.
;; Added Bookmark Dired Buffer to Dir menu.
;; Alias dired-toggle-marks to dired-do-toggle for Emacs 20, instead of backwards for others.
;; Use dired-toggle-marks everywhere instead of dired-do-toggle.
;; 2013/11/03 dadams
;; Created submenus of Multiple menu: Bookmarks, Search.
;; Created submenus of Multiple > Marked Here and Below menu:
;; Images, Encryption, Search, Bookmarks.
;; Reordered menus.
;; 2013/09/26 dadams
;; diredp-next-line: Use let*, so line-move sees let bindings.
;; 2013/08/11 dadams
;; diredp-dired-files-interactive-spec:
;; Protect icicle-file-sort with boundp. Thx to Vladimir Lomov.
;; 2013/08/06 dadams
;; diredp-display-image,diredp-menu-bar-immediate-image-menu (:enable's):
;; Protect diredp-string-match-p from nil argument.
;; 2013/07/24 dadams
;; Added: diredp-nonempty-region-p. Use everywhere, in place of its definition.
;; 2013/07/21 dadams
;; Added: diredp-image-dired-(comment-file|copy-with-exif-name|(create|display)-thumb|
;; delete-tag|edit-comment-and-tags|tag-file),
;; diredp-string-match-p, diredp-menu-bar-immediate-image-menu.
;; Put this-file image commands on new menu diredp-menu-bar-immediate-image-menu.
;; diredp-menu-bar-images-menu: Added diredp-do-display-images.
;; Use diredp-string-match-p instead of string-match where appropriate.
;; diredp-find-a-file-read-args: Removed #' from lambda.
;; 2013/07/19 dadams
;; Added redefinition of dired-hide-details-mode.
;; Added: diredp-hide-details-propagate-flag, diredp-hide-details-initially-flag,
;; diredp-hide-details-last-state, diredp-hide-details-toggled,
;; diredp-hide-details-if-dired, global-dired-hide-details-mode,
;; diredp-fit-frame-unless-buffer-narrowed, diredp-hide/show-details,
;; diredp-do-display-images, diredp-display-image.
;; On dired-after-readin-hook: diredp-hide/show-details.
;; On dired-hide-details-mode-hook: diredp-fit-frame-unless-buffer-narrowed.
;; diredp-maplist: Use diredp-maplist, not maplist, in recursive call.
;; diredp-next-line: Added bobp test for negative ARG.
;; Emacs 20 line-move returns nil, so use (progn ... t).