branch: elpa/dirvish
commit 6a054205bd0d452c0e7c2dcf523e9160bf9e4e41
Author: Alex Lu <hellosimon1...@hotmail.com>
Commit: Alex Lu <hellosimon1...@hotmail.com>

    fix(widgets): pdf metadata
---
 dirvish-widgets.el   |  4 +---
 dirvish.el           |  2 +-
 docs/CUSTOMIZING.org | 22 ++--------------------
 3 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/dirvish-widgets.el b/dirvish-widgets.el
index 7d806dd33d..6b5e80d26e 100644
--- a/dirvish-widgets.el
+++ b/dirvish-widgets.el
@@ -586,9 +586,7 @@ GROUP-TITLES is a list of group titles."
                    (type (cond ((member ext dirvish-image-exts) 'image)
                                ((member ext dirvish-video-exts) 'video)
                                ((member ext dirvish-font-exts) 'font)
-                               ((and (memq 'pdf-preface
-                                           dirvish-preview-dispatchers)
-                                     (equal ext "pdf") 'pdf))
+                               ((equal ext "pdf") 'pdf)
                                (t (user-error "Not a media file")))))
               ;; ensure the content is higher than the window height to avoid
               ;; unexpected auto scrolling
diff --git a/dirvish.el b/dirvish.el
index 45e79ef5f4..9153d1b02c 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -1389,7 +1389,7 @@ Dirvish sets `revert-buffer-function' to this function."
 
 (define-derived-mode dirvish-directory-view-mode special-mode "Dirvish DIRview"
   "Major mode for parent directory and directory preview buffer."
-  (setq-local mode-line-format nil header-line-format nil
+  (setq-local mode-line-format nil header-line-format nil truncate-lines t
               dirvish--dir-data (dirvish--ht) font-lock-defaults
               '(dired-font-lock-keywords t nil nil beginning-of-line))
   (font-lock-mode 1)
diff --git a/docs/CUSTOMIZING.org b/docs/CUSTOMIZING.org
index 391487eb2c..c5a1620946 100644
--- a/docs/CUSTOMIZING.org
+++ b/docs/CUSTOMIZING.org
@@ -361,8 +361,8 @@ want to display preview for epub files via packages like 
=nov=, just remove the
 Two dispatchers, ~dired~ and ~fallback~, are enabled by default as fallback
 handlers. These dispatchers are used to preview text files and directories
 respectively, but can be overridden by custom dispatchers.  For example, you 
can
-use ~eza~ to preview directories instead of ~dired~ (see *Preview directory 
using ~eza~
-command* section below).
+use ~eza~ to preview directories instead of ~dired~ (see *Preview directory 
using
+eza command* section below).
 
 The ~dirvish-preview-dired-sync-omit~ option allows ~dired~ preview buffers to 
sync
 your =dired-omit-mode= and its settings from the root window, it is turned off 
by
@@ -573,24 +573,6 @@ These packages are only listed here for discoverability.
 
 (use-package dired-x
   :config
-  ;; If you're using Emacs 30+, you likely don't need this. Emacs 30 introduces
-  ;; the `dired-do-open` command and `shell-command-guess-open` option,
-  ;; providing a more straightforward way to open files externally with your
-  ;; operating system's default application (e.g., "open" on macOS, "xdg-open"
-  ;; on Linux).
-  ;; (when-let* ((cmd (cond ((eq 'darwin system-type) "open")
-  ;;                        ((memq system-type '(ms-dos cygwin windows-nt)) 
"start")
-  ;;                        (t "xdg-open"))))
-  ;;   (setq dired-guess-shell-alist-user  ; let OS decide how to open certain 
files
-  ;;         `(("\\.\\(?:docx\\|pdf\\|djvu\\|eps\\)\\'" ,cmd)
-  ;;           ("\\.\\(?:jpe?g\\|png\\|gif\\|xpm\\)\\'" ,cmd)
-  ;;           ("\\.\\(?:xcf\\)\\'" ,cmd)
-  ;;           ("\\.csv\\'" ,cmd)
-  ;;           ("\\.tex\\'" ,cmd)
-  ;;           
("\\.\\(?:mp4\\|mkv\\|avi\\|flv\\|rm\\|rmvb\\|ogv\\)\\(?:\\.part\\)?\\'" ,cmd)
-  ;;           ("\\.\\(?:mp3\\|flac\\)\\'" ,cmd)
-  ;;           ("\\.html?\\'" ,cmd)
-  ;;           ("\\.md\\'" ,cmd))))
   ;; Make dired-omit-mode hide all "dotfiles"
   (setq dired-omit-files
         (concat dired-omit-files "\\|^\\..*$")))

Reply via email to