emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-real 8b6a4e1 054/160: Added org-real-flex-width cus


From: ELPA Syncer
Subject: [elpa] externals/org-real 8b6a4e1 054/160: Added org-real-flex-width custom variable
Date: Wed, 6 Oct 2021 16:58:14 -0400 (EDT)

branch: externals/org-real
commit 8b6a4e15a348451687515d7d1dbac2dcf7e89675
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>

    Added org-real-flex-width custom variable
---
 org-real.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index 0fd60ad..5f96ce4 100644
--- a/org-real.el
+++ b/org-real.el
@@ -78,6 +78,11 @@
   :type 'boolean
   :group 'org-real)
 
+(defcustom org-real-flex-width 80
+  "When merging links, try to keep width below this"
+  :type 'number
+  :group 'org-real)
+
 ;;;; Faces
 
 (defface org-real-primary
@@ -905,7 +910,8 @@ of BOX."
   "Add BOX to a PARENT box already existing in WORLD.
 
 This function ignores the :rel slot and adds BOX in such a way
-that the width of WORLD is kept below 80 characters if possible."
+that the width of WORLD is kept below `org-real-flex-width'
+characters if possible."
   (with-slots ((siblings children)) parent
     (let* ((all-siblings (seq-filter
                           (lambda (sibling)
@@ -937,7 +943,7 @@ that the width of WORLD is kept below 80 characters if 
possible."
           (oset box :x-order (+ 1 last-sibling-x))
           (let ((new-width (org-real--get-width world)))
             (org-real--make-dirty world)
-            (when (and (> new-width cur-width) (> new-width 80))
+            (when (and (> new-width cur-width) (> new-width 
org-real-flex-width))
               (oset box :y-order (+ 1 last-sibling-y))
               (oset box :x-order 0))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]