[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-real 44e82f9 120/160: Added calculate functionality
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-real 44e82f9 120/160: Added calculate functionality to is-visible |
Date: |
Wed, 6 Oct 2021 16:58:29 -0400 (EDT) |
branch: externals/org-real
commit 44e82f9c15dd5b77bfbe6a563c9083ef4913fb44
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>
Added calculate functionality to is-visible
---
org-real.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/org-real.el b/org-real.el
index 0b50b57..bac42ea 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1,7 +1,7 @@
;;; org-real.el --- Keep track of real things as org-mode links -*-
lexical-binding: t -*-
;; Author: Tyler Grinn <tylergrinn@gmail.com>
-;; Version: 0.4.0
+;; Version: 0.4.1
;; File: org-real.el
;; Package-Requires: ((emacs "26.1"))
;; Keywords: tools
@@ -371,7 +371,7 @@ The following commands are available:
(if (and link (string= "real" (ignore-errors (url-type
(url-generic-parse-url link)))))
(let ((containers (reverse (org-real--parse-url link)))
match)
- (while (and containers (or (not match) (not (org-real--is-visible
match))))
+ (while (and containers (or (not match) (not (org-real--is-visible
match t))))
(setq match (org-real--find-matching
(org-real-box :name (plist-get (pop containers)
:name))
world)))
@@ -394,7 +394,7 @@ MAX-LEVEL is the maximum level to show headlines for."
(world (save-excursion (org-real--parse-headlines)))
match)
(org-real--pp world nil 'display-buffer-same-window t 1 2)
- (while (and path (or (not match) (not (org-real--is-visible match))))
+ (while (and path (or (not match) (not (org-real--is-visible match t))))
(setq match (org-real--find-matching (org-real-box :name (pop path))
world)))
(when match
(let ((top (org-real--get-top match))
@@ -1193,10 +1193,10 @@ If INCLUDE-ON-TOP is non-nil, also include height on
top of box."
(fill-paragraph t))
(buffer-string)))))))
(if (slot-boundp box :display-rel-box)
- (if (org-real--is-visible display-rel-box)
+ (if (org-real--is-visible display-rel-box t)
(org-real--draw display-rel-box 'rel))
(if (and (slot-boundp box :rel-box)
- (org-real--is-visible rel-box))
+ (org-real--is-visible rel-box t))
(org-real--draw rel-box 'rel)))
(org-real--draw box 'selected))
(if tooltip-timer (cancel-timer tooltip-timer))
@@ -1278,14 +1278,18 @@ BOX is the box the button is being made for."
;;;; Private class methods
-(cl-defmethod org-real--is-visible ((box org-real-box))
- "Determine if BOX is visible according to `org-real--visibility'."
- (with-slots (level parent) box
- (or (= 0 org-real--visibility)
- (<= level org-real--visibility)
+(cl-defmethod org-real--is-visible ((box org-real-box) &optional calculate)
+ "Determine if BOX is visible according to `org-real--visibility'.
+
+If CALCULATE, determine if the box has been expanded manually."
+ (if calculate
+ (with-slots (parent) box
(seq-find
(lambda (sibling) (eq sibling box))
- (org-real--get-children parent)))))
+ (org-real--get-children parent)))
+ (with-slots (level) box
+ (or (= 0 org-real--visibility)
+ (<= level org-real--visibility)))))
(cl-defmethod org-real--get-children ((box org-real-box) &optional arg)
"Get all visible children of BOX.
@@ -1604,7 +1608,7 @@ NEXT."
(eq on-top child-on-top))))
(org-real--get-children rel-box
'all))))))))
(org-real--add-child parent box t)))))
-
+
(cl-defmethod org-real--flex-add ((box org-real-box)
(parent org-real-box)
@@ -1921,7 +1925,6 @@ set to the :loc slot of each box."
t))))
container-matrix))
-
(defun org-real--parse-headlines ()
"Create an org real box from the current buffer's headlines."
(org-columns-get-format)
@@ -1940,7 +1943,6 @@ set to the :loc slot of each box."
headlines)
world))
-
(defun org-real--to-link (containers)
"Create a link string from CONTAINERS."
(concat "real://"
- [elpa] externals/org-real 573df43 087/160: Removed reference to org-collect-keywords, (continued)
- [elpa] externals/org-real 573df43 087/160: Removed reference to org-collect-keywords, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 0cb9745 082/160: Satisfying elc compiler, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 378806b 092/160: Improved efficiency, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real a30638a 097/160: Show all containers while completing, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 7f89820 094/160: Added expansion slots to speed up initial rendering, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real f3b5fc7 099/160: More edge cases, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 009dd3e 107/160: Added popup library, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 9554940 135/160: Typo in jumping to rel box, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 878480b 134/160: Merge branch 'main' into next, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 26ade6a 136/160: Bump version, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 44e82f9 120/160: Added calculate functionality to is-visible,
ELPA Syncer <=
- [elpa] externals/org-real c916d88 142/160: Draw selected box last, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 3618967 137/160: Merge branch 'next' into 'main', ELPA Syncer, 2021/10/06
- [elpa] externals/org-real f933ebc 055/160: More edge cases, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real b32309c 056/160: Don't highlight children when following link, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 52f3d15 063/160: Satisfy elc compiler, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real cbadc3a 065/160: Merge branch 'next' into 'main', ELPA Syncer, 2021/10/06
- [elpa] externals/org-real c32c714 074/160: Org real headlines takes over current window, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 4e903f9 090/160: Draw without canvas: no more whitespace around box diagram, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 61eea2d 091/160: Auto-fill description when inserting link, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 35c3857 106/160: Added metadata slot, ELPA Syncer, 2021/10/06