branch: externals/dired-preview commit 63f6d9a2daff031554bf3321d00a8a361e98bc01 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Document dired-preview-display-action-alist-function --- README.org | 27 +++++++++++++++++++++++++++ dired-preview.el | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index f8b89b98b3..ad6cd836a7 100644 --- a/README.org +++ b/README.org @@ -104,6 +104,33 @@ decided to write it my own way: it was easier for me, plus I can implement only what I consider necessary without upsetting existing users. +** How to tweak the placement of the preview window +:PROPERTIES: +:CUSTOM_ID: h:25135eb2-04a9-403e-bc3a-8ee287ac36cf +:END: + +#+vindex: dired-preview-display-action-alist-function +The user option ~dired-preview-display-action-alist-function~ +speficies a function to handle the display of the preview. The +default value will place the preview either to the right or the +bottom side window, depending on the available width. + +Users can specify their own conditions with something like this: + +#+begin_src emacs-lisp +(defun my-dired-preview-to-the-right () + "My preferred `dired-preview-display-action-alist-function'." + '((display-buffer-in-side-window) + (side . right) + (width . 0.3))) + +(setq dired-preview-display-action-alist-function #'my-dired-preview-to-the-right) +#+end_src + +Note that the ~display-buffer~ mechanism is inherently complex and +powerful. As such, this user option must be treated with care as a +false value will break things. + * Installation :PROPERTIES: :CUSTOM_ID: h:30b9c20c-071d-4943-a9a7-e8d7e7ea33e3 diff --git a/dired-preview.el b/dired-preview.el index 460434f131..853131bcd0 100644 --- a/dired-preview.el +++ b/dired-preview.el @@ -5,7 +5,7 @@ ;; Author: Protesilaos Stavrou <i...@protesilaos.com> ;; URL: https://git.sr.ht/~protesilaos/dired-preview ;; Mailing-List: https://lists.sr.ht/~protesilaos/general-issues -;; Version: 0.1.0 +;; Version: 0.1.1 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: files, convenience