-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdired+.el
17066 lines (15464 loc) · 879 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-2023, Drew Adams, all rights reserved.
;; Created: Fri Mar 19 15:58:58 1999
;; Version: 2023.05.28
;; Package-Requires: ()
;; Last-Updated: Sun May 28 08:14:30 2023 (-0700)
;; By: dradams
;; Update #: 13477
;; URL: https://www.emacswiki.org/emacs/download/dired%2b.el
;; Doc URL: https://www.emacswiki.org/emacs/DiredPlus
;; Keywords: unix, mouse, directories, diredp, dired
;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x, 25.x, 26.x, 27.x
;;
;; Features that might be required by this library:
;;
;; `apropos', `apropos+', `auth-source', `autofit-frame', `avoid',
;; `backquote', `bookmark', `bookmark+', `bookmark+-1',
;; `bookmark+-bmu', `bookmark+-key', `bookmark+-lit', `button',
;; `bytecomp', `cconv', `cl', `cl-generic', `cl-lib', `cl-macs',
;; `cmds-menu', `col-highlight', `crosshairs', `custom', `dired',
;; `dired+', `dired-aux', `dired-loaddefs', `dired-x', `doremi',
;; `doremi-frm', `easymenu', `eieio', `eieio-core',
;; `eieio-loaddefs', `epg-config', `facemenu', `facemenu+',
;; `faces', `faces+', `fit-frame', `font-lock', `font-lock+',
;; `font-lock-menus', `format-spec', `frame-cmds', `frame-fns',
;; `gv', `help+', `help-fns', `help-fns+', `help-macro',
;; `help-macro+', `help-mode', `hexrgb', `highlight', `hl-line',
;; `hl-line+', `image', `image-dired', `image-file', `image-mode',
;; `info', `info+', `kmacro', `macroexp', `menu-bar', `menu-bar+',
;; `misc-cmds', `misc-fns', `mwheel', `naked', `package',
;; `palette', `password-cache', `pp', `pp+', `radix-tree', `rect',
;; `replace', `ring', `second-sel', `seq', `strings', `syntax',
;; `tabulated-list', `text-mode', `thingatpt', `thingatpt+',
;; `timer', `url-handlers', `url-parse', `url-vars', `vline',
;; `w32-browser', `w32browser-dlgopen', `wid-edit', `wid-edit+',
;; `widget', `zones'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; 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'
;;
;;
;; Quick Viewing While Navigating
;; ------------------------------
;;
;; You can use key `C-down' or `C-up' to navigate to the next or
;; previous file line, respectively, and at the same time show its
;; file in another window. The focus remains on the Dired buffer.
;; A numeric prefix arg means move that many lines first.
;;
;; Names of files and directories that match either of the options
;; `diredp-visit-ignore-extensions' or `diredp-visit-ignore-regexps'
;; are skipped.
;;
;; You can use `e' to show the file of the current line. If it is
;; already shown in the same frame, and if Dired is the only other
;; window there, then the file is hidden (its window is deleted).
;;
;;
;; Font-Lock Highlighting
;; ----------------------
;;
;; 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', `dired-omit-extensions', and
;; `diredp-omit-files-font-lock-regexp'. 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 `C-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' is 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.
;;
;; Note too that if you have inserted subdir listings then 4 `C-u',
;; which includes both `.' and `..', includes them for the main
;; listing and for each inserted subdir listing. That is, since the
;; same directory is listed twice, as both parent and child, it is
;; also included twice in the list returned by
;; `dired-get-marked-files', typically with slightly different
;; syntax. If this is problematic for a given use of
;; `dired-get-marked-files' then you'll want to remove duplicates
;; (which, again, likely differ in syntax though they represent the
;; same directory).
;;
;; The same thing happens if you explicitly mark the same
;; subdirectory in both its own listing and its parent directory.
;; `dired-get-marked-files' includes both names. (This is also true
;; for vanilla Emacs.)
;;
;;
;; 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 such a
;; descendant directory is listed in a Dired buffer then its marked
;; files and subdirs are handled the same way. If there is no Dired
;; buffer that lists a given marked subdirectory then all of its
;; files and subdirs are acted on.
;;
;; For most such here-and-below commands, a prefix argument means
;; ignore all marks. The commands then act on all files in the
;; current Dired buffer and all of its subdirectories, recursively.
;;
;; But here-and-below commands that unmark or change marks act
;; differently for different kinds of prefix argument:
;;
;; * A non-positive prefix arg means ignore subdir markings and act
;; instead on ALL subdirs.
;;
;; * A non-negative prefix arg means do not change marks on subdirs
;; themselves.
;;
;; For example, `M-+ U' removes all marks, including from marked
;; subdirs, recursively. `C-- M-+ U' removes them from all files in
;; all subdirs (marked or not), recursively. `C-9 M-+ U' removes all
;; marks, recursively, except the marks on subdirs themselves. `C-0
;; M-+ U' acts like those two combined: it descends everywhere,
;; ignoring which subdirs are marked, but it does not remove marks
;; from subdirs themselves.
;;
;; All of the `diredp-*-recursive' commands are on prefix key `M-+',
;; and most are available on submenu `Marked Here and Below' of the
;; `Multiple' menu-bar menu. The commands that unmark and change
;; marks are also in submenu `Here and Below' of menu-bar menu
;; `Marks'.
;;
;; If you use library `Icicles' then you have the following
;; 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.
;;
;;
;; Dired Snapshots: Saving and Restoring Dired Listings
;; ----------------------------------------------------
;;
;; Suppose you use a command such as `find-name-dired', to generate a
;; Dired buffer that lists files from various places. The search
;; part of that operation might take a long time.
;;
;; And suppose that you later want to get back to such a listing,
;; even if that buffer no longer exists. In particular, maybe you
;; want to get to it in another Emacs session.
;;
;; And suppose that you don't want to pay the penalty of performing
;; the `find' search again, and you're content with the set of file
;; names found by the original search. That is, you don't care
;; whether that set of names is still 100% up-to-date.
;;
;; In such a context you want, in effect, to create a Dired buffer
;; snapshot of some sort - you want to record the set of names that
;; your search found, and later use them again in Dired.
;;
;; Dired+ gives you two ways to do this. Both involve first creating
;; a Dired buffer that's produced from an explicit set of file names,
;; from anywhere, rather than one that's produced using `ls' or
;; similar, and then saving that set of file names for re-creating
;; such a Dired buffer later.
;;
;; 1. Use `C-M-*' (`diredp-marked-other-window') or `diredp-marked',
;; to create a snapshot Dired buffer. Then bookmark that buffer.
;; Just jump to the bookmark to restore the snapshot buffer.
;;
;; 2. Use command `diredp-define-snapshot-dired-commands', to create
;; two commands (for same-window and other-window) that will
;; create a snapshot Dired buffer. Save the `defun's of those
;; commands to your init file, for persistent access.
;;
;; The saved set of files, whether embedded in a bookmark or in a
;; special Dired command, is a snapshot of the files available at a
;; particular time.
;;
;; When you later use Dired with that explicit set of file names,
;; only those files are listed - if a name no longer corresponds to
;; an existing file then it is ignored. The resulting Dired buffer
;; represents the current state of the file system, but only as far
;; as the files it lists are concerned.
;;
;; I think the first approach is generally preferable, but you might
;; prefer the second.
;;
;; If you use approach #1 then you also need my library Bookmark+:
;;
;; https://www.emacswiki.org/emacs/BookmarkPlus
;;
;; If you bookmark a Dired buffer without using Bookmark+ then the
;; bookmark records only the Dired directory name. It doesn't record
;; the snapshot information - the explicit list of files to be
;; restored. (It also doesn't record the `ls' switches or which
;; files were marked in the bookmarked snapshot listing, so you can't
;; restore them.)
;;
;; Both approaches, #1 and #2, use the marked files and dirs as the
;; set to snapshot. More precisely, they use the Dired+ version of
;; function `dired-get-marked-files'. That means that you can use a
;; prefix arg to get a different set of files to snapshot, instead of
;; those that are explicitly marked. See the doc strings.
;;
;; Note too that it is the full content of the original Dired buffer
;; that's used to define the files to snapshot. In particular,
;; inserted subdir listings are included.
;;
;;
;; 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 D A', lets
;; you add arbitrary file and directory names to an existing Dired
;; buffer.
;;
;; * `diredp-dired-union', bound globally to `C-x D U', 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 open an Emacs fileset in Dired mode, using `C-x D S' or
;; `C-x 4 D S'. See the Emacs manual, node Filesets, or
;; https://www.emacswiki.org/emacs/FileSets, for info about filesets.
;;
;; You can visit your recent files or directories in Dired mode,
;; using `C-x D R' or `C-x D r'. Like the other commands on prefix
;; key `C-x D', these Dired listings are composed of arbitrary files;
;; they're not the output of `ls'.
;;
;; You can revert (using `g') or sort any Dired buffer that lists
;; arbitrary files, which includes a buffer created with the commands
;; on prefix keys `C-x D' and `C-x 4 D' and a buffer created with
;; commands created using command
;; `diredp-define-snapshot-dired-commands'.
;;
;; You can also sort such a buffer in various ways, but you need to
;; use `C-M-L' (aka `C-M-S-l') to do so - you can't use the ordinary
;; Dired sort commands, such as `s'. You're prompted for the sort
;; order. The default sort order for such buffers is determined by
;; option `diredp-default-sort-arbitrary-function'.
;;
;; When using a Dired buffer that lists arbitrary files, other than
;; one composed of recent files, be aware that any operation that
;; reverts the listing relists the same file names, and only those
;; that correspond to currently existing files. This means that:
;;
;; 1. If any of the files no longer exist then they will no longer be
;; listed (which is likely what you would expect).
;;
;; 2. If any of the files has been renamed then it will no longer be
;; listed (which is likely not what you would expect). This
;; applies to the use of WDired to rename files: the renamed files
;; are not listed when you return to Dired from WDired. It
;; applies also to the use of `R' (`dired-do-rename').
;;
;; (With Emacs prior to version 28 you can't use WDired on a
;; recent-files buffer at all, because such a buffer uses a
;; `revert-buffer-function' that updates the file list to show the
;; currently recent files, and older versions of WDired hard-code the
;; function used to revert back to Dired mode when you exit WDired.)
;;
;; 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.
;;
;;
;; Mode-Line
;; ---------
;;
;; The number of files and dirs that are marked with `*', and the
;; number that are flagged for deletion (marked `D') are indicated in
;; the mode-line. When the cursor is on such a line the indication
;; tells you how many more there are. For example, if the cursor is
;; on the line of the third file that is marked `*', and there are
;; seven of them total, then the mode-line shows `3/7*'.
;;
;; The mode-line also indicates, for the current listing (which could
;; be a subdir listing), how many files and dirs are listed. If the
;; cursor is on the 27th file in a listing of 78 files then the
;; mode-line shows 27/78.
;;
;; For counting files and dirs in a listing, option
;; `diredp-count-.-and-..-flag' controls whether to count the lines
;; for `.' and `..'. By default it is nil, meaning they are not
;; counted.
;;
;;
;; If You Use Dired+ in Terminal Mode
;; ----------------------------------
;;
;; By default, Dired+ binds some keys that can be problematic in some
;; terminals when you use Emacs in terminal mode (i.e., `emacs -nw').
;; This is controlled by option
;; `diredp-bind-problematic-terminal-keys'.
;;
;; In particular, keys that use modifiers Meta and Shift together can
;; be problematic. If you use Dired+ in text-only terminal, and you
;; find that your terminal does not support such keys, then you might
;; want to customize the option to set the value to `nil', and then
;; bind the commands to some other keys, which your terminal
;; supports.
;;
;; The problematic keys used by Dired+ include these:
;;
;; `M-M' (aka `M-S-m') - `diredp-chmod-this-file'
;; `M-O' (aka `M-S-o') - `diredp-chown-this-file'
;; `M-T' (aka `M-S-t') - `diredp-touch-this-file'
;; `C-M-B' (aka `C-M-S-b') - `diredp-do-bookmark-in-bookmark-file'
;; `C-M-G' (aka `C-M-S-g') - `diredp-chgrp-this-file'
;; `C-M-R' (aka `C-M-S-r') - `diredp-toggle-find-file-reuse-dir'
;; `C-M-T' (aka `C-M-S-t') - `dired-do-touch'
;; `M-+ M-B' (aka `M-+ M-S-b') -
;; `diredp-do-bookmark-dirs-recursive'
;; `M-+ C-M-B' (aka `M-+ C-M-S-b') -
;; `diredp-do-bookmark-in-bookmark-file-recursive'
;; `M-+ C-M-T' (aka `M-+ C-M-S-t') - `diredp-do-touch-recursive'
;;
;; (See also `(info "(org) TTY keys")' for more information about
;; keys that can be problematic in a text-only terminal.)
;;
;;
;; 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-omit-file-name', `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-file-to-recentf', `diredp-add-this-to-recentf',
;; `diredp-add-to-dired-buffer', `diredp-add-to-this-dired-buffer',
;; `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-change-ls-switches', `diredp-change-marks-recursive'
;; (Emacs 22+), `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-abs-filenames-as-kill',
;; `diredp-copy-abs-filenames-as-kill-recursive',
;; `diredp-copy-filename-as-kill-recursive',
;; `diredp-copy-tags-this-file', `diredp-copy-this-file',
;; `diredp-create-file-here', `diredp-decrypt-this-file',
;; `diredp-define-snapshot-dired-commands',
;; `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-recent-files',
;; `diredp-dired-recent-files-other-window',
;; `diredp-dired-this-subdir', `diredp-dired-union',
;; `diredp-do-add-to-recentf',
;; `diredp-do-aggregate-apply-to-marked',
;; `diredp-do-aggregate-eval-in-marked',
;; `diredp-do-apply/eval-marked',
;; `diredp-do-apply/eval-marked-recursive',
;; `diredp-do-apply-to-marked',
;; `diredp-do-apply-to-marked-recursive',
;; `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-command-in-marked',
;; `diredp-do-command-in-marked-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-eval-in-marked',
;; `diredp-do-eval-in-marked-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-remove-from-recentf', `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-auto-save-files-recursive',
;; `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', `diredp-mark-autofiles',
;; `diredp-marked', `diredp-marked-other-window',
;; `diredp-marked-recursive',
;; `diredp-marked-recursive-other-window',
;; `diredp-mark-extension-recursive',
;; `diredp-mark-files-containing-regexp-recursive',
;; `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-if-sexp',
;; `diredp-mark-if-sexp-recursive', `diredp-mark-region-files',
;; `diredp-mark-region-files-with-char',
;; `diredp-mark-sexp-recursive' (Emacs 22+),
;; `diredp-mark/unmark-autofiles', `diredp-mark/unmark-extension',
;; `diredp-mark-with-char', `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-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-move-file' (Emacs 24+),
;; `diredp-move-files-named-in-kill-ring', `diredp-move-this-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-files', `diredp-paste-replace-tags-this-file',
;; `diredp-prev-dirline', `diredp-previous-line',
;; `diredp-prev-subdir', `diredp-print-this-file',
;; `diredp-quit-window-kill' (Emacs 24+),
;; `diredp-relsymlink-this-file',
;; `diredp-remove-all-tags-this-file',
;; `diredp-remove-file-from-recentf',
;; `diredp-remove-inserted-subdirs',
;; `diredp-remove-this-from-recentf', `diredp-rename-this-file',
;; `diredp-restore-markings', `diredp-save-markings',
;; `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-sort-arbitrary-command', `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-all-files-recursive' (Emacs 22+),
;; `diredp-unmark-all-marks-recursive' (Emacs 22+),
;; `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-visit-next-file', `diredp-visit-previous-file',
;; `diredp-visit-this-file', `diredp-w32-drives',
;; `diredp-w32-drives-mode', `diredp-yank-files',
;; `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-bind-problematic-terminal-keys',
;; `diredp-case-fold-search', `diredp-compressed-extensions',
;; `diredp-count-.-and-..-flag' (Emacs 22+),
;; `diredp-default-sort-arbitrary-function',
;; `diredp-do-report-echo-limit', `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-list-file-attributes', `diredp-max-frames',
;; `diredp-move-file-dirs' (Emacs 24+),
;; `diredp-omit-files-font-lock-regexp',
;; `diredp-omit-lines-regexp',
;; `diredp-prompt-for-bookmark-prefix-flag',
;; `diredp-recent-dirs-source',
;; `diredp-recent-files-quit-kills-flag',
;; `diredp-switches-in-mode-line',
;; `diredp-toggle-dot+dot-dot-flag',
;; `diredp-visit-ignore-extensions', `diredp-visit-ignore-regexps',
;; `diredp-w32-local-drives', `diredp-wrap-around-flag'.
;;
;; Non-interactive functions defined here:
;;
;; `derived-mode-p' (Emacs < 22),
;; `diredp--add-default-dir-to-recentf',
;; `diredp--add-dired-to-invisibility-hook', `diredp-all-files',
;; `diredp-ancestor-dirs', `diredp-apply-to-this-file',
;; `diredp-bookmark', `diredp-copy-as-kill-from-clipboard',
;; `diredp-create-files-non-directory-recursive',
;; `diredp-define-snapshot-dired-commands-1', `diredp-delete-dups',
;; `diredp-delete-if', `diredp-delete-if-not',
;; `diredp-describe-file-1', `diredp-directories-within',
;; `diredp-dired-plus-description',
;; `diredp-dired-plus-description+links',
;; `diredp-dired-plus-help-link', `diredp--dired-recent-files-1',
;; `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-fn-nonzero-arity',
;; `diredp-ensure-fn-zero-arity', `diredp-ensure-mode',
;; `diredp-eval-in-this-file', `diredp-existing-dired-buffer-p',
;; `diredp-fewer-than-2-files-p',
;; `diredp-fewer-than-echo-limit-files-p',
;; `diredp-fewer-than-N-files-p', `diredp-fileset-1',
;; `diredp-find-a-file-read-args',
;; `diredp-file-content-description',
;; `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-fit-one-window-frame', `diredp-full-file-name-less-p',
;; `diredp-full-file-name-more-p',
;; `diredp-get-args-for-diredp-marked',
;; `diredp-get-args-for-snapshot-cmd',
;; `diredp-get-confirmation-recursive', `diredp-get-files',
;; `diredp-get-files-for-dir', `diredp-get-image-filename',
;; `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-internal-do-deletions', `diredp-invoke-command',
;; `diredp-invoke/eval-in-this-file', `diredp-invoke-in-this-file',
;; `diredp-last-file-name-part',
;; `diredp-last-file-name-part-less-p',
;; `diredp-last-file-name-part-more-p', `diredp-list-file',
;; `diredp-list-files', `diredp-looking-at-p',
;; `diredp-make-find-file-keys-reuse-dirs',
;; `diredp-make-find-file-keys-not-reuse-dirs',
;; `diredp-make-obsolete', `diredp-make-obsolete-variable',
;; `diredp-maplist', `diredp-map-over-marks-and-report',
;; `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-prefix-arg-all-files', `diredp-read-bookmark-file-args',
;; `diredp-read-command', `diredp-read-expression' (Emacs 22+),
;; `diredp-read-include/exclude', `diredp-read-regexp',
;; `diredp-recent-dirs', `diredp-recent-files-buffer',
;; `diredp-refontify-buffer', `diredp-remove-if',
;; `diredp-remove-if-not', `diredp-replace-dir-sep-in-string',
;; `diredp-report-file-result', `diredp-report-summary',
;; `diredp-revert-displayed-recentf-buffers',
;; `diredp--reuse-dir-buffer-helper', `diredp-root-directory-p',
;; `diredp-set-header-line-breadcrumbs' (Emacs 22+),
;; `diredp-set-tag-value', `diredp-set-union',
;; `diredp--set-up-font-locking', `diredp--snapshot-cmd-name-time',
;; `diredp-sort-arbitrary', `diredp-string-less-p',
;; `diredp-string-match-p', `diredp-tag',
;; `diredp-this-file-marked-p', `diredp-this-file-unmarked-p',
;; `diredp-this-subdir', `diredp-untag',
;; `diredp-visit-ignore-regexp', `diredp-y-or-n-files-p'.
;;
;; Variables defined here:
;;
;; `diredp-bookmark-menu', `diredp-dir-sep-replacement',
;; `diredp-file-line-overlay', `diredp-filename-separator',
;; `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-images-recursive-menu',
;; `diredp-last-copied-filenames', `diredp-list-files-map',
;; `diredp-loaded-p', `diredp-marks-recursive-menu',
;; `diredp-menu-bar-dir-menu', `diredp-menu-bar-marks-menu',
;; `diredp-menu-bar-multiple-menu', `diredp-menu-bar-regexp-menu',
;; `diredp-menu-bar-single-menu', `diredp-multiple-bookmarks-menu',
;; `diredp-multiple-delete-menu', `diredp-multiple-dired-menu',
;; `diredp-multiple-images-menu',
;; `diredp-multiple-encryption-menu',
;; `diredp-multiple-move-copy-link-menu',
;; `diredp-multiple-omit-menu', `diredp-multiple-recursive-menu',
;; `diredp-multiple-rename-menu', `diredp-multiple-search-menu',
;; `diredp-navigate-menu', `diredp-recent-files-map',
;; `diredp-regexp-recursive-menu', `diredp-re-no-dot',
;; `diredp-saved-markings', `diredp-single-bookmarks-menu',
;; `diredp-single-encryption-menu', `diredp-single-image-menu',
;; `diredp-single-move-copy-link-menu', `diredp-single-open-menu',
;; `diredp-single-rename-menu',
;; `diredp-snapshot-cmd-buffer-name-format',
;; `diredp-snapshot-cmd-time-format', `diredp-w32-drives-mode-map'.
;;
;; Macros defined here:
;;
;; `diredp-mark-if', `diredp-user-error',
;; `diredp-with-help-window'.
;;
;;
;; ***** NOTE: The following macro defined in `subr.el' has
;; been REDEFINED HERE:
;;
;; `with-silent-modifications' - Adapt for older Emacs also.
;;
;; ***** NOTE: The following macros defined in `dired.el' have
;; been REDEFINED HERE:
;;
;; `dired-map-over-marks' - Treat multiple `C-u' specially.
;;
;;
;; ***** 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-find-file' - Allow `.' and `..' (Emacs 20 only).
;; `dired-get-filename' - Test `./' and `../' (like `.', `..').
;; `dired-get-marked-files' - Can include `.' and `..'.
;; Allow FILTER + DISTINGUISH-ONE-MARKED.
;; `dired-goto-file' - Respect `diredp-case-fold-search'.
;; Prefix arg toggles that.
;; Open an enclosing hidden parent dir.
;; Expand input per current subdir list.
;; `dired-goto-file-1' - Use `compare-strings', Emacs 25+.
;; Added optional arg OPEN-HIDDEN-DIR-P.
;; `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-flag-auto-save-files', `dired-mark-directories',
;; `dired-mark-executables', `dired-mark-files-containing-regexp',
;; `dired-mark-files-regexp', `dired-mark-symlinks'
;; - Use `diredp-mark-if', not `dired-mark-if'.
;; `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-mark-remembered' - File names in ALIST need not be absolute.
;; `dired-move-to-filename' - Made it a command.
;; `dired-other-frame' - Handle non-positive prefix arg.
;; `dired-other-window' - Handle non-positive prefix arg.
;; `dired-pop-to-buffer' - Restore (Emacs 29+).
;; 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-remember-marks' - Added optional arg LOCALP.
;; `dired-repeat-over-lines' - Skip dir header line (bug #48883).
;; `dired-revert' - Reset `mode-line-process' to nil.
;; `dired-sort-set-mode-line' - Respect `diredp-switches-in-mode-line'.
;; `dired-sort-toggle-or-edit' - Error message mentions `C-M-L'.
;; `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-map-over-marks-check',
;; `image-dired-dired-insert-marked-thumbs',
;; `image-dired-dired-toggle-marked-thumbs'.
;;
;;
;; ***** NOTE: The following functions are included here with little
;; or no change to their definitions. They are here for
;; older Emacs versions, to take advantage of the Emacs
;; 27+ way of hiding subdir listings:
;;
;; `dired--find-hidden-pos', `dired--hidden-p', `dired--hide',
;; `dired--unhide', `dired-unhide-subdir', `dired-subdir-hidden-p',
;; `dired-add-entry', `dired-remember-hidden',
;; `dired-move-to-end-of-filename', `dired-check-switches',
;; `dired-hide-subdir', `dired-hide-all'.
;;
;;
;; ***** 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-find-regexp', `dired-do-find-regexp-and-replace' -
;; Prefix arg lets you act on files other than those marked.
;; `dired-do-isearch', `dired-do-isearch-regexp',
;; `dired-do-query-replace-regexp', `dired-do-search' -
;; Use new `dired-get-marked-files'.
;; `dired-dwim-target-directory' - Uses `diredp-dwim-any-frame-flag'.
;; `dired-insert-subdir-newpos' - If not a descendant, put at eob.
;; `dired-insert-subdir-validate' - Do nothing: no restrictions.
;; `dired-do-touch' - Zero prefix arg creates empty file.
;; `dired-do-kill-lines' - Added optional arg INIT-COUNT.
;; `dired-maybe-insert-subdir' - Go back to subdir line if in listing.
;; `dired-handle-overwrite' - Added optional arg FROM, for listing.
;; `dired-copy-file(-recursive)', `dired-hardlink', `dired-query',
;; `dired-rename-file' - You can list (`l') the files involved.
;;
;;
;; ***** NOTE: The following functions defined in `dired-x.el' have
;; been REDEFINED HERE:
;;
;; `dired-copy-filename-as-kill' -
;; Use `diredp-filename-separator', not SPC, as the separator.
;; Put file names also in var `diredp-last-copied-filenames'.
;; `dired-do-find-marked-files' -
;; Call `dired-get-marked-files' with original ARG.
;; Added optional arg INTERACTIVEP - no error if nil and no files.
;; `dired-do-run-mail' - Require confirmation (Emacs < 25 only).