* dired-omit-files-p
@ 2004-05-30 20:44 Juri Linkov
2004-06-01 14:57 ` dired-omit-files-p Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2004-05-30 20:44 UTC (permalink / raw)
When `dired-omit-files-p' is t, calling `recover-session' displays an
empty buffer. This is because auto save files match a regexp in
`dired-omit-extensions'. This is misleading and causes a false feeling
that no session is available for recovering.
The following patch don't hide files if after hiding no files will be
visible in the dired buffer.
This is useful for any directory, not only for auto-save directory,
because when the user sees no files, he might think that directory
is empty and delete it.
Index: emacs/lisp/dired-x.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dired-x.el,v
retrieving revision 1.54
diff -u -r1.54 dired-x.el
--- emacs/lisp/dired-x.el 31 Mar 2004 16:09:18 -0000 1.54
+++ emacs/lisp/dired-x.el 30 May 2004 18:08:33 -0000
@@ -545,7 +545,20 @@
(let ((dired-marker-char dired-omit-marker-char))
(message "Omitting...")
(if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp)
- (progn
+ (if (save-excursion
+ (goto-char (point-min))
+ (while (and (not (eobp))
+ (or (dired-between-files)
+ (looking-at
+ (concat "^[" (char-to-string
+ dired-omit-marker-char) "]"))))
+ (forward-line 1))
+ (eobp))
+ ;; Unmark if all files are to be omitted.
+ (progn
+ (dired-mark-unmarked-files omit-re nil t dired-omit-localp)
+ (message "Not omitting all files.")
+ (setq dired-omit-files-p nil))
(setq count (dired-do-kill-lines nil "Omitted %d line%s."))
(force-mode-line-update))
(message "(Nothing to omit)"))))
@@ -579,7 +592,8 @@
(dired-mark-if
(and
;; not already marked
- (looking-at " ")
+ (or (looking-at " ")
+ (and unflag-p (looking-at (char-to-string dired-omit-marker-char))))
;; uninteresting
(let ((fn (dired-get-filename localp t)))
(and fn (string-match regexp fn))))
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dired-omit-files-p
2004-05-30 20:44 dired-omit-files-p Juri Linkov
@ 2004-06-01 14:57 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2004-06-01 14:57 UTC (permalink / raw)
Cc: emacs-devel
I think there is no maintainer for dired-x.
If you (any of you) want to work on it, please do.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-01 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-30 20:44 dired-omit-files-p Juri Linkov
2004-06-01 14:57 ` dired-omit-files-p Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.