[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 07521331c3 1/2: org-image-max-width: Allow floating
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 07521331c3 1/2: org-image-max-width: Allow floating point value as fraction of window width |
Date: |
Fri, 2 Jun 2023 09:59:14 -0400 (EDT) |
branch: externals/org
commit 07521331c3712b4f7383ee3a831608ac4b24c07f
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-image-max-width: Allow floating point value as fraction of window width
* lisp/org.el (org--create-inline-image): Allow `org-image-max-width'
to be a floating point value - fraction of window width.
(org-image-max-width): Update the docstring and type specification.
---
lisp/org.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 0e5740412b..636cfbad04 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15136,7 +15136,8 @@ t or when #+ATTR* is set to t.
Possible values:
- `fill-column' :: limit width to `fill-column'
- `window' :: limit width to window width
-- number :: limit width to number in pixels
+- integer :: limit width to number in pixels
+- float :: limit width to that fraction of window width
- nil :: do not limit image width"
:group 'org-appearance
:package-version '(Org . "9.7")
@@ -15144,7 +15145,8 @@ Possible values:
(const :tag "Do not limit image width" nil)
(const :tag "Limit to `fill-column'" fill-column)
(const :tag "Limit to window width" window)
- (integer :tag "Limit to a number of pixels")))
+ (integer :tag "Limit to a number of pixels")
+ (float :tag "Limit to a fraction of window width")))
(defcustom org-agenda-inhibit-startup nil
"Inhibit startup when preparing agenda buffers.
@@ -16285,6 +16287,7 @@ according to the value of
`org-display-remote-inline-images'."
(`fill-column (* fill-column (frame-char-width
(selected-frame))))
(`window (window-width nil t))
((pred integerp) org-image-max-width)
+ ((pred floatp) (floor (* org-image-max-width
(window-width nil t))))
(`nil nil)
(_ (error "Unsupported value of `org-image-max-width':
%S"
org-image-max-width)))