[elpa] externals/org-real 573df43 087/160: Removed reference to org-collect-keywords

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 573df4390fe5d42dc35f64e44f4a16a30b5a42bb
Author: Tyler Grinn 
Commit: Tyler Grinn 

Removed reference to org-collect-keywords
---
 org-real.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index ca5f3d7..fdfba3d 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1559,8 +1559,8 @@ set to the :loc slot of each box."
 (defun org-real--parse-headlines ()
   "Create an org real box from the current buffer's headlines."
   (let* ((headlines (cddr (org-element-parse-buffer 'headline)))
- (title (or (cadr (car (org-collect-keywords '("TITLE"
-(file-name-base (buffer-file-name))
+ (filename (buffer-file-name))
+ (title (or (concat (file-name-base filename) "." (file-name-extension 
filename))
 "Document"))
  (world (org-real-box))
  (document (org-real-box :name title)))



[elpa] externals/org-real 0cb9745 082/160: Satisfying elc compiler

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 0cb9745c5cc8201b4b1c1c398fd82fa23ea369d3
Author: Tyler Grinn 
Commit: Tyler Grinn 

Satisfying elc compiler
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 64e3796..58315e2 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1396,7 +1396,7 @@ characters if possible."
   ((string= rel "on top of") -1.0e+INF)
   (t 0))
 :primary t)))
-(if (= 1 (oref parent :level))
+(if (= 1 (with-slots (level) parent level))
 (org-real--flex-add box parent)
   (org-real--add-next box parent))
 (mapc



[elpa] externals/org-real f1614bf 111/160: Refactoring; killing org real buffer if it exists before recreating

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f1614bfdd8ccecef4f7c18a92a025aa9e7f8f3f3
Author: Tyler Grinn 
Commit: Tyler Grinn 

Refactoring; killing org real buffer if it exists before recreating
---
 org-real.el | 112 +---
 1 file changed, 61 insertions(+), 51 deletions(-)

diff --git a/org-real.el b/org-real.el
index 8018be0..0be47d6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -396,22 +396,14 @@ MAX-LEVEL is the maximum level to show headlines for."
   (org-real--flex-adjust org-real--current-box)
   (let ((inhibit-read-only t))
 (erase-buffer)
-(setq org-real--box-ring '())
 (if org-real--current-containers
 (org-real--pp-text org-real--current-containers))
 (setq org-real--current-offset (- (line-number-at-pos)
   org-real-margin-y
   (* 2 org-real-padding-y)))
-(let ((box-coords (org-real--draw org-real--current-box)))
-  (setq org-real--box-ring
-(seq-sort
- '<
- (mapcar
-  (lambda (coords)
-(forward-line (- (car coords) (line-number-at-pos)))
-(move-to-column (cdr coords))
-(point))
-  box-coords
+(org-real--draw org-real--current-box)
+(setq org-real--box-ring
+  (seq-sort '< (org-real--get-positions org-real--current-box)))
 (goto-char (point-max))
 (insert "\n")
 (goto-char 0)))
@@ -474,6 +466,8 @@ it.
 VISIBILITY is the initial visibility of children and
 MAX-VISIBILITY is the maximum depth to display when cycling
 visibility."
+  (if-let ((buffer (get-buffer "Org Real")))
+  (kill-buffer buffer))
   (let ((buffer (get-buffer-create "Org Real")))
 (with-current-buffer buffer
   (org-real-mode)
@@ -485,7 +479,6 @@ visibility."
   (org-real-mode-redraw)
   (let* ((width (apply 'max (mapcar 'length (split-string (buffer-string) 
"\n"
  (height (count-lines (point-min) (point-max)))
- (buffer (get-buffer-create "Org Real"))
  (window (or (get-buffer-window buffer)
  (display-buffer buffer
  `(,(or display-buffer-fn
@@ -637,7 +630,7 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
   (ignore-errors
 (url-type
  
(url-generic-parse-url link
- (plist-get (car (last 
(org-real--parse-url link nil)))
+ (plist-get (car (last 
(org-real--parse-url link)))
 :name))
 (unwind-protect
 (if (called-interactively-p 'any)
@@ -764,6 +757,26 @@ non-nil, skip setting :primary slot on the last box."
 (org-real--merge-into (pop boxes) world))
   world)))
 
+(cl-defmethod org-real--merge-into ((from org-real-box) (to org-real-box))
+  "Merge FROM box into TO box."
+  (let (match-found)
+(mapc
+ (lambda (from-box)
+   (let ((match (org-real--find-matching from-box to)))
+ (while (and (not match) (slot-boundp from-box :rel-box))
+   (setq from-box (with-slots (rel-box) from-box rel-box))
+   (setq match (org-real--find-matching from-box to)))
+ (when match
+   (setq match-found t)
+   (org-real--add-matching from-box match
+ (org-real--primary-boxes from))
+(unless match-found
+  (let ((all-from-children (org-real--get-children from 'all)))
+(with-slots ((to-children children) (to-behind behind)) to
+  (if (= 1 (length all-from-children))
+  (org-real--flex-add (car all-from-children) to)
+(org-real--flex-add from to)))
+
 (cl-defmethod org-real--update-visibility ((box org-real-box))
   "Update visibility of BOX and all of its children."
   (with-slots (level children hidden-children expand-children) box
@@ -787,6 +800,19 @@ non-nil, skip setting :primary slot on the last box."
(org-real--get-all children))
   (mapc 'org-real--update-visibility (org-real--get-children box 'all)))
 
+(cl-defmethod org-real--get-positions ((box org-real-box))
+  "Get the buffer position of the names of BOX and its children."
+  (if-let ((pos (and (slot-boundp box :name)
+ (let ((top (org-real--get-top box))
+   (left (org-real--get-left box)))
+   (forward-line (- (+ org-real--current-offset 1 top 
org-real-padding-y)
+(line-number-at-pos)))
+   (move-to-column (+ 1 left org-real-padding-x))
+   (point)
+  (apply 'append (list pos) (mapcar 'org-real--get-positions 
(o

[elpa] externals/org-real 61eea2d 091/160: Auto-fill description when inserting link

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 61eea2d9422b8f935c49dfa0ca357f2a825c6fe9
Author: Tyler Grinn 
Commit: Tyler Grinn 

Auto-fill description when inserting link
---
 README.org  |   4 ++
 org-real.el | 189 +---
 2 files changed, 107 insertions(+), 86 deletions(-)

diff --git a/README.org b/README.org
index 8d02395..1b35d81 100644
--- a/README.org
+++ b/README.org
@@ -122,6 +122,10 @@ Keep track of real things as org-mode links.
 
[[file:demo/apply-changes.gif]]
 
+   If a link is changed manually, use the interactive function
+   =org-real-apply= with the cursor on top of the new link to apply
+   changes from that link to the buffer.
+
 ** Org Real mode
 
To open a real link, place the cursor within the link and press
diff --git a/org-real.el b/org-real.el
index b9c28c8..58df93d 100644
--- a/org-real.el
+++ b/org-real.el
@@ -78,6 +78,12 @@
 (unintern 'org-real--add-matching nil)
 (unintern 'org-real--flex-add nil)
 
+ Patch! 0.3.0 > 0.3.1+
+ Will be removed in version 1.0.0+
+
+(and (fboundp 'org-real--apply) (advice-remove 'org-insert-link 
#'org-real--apply))
+(and (fboundp 'org-real--maybe-edit-link) (advice-remove 'org-insert-link 
#'org-real--maybe-edit-link))
+
  Customization variables
 
 (defgroup org-real nil
@@ -160,6 +166,82 @@ MAX-LEVEL is the maximum level to show headlines for."
'display-buffer-same-window
t 1 2))
 
+(defun org-real-apply ()
+  "Apply any change from the real link at point to the current buffer."
+  (interactive)
+  (let (new-link replace-all)
+(cond
+ ((org-in-regexp org-link-bracket-re 1)
+  (setq new-link (match-string-no-properties 1)))
+ ((org-in-regexp org-link-plain-re)
+  (setq new-link (org-unbracket-string "<" ">" (match-string 0)
+(when (and new-link
+   (string= "real" (ignore-errors (url-type (url-generic-parse-url 
new-link)
+  (let ((new-containers (reverse (org-real--parse-url new-link 
(point-marker)
+(while new-containers
+  (let ((primary (plist-get (car new-containers) :name))
+(changes '())
+old-containers)
+(org-element-map (org-element-parse-buffer) 'link
+  (lambda (old-link)
+(when (string= (org-element-property :type old-link) "real")
+  (setq old-containers (reverse (org-real--parse-url
+ (org-element-property 
:raw-link old-link)
+ (set-marker (point-marker) 
(org-element-property :begin old-link)
+  (when-let* ((new-index 0)
+  (old-index (seq-position
+  old-containers
+  primary
+  (lambda (a b) (string= (plist-get a 
:name) b
+  (begin (org-element-property :begin old-link))
+  (end (org-element-property :end old-link))
+  (replace-link (org-real--to-link
+ (reverse
+  (append (cl-subseq 
old-containers 0 old-index)
+  new-containers)
+(when (catch 'conflict
+(if (not (= (length new-containers) (- (length 
old-containers) old-index)))
+(throw 'conflict t))
+(while (< new-index (length new-containers))
+  (if (or (not (string= (plist-get (nth new-index 
new-containers) :name)
+(plist-get (nth old-index 
old-containers) :name)))
+  (not (string= (plist-get (nth new-index 
new-containers) :rel)
+(plist-get (nth old-index 
old-containers) :rel
+  (throw 'conflict t))
+  (setq new-index (+ 1 new-index))
+  (setq old-index (+ 1 old-index)))
+nil)
+  (let* ((old-desc (save-excursion
+ (and (goto-char begin)
+  (org-in-regexp 
org-link-bracket-re 1)
+  (match-end 2)
+  (match-string-no-properties 2
+ (new-link (org-real--link-make-string 
replace-link old-desc)))
+(push
+ `(lambda ()
+(save-excursion
+  (delete-region ,begin ,end)
+  (goto-char ,begin)
+  (inser

[elpa] externals/org-real 0e8bd16 104/160: Relationship defaults to "in" if omitted in link

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 0e8bd16636de896b8e1c73537147b066f16eb9d0
Author: Tyler Grinn 
Commit: Tyler Grinn 

Relationship defaults to "in" if omitted in link
---
 org-real.el | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/org-real.el b/org-real.el
index 31c14b2..b27fcfb 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1658,12 +1658,13 @@ set to the :loc slot of each box."
  (containers (mapcar
   (lambda (token)
 (let* ((location (split-string token "\\?"))
-   (container (list :name (car location) :loc 
marker))
-   (rel (and (string-match "&?rel=\\([^&]*\\)" 
(cadr location))
- (match-string 1 (cadr location)
-  (if rel
-  (plist-put container :rel rel)
-container)))
+   (rel (or (and (cadr location)
+ (string-match "&?rel=\\([^&]*\\)" 
(cadr location))
+ (match-string 1 (cadr location)))
+"in")))
+  (list :name (car location)
+:loc marker
+:rel rel)))
   tokens)))
 (push (list :name host :loc marker) containers)))
 
@@ -1704,8 +1705,9 @@ set to the :loc slot of each box."
   (mapconcat
(lambda (container)
  (concat (plist-get container :name)
- (when (plist-member container :rel)
-   (concat "?rel=" (plist-get container :rel)
+ (when-let ((rel (plist-get container :rel)))
+   (if (not (string= "in" rel))
+   (concat "?rel=" (plist-get container :rel))
containers
"/")))
 



[elpa] externals/org-real 72dd6bf 113/160: Added more customization vars

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 72dd6bf43567f75e6f5a37b9751c840c9a2a4207
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added more customization vars
---
 README.org | 4 
 1 file changed, 4 insertions(+)

diff --git a/README.org b/README.org
index f954afc..3fbb8b6 100644
--- a/README.org
+++ b/README.org
@@ -13,6 +13,8 @@ Keep track of real things as org-mode links.
 :init
 (setq org-real-default-visibility 2
   org-real-flex-width 80
+  org-real-tooltips t
+  org-real-tooltip-timeout 0.5
   org-real-include-context t
   org-real-margin-x 2
   org-real-margin-y 1
@@ -45,6 +47,8 @@ Keep track of real things as org-mode links.
:init
(setq org-real-default-visibility 2
  org-real-flex-width 80
+ org-real-tooltips t
+ org-real-tooltip-timeout 0.5
  org-real-include-context t
  org-real-margin-x 2
  org-real-margin-y 1



[elpa] externals/org-real d9aab4e 103/160: Refactoring

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit d9aab4e877cd0a0cb012ba326063725ae8974d3b
Author: Tyler Grinn 
Commit: Tyler Grinn 

Refactoring
---
 org-real.el | 897 ++--
 1 file changed, 448 insertions(+), 449 deletions(-)

diff --git a/org-real.el b/org-real.el
index 769cdea..31c14b2 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 
-;; Version: 0.3.2
+;; Version: 0.4.0
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -84,6 +84,13 @@
 (and (fboundp 'org-real--apply) (advice-remove 'org-insert-link 
#'org-real--apply))
 (and (fboundp 'org-real--maybe-edit-link) (advice-remove 'org-insert-link 
#'org-real--maybe-edit-link))
 
+ Patch! 0.3.2 > 0.4.0+
+ Will be removed in version 1.0.0+
+
+(and (fboundp 'org-real--jump-other-window) (fmakunbound 
'org-real--jump-other-window))
+(and (fboundp 'org-real--jump-to) (fmakunbound 'org-real--jump-to))
+(and (fboundp 'org-real--jump-all) (fmakunbound 'org-real--jump-all))
+
  Customization variables
 
 (defgroup org-real nil
@@ -142,6 +149,14 @@
   '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of" "on top of")
   "List of available prepositions for things.")
 
+(defconst org-real-children-prepositions
+  '("in" "on" "behind" "in front of" "on top of")
+  "List of prepositions which are rendered as children.")
+
+(defconst org-real-flex-prepositions
+  '("in" "on" "behind")
+  "List of prepositions for which boxes are flexibly added to their parent.")
+
  Interactive functions
 
 (defun org-real-world ()
@@ -247,18 +262,23 @@ MAX-LEVEL is the maximum level to show headlines for."
 (defvar org-real--box-ring '()
   "List of buffer positions of buttons in an Org Real diagram.")
 (make-variable-buffer-local 'org-real--box-ring)
+
 (defvar org-real--current-box nil
   "Current box the buffer is displaying.")
 (make-variable-buffer-local 'org-real--current-box)
+
 (defvar org-real--current-containers '()
   "Current containers the buffer is displaying.")
 (make-variable-buffer-local 'org-real--current-containers)
+
 (defvar org-real--current-offset 0
   "Current offset for the box diagram.")
 (make-variable-buffer-local 'org-real--current-offset)
+
 (defvar org-real--visibility org-real-default-visibility
   "Visibility of children in the current org real diagram.")
 (make-variable-buffer-local 'org-real--visibility)
+
 (defvar org-real--max-visibility 3
   "Maximum visibility setting allowed when cycling all children.")
 (make-variable-buffer-local 'org-real--max-visibility)
@@ -691,28 +711,25 @@ non-nil, skip setting :primary slot on the last box."
 (cl-defmethod org-real--update-visibility ((box org-real-box))
   "Update visibility of BOX and all of its children."
   (with-slots (level children hidden-children expand-children) box
-(if (or (= 0 org-real--visibility)
-(<= level org-real--visibility))
-(progn
-  (when (slot-boundp box :expand-children)
-(funcall expand-children box)
-(slot-makeunbound box :expand-children))
-  (if (org-real--get-all hidden-children)
-  (cl-rotatef children hidden-children))
-  (let (fully-expanded)
-(while (not fully-expanded)
-  (setq fully-expanded t)
-  (mapc
-   (lambda (child)
- (with-slots (expand-siblings) child
-   (when (slot-boundp child :expand-siblings)
- (funcall expand-siblings child)
- (slot-makeunbound child :expand-siblings)
- (setq fully-expanded nil
-   (org-real--get-all children)
-  (if (not (org-real--get-all hidden-children)) (cl-rotatef children 
hidden-children)))
-(mapc 'org-real--update-visibility (append (org-real--get-all children)
-   (org-real--get-all 
hidden-children)
+(if (not (org-real--is-visible box))
+(if (not (org-real--get-all hidden-children)) (cl-rotatef children 
hidden-children))
+  (when (slot-boundp box :expand-children)
+(funcall expand-children box)
+(slot-makeunbound box :expand-children))
+  (if (org-real--get-all hidden-children)
+  (cl-rotatef children hidden-children))
+  (let (fully-expanded)
+(while (not fully-expanded)
+  (setq fully-expanded t)
+  (mapc
+   (lambda (child)
+ (with-slots (expand-siblings) child
+   (when (slot-boundp child :expand-siblings)
+ (funcall expand-siblings child)
+ (slot-makeunbound child :expand-siblings)
+ (setq fully-expanded nil
+   (org-real--get-all children))
+  (mapc 'org-real--update-visibility (org-real--get-children box 'all))

[elpa] externals/org-real 6428a6d 125/160: Smooth lines

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 6428a6d03088b7e832ab40acbb7f0427656ca738
Author: Tyler Grinn 
Commit: Tyler Grinn 

Smooth lines
---
 org-real.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-real.el b/org-real.el
index 2073472..7f67cf9 100644
--- a/org-real.el
+++ b/org-real.el
@@ -946,14 +946,14 @@ button drawn."
 (draw (cons top left)
   (concat (cond ((and double dashed) "┏")
 (double "╔")
-(t "┌"))
+(t "╭"))
   (make-string (- width 2) (cond ((and double dashed) 
#x2505)
  (dashed #x254c)
  (double #x2550)
  (t #x2500)))
   (cond ((and double dashed) "┓")
 (double "╗")
-(t "┐"
+(t "╮"
 (if align-bottom
 (draw (cons (+ top height) left)
   (concat (cond ((and double dashed) "┸")
@@ -967,14 +967,14 @@ button drawn."
   (draw (cons (+ top height -1) left)
 (concat (cond ((and double dashed) "┗")
   (double "╚")
-  (t "└"))
+  (t "╰"))
 (make-string (- width 2) (cond ((and double 
dashed) #x2505)
(dashed #x254c)
(double #x2550)
(t #x2500)))
 (cond ((and double dashed) "┛")
   (double "╝")
-  (t "┘")
+  (t "╯")
 (draw-name (cons (+ top 1 org-real-padding-y)
  (+ left 1 org-real-padding-x))
name



[elpa] externals/org-real 26ade6a 136/160: Bump version

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 26ade6a6ed6196531e29e884677d8c012e602f0e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Bump version
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 7a7f89f..0dd0b57 100644
--- a/org-real.el
+++ b/org-real.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2021 Free Software Foundation, Inc.
 
 ;; Author: Tyler Grinn 
-;; Version: 1.0.0
+;; Version: 0.4.3
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools



[elpa] externals/org-real 44e82f9 120/160: Added calculate functionality to is-visible

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 44e82f9c15dd5b77bfbe6a563c9083ef4913fb44
Author: Tyler Grinn 
Commit: Tyler Grinn 

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 
-;; 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 fb056dc 078/160: Reuse window if org real diagram already visible

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit fb056dc43787d8dfe10e71f801c65028a3fb09c2
Author: Tyler Grinn 
Commit: Tyler Grinn 

Reuse window if org real diagram already visible
---
 org-real.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/org-real.el b/org-real.el
index c0fa26e..fbfc1c8 100644
--- a/org-real.el
+++ b/org-real.el
@@ -326,11 +326,12 @@ visibility."
   (let* ((width (apply 'max (mapcar 'length (split-string (buffer-string) 
"\n"
  (height (count-lines (point-min) (point-max)))
  (buffer (get-buffer-create "Org Real"))
- (window (display-buffer buffer
- `(,(or display-buffer-fn
-'display-buffer-pop-up-window)
-   (window-width . ,width)
-   (window-height . ,height)
+ (window (or (get-buffer-window buffer)
+ (display-buffer buffer
+ `(,(or display-buffer-fn
+'display-buffer-pop-up-window)
+   (window-width . ,width)
+   (window-height . ,height))
 (if select (select-window window))
 
 (defun org-real--pp-text (containers)



[elpa] externals/org-real e0d81ab 098/160: Bump version

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit e0d81ab04ca82044523a744a89a0ddc33415df27
Author: Tyler Grinn 
Commit: Tyler Grinn 

Bump version
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 698b401..bbb0bf0 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 
-;; Version: 0.3.1
+;; Version: 0.3.2
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools



[elpa] externals/org-real 7d5574d 126/160: Adding margin and padding tests

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 7d5574d7144a952c10923286a83d4b3d83578a74
Author: Tyler Grinn 
Commit: Tyler Grinn 

Adding margin and padding tests
---
 Eldev|  59 +++---
 org-real.el  | 144 -
 tests/edge-cases.org | 298 +-
 tests/margin.org | 153 ++
 tests/padding.org| 300 +++
 tests/smoke-test.org | 160 +--
 6 files changed, 790 insertions(+), 324 deletions(-)

diff --git a/Eldev b/Eldev
index de0ac6c..5991ac1 100644
--- a/Eldev
+++ b/Eldev
@@ -43,6 +43,7 @@
 (current-buffer)
 nil t))
 (with-current-buffer (get-buffer "*Diff*")
+  (message "@@ -actual +expected @@")
   (message
(string-join
 (butlast
@@ -67,29 +68,53 @@
   (org-element-map (org-element-parse-buffer) 'link
 (lambda (link)
   (goto-char (org-element-property :begin link))
-  (let ((title (and (org-in-regexp org-link-bracket-re)
-(match-string 2)))
-(result (catch 'result
-  (save-window-excursion
-(condition-case nil
-(org-open-at-point)
-  (error (throw 'result nil
-  (string= (get-expected) (get-actual)
+  (let* ((title (and (org-in-regexp org-link-bracket-re)
+ (match-string 2)))
+ (org-real-margin-y (if (org-entry-get nil "MARGIN-Y" t)
+(string-to-number (org-entry-get 
nil "MARGIN-Y" t))
+  org-real-margin-y))
+ (org-real-margin-x (if (org-entry-get nil "MARGIN-X" t)
+(string-to-number (org-entry-get 
nil "MARGIN-X" t))
+  org-real-margin-x))
+ (org-real-padding-y (if (org-entry-get nil "PADDING-Y" t)
+ (string-to-number (org-entry-get 
nil "PADDING-Y" t))
+   org-real-padding-y))
+ (org-real-padding-x (if (org-entry-get nil "PADDING-X" t)
+ (string-to-number (org-entry-get 
nil "PADDING-X" t))
+   org-real-padding-x))
+ (result (catch 'result
+   (save-window-excursion
+ (condition-case nil
+ (org-open-at-point)
+   (error (throw 'result nil
+   (string= (get-expected) (get-actual)
 (print-result title result)
 (set-result result
 
   (message "\n  Merging links:\n")
   (org-babel-map-src-blocks nil
 (goto-char beg-block)
-(let ((title (org-entry-get nil "ITEM"))
-  (result (catch 'result
-(save-window-excursion
-  (condition-case nil
-  (progn
-(org-edit-special)
-(org-real-world))
-(error (throw 'result nil
-(string= (get-expected) (get-actual)
+(let* ((title (org-entry-get nil "ITEM"))
+   (org-real-margin-y (if (org-entry-get nil "MARGIN-Y")
+  (string-to-number (org-entry-get nil 
"MARGIN-Y" t))
+org-real-margin-y))
+   (org-real-margin-x (if (org-entry-get nil "MARGIN-X" t)
+  (string-to-number (org-entry-get nil 
"MARGIN-X" t))
+org-real-margin-x))
+   (org-real-padding-y (if (org-entry-get nil "PADDING-Y" t)
+   (string-to-number (org-entry-get 
nil "PADDING-Y" t))
+ org-real-padding-y))
+   (org-real-padding-x (if (org-entry-get nil "PADDING-X" t)
+   (string-to-number (org-entry-get 
nil "PADDING-X" t))
+ org-real-padding-x))
+   (result (catch 'result
+ (save-window-excursion
+  

[elpa] externals/org-real f80251e 116/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f80251ef6b244e842a75db1034352ab039b58b91
Merge: f883078 b3d1c09
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

"in" is optional

# Changed
* `?rel=in` is optional in an org-real link\
  You can (optionally) update existing links by editing them with `C-c C-l`

# Fixed
* `org-real-include-context t` does not duplicate boxes
* `org-real-cycle-visibility` (global) expands all sibling boxes 
automatically

# New
* Navigate by relationship with `r`
* Color selected border and relationship box border
* Added metadata slot and popup tooltip functionality

# Improvements
* If a headline is a link, only display description part in 
`org-real-headlines`
* Popup buffer is resized each time a link is opened

See merge request tygrdev/org-real!6
---
 README.org  |7 +
 org-real.el | 1207 +++
 2 files changed, 723 insertions(+), 491 deletions(-)

diff --git a/README.org b/README.org
index 0f1552d..24edefc 100644
--- a/README.org
+++ b/README.org
@@ -13,6 +13,8 @@ Keep track of real things as org-mode links.
 :init
 (setq org-real-default-visibility 2
   org-real-flex-width 80
+  org-real-tooltips t
+  org-real-tooltip-timeout 0.5
   org-real-include-context t
   org-real-margin-x 2
   org-real-margin-y 1
@@ -45,6 +47,8 @@ Keep track of real things as org-mode links.
:init
(setq org-real-default-visibility 2
  org-real-flex-width 80
+ org-real-tooltips t
+ org-real-tooltip-timeout 0.5
  org-real-include-context t
  org-real-margin-x 2
  org-real-margin-y 1
@@ -140,6 +144,7 @@ Keep track of real things as org-mode links.
- =RET / mouse-1= Jump to first occurrence of link
- =o= Cycle occurrences of links in other window
- =M-RET= Open all occurences of links by splitting the current window
+   - =r= Jump to the box directly related to the current box
 
[[file:demo/org-real-mode.gif]]
 
@@ -176,6 +181,8 @@ Keep track of real things as org-mode links.
[[file:demo/headline-relationships.png]]
 
 
+   The tooltip for each headline shows the values that would be
+   displayed if the org file was in org columns view.
 * Development
 
 ** Setup
diff --git a/org-real.el b/org-real.el
index b8368a3..3f13785 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 
-;; Version: 0.3.2
+;; Version: 0.4.0
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -28,6 +28,10 @@
 ;;   - to the right of
 ;;   - to the left of
 ;;
+;;   The tooltip in `org-real-headlines' shows the values for each row
+;;   in `org-columns' and can be customized the same way as org
+;;   columns view.
+;;
 ;; When in an Org Real mode diagram, the standard movement keys will
 ;; move by boxes rather than characters.  S-TAB will cycle the
 ;; visibility of all children.  Each box has the following keys:
@@ -38,6 +42,9 @@
 ;; Pressed multiple times, cycle through occurrences.
 ;;   M-RET - Open all occurrences as separate buffers.
 ;; This will split the current window as needed.
+;;   r - Jump to the box directly related to the current box.
+;; Repeated presses will eventually take you to the
+;; top level box.
 ;;
 
 ;;; Code:
@@ -46,6 +53,7 @@
 
 (require 'eieio)
 (require 'org-element)
+(require 'org-colview)
 (require 'cl-lib)
 
  Patch! 0.0.1 -> 0.1.0+
@@ -84,6 +92,13 @@
 (and (fboundp 'org-real--apply) (advice-remove 'org-insert-link 
#'org-real--apply))
 (and (fboundp 'org-real--maybe-edit-link) (advice-remove 'org-insert-link 
#'org-real--maybe-edit-link))
 
+ Patch! 0.3.2 > 0.4.0+
+ Will be removed in version 1.0.0+
+
+(and (fboundp 'org-real--jump-other-window) (fmakunbound 
'org-real--jump-other-window))
+(and (fboundp 'org-real--jump-to) (fmakunbound 'org-real--jump-to))
+(and (fboundp 'org-real--jump-all) (fmakunbound 'org-real--jump-all))
+
  Customization variables
 
 (defgroup org-real nil
@@ -125,8 +140,27 @@
   :type 'number
   :group 'org-real)
 
+(defcustom org-real-tooltips t
+  "Show tooltips in an org real diagram."
+  :type 'boolean
+  :group 'org-real)
+
+(defcustom org-real-tooltip-timeout 0.5
+  "Idle time before showing tooltip in org real diagram."
+  :type 'number
+  :group 'org-real)
+
+(defcustom org-real-tooltip-max-width 30
+  "Maximum width of all tooltips."
+  :type 'number
+  :group 'org-real)
+
  Faces
 
+(defface org-real-default nil
+  "Default face used in Org Real mode."
+  :group 'org-real)
+
 (defface org-real-primary nil
   "Face for the last thing in a real link."
   :group 'org-real)
@@ -136,12 +170,48 @@
  '((t :foreground "ligh

[elpa] externals/org-real 20d9631 147/160: Added boxy dependency

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 20d963190162aa38092e9bf0688b9a3261aae248
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added boxy dependency
---
 .gitmodules |3 +
 Eldev   |   13 +-
 deps/boxy   |1 +
 org-real.el | 1709 ---
 4 files changed, 238 insertions(+), 1488 deletions(-)

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..e03e59b
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "deps/boxy"]
+   path = deps/boxy
+   url = ../boxy
diff --git a/Eldev b/Eldev
index 5991ac1..a46205d 100644
--- a/Eldev
+++ b/Eldev
@@ -1,5 +1,9 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
+(setq eldev-standard-excludes '(".*" "/dist/" "/deps/"))
+
+(eldev-use-local-dependency "deps/boxy" 'packaged)
+
 (eldev-defcommand
  org_real-md5 (&rest _)
  "Create md5 checksum of .tar and .el files in dist folder."
@@ -17,16 +21,15 @@
  org_real-test (&rest _)
  "Runs tests against all org files in tests folder."
  :override t
- (require 'cl-lib)
- (require 'org-element)
- (load-file "org-real.el")
+ (eldev-load-project-dependencies)
+ (require 'org-real)
  (let ((failures 0))
(cl-flet* ((get-expected ()
 (save-excursion
   (re-search-forward "#\\+begin_example")
   (org-element-property :value 
(org-element-at-point
   (get-actual ()
-  (with-current-buffer (get-buffer "Org Real")
+  (with-current-buffer (get-buffer "*Boxy*")
 (buffer-string)))
   (print-result (title result)
 (message "%s : %s"
@@ -39,7 +42,7 @@
   (save-window-excursion
 (with-temp-buffer
   (insert expected)
-  (diff-buffers (get-buffer "Org Real")
+  (diff-buffers (get-buffer "*Boxy*")
 (current-buffer)
 nil t))
 (with-current-buffer (get-buffer "*Diff*")
diff --git a/deps/boxy b/deps/boxy
new file mode 16
index 000..a20250a
--- /dev/null
+++ b/deps/boxy
@@ -0,0 +1 @@
+Subproject commit a20250aea0970b1afd58ff4fea11559866326664
diff --git a/org-real.el b/org-real.el
index 39e241c..381daa3 100644
--- a/org-real.el
+++ b/org-real.el
@@ -3,9 +3,9 @@
 ;; Copyright (C) 2021 Free Software Foundation, Inc.
 
 ;; Author: Tyler Grinn 
-;; Version: 0.4.4
+;; Version: 1.0.0
 ;; File: org-real.el
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "26.1") (boxy "1.0"))
 ;; Keywords: tools
 ;; URL: https://gitlab.com/tygrdev/org-real
 
@@ -53,55 +53,13 @@
 
  Requirements
 
+(require 'boxy)
 (require 'eieio)
 (require 'org-element)
 (require 'org-colview)
 (require 'cl-lib)
 (require 'ispell)
 
- Patch! 0.0.1 -> 0.1.0+
- Will be removed in version 1.0.0+
-
-(and (fboundp 'org-real--merge) (fmakunbound 'org-real--merge))
-(and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
-(and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
-(and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
-(and (fboundp 'org-real--add-matching) (fmakunbound 'org-real--add-matching))
-(and (fboundp 'org-real--flex-add) (fmakunbound 'org-real--flex-add))
-(and (fboundp 'org-real--expand) (fmakunbound 'org-real--expand))
-(and (fboundp 'org-real--draw) (fmakunbound 'org-real--draw))
-(and (fboundp 'org-real--get-width) (fmakunbound 'org-real--get-width))
-(and (fboundp 'org-real--get-height) (fmakunbound 'org-real--get-height))
-(and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
-(and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
-
- Patch! 0.1.1 > 0.2.0+
- Will be removed in version 1.0.0+
-
-(let ((customizations (get 'org-real 'custom-group)))
-  (setf customizations (cl-delete "org-real-margin" customizations :key #'car 
:test #'string=))
-  (setf customizations (cl-delete "org-real-padding" customizations :key #'car 
:test #'string=))
-  (put 'org-real 'custom-group customizations))
-
- Patch! 0.2.0 > 0.3.0+
- Will be removed in version 1.0.0+
-
-(unintern 'org-real--add-matching nil)
-(unintern 'org-real--flex-add nil)
-
- Patch! 0.3.0 > 0.3.1+
- Will be removed in version 1.0.0+
-
-(and (fboundp 'org-real--apply) (advice-remove 'org-insert-link 
#'org-real--apply))
-(and (fboundp 'org-real--maybe-edit-link) (advice-remove 'org-insert-link 
#'org-real--maybe-edit-link))
-
- Patch! 0.3.2 > 0.4.0+
- Will be removed in version 1.0.0+
-
-(and (fboundp 'org-real--jump-other-window) (fmakunbound 
'org-real--jump-other-window))
-(and (fboundp 'org-real--jump-to) (fmakunbound 'org-real--jump-to))
-(

[elpa] externals/org-real cad260e 002/160: Removed unused box slot

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit cad260e9656b12b0293ea564cce2d0fe45e3b0ec
Author: Tyler Grinn 
Commit: Tyler Grinn 

Removed unused box slot
---
 org-real.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index 0939dcc..edeeca6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -2,11 +2,10 @@
 (require 'org)
 (require 'cl)
 
+
 (defclass org-real--box ()
   ((name :initarg :name
  :type string)
-   (style :initarg :style
-  :type string)
(rel :initarg :rel
 :type string)
(rel-box :initarg :rel-box



[elpa] externals/org-real d5ca314 146/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit d5ca314e5104be0e111b79daea8c963b9c57b2a2
Merge: 3618967 20e80af
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

Bug fixes and improvements

* Use buffer name instead of file name for `org-real-headlines`
* Updated README
* Updated color scheme to react to dark/light background

See merge request tygrdev/org-real!10
---
 README.org   |  40 +++---
 demo/apply-changes.gif   | Bin 753884 -> 452777 bytes
 demo/edit-link.gif   | Bin 791373 -> 476059 bytes
 demo/garage.org  |   2 +-
 demo/headline-relationships.png  | Bin 23455 -> 0 bytes
 demo/headlines.gif   | Bin 0 -> 651736 bytes
 demo/insert-link-with-completion.gif | Bin 628057 -> 401659 bytes
 demo/insert-link.gif | Bin 1106614 -> 649381 bytes
 demo/org-real-mode.gif   | Bin 435169 -> 535961 bytes
 demo/projects.org|  18 +++
 org-real.el  | 100 +++
 11 files changed, 86 insertions(+), 74 deletions(-)

diff --git a/README.org b/README.org
index 24edefc..950e0f2 100644
--- a/README.org
+++ b/README.org
@@ -130,23 +130,10 @@ Keep track of real things as org-mode links.
=org-real-apply= with the cursor on top of the new link to apply
changes from that link to the buffer.
 
-** Org Real mode
-
+** Opening links
To open a real link, place the cursor within the link and press
=C-c C-o=. This will display a popup buffer in Org Real mode
-   showing the location of the link. Use =S-TAB= to cycle the
-   visibility level of all children or just =TAB= to toggle the
-   visibility of children for a single box.
-
-   In the org real diagram, emacs movement keys will navigate by boxes
-   rather than characters. Each box in the diagram has these options:
-
-   - =RET / mouse-1= Jump to first occurrence of link
-   - =o= Cycle occurrences of links in other window
-   - =M-RET= Open all occurences of links by splitting the current window
-   - =r= Jump to the box directly related to the current box
-
-   [[file:demo/org-real-mode.gif]]
+   showing the location of the link.
 
 ** =org-real-world=
 
@@ -178,11 +165,28 @@ Keep track of real things as org-mode links.
- to the right of
- to the left of
 
-   [[file:demo/headline-relationships.png]]
-
-
The tooltip for each headline shows the values that would be
displayed if the org file was in org columns view.
+
+   [[file:demo/headlines.gif]]
+
+** Org Real mode
+
+   Once in Org Real mode, you can cycle the visibility level of all
+   children with =S-TAB= or use =TAB= to toggle the visibility of
+   children for a single box.
+
+   Emacs movement keys will navigate by boxes rather than
+   characters. Each box in the diagram has these keybindings:
+
+   - =RET / mouse-1= Jump to first occurrence of link
+   - =o= Cycle occurrences of links in other window
+   - =M-RET= Open all occurences of links by splitting the current window
+   - =r= Jump to the box directly related to the current box
+   - =TAB= expand/collapse children boxes
+
+   [[file:demo/org-real-mode.gif]]
+
 * Development
 
 ** Setup
diff --git a/demo/apply-changes.gif b/demo/apply-changes.gif
index ca91af2..9053d06 100644
Binary files a/demo/apply-changes.gif and b/demo/apply-changes.gif differ
diff --git a/demo/edit-link.gif b/demo/edit-link.gif
index 2f7c258..e98b4dd 100644
Binary files a/demo/edit-link.gif and b/demo/edit-link.gif differ
diff --git a/demo/garage.org b/demo/garage.org
index 9cef143..ca2c554 100644
--- a/demo/garage.org
+++ b/demo/garage.org
@@ -12,6 +12,6 @@
   - [[real://garage/workbench/nails?rel=on top of][nails]]
   - [[real://garage/east wall][East wall]]
   - [[real://garage/east wall/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above][snowblower]]
-  - [[real://garage/workbench/hammer?rel=on/screws?rel=to the right 
of][screws]]
+  - [[real://garage/workbench/nails?rel=on top of/screws?rel=above][screws]]
   - [[real://garage/saw?rel=on][saw]]
   - [[real://garage/workbench/paintbrush?rel=in front of/wrench?rel=to the 
left of/pliers?rel=below][pliers]]
diff --git a/demo/headline-relationships.png b/demo/headline-relationships.png
deleted file mode 100644
index 00d22e8..000
Binary files a/demo/headline-relationships.png and /dev/null differ
diff --git a/demo/headlines.gif b/demo/headlines.gif
new file mode 100644
index 000..654b588
Binary files /dev/null and b/demo/headlines.gif differ
diff --git a/demo/insert-link-with-completion.gif 
b/demo/insert-link-with-completion.gif
index 19d489b..5919ccd 100644
Binary files a/demo/insert-link-with-completion.gif and 
b/demo/insert-link-with-completion.gif differ
diff --git a/demo/insert-link.gif b/demo/insert-link.gif
index f5bb53c..fce8ee1 100644
Binary files a/demo/insert-link.gif and b/demo/insert-link.gif differ
diff --git a/demo/org-real-m

[elpa] externals/org-real a040280 003/160: Added primary slot to color last element in url

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a040280126217531cb96c9cf0929dc6c03edf444
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added primary slot to color last element in url
---
 org-real.el | 35 +++
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/org-real.el b/org-real.el
index edeeca6..13b08de 100644
--- a/org-real.el
+++ b/org-real.el
@@ -26,7 +26,10 @@
:type org-real--box)
(children :initarg :children
  :initform '()
- :type list)))
+ :type list)
+   (primary :initarg :primary
+:initform nil
+:type boolean)))
 
 (defvar org-real-prepositions
   '("in" "behind" "in front of" "above" "below" "to the left of" "to the right 
of"))
@@ -81,11 +84,13 @@
 (oset box :parent prev)
 (object-add-to-list prev :children box)
 (if containers
-(org-real--create-box containers prev box)))
+(org-real--create-box containers prev box)
+  (oset box :primary t)))
 (oset box :parent parent)
 (object-add-to-list parent :children box)
 (if containers
-(org-real--create-box containers parent box))
+(org-real--create-box containers parent box)
+  (oset box :primary t))
 
 (defun org-real--parse-url (str)
   "Parse URL into an org real object"
@@ -131,13 +136,22 @@
 (org-real--draw box offset)
 (special-mode)
 
+(defface org-real-primary
+  '((t :background "aquamarine"
+   :foreground "black"))
+  "Face for the last thing in a url"
+  :group 'org-real)
+
 (defun org-real--pp-text (containers)
   (let* ((reversed (reverse containers))
- (container (pop reversed)))
+ (container (pop reversed))
+ (primary-name (plist-get container :name)))
 (dotimes (_ (cdr org-real--padding)) (insert "\n"))
 (insert (make-string (car org-real--padding) ?\s))
 (insert "The ")
-(insert (plist-get container :name))
+(put-text-property 0 (length primary-name) 'face 'org-real-primary
+   primary-name)
+(insert primary-name)
 (if reversed (insert " is"))
 (while reversed
   (insert " ")
@@ -158,10 +172,14 @@
(name (oref box :name))
(children (oref box :children))
(dashed (oref box :behind))
-   (align-bottom (oref box :in-front)))
-  (cl-flet ((draw (coords str)
+   (align-bottom (oref box :in-front))
+   (primary (oref box :primary)))
+  (cl-flet ((draw (coords str &optional primary)
(goto-line (car coords))
(move-to-column (cdr coords) t)
+   (if primary
+   (put-text-property 0 (length str) 'face 
'org-real-primary
+  str))
(insert str)
(delete-char (length str
 (draw (cons top left)
@@ -173,7 +191,8 @@
 (concat "└" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┘")))
 (draw (cons (+ top 1 (cdr org-real--padding))
 (+ left 1 (car org-real--padding)))
-  name)
+  name
+  primary)
 (let ((r (+ top 1))
   (c1 left)
   (c2 (+ left width -1)))



[elpa] externals/org-real a13ee17 155/160: Added elpaignore

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a13ee17496ecfd657ceca0366a524a62cebb5f5e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added elpaignore
---
 .elpaignore | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 000..85fc776
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1,6 @@
+/deps
+/tests
+/.gitignore
+/.gitlab-ci.yml
+/.gitmodules
+/Eldev



[elpa] externals/org-real 8550ace 004/160: Added alias "on" for "in"

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 8550acee7d12ad61924bfd9e8db7bd287dcc4e9a
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added alias "on" for "in"
---
 org-real.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-real.el b/org-real.el
index 13b08de..17fc2d2 100644
--- a/org-real.el
+++ b/org-real.el
@@ -32,7 +32,7 @@
 :type boolean)))
 
 (defvar org-real-prepositions
-  '("in" "behind" "in front of" "above" "below" "to the left of" "to the right 
of"))
+  '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of"))
 
 (defun org-real--create-box (containers &optional parent prev)
   (if (not parent)
@@ -45,7 +45,7 @@
   (when prev
 (oset box :rel (plist-get container :rel))
 (oset box :rel-box prev)
-(cond ((string= rel "in")
+(cond ((or (string= rel "in") (string= rel "on"))
(oset box :x-order (oref prev :x-order))
(oset box :y-order (oref prev :y-order))
(oset box :behind (oref prev :behind)))
@@ -79,7 +79,7 @@
(oset box :in-front (oref prev :in-front)
 
   (if (and prev (member (oref box :rel)
-'("in" "behind" "in front of")))
+'("in" "on" "behind" "in front of")))
   (progn
 (oset box :parent prev)
 (object-add-to-list prev :children box)



[elpa] externals/org-real d95d469 156/160: Changed cl-defmethod to defun; linting

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit d95d46966581cf82e5c330615f0040458386dc5f
Author: Tyler Grinn 
Commit: Tyler Grinn 

Changed cl-defmethod to defun; linting
---
 org-real.el | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/org-real.el b/org-real.el
index 8a37b6a..9076d17 100644
--- a/org-real.el
+++ b/org-real.el
@@ -238,7 +238,7 @@ diagram."
 (put-text-property 0 (length primary-name) 'face 'org-real-primary
primary-name)
 (cl-flet ((append-str (&rest strings)
-  (setq header (apply 'concat header strings
+  (setq header (apply #'concat header strings
   (append-str (make-string org-real-margin-y ?\n)
   (make-string org-real-margin-x ?\s)
   "The " primary-name)
@@ -250,8 +250,9 @@ diagram."
   (append-str ".")
   header)))
 
- Interactive functions
+ Commands
 
+;;;###autoload
 (defun org-real-world ()
   "View all real links in the current buffer."
   (interactive)
@@ -263,7 +264,7 @@ diagram."
  (world (boxy-merge
  (mapcar
   (lambda (containers)
-(org-real--make-instance 'boxy-box containers))
+(org-real--make-box containers))
   (org-real--parse-buffer)
 (org-real-pp world
  :display-buffer-fn 'display-buffer-same-window
@@ -279,6 +280,7 @@ diagram."
 (with-current-buffer (get-buffer "*Boxy*")
   (boxy-jump-to-box match)))
 
+;;;###autoload
 (defun org-real-apply ()
   "Apply any change from the real link at point to the current buffer."
   (interactive)
@@ -351,7 +353,7 @@ diagram."
   ((or (= response ?n) (= response 
?N)) nil)
   ((or (= response ?a) (= response ?A))
(setq replace-all t))
-  (mapc 'funcall changes)))
+  (mapc #'funcall changes)))
   (pop new-containers)
   (message nil))
 
@@ -364,7 +366,7 @@ diagram."
 (defun org-real-follow (url &rest _)
   "Open a real link URL in a popup buffer."
   (let* ((containers (org-real--parse-url url (point-marker)))
- (box (org-real--make-instance 'boxy-box (copy-tree containers
+ (box (org-real--make-box (copy-tree containers
 (if org-real-include-context
 (let* ((primary-name (plist-get (car (reverse containers)) :name))
(container-matrix (seq-filter
@@ -378,7 +380,7 @@ diagram."
   (org-real--parse-buffer)))
(context-boxes (mapcar
(lambda (containers)
- (org-real--make-instance 'boxy-box containers 
t))
+ (org-real--make-box containers t))
container-matrix)))
   (mapc
(lambda (context) (boxy-merge-into context box))
@@ -395,7 +397,7 @@ diagram."
(org-real--complete-thing "Thing: " container-matrix 
'()
 (catch 'confirm
   (while t
-(org-real-pp (org-real--make-instance 'boxy-box containers)
+(org-real-pp (org-real--make-box containers)
  :header (org-real--get-header containers)
  :visibility 0)
 (let ((response (read-event "RETURN- Confirm\nBACKSPACE - Remove 
context\n+ - Add context")))
@@ -434,7 +436,7 @@ EXISTING containers will be excluded from the completion."
(cl-delete-duplicates
 (mapcar
  (lambda (container) (plist-get container :name))
- (apply 'append container-matrix)
+ (apply #'append container-matrix)
  (result (completing-read prompt completions nil 'confirm))
  (existing-containers (car (seq-sort
 (lambda (a b) (> (length a) (length b)))
@@ -494,9 +496,7 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
 
  Boxy box implementation
 
-(cl-defmethod org-real--make-instance ((_ (subclass boxy-box))
-   containers
-   &optional skip-primary)
+(defun org-real--make-box (containers &optional skip-primary)
   "Create a `boxy-box' from CONTAINERS.
 
 If SKIP-PRIMARY is non-nil, don't highlight the primary box."
@@ -508,11 +508,11 @@ If SKIP-PRIMARY is non-nil, don't highlight the primary 
box."
 (org-real--add-container containers world skip-primary)
 world))
 
-(cl-defmethod org-real--add-container (containers
-   (prev boxy-box)
-   &optional
-   skip-primary
-   force-visi

[elpa] externals/org-real 8b3b5c2 005/160: org-real--merge and org-real-world

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 8b3b5c208307d57c5f0c7be1923a9e6d51978e22
Author: Tyler Grinn 
Commit: Tyler Grinn 

org-real--merge and org-real-world
---
 garage.org  |   4 +++
 org-real.el | 101 ++--
 tests.org   |   2 +-
 3 files changed, 97 insertions(+), 10 deletions(-)

diff --git a/garage.org b/garage.org
new file mode 100644
index 000..92cf5f5
--- /dev/null
+++ b/garage.org
@@ -0,0 +1,4 @@
+* Items in the garage
+  - [[real://garage/workbench?rel=in/wrench?rel=on][wrench]]
+  - [[real://garage/workbench?rel=in/ratchet?rel=on][ratchet]]
+  - [[real://garage/east wall?rel=in/rake?rel=on][rake]]
diff --git a/org-real.el b/org-real.el
index 17fc2d2..62510d6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -60,7 +60,7 @@
(oset box :in-front t))
   ((string= rel "above")
(oset box :x-order (oref prev :x-order))
-   (oset box :y-order (- 1 (oref prev :y-order)))
+   (oset box :y-order (- (oref prev :y-order) 1))
(oset box :behind (oref prev :behind)))
   ((string= rel "below")
(oset box :x-order (oref prev :x-order))
@@ -68,7 +68,7 @@
(oset box :behind (oref prev :behind))
(oset box :in-front (oref prev :in-front)))
   ((string= rel "to the left of")
-   (oset box :x-order (- 1 (oref prev :x-order)))
+   (oset box :x-order (- (oref prev :x-order) 1))
(oset box :y-order (oref prev :y-order))
(oset box :behind (oref prev :behind))
(oset box :in-front (oref prev :in-front)))
@@ -113,6 +113,90 @@
   tokens)))
 (add-to-list 'containers (list :name host
 
+(defun org-real--parse-buffer ()
+  (let ((boxes '()))
+(org-element-map (org-element-parse-buffer) 'link
+  (lambda (link)
+(if (string= (org-element-property :type link) "real")
+(add-to-list 'boxes
+ (org-real--create-box
+  (org-real--parse-url
+   (org-element-property :raw-link link)))
+ t
+(org-real--merge boxes)))
+
+(defun org-real--merge (boxes)
+  (if (< (length boxes) 2)
+  (if (= 0 (length boxes))
+  (org-real--box)
+(car boxes))
+(let ((world (org-real--box))
+  box)
+  (while boxes
+(setq box (pop boxes))
+(org-real--merge-into box world))
+  world)))
+
+(defun org-real--merge-into (from to)
+  (let ((from-boxes (reverse (org-real--expand from)))
+(to-boxes (reverse (org-real--expand to
+(unless (seq-some
+ (lambda (from-box)
+   (seq-some
+(lambda (to-box)
+  (when (and (slot-boundp from-box :name)
+ (slot-boundp to-box :name)
+ (string= (oref from-box :name) (oref to-box 
:name)))
+(mapc
+ (lambda (child)
+   (org-real--flex-add child to-box to))
+ (oref from-box :children))
+t))
+to-boxes))
+ from-boxes)
+  (org-real--flex-add from to to
+
+(defun org-real--flex-add (box parent world)
+  (let* ((cur-width (org-real--get-width world))
+ (siblings (oref parent :children))
+ (last-sibling (and siblings (seq-reduce
+(lambda (max sibling)
+  (let ((max-x (oref max :x-order))
+(max-y (oref max :y-order))
+(sibling-x (oref sibling :x-order))
+(sibling-y (oref sibling 
:y-order)))
+(if (> sibling-y max-y)
+sibling
+  (if (and (= max-y sibling-y) (> 
sibling-x max-x))
+  sibling
+max
+siblings
+(org-real--box :y-order -)
+(oset box :parent parent)
+(object-add-to-list parent :children box)
+(when last-sibling
+  (oset box :y-order (oref last-sibling :y-order))
+  (oset box :x-order (+ 1 (oref last-sibling :x-order)))
+  (let ((new-width (org-real--get-width world)))
+(when (and (> new-width cur-width) (> new-width 80))
+  (oset box :y-order (+ 1 (oref last-sibling :y-order)))
+  (oset box :x-order 0))
+
+  
+(defun org-real--expand (box)
+  (apply 'append (list box) (mapcar 'org-real--expand (oref box :children
+
+(defun org-real-world ()
+  (interactive)
+  (let* ((box (org-real--parse-buffer))
+ (width (org-real--get-wi

[elpa] externals/org-real 883497d 009/160: Use .el file instead of .tar in release job

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 883497dc02687d852905cf3772054552a6400954
Author: Tyler Grinn 
Commit: Tyler Grinn 

Use .el file instead of .tar in release job
---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 360659e..e8d988b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,8 +30,8 @@ release:
 description: $CI_COMMIT_DESCRIPTION
 assets:
   links:
-- name: $FILENAME_BASE.tar
-  url: $DIST_DIR/$FILENAME_BASE.tar
+- name: $FILENAME_BASE.el
+  url: $DIST_DIR/$FILENAME_BASE.el
 - name: $FILENAME_BASE.md5
   url: $DIST_DIR/$FILENAME_BASE.md5
   script:



[elpa] branch externals/taxy-magit-section created (now f9c37e3)

2021-10-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/taxy-magit-section.

at  f9c37e3   Meta: Package taxy-magit-section separately

This branch includes the following new commits:

   new  f9c37e3   Meta: Package taxy-magit-section separately




[elpa] externals/org-real a909323 017/160: Shift other things to the right or below when merging

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a90932310491bf7a4608cbc4341fc8a8c9301cfb
Author: Tyler Grinn 
Commit: Tyler Grinn 

Shift other things to the right or below when merging
---
 garage.org  |  2 ++
 org-real.el | 14 --
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/garage.org b/garage.org
index b8ebb4b..f7d1775 100644
--- a/garage.org
+++ b/garage.org
@@ -6,3 +6,5 @@
   - [[real://garage/east wall?rel=in/rake?rel=on/shovel?rel=to the left 
of][shovel]]
   - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left of][hoe]]
   - 
[[real://garage/workbench?rel=in/wrench?rel=on/paintbrush?rel=above][paintbrush]]
+  - [[real://garage/workbench?rel=in/ratchet?rel=on/hammer?rel=to the right 
of][hammer]]
+  - [[real://garage/workbench?rel=in/ratchet?rel=on/nails?rel=to the right 
of][nails]]
diff --git a/org-real.el b/org-real.el
index ff858f1..be394f6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -274,11 +274,21 @@ of BOX."
(oset next :x-order (oref match :x-order))
(oset next :behind (oref match :behind)))
   ((string= rel "below")
+   (let ((y-order (oref match :y-order)))
+ (oset next :y-order (+ 1 y-order))
+ (org-real--map-immediate
+  (lambda (box) (when (> (oref box :y-order) y-order)
+  (oset box :y-order (+ 1 (oref box :y-order)
+  match))
(oset next :x-order (oref match :x-order))
-   (oset next :y-order (+ 1 (oref match :y-order)))
(oset next :behind (oref match :behind)))
   ((string= rel "to the right of")
-   (oset next :x-order (+ 1 (oref match :x-order)))
+   (let ((x-order (oref match :x-order)))
+ (oset next :x-order (+ 1 x-order))
+ (org-real--map-immediate
+  (lambda (box) (when (> (oref box :x-order) x-order)
+  (oset box :x-order (+ 1 (oref box :x-order)
+  match))
(oset next :y-order (oref match :y-order))
(oset next :behind (oref match :behind))
(oset next :in-front (oref match :in-front)))



[elpa] externals/org-real 9ea4553 018/160: Modified logic to allow multiple children

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 9ea4553ebc79c5333e4fe6f6a3ed7af9df922455
Author: Tyler Grinn 
Commit: Tyler Grinn 

Modified logic to allow multiple children
---
 README.org  |   6 ++--
 garage.org  |   1 +
 org-real.el | 102 +++-
 3 files changed, 62 insertions(+), 47 deletions(-)

diff --git a/README.org b/README.org
index 0d44bce..4a000e3 100644
--- a/README.org
+++ b/README.org
@@ -7,9 +7,7 @@ Keep track of real things as org links.
   :straight (org-real :type git :host gitlab :repo "tygrdev/org-real"))
 #+end_src
 
-* Status *PARTIALLY WORKING*
-  - TODO Allow things to have multiple children with the same preposition
-  - TODO =org-real-world= flex layout sometimes draws over existing boxes
+* Status *ALPHA*
   - TODO Ask to replace all occurences after editing a link
 
 * Usage
@@ -78,7 +76,7 @@ Keep track of real things as org links.
 
[[file:demo/open-link.gif]]
 
-** =org-real-world= (expirimental)
+** =org-real-world=

To view all real links in the current buffer in a combined diagram,
use the interactive function =org-real-world=
diff --git a/garage.org b/garage.org
index f7d1775..c165c46 100644
--- a/garage.org
+++ b/garage.org
@@ -8,3 +8,4 @@
   - 
[[real://garage/workbench?rel=in/wrench?rel=on/paintbrush?rel=above][paintbrush]]
   - [[real://garage/workbench?rel=in/ratchet?rel=on/hammer?rel=to the right 
of][hammer]]
   - [[real://garage/workbench?rel=in/ratchet?rel=on/nails?rel=to the right 
of][nails]]
+  - [[real://garage/car?rel=in/air freshener?rel=in][air freshener]]
diff --git a/org-real.el b/org-real.el
index be394f6..d207afb 100644
--- a/org-real.el
+++ b/org-real.el
@@ -557,52 +557,60 @@ OFFSET is the starting line to start insertion."
  (children (oref box :children)))
 (if (not children)
 width
-  (let ((rows '()))
-(mapc
- (lambda (child)
-   (add-to-list 'rows (oref child :y-order)))
- children)
-(let ((child-widths (mapcar
- (lambda (row)
-   (+ base-width
-  (seq-reduce
-   (lambda (sum child) (+ sum
-  (car 
org-real--padding)
-  (org-real--get-width 
child)))
-   (seq-filter
-(lambda (child) (= row (oref child 
:y-order)))
-children)
-   (* -1 (car org-real--padding)
- rows)))
-  (apply 'max width child-widths))
+  (let* ((column-indices (seq-reduce
+  (lambda (columns child)
+(add-to-list 'columns (oref child :x-order)))
+  children
+  '()))
+ (columns (mapcar
+   (lambda (c)
+ (seq-filter
+  (lambda (child)
+(= c (oref child :x-order)))
+  children))
+   column-indices))
+ (column-widths (mapcar
+ (lambda (column)
+   (apply 'max (mapcar 'org-real--get-width 
column)))
+ columns))
+ (children-width (seq-reduce
+  (lambda (total width)
+(+ total (car org-real--margin) width))
+  column-widths
+  (* -1 (car org-real--margin)
+(if (> width children-width)
+width
+  (+ base-width children-width))
 
 (defun org-real--get-height (box)
   "Get the height of BOX."
-  (let ((height (+ (if (oref box :in-front)
-   (* -1 (cdr org-real--margin))
- 0)
-   2 ; box walls
-   (* 2 (cdr org-real--padding))
-   (cdr org-real--margin)))
-(children (oref box :children))
-(in-front (oref box :in-front)))
+  (let* ((in-front (oref box :in-front))
+ (height (+ (if in-front
+(* -1 (cdr org-real--margin))
+  0)
+2 ; box walls
+(* 2 (cdr org-real--padding))
+(cdr org-real--margin)))
+ (children (oref box :children)))
 (if (not children)
 height
-  (let ((columns '()))
-(mapc
- (lambda (child) (add-to-list 'columns (oref child :x-order)))
- children)
-(let ((child-heights (mapcar
-  (lambda (col)
-(+ height
-   (seq-reduce
-(lambda (sum chi

[elpa] main 91f1c6c: * elpa-packages (nano-modeline): New package

2021-10-06 Thread monnier--- via
branch: main
commit 91f1c6c98e29866c9cb8fa1368dc482eb5edd4b1
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-packages (nano-modeline): New package
---
 elpa-packages | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 0f7b51f..9b4462b 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -265,6 +265,8 @@
  ("nadvice":url nil)
  ("nameless"   :url "https://github.com/Malabarba/Nameless";)
  ("names"  :url "https://github.com/Malabarba/names";)
+ ("nano-modeline"  :url "https://github.com/rougier/nano-modeline";
+  :auto-sync t)
  ("nano-theme" :url "https://github.com/rougier/nano-theme";
   :auto-sync t)
  ("nhexl-mode" :url nil)



[elpa] externals/org-real 735ce86 028/160: Cleaned up hooks

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 735ce86586a49f24452f2ba7a24d82e19158af36
Author: Tyler Grinn 
Commit: Tyler Grinn 

Cleaned up hooks
---
 org-real.el | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/org-real.el b/org-real.el
index bcefb29..f56c022 100644
--- a/org-real.el
+++ b/org-real.el
@@ -425,6 +425,8 @@ matching the one returned from `completing-read'."
 existing-containers
   `((:name ,result)
 
+;;; Hooks
+
 (defun org-real--read-string-advice (orig prompt link &rest args)
   "Advise `read-string' during `org-insert-link' to use custom completion.
 
@@ -434,24 +436,20 @@ passed to it."
   (org-real-complete link)
 (apply orig prompt link args)))
 
-(defun org-real--insert-link-before (&rest args)
+(defun org-real--maybe-edit-link (orig &rest args)
   "Advise `org-insert-link' to advise `read-string' during editing of a link.
 
 ARGS are the arguments passed to `org-insert-link'."
-  (advice-add 'read-string :around #'org-real--read-string-advice))
-
-(defun org-real--insert-link-after (&rest args)
-  "Advise `org-insert-link' to advise `read-string' during editing of a link.
+  (advice-add 'read-string :around #'org-real--read-string-advice)
+  (unwind-protect
+  (if (called-interactively-p)
+  (call-interactively orig)
+(apply orig args))
+(advice-remove 'read-string #'org-real--read-string-advice)))
 
-ARGS are the arguments passed to `org-insert-link'."
-  (advice-remove 'read-string #'org-real--read-string-advice)
-  (org-real--apply))
+(advice-add 'org-insert-link :around #'org-real--maybe-edit-link)
 
-
-(advice-add 'org-insert-link :before #'org-real--insert-link-before)
-(advice-add 'org-insert-link :after #'org-real--insert-link-after)
-
-(defun org-real--apply ()
+(defun org-real--apply (&rest args)
   "Apply any changes to the current buffer from the last inserted real link."
   (let (new-link new-desc replace-all)
 (cond
@@ -523,6 +521,8 @@ ARGS are the arguments passed to `org-insert-link'."
   (pop new-containers)
   (message nil))
 
+(advice-add 'org-insert-link :after #'org-real--apply)
+
  Pretty printing
 
 (defun org-real--pp (box &optional containers)



[elpa] externals/org-real dbd7b45 037/160: Check for compiler warnings in CI/CD pipeline

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit dbd7b45d181a41e86d9eb1b06560982673eef0e9
Author: Tyler Grinn 
Commit: Tyler Grinn 

Check for compiler warnings in CI/CD pipeline
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f95502..95db3a4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ package:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
   script:
 - /root/.eldev/bin/eldev -dtT lint
-- /root/.eldev/bin/eldev -dtT compile
+- /root/.eldev/bin/eldev -dtT compile -W
 - /root/.eldev/bin/eldev -dtT package
 - /root/.eldev/bin/eldev -dtT md5
   artifacts:



[elpa] externals/org-real 7f33978 027/160: Added apply function for rearranging other links

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 7f33978800cd3366f1ad24ec57af3989ceecb039
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added apply function for rearranging other links
---
 org-real.el | 76 -
 1 file changed, 75 insertions(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index a260f7f..bcefb29 100644
--- a/org-real.el
+++ b/org-real.el
@@ -444,11 +444,85 @@ ARGS are the arguments passed to `org-insert-link'."
   "Advise `org-insert-link' to advise `read-string' during editing of a link.
 
 ARGS are the arguments passed to `org-insert-link'."
-  (advice-remove 'read-string #'org-real--read-string-advice))
+  (advice-remove 'read-string #'org-real--read-string-advice)
+  (org-real--apply))
+
 
 (advice-add 'org-insert-link :before #'org-real--insert-link-before)
 (advice-add 'org-insert-link :after #'org-real--insert-link-after)
 
+(defun org-real--apply ()
+  "Apply any changes to the current buffer from the last inserted real link."
+  (let (new-link new-desc replace-all)
+(cond
+ ((org-in-regexp org-link-bracket-re 1)
+  (setq new-link (match-string-no-properties 1)))
+ ((org-in-regexp org-link-plain-re)
+  (setq new-link (org-unbracket-string "<" ">" (match-string 0)
+(when (and new-link
+   (string= "real" (ignore-errors (url-type (url-generic-parse-url 
new-link)
+  (let ((new-containers (reverse (org-real--parse-url new-link
+(while new-containers
+  (let ((primary (plist-get (car new-containers) :name))
+(changes '())
+old-containers)
+(org-element-map (org-element-parse-buffer) 'link
+  (lambda (old-link)
+(when (string= (org-element-property :type old-link) "real")
+  (setq old-containers (reverse (org-real--parse-url
+ (org-element-property 
:raw-link old-link
+  
+  (when-let* ((new-index 0)
+  (old-index (seq-position
+  old-containers
+  primary
+  (lambda (a b) (string= (plist-get a 
:name) b
+  (begin (org-element-property :begin old-link))
+  (end (org-element-property :end old-link))
+  (replace-link (org-real--to-link
+ (reverse
+  (append (cl-subseq 
old-containers 0 old-index)
+  new-containers
+  (old-desc ""))
+(when (catch 'conflict
+(if (not (= (length new-containers) (- (length 
old-containers) old-index)))
+(throw 'conflict t))
+(while (< new-index (length new-containers))
+  (if (or (not (string= (plist-get (nth new-index 
new-containers) :name)
+(plist-get (nth old-index 
old-containers) :name)))
+  (not (string= (plist-get (nth new-index 
new-containers) :rel)
+(plist-get (nth old-index 
old-containers) :rel
+  (throw 'conflict t))
+  (setq new-index (+ 1 new-index))
+  (setq old-index (+ 1 old-index)))
+nil)
+  (goto-char begin)
+  (if (org-in-regexp org-link-bracket-re 1)
+  (setq old-desc (when (match-end 2) 
(match-string-no-properties 2
+  (push
+   `(lambda ()
+  (delete-region ,begin ,end)
+  (goto-char ,begin)
+  (insert (org-link-make-string ,replace-link 
,old-desc)))
+   changes))
+(when (and changes
+   (or replace-all (let ((response
+  (read-char-choice
+   (concat
+"Replace all occurrences of "
+primary
+" in current buffer? y/n/a ")
+   '(?y ?Y ?n ?N ?a ?A)
+   t)))
+ (cond
+  ((or (= response ?y) (= response 
?Y)) t)
+  ((or (= response ?n) (= response 
?N)) nil)
+ 

[elpa] externals/org-real 4fe5b9f 036/160: Renamed md5 command

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 4fe5b9fd12aa4c5e03e51b01630f14c5e2a8e34d
Author: Tyler Grinn 
Commit: Tyler Grinn 

Renamed md5 command
---
 Eldev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Eldev b/Eldev
index ae36fab..84e9700 100644
--- a/Eldev
+++ b/Eldev
@@ -1,7 +1,7 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
 (eldev-defcommand
- md5 (&rest parameters)
+ org_real-md5 (&rest parameters)
  "Create md5 checksum of tar files in dist folder"
  (mapc
   (lambda (file)



[elpa] externals/org-real 371024e 035/160: Satisfying ELC compiler

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 371024ebdab9f333d1788d6ef0f18ba6d772cb38
Author: Tyler Grinn 
Commit: Tyler Grinn 

Satisfying ELC compiler
---
 org-real--box.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/org-real--box.el b/org-real--box.el
index fdc3dec..3fa1d83 100644
--- a/org-real--box.el
+++ b/org-real--box.el
@@ -34,6 +34,11 @@
 (require 'eieio)
 (require 'cl-lib)
 
+ Variables from org-real.el
+
+(eval-when-compile
+  (defvar org-real-padding)
+  (defvar org-real-margin))
 
  Class definitions
 



[elpa] externals/org-real 0b764c7 022/160: get-width compares children with margins included

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 0b764c7e1bfec93538f23bc8bf8526d5dda48e95
Author: Tyler Grinn 
Commit: Tyler Grinn 

get-width compares children with margins included
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 557b689..00c9b48 100644
--- a/org-real.el
+++ b/org-real.el
@@ -576,7 +576,7 @@ OFFSET is the starting line to start insertion."
 (+ total (car org-real--margin) width))
   column-widths
   (* -1 (car org-real--margin)
-(if (> width children-width)
+(if (> width (+ (* 2 (car org-real--margin)) children-width))
 width
   (+ base-width children-width))
 



[elpa] externals/org-real 3e325b3 021/160: Simplified merge function

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 3e325b3e3205aa25efde6e0093ff01d9aec58507
Author: Tyler Grinn 
Commit: Tyler Grinn 

Simplified merge function
---
 org-real.el | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/org-real.el b/org-real.el
index 588b3e6..557b689 100644
--- a/org-real.el
+++ b/org-real.el
@@ -224,11 +224,9 @@ If EXCLUDE-CHILDREN, only retrieve sibling boxes."
   (if (= 0 (length boxes))
   (org-real--box)
 (car boxes))
-(let ((world (org-real--box))
-  box)
+(let ((world (org-real--box)))
   (while boxes
-(setq box (pop boxes))
-(org-real--merge-into box world))
+(org-real--merge-into (pop boxes) world))
   world)))
 
 (defun org-real--expand (box)



[elpa] externals/org-real 4c2915a 033/160: Updated README

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 4c2915a976befc2a1750db5ba3c600a0c9eee37f
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated README
---
 README.org | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index e759def..585f06a 100644
--- a/README.org
+++ b/README.org
@@ -11,8 +11,8 @@ Keep track of real things as org links.
 
 [[https://gitlab.com/tygrdev/org-real/-/releases][Download the latest release]]
 
-* Status *ALPHA*
-  - TODO Ask to replace all occurences after editing a link
+* Status *BETA*
+  - TODO ERT tests
 
 * Usage
 ** Inserting a link
@@ -72,6 +72,10 @@ Keep track of real things as org links.
 
[[file:demo/edit-link.gif]]
 
+   If any container in the new link does not match an existing
+   container in the buffer, org-real will prompt you to replace all
+   occurences of that thing with the new context and relationships.
+   
 ** Opening links
 
To open a link, place the cursor within the link and press =C-c



[elpa] externals/org-real ac799d3 040/160: Merge into single file

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit ac799d3077455ad896124fc36a30c1259ba05bf8
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge into single file

Merged org-real-box.el into org-real.el
---
 org-real-box.el | 560 
 org-real-pkg.el |   5 -
 org-real.el | 517 ++-
 3 files changed, 515 insertions(+), 567 deletions(-)

diff --git a/org-real-box.el b/org-real-box.el
deleted file mode 100644
index 710c78a..000
--- a/org-real-box.el
+++ /dev/null
@@ -1,560 +0,0 @@
-;;; org-real-box.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
-
-;; Author: Tyler Grinn 
-;; Version: 0.1.0
-;; File: org-real-box.el
-;; Package-Requires: ((emacs "26.1"))
-;; Keywords: tools
-;; URL: https://gitlab.com/tygrdev/org-real
-
-;;; Commentary:
-
-;; Box class definition and related methods
-
-;;; Code:
-
- Patch! 0.0.1 -> 0.1.0+
- Will be removed in version 1.0.0+
-
-(and (fboundp 'org-real--merge) (fmakunbound 'org-real--merge))
-(and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
-(and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
-(and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
-(and (fboundp 'org-real--add-matching) (fmakunbound 'org-real--add-matching))
-(and (fboundp 'org-real--flex-add) (fmakunbound 'org-real--flex-add))
-(and (fboundp 'org-real--expand) (fmakunbound 'org-real--expand))
-(and (fboundp 'org-real--draw) (fmakunbound 'org-real--draw))
-(and (fboundp 'org-real--get-width) (fmakunbound 'org-real--get-width))
-(and (fboundp 'org-real--get-height) (fmakunbound 'org-real--get-height))
-(and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
-(and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
-
- Requirements:
-
-(require 'eieio)
-(require 'cl-lib)
-
- Variables from org-real.el
-
-(eval-when-compile
-  (defvar org-real-padding)
-  (defvar org-real-margin))
-
- Class definitions
-
-(defclass org-real-box-collection ()
-  ((box :initarg :box
-:type org-real-box)
-   (next :initarg :next
- :type org-real-box-collection))
-  "A collection of `org-real-box'es.")
-
-(defclass org-real-box ()
-  ((name :initarg :name
- :type string)
-   (rel :initarg :rel
-:type string)
-   (rel-box :initarg :rel-box
-:type org-real-box)
-   (x-order :initarg :x-order
-:initform 0
-:type number)
-   (y-order :initarg :y-order
-:initform 0
-:type number)
-   (in-front :initarg :in-front
- :initform nil
- :type boolean)
-   (behind :initarg :behind
-   :initform nil
-   :type boolean)
-   (parent :initarg :parent
-   :type org-real-box)
-   (children :initarg :children
- :initform (org-real-box-collection)
- :type org-real-box-collection)
-   (primary :initarg :primary
-:initform nil
-:type boolean))
-  "A representation of a box in 3D space.")
-
-
- Exports
-
-(cl-defmethod org-real--make-instance ((_ (subclass org-real-box)) containers)
-  "Create an instance of `org-real-box' from CONTAINERS.
-
-CONTAINERS is a list of plists containing at least a :name
-property and optionally a :rel property."
-  (when-let* ((world (org-real-box))
-  (base-container (pop containers))
-  (base (org-real-box :name (plist-get base-container :name
-(oset base :parent world)
-(with-slots (children) world
-  (setq children (org-real--add-to-list children base)))
-(if containers
-(org-real--make-instance-helper containers world base))
-world))
-
-(cl-defmethod org-real--merge (boxes)
-  "Merge BOXES into a single box."
-  (if (< (length boxes) 2)
-  (if (= 0 (length boxes))
-  (org-real-box)
-(car boxes))
-(let ((world (org-real-box)))
-  (while boxes
-(org-real--merge-into (pop boxes) world))
-  world)))
-
- Drawing
-
-(cl-defmethod org-real--draw ((box org-real-box) offset)
-  "Insert an ascii drawing of BOX into the current buffer.
-
-OFFSET is the starting line to start insertion."
-  (let ((children (with-slots (children) box (org-real--get-all children
-(if (slot-boundp box :name)
-(with-slots (name behind (align-bottom in-front) (dashed behind) 
primary) box
-  (let* ((top (+ offset (org-real--get-top box)))
- (left (org-real--get-left box))
- (width (org-real--get-width box))
- (height (org-real--get-height box)))
-(cl-flet ((draw (coords str &optional primary)
-(forward-line (- (car coords) 
(line-number-at-pos)))
-(move-to-column (cdr coords) t)
-(if primary
-(put-text-property 0 (length str) 'face 
'org-real-p

[elpa] externals/org-real d161250 041/160: Removed reference to org-real-box

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit d16125094b8c46c089290d4222d2d05d5eb4f22d
Author: Tyler Grinn 
Commit: Tyler Grinn 

Removed reference to org-real-box
---
 org-real.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index a7f3c8d..9193893 100644
--- a/org-real.el
+++ b/org-real.el
@@ -23,8 +23,6 @@
 (require 'org-element)
 (require 'cl-lib)
 
-(require 'org-real-box)
-
  Customization variables
 
 (defcustom org-real-margin '(2 . 1)



[elpa] externals/org-real 7d9d67d 044/160: Rearranging

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 7d9d67d09e692d171f69bf78fe0e91a5e8069bad
Author: Tyler Grinn 
Commit: Tyler Grinn 

Rearranging
---
 org-real.el | 501 ++--
 1 file changed, 250 insertions(+), 251 deletions(-)

diff --git a/org-real.el b/org-real.el
index e1a7a2f..28df092 100644
--- a/org-real.el
+++ b/org-real.el
@@ -71,7 +71,236 @@ vertical padding"
   '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of")
   "List of available prepositions for things.")
 
- Class definitions
+ Interactive functions
+
+(defun org-real-world ()
+  "View all real links in the current buffer."
+  (interactive)
+  (org-real--pp
+   (org-real--merge
+(mapcar
+ (lambda (containers)
+   (org-real--make-instance 'org-real-box containers))
+ (org-real--parse-buffer)
+
+
+ Pretty printing
+
+(defun org-real--pp (box &optional containers)
+  "Pretty print BOX in a popup buffer.
+
+If CONTAINERS is passed in, also pretty print a sentence
+describing where BOX is."
+  (let ((top (org-real--get-top box))
+(width (org-real--get-width box))
+(height (org-real--get-height box))
+(inhibit-read-only t)
+(buffer (get-buffer-create "Org Real")))
+(with-current-buffer buffer
+  (erase-buffer)
+  (toggle-truncate-lines t)
+  (if containers (org-real--pp-text containers))
+  (let ((offset (- (line-number-at-pos)
+   (cdr org-real-margin)
+   (* 2 (cdr org-real-padding)
+(dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
+(org-real--draw box offset)
+(special-mode)))
+(display-buffer buffer `(display-buffer-pop-up-window
+ (window-width . 80)
+ (window-height . ,height)
+
+(defun org-real--pp-text (containers)
+  "Insert a textual representation of CONTAINERS into the current buffer."
+  (let* ((reversed (reverse containers))
+ (container (pop reversed))
+ (primary-name (plist-get container :name)))
+(dotimes (_ (cdr org-real-padding)) (insert "\n"))
+(insert (make-string (car org-real-padding) ?\s))
+(insert "The ")
+(put-text-property 0 (length primary-name) 'face 'org-real-primary
+   primary-name)
+(insert primary-name)
+(if reversed (insert " is"))
+(while reversed
+  (insert " ")
+  (insert (plist-get container :rel))
+  (setq container (pop reversed))
+  (insert " the ")
+  (insert (plist-get container :name)))
+(insert ".")
+(fill-paragraph)
+(insert "\n")))
+
+ `org-insert-link' configuration
+
+(org-link-set-parameters "real"
+ :follow #'org-real-follow
+ :complete #'org-real-complete)
+
+(defun org-real-follow (url &rest _)
+  "Open a real link URL in a popup buffer."
+  (let* ((containers (org-real--parse-url url))
+ (box (org-real--make-instance 'org-real-box (copy-tree containers
+(org-real--pp box (copy-tree containers
+
+(defun org-real-complete (&optional existing)
+  "Complete a real link or edit EXISTING link."
+  (let* ((container-matrix (org-real--parse-buffer))
+ (containers (if existing
+ (org-real--parse-url existing)
+   (org-real--complete-thing "Thing: " container-matrix
+(catch 'confirm
+  (while t
+(org-real--pp (org-real--make-instance 'org-real-box containers) 
containers)
+(let ((response (read-event "RETURN- Confirm\nBACKSPACE - Remove 
context\n+ - Add context")))
+  (cond
+   ((eq response 'return)
+(throw 'confirm containers))
+   ((eq response 'backspace)
+(pop containers)
+(if (= 0 (length containers))
+(setq containers (org-real--complete-thing "Thing: " 
container-matrix
+   ((eq response ?+)
+(let* ((top (plist-get (car containers) :name))
+   (preposition
+(completing-read (concat "The " top " is: ") 
org-real-prepositions nil t))
+   (additional-containers
+(org-real--complete-thing (concat "The " top " is " 
preposition " the: ") container-matrix)))
+  (setcar containers (plist-put (car containers) :rel preposition))
+  (setq containers (append additional-containers containers
+(org-real--to-link containers)))
+
+(defun org-real--complete-thing (prompt container-matrix)
+  "Use `completing-read' with PROMPT to get a list of containers.
+
+CONTAINER-MATRIX is used to generate possible completions.  The
+return value is the longest list of containers from the matrix
+that contains, as the last element, a container with a name
+matching the one returned from `completing-read'."
+  (let* ((completions (mapcar
+   

[elpa] externals/org-real 2ebeb5c 046/160: Updated readme

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 2ebeb5c73cb472e36b8def1aeb2aa9b5b28abd73
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated readme
---
 README.org | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 6aa89fb..f389898 100644
--- a/README.org
+++ b/README.org
@@ -78,9 +78,9 @@ Keep track of real things as org-mode links.

 ** Opening links
 
-   To open a link, place the cursor within the link and press =C-c
-   C-o=. This will display a popup buffer showing the location of the
-   thing described by the link.
+   To open a real link, place the cursor within the link and press
+   =C-c C-o=. This will display a popup buffer showing the location of
+   the thing described by the link.
 
[[file:demo/open-link.gif]]
 



[elpa] externals/org-real b32309c 056/160: Don't highlight children when following link

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit b32309c27f240b7828698c6035c6ccfe1ae3ddab
Author: Tyler Grinn 
Commit: Tyler Grinn 

Don't highlight children when following link
---
 org-real.el | 23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/org-real.el b/org-real.el
index 51df8b2..52f335b 100644
--- a/org-real.el
+++ b/org-real.el
@@ -171,7 +171,7 @@ describing where BOX is."
 (let* ((primary-name (plist-get (car (reverse containers)) :name))
(children (mapcar
   (lambda (containers)
-(org-real--make-instance 'org-real-box containers))
+(org-real--make-instance 'org-real-box containers 
t))
   (seq-filter
(lambda (containers)
  (setq containers (reverse containers))
@@ -413,7 +413,9 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
 (oset collection :box box)
 collection))
 
-(cl-defmethod org-real--make-instance ((_ (subclass org-real-box)) containers)
+(cl-defmethod org-real--make-instance ((_ (subclass org-real-box))
+   containers
+   &optional skip-primary)
   "Create an instance of `org-real-box' from CONTAINERS.
 
 CONTAINERS is a list of plists containing at least a :name
@@ -425,7 +427,8 @@ property and optionally a :rel property."
 (with-slots (children) world
   (setq children (org-real--push children base)))
 (if containers
-(org-real--make-instance-helper containers world base))
+(org-real--make-instance-helper containers world base skip-primary)
+  (unless skip-primary (oset box :primary t)))
 world))
 
 (cl-defmethod org-real--merge (boxes)
@@ -667,10 +670,14 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box."
 
  Private class methods
 
-(cl-defmethod org-real--make-instance-helper (containers parent (prev 
org-real-box))
+(cl-defmethod org-real--make-instance-helper (containers
+  parent
+  (prev org-real-box)
+  &optional skip-primary)
   "Help create a 3D representation of CONTAINERS.
 
 PREV must already existing in PARENT."
+  (message "Skip primary? %s" skip-primary)
   (let* ((container (pop containers))
  (rel (plist-get container :rel))
  (box (org-real-box :name (plist-get container :name
@@ -737,14 +744,14 @@ PREV must already existing in PARENT."
   (with-slots (children) prev
 (setq children (org-real--push children box)))
   (if containers
-  (org-real--make-instance-helper containers prev box)
-(oset box :primary t)))
+  (org-real--make-instance-helper containers prev box skip-primary)
+(unless skip-primary (oset box :primary t
   (oset box :parent parent)
   (with-slots (children) parent
 (setq children (org-real--push children box)))
   (if containers
-  (org-real--make-instance-helper containers parent box)
-(oset box :primary t)
+  (org-real--make-instance-helper containers parent box skip-primary)
+(unless skip-primary (oset box :primary t))
 
 (cl-defmethod org-real--make-dirty (box)
   "Clear all TOP LEFT WIDTH and HEIGHT coordinates from BOX and its children."



[elpa] externals/org-real 52f3d15 063/160: Satisfy elc compiler

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 52f3d15faf84675048fecf4753313659a50508b2
Author: Tyler Grinn 
Commit: Tyler Grinn 

Satisfy elc compiler
---
 org-real.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 8099649..a9fa2e9 100644
--- a/org-real.el
+++ b/org-real.el
@@ -693,7 +693,6 @@ PREV must already existing in PARENT."
 (with-slots
 ((prev-x x-order)
  (prev-y y-order)
- parent
  (prev-behind behind)
  (prev-on-top on-top)
  (prev-in-front in-front))



[elpa] externals/org-real e0109e8 079/160: Typo

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit e0109e83e64cd99979a14aa1afaea5dff837eb56
Author: Tyler Grinn 
Commit: Tyler Grinn 

Typo
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index fbfc1c8..eaf35ab 100644
--- a/org-real.el
+++ b/org-real.el
@@ -449,7 +449,7 @@ EXISTING containers will be excluded from the completion."
 existing-containers
   `((:name ,result :loc ,(point-marker))
 
-;;; Hooks
+;;; Hooks and advice
 
 (defun org-real--read-string-advice (orig prompt link &rest args)
   "Advise `read-string' during `org-insert-link' to use custom completion.



[elpa] externals/org-real 106063e 077/160: Complete redesign

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 106063e94fe43e7b9b8e4696cfef1975367ac346
Author: Tyler Grinn 
Commit: Tyler Grinn 

Complete redesign
---
 org-real.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/org-real.el b/org-real.el
index e683995..c0fa26e 100644
--- a/org-real.el
+++ b/org-real.el
@@ -121,12 +121,15 @@
 
  Faces
 
-(defface org-real-primary
-  '((t :background "aquamarine"
-   :foreground "black"))
+(defface org-real-primary nil
   "Face for the last thing in a real link."
   :group 'org-real)
 
+(face-spec-set
+ 'org-real-primary
+ '((t :foreground "light slate blue"))
+ 'face-defface-spec)
+
  Constants & variables
 
 (defconst org-real-prepositions



[elpa] externals/org-real 4cc110c 086/160: Added document container to org-real-headlines

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 4cc110c819e9727599fa2b63b5270bdafd02c1e5
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added document container to org-real-headlines
---
 demo/projects.org |  3 ++-
 org-real.el   | 11 ---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/demo/projects.org b/demo/projects.org
index 58cd090..f5d06ee 100644
--- a/demo/projects.org
+++ b/demo/projects.org
@@ -1,3 +1,5 @@
+#+TITLE: Projects
+
 * Ideas
 ** Keyboard pants
:PROPERTIES:
@@ -14,4 +16,3 @@
:REL: in front of
:END:
 
-
diff --git a/org-real.el b/org-real.el
index 174f8a6..ca5f3d7 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1558,11 +1558,16 @@ set to the :loc slot of each box."
 
 (defun org-real--parse-headlines ()
   "Create an org real box from the current buffer's headlines."
-  (let ((headlines (cddr (org-element-parse-buffer 'headline)))
-(world (org-real-box :level 1)))
+  (let* ((headlines (cddr (org-element-parse-buffer 'headline)))
+ (title (or (cadr (car (org-collect-keywords '("TITLE"
+(file-name-base (buffer-file-name))
+"Document"))
+ (world (org-real-box))
+ (document (org-real-box :name title)))
+(org-real--flex-add document world)
 (mapc
  (lambda (headline)
-(org-real--add-headline headline world))
+(org-real--add-headline headline document))
  headlines)
 world))
 



[elpa] externals/org-real 881e4af 093/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 881e4af6f18c528a93480891d3a6d4f9334861f2
Merge: 88c947d 378806b
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

Auto-fill description

* When inserting a link, auto-fill the primary thing into the description 
prompt
* Removed whitespace around org real diagram
* Improved efficiency

See merge request tygrdev/org-real!4
---
 Eldev|  58 ---
 README.org   |   4 +
 org-real.el  | 477 +++
 tests/edge-cases.org | 342 +---
 4 files changed, 447 insertions(+), 434 deletions(-)

diff --git a/Eldev b/Eldev
index 101bcf7..de0ac6c 100644
--- a/Eldev
+++ b/Eldev
@@ -21,31 +21,49 @@
  (require 'org-element)
  (load-file "org-real.el")
  (let ((failures 0))
-   (cl-flet ((get-expected ()
-   (save-excursion
- (re-search-forward "#\\+begin_example")
- (org-element-property :value 
(org-element-at-point
- (get-actual ()
- (with-current-buffer (get-buffer "Org Real")
-   (buffer-string)))
- (print-result (title result)
-   (message "%s : %s"
-(if result
-"\033[0;32mPASS\033[0m"
-  "\033[0;31mFAIL\033[0m")
-title))
- (set-result (result)
- (if (not result) (cl-incf failures))
- (let ((inhibit-message t))
-   (org-todo (if result "PASS" "FAIL")
+   (cl-flet* ((get-expected ()
+(save-excursion
+  (re-search-forward "#\\+begin_example")
+  (org-element-property :value 
(org-element-at-point
+  (get-actual ()
+  (with-current-buffer (get-buffer "Org Real")
+(buffer-string)))
+  (print-result (title result)
+(message "%s : %s"
+ (if result
+ "\033[0;32mPASS\033[0m"
+   "\033[0;31mFAIL\033[0m")
+ title)
+(if (not result)
+(let ((expected (get-expected)))
+  (save-window-excursion
+(with-temp-buffer
+  (insert expected)
+  (diff-buffers (get-buffer "Org Real")
+(current-buffer)
+nil t))
+(with-current-buffer (get-buffer "*Diff*")
+  (message
+   (string-join
+(butlast
+ (butlast
+  (cdddr
+   (split-string
+(buffer-string)
+"\n"
+  "\n")))
+  (set-result (result)
+  (if (not result) (cl-incf failures))
+  (let ((inhibit-message t))
+(org-todo (if result "PASS" "FAIL")
  (mapc
   (lambda (test)
 (with-temp-file test
-  (message "%s:" (file-name-base test))
+  (message "\n%s:\n" (file-name-base test))
   (insert-file-contents test)
   (org-mode)
 
-  (message "  Opening links:")
+  (message "  Opening links:\n")
   (org-element-map (org-element-parse-buffer) 'link
 (lambda (link)
   (goto-char (org-element-property :begin link))
@@ -60,7 +78,7 @@
 (print-result title result)
 (set-result result
 
-  (message "  Merging links:")
+  (message "\n  Merging links:\n")
   (org-babel-map-src-blocks nil
 (goto-char beg-block)
 (let ((title (org-entry-get nil "ITEM"))
diff --git a/README.org b/README.org
index 8d02395..1b35d81 100644
--- a/README.org
+++ b/README.org
@@ -122,6 +122,10 @@ Keep track of real things as org-mode links.
 
[[file:demo/apply-changes.gif]]
 
+   If a link is changed manually, use the interactive function
+   =org-real-apply= with the cursor on top of the new link to apply
+   changes from that link to the buffer.
+
 ** Org Real mode
 
To open a real link, place the cursor within the link 

[elpa] main 446a9d9: * elpa-packages (taxy, taxy-magit-section): Update/add

2021-10-06 Thread monnier--- via
branch: main
commit 446a9d9660de0abef1e1472b5b517d92bafd6f27
Author: Adam Porter 
Commit: Stefan Monnier 

* elpa-packages (taxy, taxy-magit-section): Update/add
---
 elpa-packages | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 1ef16cf..0f7b51f 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -387,6 +387,12 @@
  ("system-packages":url "https://gitlab.com/jabranham/system-packages";)
  ("systemd":url nil)
  ("taxy":url "https://github.com/alphapapa/taxy.el.git";
+  :doc "taxy.info"
+  :ignored-files ("images")
+  :auto-sync t)
+ ("taxy-magit-section"  :url "https://github.com/alphapapa/taxy.el.git";
+  :branch "package/taxy-magit-section"
+  :doc "taxy-magit-section.info"
   :auto-sync t)
  ("temp-buffer-browse"  :url "https://github.com/leoliu/temp-buffer-browse";)
  ("test-simple" :url "https://github.com/rocky/emacs-test-simple";)



[elpa] externals/org-real 5fb78c3 108/160: Skip adding box if it already exists

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 5fb78c3a7916760f8123b3b842b357bbb43afb5c
Author: Tyler Grinn 
Commit: Tyler Grinn 

Skip adding box if it already exists
---
 org-real.el | 183 ++--
 1 file changed, 92 insertions(+), 91 deletions(-)

diff --git a/org-real.el b/org-real.el
index 6fcceaa..f5cba37 100644
--- a/org-real.el
+++ b/org-real.el
@@ -518,24 +518,22 @@ visibility."
  (box (org-real--make-instance 'org-real-box (copy-tree containers
 (if org-real-include-context
 (let* ((primary-name (plist-get (car (reverse containers)) :name))
-   (context (mapcar
- (lambda (containers)
-   (org-real--make-instance 'org-real-box containers 
t))
- (cl-delete-duplicates
-  (seq-filter
-   (lambda (containers)
- (let ((rel-containers (reverse containers)))
-   (pop rel-containers) ;; Exclude copies of the 
same thing
-   (seq-some
-(lambda (rel-container)
-  (string= primary-name (plist-get 
rel-container :name)))
-rel-containers)))
-   (org-real--parse-buffer))
-  :test #'string=
-  :key (lambda (containers) (plist-get (nth (- (length 
containers) 1)
-containers)
-   :name))
-  (setq box (org-real--merge (push box context)
+   (container-matrix (seq-filter
+  (lambda (containers)
+(let ((rel-containers (reverse 
containers)))
+  (pop rel-containers) ;; Exclude copies 
of the same thing
+  (seq-some
+   (lambda (rel-container)
+ (string= primary-name (plist-get 
rel-container :name)))
+   rel-containers)))
+  (org-real--parse-buffer)))
+   (context-boxes (mapcar
+   (lambda (containers)
+ (org-real--make-instance 'org-real-box 
containers t))
+   container-matrix)))
+  (mapc
+   (lambda (context) (org-real--merge-into context box))
+   context-boxes)))
 (org-real--pp box (copy-tree containers) nil nil 0)))
 
 (defun org-real-complete (&optional existing)
@@ -1237,7 +1235,7 @@ If FORCE-VISIBLE, always make CHILD visible in PARENT."
 (cl-defmethod org-real--expand ((box org-real-box))
   "Get a list of all boxes, including BOX, that are children of BOX."
   (if (slot-boundp box :parent)
-  (apply 'append (list box) (mapcar 'org-real--expand 
(org-real--get-children box 'all)))
+  (apply 'append (list box) (mapcar 'org-real--expand (org-real--next 
box)))
 (apply 'append (mapcar 'org-real--expand (org-real--get-children box 
'all)
 
 (cl-defmethod org-real--make-dirty ((box org-real-box))
@@ -1397,9 +1395,7 @@ PREV must already exist in PARENT."
  (with-slots (locations) box locations)))
   (let ((world (org-real--get-world match)))
 (mapc
- (lambda (next)
-   (if (not (org-real--find-matching next world))
-   (org-real--add-next next match)))
+ (lambda (next) (org-real--add-next next match))
  (org-real--next box
 
 (cl-defmethod org-real--merge-into ((from org-real-box) (to org-real-box))
@@ -1462,76 +1458,81 @@ If FORCE-VISIBLE, show the box regardless of
next-boxes))
  (children-boxes (alist-get 'children partitioned))
  (sibling-boxes (alist-get 'siblings partitioned)))
-(setq extra-data partitioned)
-(cond
- ((member rel '("to the left of" "to the right of"))
-  (setq next-level prev-level)
-  (setq next-y prev-y)
-  (setq next-behind prev-behind)
-  (setq next-in-front prev-in-front)
-  (setq next-on-top prev-on-top)
-  (if (string= rel "to the left of")
-  (setq next-x prev-x)
-(setq next-x (+ 1 prev-x)))
-  (let ((row-siblings (seq-filter
-   (lambda (sibling)
- (with-slots (y-order) sibling
-   (= y-order prev-y)))
-   (org-real--get-children parent 'all
+(if-let ((match (org-real--find-matching next prev)))
 (mapc
- (lambda (sibling)
-   (with-slots (x-order) sibling
- (if (>= x-ord

[elpa] externals/org-real 009dd3e 107/160: Added popup library

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 009dd3e3859fb2dd5f5741a031afd9599f5a4310
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added popup library
---
 Eldev   |  2 ++
 org-real.el | 92 -
 2 files changed, 63 insertions(+), 31 deletions(-)

diff --git a/Eldev b/Eldev
index de0ac6c..a6196bb 100644
--- a/Eldev
+++ b/Eldev
@@ -1,5 +1,7 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
+(eldev-use-package-archive 'melpa)
+
 (eldev-defcommand
  org_real-md5 (&rest _)
  "Create md5 checksum of .tar and .el files in dist folder."
diff --git a/org-real.el b/org-real.el
index a175aed..6fcceaa 100644
--- a/org-real.el
+++ b/org-real.el
@@ -3,7 +3,7 @@
 ;; Author: Tyler Grinn 
 ;; Version: 0.4.0
 ;; File: org-real.el
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "26.1") (popup "0.5"))
 ;; Keywords: tools
 ;; URL: https://gitlab.com/tygrdev/org-real
 
@@ -49,7 +49,9 @@
 
 (require 'eieio)
 (require 'org-element)
+(require 'org-colview)
 (require 'cl-lib)
+(require 'popup)
 
  Patch! 0.0.1 -> 0.1.0+
  Will be removed in version 1.0.0+
@@ -168,6 +170,16 @@
  '((t :foreground "orange"))
  'face-defface-spec)
 
+(defface org-real-popup nil
+  "Face for popups in an Org Real diagram."
+  :group 'org-real)
+
+(face-spec-set
+ 'org-real-popup
+ '((t :background "light slate blue"
+  :foreground "white"))
+ 'face-defface-spec)
+
  Constants & variables
 
 (defconst org-real-prepositions
@@ -403,6 +415,9 @@ The following commands are available:
 \\{org-real-mode-map}"
   :group 'org-mode
   (let ((inhibit-message t))
+(face-remap-add-relative
+ 'popup-tip-face
+ 'org-real-popup)
 (setq indent-tabs-mode nil)
 (cursor-sensor-mode t)
 (toggle-truncate-lines t)))
@@ -503,9 +518,10 @@ visibility."
  (box (org-real--make-instance 'org-real-box (copy-tree containers
 (if org-real-include-context
 (let* ((primary-name (plist-get (car (reverse containers)) :name))
-   (children (mapcar
-  (lambda (containers)
-(org-real--make-instance 'org-real-box containers 
t))
+   (context (mapcar
+ (lambda (containers)
+   (org-real--make-instance 'org-real-box containers 
t))
+ (cl-delete-duplicates
   (seq-filter
(lambda (containers)
  (let ((rel-containers (reverse containers)))
@@ -514,8 +530,12 @@ visibility."
 (lambda (rel-container)
   (string= primary-name (plist-get 
rel-container :name)))
 rel-containers)))
-   (org-real--parse-buffer)
-  (setq box (org-real--merge (push box children)
+   (org-real--parse-buffer))
+  :test #'string=
+  :key (lambda (containers) (plist-get (nth (- (length 
containers) 1)
+containers)
+   :name))
+  (setq box (org-real--merge (push box context)
 (org-real--pp box (copy-tree containers) nil nil 0)))
 
 (defun org-real-complete (&optional existing)
@@ -765,8 +785,8 @@ non-nil, skip setting :primary slot on the last box."
   "Insert an ascii drawing of BOX into the current buffer.
 
 If ARG is non-nil, skip drawing children boxes and only update
-text properties on the border. If ARG is 'selected, draw the
-border using the `org-real-selected' face. If ARG is 'rel, draw
+text properties on the border.  If ARG is 'selected, draw the
+border using the `org-real-selected' face.  If ARG is 'rel, draw
 the border using `org-real-rel' face, else use `org-real-default'
 face.
 
@@ -1065,28 +1085,31 @@ If INCLUDE-ON-TOP is non-nil, also include height on 
top of box."
 
  Org real mode buttons
 
-(cl-defmethod org-real--create-cursor-functions ((box org-real-box))
+(cl-defmethod org-real--create-cursor-function ((box org-real-box))
+  "Create cursor functions for entering and leaving BOX."
   (with-slots (rel rel-box name metadata) box
-(lambda (_window _oldpos dir)
-  (let ((inhibit-read-only t)
-(top (org-real--get-top box))
-(left (org-real--get-left box)))
-(save-excursion
-  (if (eq dir 'entered)
-  (progn
-(if (slot-boundp box :metadata)
-(message metadata)
-  (if (slot-boundp box :name)
-  (if (slot-boundp box :rel)
-  (with-slots ((rel-name name)) rel-box
-(message "The %s is %s the %s." name rel rel-name))
-(message "The %s." name 
-(if (slot-boundp box :rel-box

[elpa] externals/org-real f883078 101/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f883078abcabbebf74bedd2879ddcbe3d74219cb
Merge: 881e4af 6a7fbe8
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

Added expansion slots to speed up initial rendering

Box diagram can now be rendered in steps. Only visible boxes are rendered 
initially. For large org files, this makes `org-real-headlines` much faster.

See merge request tygrdev/org-real!5
---
 README.org   |  10 ++
 demo/garage.org  |   2 +-
 org-real.el  | 326 +--
 tests/edge-cases.org |  30 +++--
 4 files changed, 241 insertions(+), 127 deletions(-)

diff --git a/README.org b/README.org
index 1b35d81..0f1552d 100644
--- a/README.org
+++ b/README.org
@@ -148,11 +148,21 @@ Keep track of real things as org-mode links.
To view all real links in the current buffer in a combined diagram,
use the interactive function =org-real-world=
 
+   Suggested keybinding:
+   #+begin_src emacs-lisp
+ (define-key org-mode-map (kbd "C-c r w") 'org-real-world)
+   #+end_src
+
 ** =org-real-headlines=
 
To view all headlines in an org-mode file as an org-real diagram,
use the interactive function =org-real-headlines=
 
+   Suggested keybinding:
+   #+begin_src emacs-lisp
+ (define-key org-mode-map (kbd "C-c r o") 'org-real-headlines)
+   #+end_src
+
To modify the relationship between a headline and its parent, add
the property REL to the child headline. Valid values are:
- on top of
diff --git a/demo/garage.org b/demo/garage.org
index 2ad5cca..ae95ec8 100644
--- a/demo/garage.org
+++ b/demo/garage.org
@@ -14,4 +14,4 @@
   - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above][snowblower]]
   - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of][screws]]
   - [[real://garage/saw?rel=on][saw]]
-  - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of/pliers?rel=above][pliers]]
+  - [[real://garage/workbench?rel=in/paintbrush?rel=in front of/wrench?rel=to 
the left of/pliers?rel=below][pliers]]
diff --git a/org-real.el b/org-real.el
index 0e99900..b8368a3 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 
-;; Version: 0.3.1
+;; Version: 0.3.2
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -479,7 +479,7 @@ visibility."
(org-real--complete-thing "Thing: " container-matrix 
'()
 (catch 'confirm
   (while t
-(org-real--pp (org-real--make-instance 'org-real-box containers) 
containers)
+(org-real--pp (org-real--make-instance 'org-real-box containers) 
containers nil nil 0)
 (let ((response (read-event "RETURN- Confirm\nBACKSPACE - Remove 
context\n+ - Add context")))
   (cond
((or (eq response 'return) (eq response 13))
@@ -612,6 +612,11 @@ ORIG is `org-insert-link', ARGS are the arguments passed 
to it."
(hidden-children :initarg :hidden-children
 :initform (org-real-box-collection)
 :type org-real-box-collection)
+   (expand-siblings :initarg :expand-siblings
+:type function)
+   (expand-children :initarg :expand-children
+:type function)
+   (extra-data :initarg :extra-data)
(level :initarg :level
   :initform 0
   :type number)
@@ -685,12 +690,23 @@ non-nil, skip setting :primary slot on the last box."
 
 (cl-defmethod org-real--update-visibility ((box org-real-box))
   "Update visibility of BOX and all of its children."
-  (with-slots (level children hidden-children) box
-(let ((hidden (org-real--get-all hidden-children)))
-  (if (or (= 0 org-real--visibility)
-  (<= level org-real--visibility))
-  (if hidden (cl-rotatef children hidden-children))
-(if (not hidden) (cl-rotatef children hidden-children
+  (with-slots (level children hidden-children expand-children) box
+(if (or (= 0 org-real--visibility)
+(<= level org-real--visibility))
+(progn
+  (when (slot-boundp box :expand-children)
+(funcall expand-children box)
+(slot-makeunbound box :expand-children))
+  (if (org-real--get-all hidden-children)
+  (cl-rotatef children hidden-children))
+  (mapc
+   (lambda (child)
+ (with-slots (expand-siblings) child
+   (when (slot-boundp child :expand-siblings)
+ (funcall expand-siblings child)
+ (slot-makeunbound child :expand-siblings
+   (org-real--get-all children)))
+  (if (not (org-real--get-all hidden-children)) (cl-rotatef children 
hidden-children)))
 (mapc 'org-real--update-visibility (append (org-real--get-all children)
  

[elpa] externals/org-real b4373e7 123/160: Only flex adjusting necessary boxes

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit b4373e780a233e3271a299b71a86ccee3d0809c5
Author: Tyler Grinn 
Commit: Tyler Grinn 

Only flex adjusting necessary boxes
---
 org-real.el | 32 ++--
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/org-real.el b/org-real.el
index b8c14f2..c08f2b9 100644
--- a/org-real.el
+++ b/org-real.el
@@ -304,12 +304,11 @@
((= 2 org-real--visibility) (message "CONTENTS"))
((= 3 org-real--visibility) (message "MORE CONTENTS")))
   (org-real--update-visibility org-real--current-box)
+  (org-real--flex-adjust org-real--current-box org-real--current-box)
   (org-real-mode-redraw))
 
 (defun org-real-mode-redraw ()
   "Redraw `org-real--current-box' in the current buffer."
-  (org-real--make-dirty org-real--current-box)
-  (org-real--flex-adjust org-real--current-box org-real--current-box)
   (let ((inhibit-read-only t))
 (erase-buffer)
 (if org-real--current-containers
@@ -523,6 +522,7 @@ visibility."
   (setq org-real--visibility (or visibility org-real-default-visibility))
   (setq org-real--max-visibility (or max-visibility 3))
   (org-real--update-visibility box)
+  (org-real--flex-adjust box box)
   (org-real-mode-redraw)
   (let* ((width (apply 'max (mapcar 'length (split-string (buffer-string) 
"\n"
  (height (count-lines (point-min) (point-max)))
@@ -823,13 +823,12 @@ non-nil, skip setting :primary slot on the last box."
  (org-real--primary-boxes from))
 (unless match-found
   (let ((all-from-children (org-real--get-children from 'all)))
-(with-slots ((to-children children) (to-behind behind)) to
-  (if (= 1 (length all-from-children))
-  (progn
-(oset (car all-from-children) :flex t)
-(org-real--add-child to (car all-from-children)))
-(oset from :flex t)
-(org-real--add-child to from)))
+(if (= 1 (length all-from-children))
+(progn
+  (oset (car all-from-children) :flex t)
+  (org-real--add-child to (car all-from-children)))
+  (oset from :flex t)
+  (org-real--add-child to from))
 
 (cl-defmethod org-real--update-visibility ((box org-real-box))
   "Update visibility of BOX and all of its children."
@@ -1208,8 +1207,12 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box."
 (org-real--draw rel-box 'rel)))
   (org-real--draw box 'selected))
   (if tooltip-timer (cancel-timer tooltip-timer))
-  (if (slot-boundp box :rel-box)
-  (org-real--draw rel-box t))
+  (if (slot-boundp box :display-rel)
+  (if (org-real--is-visible display-rel t)
+  (org-real--draw display-rel-box t))
+(if (and (slot-boundp box :rel-box)
+ (org-real--is-visible rel-box t))
+(org-real--draw rel-box t)))
   (org-real--draw box t
 
 (cl-defmethod org-real--jump-other-window ((box org-real-box))
@@ -1777,7 +1780,7 @@ characters if possible."
   "Cycle visibility of children of BOX."
   (lambda ()
 (interactive)
-(with-slots (children hidden-children expand-children expanded) box
+(with-slots (children hidden-children expand-children expanded parent) box
   (if (slot-boundp box :expand-children)
   (progn
 (funcall expand-children box)
@@ -1795,7 +1798,8 @@ characters if possible."
  (setq fully-expanded nil)
  (funcall expand-siblings child)
  (slot-makeunbound child :expand-siblings
-   (org-real--get-all children)
+   (org-real--get-all children
+  (org-real--flex-adjust parent (org-real--get-world parent)))
 (org-real-mode-redraw)
 (let ((top (org-real--get-top box))
   (left (org-real--get-left box)))
@@ -1854,7 +1858,7 @@ characters if possible."
(truncate-string-to-width str org-real-tooltip-max-width 
nil nil t)))
 (when (= 0 remaining-chars)
   (save-excursion (goto-char pos) (let ((inhibit-read-only t)) (insert 
" ")))
-  (setq remaining-chars (+ 1 remaining-chars)))
+  (setq remaining-chars 1))
 (setq overlay (make-overlay pos (+ pos (min remaining-chars width
 (overlay-put overlay 'face 'org-real-popup)
 (overlay-put overlay 'display `((margin nil) ,str))



[elpa] externals/org-real 58989c3 121/160: Use cartesian distance for cycle up/down

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 58989c3aa0f56803d2b5da71109fbd14b1cdf39d
Author: Tyler Grinn 
Commit: Tyler Grinn 

Use cartesian distance for cycle up/down
---
 org-real.el | 72 +++--
 1 file changed, 41 insertions(+), 31 deletions(-)

diff --git a/org-real.el b/org-real.el
index bac42ea..b8c14f2 100644
--- a/org-real.el
+++ b/org-real.el
@@ -253,36 +253,44 @@
 (defun org-real-mode-cycle-down ()
   "Cycle to the next button on the row below."
   (interactive)
-  (let ((col (current-column)))
-(forward-line 1)
-(org-real-mode-cycle)
-(move-to-column col)
-(let ((pos (point)))
-  (goto-char (seq-reduce
-  (lambda (closest p)
-(if (< (abs (- pos p))
-   (abs (- pos closest)))
-p
-  closest))
-  org-real--box-ring
-  1.0e+INF)
+  (let ((coords (cons (line-number-at-pos) (current-column
+(goto-char (seq-reduce
+(lambda (closest pos)
+  (goto-char pos)
+  (if (<= (line-number-at-pos) (car coords))
+  closest
+(let* ((pos-coords (cons (line-number-at-pos) 
(current-column)))
+   (pos-dist (sqrt (+ (expt (- (car pos-coords) (car 
coords)) 2)
+  (expt (- (cdr pos-coords) (cdr 
coords)) 2
+   (closest-coords (and (goto-char closest) (cons 
(line-number-at-pos) (current-column
+   (closest-dist (sqrt (+ (expt (- (car 
closest-coords) (car coords)) 2)
+  (expt (- (cdr 
closest-coords) (cdr coords)) 2)
+  (if (< pos-dist closest-dist)
+  pos
+closest
+org-real--box-ring
+(point-max)
 
 (defun org-real-mode-cycle-up ()
   "Cycle to the next button on the row above."
   (interactive)
-  (let ((col (current-column)))
-(forward-line -1)
-(org-real-mode-uncycle)
-(move-to-column col)
-(let ((pos (point)))
-  (goto-char (seq-reduce
-  (lambda (closest p)
-(if (< (abs (- pos p))
-   (abs (- pos closest)))
-p
-  closest))
-  org-real--box-ring
-  1.0e+INF)
+  (let ((coords (cons (line-number-at-pos) (current-column
+(goto-char (seq-reduce
+(lambda (closest pos)
+  (goto-char pos)
+  (if (>= (line-number-at-pos) (car coords))
+  closest
+(let* ((pos-coords (cons (line-number-at-pos) 
(current-column)))
+   (pos-dist (sqrt (+ (expt (- (car pos-coords) (car 
coords)) 2)
+  (expt (- (cdr pos-coords) (cdr 
coords)) 2
+   (closest-coords (and (goto-char closest) (cons 
(line-number-at-pos) (current-column
+   (closest-dist (sqrt (+ (expt (- (car 
closest-coords) (car coords)) 2)
+  (expt (- (cdr 
closest-coords) (cdr coords)) 2)
+  (if (< pos-dist closest-dist)
+  pos
+closest
+org-real--box-ring
+(point-min)
 
 (defun org-real-mode-cycle-visibility ()
   "Cycle visibility on all children in the current buffer."
@@ -1197,7 +1205,7 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box."
   (org-real--draw display-rel-box 'rel))
 (if (and (slot-boundp box :rel-box)
  (org-real--is-visible rel-box t))
-  (org-real--draw rel-box 'rel)))
+(org-real--draw rel-box 'rel)))
   (org-real--draw box 'selected))
   (if tooltip-timer (cancel-timer tooltip-timer))
   (if (slot-boundp box :rel-box)
@@ -1394,6 +1402,8 @@ PREV must already exist in PARENT."
  (cur-behind behind)
  (cur-on-top on-top)
  (cur-in-front in-front)
+ display-rel
+ display-rel-box
  flex)
 box
 (with-slots
@@ -1423,18 +1433,18 @@ PREV must already exist in PARENT."
 (setq cur-behind prev-behind)
 (cond
  ((and prev-in-front (string= rel "below"))
-  (oset box :display-rel-box prev)
+  (setq display-rel-box prev)
   (while (with-slots (in-front) prev in-front)
 (setq prev (with-slots (parent) prev parent)))
   (setq parent (with-slots (parent) prev parent)))
  ((and prev-on-top (string= rel "above"))
- 

[elpa] externals/org-real 193f14d 138/160: Refactoring

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 193f14d1e02f36e893e9e07fe765aa9faa9c9931
Author: Tyler Grinn 
Commit: Tyler Grinn 

Refactoring
---
 demo/garage.org |  2 +-
 org-real.el | 85 +
 2 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/demo/garage.org b/demo/garage.org
index 9cef143..ca2c554 100644
--- a/demo/garage.org
+++ b/demo/garage.org
@@ -12,6 +12,6 @@
   - [[real://garage/workbench/nails?rel=on top of][nails]]
   - [[real://garage/east wall][East wall]]
   - [[real://garage/east wall/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above][snowblower]]
-  - [[real://garage/workbench/hammer?rel=on/screws?rel=to the right 
of][screws]]
+  - [[real://garage/workbench/nails?rel=on top of/screws?rel=above][screws]]
   - [[real://garage/saw?rel=on][saw]]
   - [[real://garage/workbench/paintbrush?rel=in front of/wrench?rel=to the 
left of/pliers?rel=below][pliers]]
diff --git a/org-real.el b/org-real.el
index 0dd0b57..c6f6f1b 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1213,50 +1213,51 @@ If INCLUDE-ON-TOP is non-nil, also include height on 
top of box."
 
 (cl-defmethod org-real--create-cursor-function ((box org-real-box))
   "Create cursor functions for entering and leaving BOX."
-  (with-slots (rel rel-box display-rel-box display-rel name metadata 
help-echo) box
+  (with-slots
+  ((actual-rel rel)
+   (actual-rel-box rel-box)
+   display-rel-box
+   display-rel
+   name
+   metadata
+   help-echo)
+  box
 (let (tooltip-timer)
   (lambda (_window _oldpos dir)
-(let ((inhibit-read-only t))
-  (save-excursion
-(if (eq dir 'entered)
-(progn
-  (if (slot-boundp box :help-echo)
-  (message help-echo))
-  (if (slot-boundp box :metadata)
-  (setq tooltip-timer (org-real--tooltip metadata))
-(if (and (slot-boundp box :name) (slot-boundp box :rel))
-(with-slots ((rel-name name)) (if (slot-boundp box 
:display-rel-box)
-  display-rel-box
-rel-box)
-  (setq tooltip-timer
-(org-real--tooltip
- (with-temp-buffer
-   (insert (format (concat "The %s "
-   (if 
(org-real--is-plural name) "are" "is")
-   " %s the %s.")
-   name
-   (if (slot-boundp box 
:display-rel)
-   display-rel
- rel)
-   rel-name))
-   (let ((fill-column 
org-real-tooltip-max-width))
- (fill-paragraph t))
-   (buffer-string)))
-  (if (slot-boundp box :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 t))
-(org-real--draw rel-box 'rel)))
-  (org-real--draw box 'selected))
-  (if tooltip-timer (cancel-timer tooltip-timer))
-  (if (slot-boundp box :display-rel-box)
-  (if (org-real--is-visible display-rel-box t)
-  (org-real--draw display-rel-box t))
-(if (and (slot-boundp box :rel-box)
- (org-real--is-visible rel-box t))
-(org-real--draw rel-box t)))
-  (org-real--draw box t
+(let* ((rel-box (and (slot-boundp box :rel-box)
+ (if (slot-boundp box :display-rel-box)
+ display-rel-box
+   actual-rel-box)))
+   (visible-rel-box rel-box))
+  (while (and visible-rel-box (not (org-real--is-visible 
visible-rel-box t)))
+(setq visible-rel-box (with-slots (parent) visible-rel-box 
parent)))
+  (when (eq dir 'entered)
+(save-excursion
+  (let ((inhibit-read-only t))
+(org-real--draw box 'selected)
+(if visible-rel-box (org-real--draw visible-rel-box 'rel
+(if (slot-boundp box :help-echo) (message help-echo))
+(if (slot-boundp box :metadata)
+(setq tooltip-timer (org-real--tooltip metadata))
+  (if (and (slot-boundp box :name) rel-box)
+  (l

[elpa] externals/org-real cd43923 119/160: Use original relationship for tooltip if changed

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit cd43923ddcaa65124dee2b65d602cec15eda5945
Author: Tyler Grinn 
Commit: Tyler Grinn 

Use original relationship for tooltip if changed
---
 org-real.el | 309 +++-
 1 file changed, 162 insertions(+), 147 deletions(-)

diff --git a/org-real.el b/org-real.el
index 4a306ad..0b50b57 100644
--- a/org-real.el
+++ b/org-real.el
@@ -212,142 +212,6 @@
   '("in" "on" "behind")
   "List of prepositions for which boxes are flexibly added to their parent.")
 
- Interactive functions
-
-(defun org-real-world ()
-  "View all real links in the current buffer."
-  (interactive)
-  (let ((link (cond
-   ((org-in-regexp org-link-bracket-re 1)
-(match-string-no-properties 1))
-   ((org-in-regexp org-link-plain-re)
-(org-unbracket-string "<" ">" (match-string 0)
-(world (org-real--merge
-(mapcar
- (lambda (containers)
-   (org-real--make-instance 'org-real-box containers))
- (org-real--parse-buffer)
-(org-real--pp world nil nil t)
-(if (and link (string= "real" (ignore-errors (url-type 
(url-generic-parse-url link)
-(let ((containers (reverse (org-real--parse-url link)))
-  match parent)
-  (while (and containers (not match))
-(setq match (org-real--find-matching
- (org-real-box :name (plist-get (pop containers) 
:name))
- world)))
-  (when match
-(setq parent (with-slots (parent) match parent))
-(while (not (org-real--is-visible parent))
-  (setq match parent)
-  (setq parent (with-slots (parent) match parent)))
-(run-with-timer
- 0 nil
- (lambda ()
- (let ((top (org-real--get-top match))
-   (left (org-real--get-left match)))
-   (forward-line (- (+ org-real--current-offset top 1 
org-real-padding-y)
-(line-number-at-pos)))
-   (move-to-column (+ left 1 org-real-padding-x))
-
-(defun org-real-headlines ()
-  "View all org headlines as an org real diagram.
-
-MAX-LEVEL is the maximum level to show headlines for."
-  (interactive)
-  (let ((path (seq-filter 'identity (append (list (org-entry-get nil "ITEM")) 
(reverse (org-get-outline-path)
-(world (save-excursion (org-real--parse-headlines)))
-match)
-(org-real--pp world nil 'display-buffer-same-window t 1 2)
-(while (and path (not match))
-  (setq match (org-real--find-matching (org-real-box :name (pop path)) 
world)))
-(when match
-  (while (not (org-real--is-visible match))
-(setq match (with-slots (parent) match parent)))
-  (let ((top (org-real--get-top match))
-(left (org-real--get-left match)))
-(run-with-timer
- 0 nil
- (lambda ()
-   (forward-line (- (+ org-real--current-offset top 1 
org-real-padding-y)
-(line-number-at-pos)))
-   (move-to-column (+ left 1 org-real-padding-x
-
-(defun org-real-apply ()
-  "Apply any change from the real link at point to the current buffer."
-  (interactive)
-  (let (new-link replace-all)
-(cond
- ((org-in-regexp org-link-bracket-re 1)
-  (setq new-link (match-string-no-properties 1)))
- ((org-in-regexp org-link-plain-re)
-  (setq new-link (org-unbracket-string "<" ">" (match-string 0)
-(when (and new-link
-   (string= "real" (ignore-errors (url-type (url-generic-parse-url 
new-link)
-  (let ((new-containers (reverse (org-real--parse-url new-link 
(point-marker)
-(while new-containers
-  (let ((primary (plist-get (car new-containers) :name))
-(changes '())
-old-containers)
-(org-element-map (org-element-parse-buffer) 'link
-  (lambda (old-link)
-(when (string= (org-element-property :type old-link) "real")
-  (setq old-containers (reverse (org-real--parse-url
- (org-element-property 
:raw-link old-link)
- (set-marker (point-marker) 
(org-element-property :begin old-link)
-  (when-let* ((new-index 0)
-  (old-index (seq-position
-  old-containers
-  primary
-  (lambda (a b) (string= (plist-get a 
:name) b
-  (begin (org-element-property :begin old-link))
-  (end (org-element-property :end old-link))
-  (replace-link (org-real--to-link
- (reverse
-  

[elpa] externals/org-real 93cb91e 133/160: Linting/elc

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 93cb91ef4f310f134fa5eb315881fab309790687
Author: Tyler Grinn 
Commit: Tyler Grinn 

Linting/elc
---
 org-real.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-real.el b/org-real.el
index fdd9017..b5e98b6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1211,7 +1211,7 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box."
 
 (cl-defmethod org-real--create-cursor-function ((box org-real-box))
   "Create cursor functions for entering and leaving BOX."
-  (with-slots (rel rel-box display-rel-box display-rel name metadata) box
+  (with-slots (rel rel-box display-rel-box display-rel name metadata 
help-echo) box
 (let (tooltip-timer)
   (lambda (_window _oldpos dir)
 (let ((inhibit-read-only t))
@@ -1219,7 +1219,7 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box."
 (if (eq dir 'entered)
 (progn
   (if (slot-boundp box :help-echo)
-  (message (oref box :help-echo)))
+  (message help-echo))
   (if (slot-boundp box :metadata)
   (setq tooltip-timer (org-real--tooltip metadata))
 (if (and (slot-boundp box :name) (slot-boundp box :rel))
@@ -1320,7 +1320,7 @@ BOX is the box the button is being made for."
   (append
`(("TAB"   . ,(org-real--cycle-children box))
  ("r" . ,(org-real--jump-rel box)))
-   (when (oref box :locations)
+   (when (and (slot-boundp box :locations) locations)
  `(("o" . ,(org-real--jump-other-window box))
("" . ,(org-real--jump-to box))
("RET"   . ,(org-real--jump-to box))



[elpa] externals/org-real 9ab2ad0 158/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 9ab2ad0ec9b55ed2accca868208f1015ae1328bd
Merge: d5ca314 791ed99
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

v1.0.0

See merge request tygrdev/org-real!11
---
 .elpaignore   |6 +
 .gitlab-ci.yml|2 +
 .gitmodules   |3 +
 Eldev |   13 +-
 LICENSE   |  674 +++
 README.org|   90 +-
 demo/{org-real-mode.gif => boxy-mode.gif} |  Bin
 demo/headlines.gif|  Bin 651736 -> 0 bytes
 demo/projects.org |   18 -
 deps/boxy |1 +
 org-real.el   | 1773 -
 11 files changed, 907 insertions(+), 1673 deletions(-)

diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 000..85fc776
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1,6 @@
+/deps
+/tests
+/.gitignore
+/.gitlab-ci.yml
+/.gitmodules
+/Eldev
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea1c6fb..74e6f75 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,8 @@ stages:
 package:
   stage: build
   image: silex/emacs:27
+  variables:
+GIT_SUBMODULE_STRATEGY: recursive
   before_script:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
 - export PATH=$PATH:/root/.eldev/bin
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..e03e59b
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "deps/boxy"]
+   path = deps/boxy
+   url = ../boxy
diff --git a/Eldev b/Eldev
index 5991ac1..a46205d 100644
--- a/Eldev
+++ b/Eldev
@@ -1,5 +1,9 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
+(setq eldev-standard-excludes '(".*" "/dist/" "/deps/"))
+
+(eldev-use-local-dependency "deps/boxy" 'packaged)
+
 (eldev-defcommand
  org_real-md5 (&rest _)
  "Create md5 checksum of .tar and .el files in dist folder."
@@ -17,16 +21,15 @@
  org_real-test (&rest _)
  "Runs tests against all org files in tests folder."
  :override t
- (require 'cl-lib)
- (require 'org-element)
- (load-file "org-real.el")
+ (eldev-load-project-dependencies)
+ (require 'org-real)
  (let ((failures 0))
(cl-flet* ((get-expected ()
 (save-excursion
   (re-search-forward "#\\+begin_example")
   (org-element-property :value 
(org-element-at-point
   (get-actual ()
-  (with-current-buffer (get-buffer "Org Real")
+  (with-current-buffer (get-buffer "*Boxy*")
 (buffer-string)))
   (print-result (title result)
 (message "%s : %s"
@@ -39,7 +42,7 @@
   (save-window-excursion
 (with-temp-buffer
   (insert expected)
-  (diff-buffers (get-buffer "Org Real")
+  (diff-buffers (get-buffer "*Boxy*")
 (current-buffer)
 nil t))
 (with-current-buffer (get-buffer "*Diff*")
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..e72bfdd
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to preve

[elpa] externals/org-real babe4da 148/160: Add submodules during ci/cd pipeline

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit babe4daf9e7123e41771610c3dca3c05664a7e5a
Author: Tyler Grinn 
Commit: Tyler Grinn 

Add submodules during ci/cd pipeline
---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea1c6fb..74e6f75 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,8 @@ stages:
 package:
   stage: build
   image: silex/emacs:27
+  variables:
+GIT_SUBMODULE_STRATEGY: recursive
   before_script:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
 - export PATH=$PATH:/root/.eldev/bin



[elpa] externals/org-real dab4fc9 154/160: Updated readme

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit dab4fc9d899481dd91ad66a82ca3f462e70a1439
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated readme
---
 README.org|   6 +++---
 demo/{org-real-mode.gif => boxy-mode.gif} | Bin
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 07206ef..64f88a9 100644
--- a/README.org
+++ b/README.org
@@ -90,9 +90,9 @@ Keep track of real things as org-mode links.
  (define-key org-mode-map (kbd "C-c r w") 'org-real-world)
#+end_src
 
-** Org Real mode
+** Boxy mode
 
-   Once in Org Real mode, you can cycle the visibility level of all
+   Once in boxy mode, you can cycle the visibility level of all
children with =S-TAB= or use =TAB= to toggle the visibility of
children for a single box.
 
@@ -105,7 +105,7 @@ Keep track of real things as org-mode links.
- =r= Jump to the box directly related to the current box
- =TAB= expand/collapse children boxes
 
-   [[file:demo/org-real-mode.gif]]
+   [[file:demo/boxy-mode.gif]]
 
 * License
   GPLv3
diff --git a/demo/org-real-mode.gif b/demo/boxy-mode.gif
similarity index 100%
rename from demo/org-real-mode.gif
rename to demo/boxy-mode.gif



[elpa] externals/org-real 80799f6 150/160: Linting

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 80799f639fca9de2fe0214fbdab694acc40dc5c8
Author: Tyler Grinn 
Commit: Tyler Grinn 

Linting
---
 org-real.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 7490908..8e7b9c3 100644
--- a/org-real.el
+++ b/org-real.el
@@ -525,7 +525,9 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
 (cl-defmethod org-real--make-instance ((_ (subclass boxy-box))
containers
&optional skip-primary)
-  "Create a `boxy-box' from CONTAINERS."
+  "Create a `boxy-box' from CONTAINERS.
+
+If SKIP-PRIMARY is non-nil, don't highlight the primary box."
   (let ((world (boxy-box
 :margin-x org-real-margin-x
 :margin-y org-real-margin-y
@@ -541,6 +543,8 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
force-visible)
   "Add the first container from CONTAINERS to PREV.
 
+If SKIP-PRIMARY, don't highlight the primary box.
+
 If FORCE-VISIBLE, force the child to be visible regardless of its
 level."
   (let* ((container (pop containers))



[elpa] externals/org-real 791ed99 157/160: Added url-parse

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 791ed99b45a729a1cddb577af6f86c5e15c2a92c
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added url-parse
---
 org-real.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/org-real.el b/org-real.el
index 9076d17..0d319e3 100644
--- a/org-real.el
+++ b/org-real.el
@@ -54,6 +54,7 @@
 (require 'org-element)
 (require 'cl-lib)
 (require 'ispell)
+(require 'url-parse)
 
  Options
 



[elpa] externals/org-real 72bf24b 007/160: Added documentation, ci/cd, and completion

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 72bf24bbb031e1a4bc33ecbb8f8b3a61e3d9714e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added documentation, ci/cd, and completion
---
 .gitignore |   5 +
 .gitlab-ci.yml |  55 +++
 Eldev  |  12 +++
 org-real.el| 302 ++---
 4 files changed, 320 insertions(+), 54 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..05a4712
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+# Added automatically by ‘eldev init’.
+/.eldev
+/Eldev-local
+/dist
+
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000..07fc5b4
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,55 @@
+stages:
+  - build
+  - release
+
+server:
+  stage: build
+  image: node:lts-alpine
+  cache:
+key: $CI_COMMIT_REF_SLUG
+paths:
+  - .npm
+  before_script:
+- npm set cache .npm
+- npm ci
+  script:
+- npm run quality:check
+
+package:
+  stage: build
+  image: silex/emacs:27
+  before_script:
+- curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
+  script:
+- /root/.eldev/bin/eldev -dtT lint
+- /root/.eldev/bin/eldev -dtT package
+- /root/.eldev/bin/eldev -dtT md5
+  artifacts:
+paths:
+  - dist/
+
+release:
+  stage: release
+  only:
+- tags
+  image: registry.gitlab.com/gitlab-org/release-cli:latest
+  dependencies:
+- package
+  variables:
+DIST_DIR: $CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/dist
+FILENAME_BASE: $CI_PROJECT_NAME-$CI_COMMIT_TAG
+  release:
+tag_name: $CI_COMMIT_TAG
+description: $CI_COMMIT_DESCRIPTION
+assets:
+  links:
+- name: $FILENAME_BASE.tar
+  url: $DIST_DIR/$FILENAME_BASE.tar
+- name: $FILENAME_BASE.md5
+  url: $DIST_DIR/$FILENAME_BASE.md5
+  script:
+- echo Release job
+  artifacts:
+paths:
+  - dist/
+expire_in: never
diff --git a/Eldev b/Eldev
new file mode 100644
index 000..49da7f0
--- /dev/null
+++ b/Eldev
@@ -0,0 +1,12 @@
+; -*- mode: emacs-lisp; lexical-binding: t -*-
+
+(eldev-defcommand
+ eventuel-md5 (&rest parameters)
+ "Create md5 checksum of tar files in dist folder"
+ (mapcar
+  (lambda (file)
+(write-region
+ (secure-hash 'md5 file)
+ nil
+ (concat (file-name-sans-extension file) ".md5")))
+  (directory-files eldev-dist-dir t "\\.el\\'")))
diff --git a/org-real.el b/org-real.el
index dc7f358..d8a963a 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1,7 +1,29 @@
+;;; org-real.el --- Create org-mode links to real things -*- lexical-binding: 
t -*-
+
+;; Author: Tyler Grinn 
+;; Version: 0.0.1
+;; File: org-real.el
+;; Package-Requires: ((emacs "26.1"))
+;; Keywords: tools
+;; URL: https://gitlab.com/tygrdev/org-real
+
+;;; Commentary:
+
+;; This package adds a 'real' type link to org mode to create links to
+;; real things.
+;;
+;; The function `org-real-world' will display all real links in the
+;; current buffer.
+
+;;; Code:
+
+ Requirements
+
 (require 'eieio)
 (require 'org)
-(require 'cl)
+(require 'cl-lib)
 
+ Classes
 
 (defclass org-real--box ()
   ((name :initarg :name
@@ -31,10 +53,12 @@
 :initform nil
 :type boolean)))
 
-(defvar org-real-prepositions
-  '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of"))
-
 (defun org-real--create-box (containers &optional parent prev)
+  "Create an `org-real--box' from CONTAINERS.
+
+CONTAINERS is a list of plists containing at least a :name
+property and optionally a :rel property.  PARENT and PREV
+parameters are used internally and should not be supplied."
   (if (not parent)
   (let ((world (org-real--box)))
 (org-real--create-box containers world)
@@ -91,9 +115,43 @@
 (if containers
 (org-real--create-box containers parent box)
   (oset box :primary t))
-
+
+ Faces
+
+(defface org-real-primary
+  '((t :background "aquamarine"
+   :foreground "black"))
+  "Face for the last thing in a real link."
+  :group 'org-real)
+
+ Constants
+
+(defconst org-real-prepositions
+  '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of")
+  "List of available prepositions for things.")
+(defvar org-real--padding '(2 . 1)
+  "Padding used when displaying a real link.")
+(defvar org-real--margin '(2 . 1)
+  "Margin used when displaying a real link.")
+
+ Utility expressions
+
+(defun org-real--find-last-index (pred sequence)
+  "Return the index of the last element for which (PRED element) is non-nil in 
SEQUENCE."
+  (let ((i (- (length sequence) 1)))
+(catch 'match
+  (mapc
+   (lambda (elt)
+ (if (funcall pred elt) (throw 'match i))
+ (setq i (- i 1)))
+   (reverse sequence)))
+i))
+
 (defun org-real--parse-url (str)
-  "Parse URL into an org real object"
+  "Parse STR into a list of plists.
+
+Returns a list of plists with a :name property

[elpa] externals/org-real 2ee4b19 006/160: More edge cases

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 2ee4b1955bd7f2dcf6a36e22bacec45025c022c3
Author: Tyler Grinn 
Commit: Tyler Grinn 

More edge cases
---
 garage.org   |   4 +++
 org-real.el  | 104 +--
 prepositions.org |   8 +
 3 files changed, 97 insertions(+), 19 deletions(-)

diff --git a/garage.org b/garage.org
index 92cf5f5..b8ebb4b 100644
--- a/garage.org
+++ b/garage.org
@@ -1,4 +1,8 @@
 * Items in the garage
   - [[real://garage/workbench?rel=in/wrench?rel=on][wrench]]
   - [[real://garage/workbench?rel=in/ratchet?rel=on][ratchet]]
+  - [[real://garage/workbench?rel=in/ratchet?rel=on/screwdriver?rel=to the 
left of][screwdriver]]
   - [[real://garage/east wall?rel=in/rake?rel=on][rake]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/shovel?rel=to the left 
of][shovel]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left of][hoe]]
+  - 
[[real://garage/workbench?rel=in/wrench?rel=on/paintbrush?rel=above][paintbrush]]
diff --git a/org-real.el b/org-real.el
index 62510d6..dc7f358 100644
--- a/org-real.el
+++ b/org-real.el
@@ -55,7 +55,7 @@
(oset box :behind t))
   ((string= rel "in front of")
(oset box :x-order (oref prev :x-order))
-   (oset box :y-order (oref prev :y-order))
+   (oset box :y-order )
(oset box :behind (oref prev :behind))
(oset box :in-front t))
   ((string= rel "above")
@@ -147,15 +147,73 @@
   (when (and (slot-boundp from-box :name)
  (slot-boundp to-box :name)
  (string= (oref from-box :name) (oref to-box 
:name)))
-(mapc
- (lambda (child)
-   (org-real--flex-add child to-box to))
- (oref from-box :children))
+(org-real--add-matching from-box to-box to)
 t))
 to-boxes))
  from-boxes)
   (org-real--flex-add from to to
 
+(defun org-real--map (fn box)
+  (funcall fn box)
+  (mapc
+   (lambda (box) (org-real--map fn box))
+   (org-real--next box t)))
+  
+  
+(defun org-real--next (box &optional exclude-children)
+  (let ((relatives (append (if exclude-children '() (oref box :children))
+   (oref (oref box :parent) :children
+(seq-filter
+ (lambda (relative)
+   (and (slot-boundp relative :rel-box)
+(string= (oref (oref relative :rel-box) :name)
+ (oref box :name
+ relatives)))
+
+(defun org-real--add-matching (box match world)
+  (let ((next-boxes (org-real--next box))
+(parent (oref match :parent)))
+(mapc
+ (lambda (next)
+   (let ((rel (oref next :rel)))
+ (cond
+  ((string= rel "above")
+   (let ((y-order (oref match :y-order)))
+ (oset next :y-order y-order)
+ (org-real--map
+  (lambda (box) (when (>= (oref box :y-order) y-order)
+  (oset box :y-order (+ 1 (oref box :y-order)
+  match))
+   (oset next :x-order (oref match :x-order))
+   (oset next :behind (oref match :behind)))
+  ((string= rel "below")
+   (oset next :x-order (oref match :x-order))
+   (oset next :y-order (+ 1 (oref match :y-order)))
+   (oset next :behind (oref match :behind)))
+  ((string= rel "to the right of")
+   (oset next :x-order (+ 1 (oref match :x-order)))
+   (oset next :y-order (oref match :y-order))
+   (oset next :behind (oref match :behind))
+   (oset next :in-front (oref match :in-front)))
+  ((string= rel "to the left of")
+   (let ((x-order (oref match :x-order)))
+ (oset next :x-order x-order)
+ (org-real--map
+  (lambda (box) (when (>= (oref box :x-order) x-order)
+  (oset box :x-order (+ 1 (oref box :x-order)
+  match))
+   (oset next :y-order (oref match :y-order))
+   (oset next :behind (oref match :behind))
+   (oset next :in-front (oref match :in-front
+
+ (oset next :rel-box match)
+ (if (member rel '("in" "on" "behind" "in front of"))
+ (org-real--flex-add next match world)
+   (oset next :parent parent)
+   (object-add-to-list parent :children next))
+ (org-real--add-matching next next world)))
+ next-boxes)))
+
 (defun org-real--flex-add (box parent world)
   (let* ((cur-width (org-real--get-width world))
  (siblings (oref parent :children))
@@ -170,11 +228,13 @@
   (if (and (= max-y sibling-y) (> 
sibling-x max-x))
   sibling
 max
-sib

[elpa] externals/org-real 49c8920 008/160: Removed server stage from ci/cd

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 49c89203c116c44e0baed7b8f760ab3b95bc6175
Author: Tyler Grinn 
Commit: Tyler Grinn 

Removed server stage from ci/cd
---
 .gitlab-ci.yml | 13 -
 1 file changed, 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 07fc5b4..360659e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,19 +2,6 @@ stages:
   - build
   - release
 
-server:
-  stage: build
-  image: node:lts-alpine
-  cache:
-key: $CI_COMMIT_REF_SLUG
-paths:
-  - .npm
-  before_script:
-- npm set cache .npm
-- npm ci
-  script:
-- npm run quality:check
-
 package:
   stage: build
   image: silex/emacs:27



[elpa] externals/org-real e039322 012/160: Add new line after pp text

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit e0393222adbdbfa43ea1f0d1ec8304a720ab52a0
Author: Tyler Grinn 
Commit: Tyler Grinn 

Add new line after pp text
---
 org-real.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index ce63639..852c22e 100644
--- a/org-real.el
+++ b/org-real.el
@@ -488,7 +488,8 @@ describing where BOX is."
   (insert " the ")
   (insert (plist-get container :name)))
 (insert ".")
-(fill-paragraph)))
+(fill-paragraph)
+(insert "\n")))
 
 (defun org-real--draw (box offset)
   "Insert an ascii drawing of BOX into the current buffer.



[elpa] externals/org-real c513e06 016/160: Updated readme

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit c513e062e1817b60f109336f93e154c30db82560
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated readme
---
 README.org | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 6796f9e..0d44bce 100644
--- a/README.org
+++ b/README.org
@@ -8,10 +8,9 @@ Keep track of real things as org links.
 #+end_src
 
 * Status *PARTIALLY WORKING*
-
-** TODO Allow things to have multiple children with the same preposition
-** TODO =org-real-world= flex layout sometimes draws over existing boxes
-** TODO Ask to replace all occurences after editing a link
+  - TODO Allow things to have multiple children with the same preposition
+  - TODO =org-real-world= flex layout sometimes draws over existing boxes
+  - TODO Ask to replace all occurences after editing a link
 
 * Usage
 ** Inserting a link
@@ -31,7 +30,7 @@ Keep track of real things as org links.
│  │   ↑│  │
│  │   ↑│  │
│  │  ┌─── ↑ ┐  │  │
-   │  │  │  │  │  │
+   │  │  │↑ │  │  │
│  │  │  inside  │  │  │
│  │  │  │  │  │
│  │  └──┘  │  │



[elpa] externals/org-real f281b65 010/160: Typo

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f281b6507815082f9e79f96e7aa87c30f78f4b22
Author: Tyler Grinn 
Commit: Tyler Grinn 

Typo
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index d8a963a..e6ca418 100644
--- a/org-real.el
+++ b/org-real.el
@@ -151,7 +151,7 @@ parameters are used internally and should not be supplied."
   "Parse STR into a list of plists.
 
 Returns a list of plists with a :name property and optionally a
-:ref property."
+:rel property."
   (let* ((url (url-generic-parse-url str))
  (host (url-host url))
  (path-and-query (url-path-and-query url))



[elpa] externals/org-real 356767c 034/160: Added org-real-pkg for multifile package

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 356767c8eb5898a6c67326999be8114ff2f4e8fe
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added org-real-pkg for multifile package
---
 README.org   |  2 +-
 org-real--box.el |  4 ++--
 org-real-pkg.el  |  5 +
 org-real.el  | 10 +-
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index 585f06a..6aa89fb 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
 #+TITLE: Org Real
 
-Keep track of real things as org links.
+Keep track of real things as org-mode links.
 
 #+begin_src emacs-lisp
 (use-package org-real
diff --git a/org-real--box.el b/org-real--box.el
index 40b65e7..fdc3dec 100644
--- a/org-real--box.el
+++ b/org-real--box.el
@@ -1,8 +1,8 @@
-;;; org-real--box.el --- Create org-mode links to real things -*- 
lexical-binding: t -*-
+;;; org-real--box.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
 
 ;; Author: Tyler Grinn 
 ;; Version: 0.1.0
-;; File: org-real.el
+;; File: org-real--box.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
 ;; URL: https://gitlab.com/tygrdev/org-real
diff --git a/org-real-pkg.el b/org-real-pkg.el
new file mode 100644
index 000..7745852
--- /dev/null
+++ b/org-real-pkg.el
@@ -0,0 +1,5 @@
+(define-package
+  "org-real"
+  "0.1.0"
+  "Keep track of real things as org-mode links"
+  '((emacs "26.1")))
diff --git a/org-real.el b/org-real.el
index 160379d..3c43518 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1,4 +1,4 @@
-;;; org-real.el --- Create org-mode links to real things -*- lexical-binding: 
t -*-
+;;; org-real.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
 
 ;; Author: Tyler Grinn 
 ;; Version: 0.1.0
@@ -335,8 +335,8 @@ describing where BOX is."
   (toggle-truncate-lines t)
   (if containers (org-real--pp-text containers))
   (let ((offset (- (line-number-at-pos)
-   (cdr org-real--margin)
-   (* 2 (cdr org-real--padding)
+   (cdr org-real-margin)
+   (* 2 (cdr org-real-padding)
 (dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
 (org-real--draw box offset)
 (special-mode)))
@@ -348,8 +348,8 @@ describing where BOX is."
   (let* ((reversed (reverse containers))
  (container (pop reversed))
  (primary-name (plist-get container :name)))
-(dotimes (_ (cdr org-real--padding)) (insert "\n"))
-(insert (make-string (car org-real--padding) ?\s))
+(dotimes (_ (cdr org-real-padding)) (insert "\n"))
+(insert (make-string (car org-real-padding) ?\s))
 (insert "The ")
 (put-text-property 0 (length primary-name) 'face 'org-real-primary
primary-name)



[elpa] externals/org-real 180d374 014/160: Standardized pretty printing for org-real-world and opening a link

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 180d374f1d865b65e6443d96ad20102c542247ea
Author: Tyler Grinn 
Commit: Tyler Grinn 

Standardized pretty printing for org-real-world and opening a link
---
 org-real.el | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/org-real.el b/org-real.el
index d08e9cc..ff858f1 100644
--- a/org-real.el
+++ b/org-real.el
@@ -339,14 +339,10 @@ that the width of WORLD is kept below 80 characters if 
possible."
 (defun org-real-world ()
   "View all real links in the current buffer."
   (interactive)
-  (let* ((box (org-real--merge (mapcar 'org-real--create-box 
(org-real--parse-buffer
- (width (org-real--get-width box))
- (height (org-real--get-height box)))
-(with-current-buffer-window "Org Real" nil nil
-  (dotimes (_ height) (insert (concat (make-string width ?\s) "\n")))
-  (org-real--draw box 0)
-  (toggle-truncate-lines t)
-  (special-mode
+  (org-real--pp
+   (org-real--merge
+(mapcar 'org-real--create-box
+(org-real--parse-buffer)
 
  `org-insert-link' configuration
 
@@ -457,16 +453,20 @@ describing where BOX is."
 (height (org-real--get-height box))
 (inhibit-read-only t)
 (buffer (get-buffer-create "Org Real")))
-(display-buffer buffer 'display-buffer-pop-up-window)
 (with-current-buffer buffer
   (erase-buffer)
   (goto-line 0)
   (toggle-truncate-lines t)
   (if containers (org-real--pp-text containers))
-  (let ((offset (line-number-at-pos)))
+  (let ((offset (- (line-number-at-pos)
+   (cdr org-real--margin)
+   (* 2 (cdr org-real--padding)
 (dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
 (org-real--draw box offset)
-(special-mode)
+(special-mode)))
+(display-buffer buffer `(display-buffer-pop-up-window
+ (window-width . 80)
+ (window-height . ,height)
 
 
 (defun org-real--pp-text (containers)



[elpa] externals/org-real dd03f41 025/160: Initial release

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit dd03f41811073eb0e3ee8c78dc1595b1160a5190
Author: Tyler Grinn 
Commit: Tyler Grinn 

Initial release

Initial release
---
 README.org | 4 
 1 file changed, 4 insertions(+)

diff --git a/README.org b/README.org
index 4a000e3..e759def 100644
--- a/README.org
+++ b/README.org
@@ -7,6 +7,10 @@ Keep track of real things as org links.
   :straight (org-real :type git :host gitlab :repo "tygrdev/org-real"))
 #+end_src
 
+*OR*
+
+[[https://gitlab.com/tygrdev/org-real/-/releases][Download the latest release]]
+
 * Status *ALPHA*
   - TODO Ask to replace all occurences after editing a link
 



[elpa] externals/org-real e0eac63 019/160: Updated preposition list

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit e0eac638856fb8e1dc3b5ecc60ef4c2abac522aa
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated preposition list
---
 prepositions.org | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/prepositions.org b/prepositions.org
index 8e1c8d2..48001bc 100644
--- a/prepositions.org
+++ b/prepositions.org
@@ -1,8 +1,8 @@
-- [[real:// /in?rel=in][in]]
-- [[real:// /on?rel=on][on]]
-- [[real:// /behind?rel=behind][behind]]
-- [[real:// /in front of?rel=in front of][in front of]]
-- [[real:// /to the right of?rel=to the right of][to the right of]]
-- [[real:// /above?rel=above][above]]
-- [[real:// /below?rel=below][below]]
-- [[real:// /to the left of?rel=to the left of][to the left of]]
+- [[real:///in?rel=in][in]]
+- [[real:///on?rel=on][on]]
+- [[real:///behind?rel=behind][behind]]
+- [[real:///in front?rel=in front of][in front]]
+- [[real:///right?rel=to the right of][right]]
+- [[real:///above?rel=above][above]]
+- [[real:///below?rel=below][below]]
+- [[real:///left?rel=to the left of][left]]



[elpa] externals/org-real d07bf14 020/160: find-last index returns nil if no match

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit d07bf14e43a8c7aa041414bf69974d4804fc92b5
Author: Tyler Grinn 
Commit: Tyler Grinn 

find-last index returns nil if no match
---
 org-real.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index d207afb..588b3e6 100644
--- a/org-real.el
+++ b/org-real.el
@@ -144,8 +144,8 @@ parameters are used internally and should not be supplied."
(lambda (elt)
  (if (funcall pred elt) (throw 'match i))
  (setq i (- i 1)))
-   (reverse sequence)))
-i))
+   (reverse sequence))
+  nil)))
 
 (defun org-real--parse-url (str)
   "Parse STR into a list of plists.



[elpa] externals/org-real a16fed2 032/160: Linting

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a16fed264aaacd435d8d7b6dcf94882667b7720c
Author: Tyler Grinn 
Commit: Tyler Grinn 

Linting
---
 org-real--box.el | 60 
 org-real.el  | 44 +++--
 2 files changed, 72 insertions(+), 32 deletions(-)

diff --git a/org-real--box.el b/org-real--box.el
index a988dc8..40b65e7 100644
--- a/org-real--box.el
+++ b/org-real--box.el
@@ -1,12 +1,22 @@
-;;; org-real.el --- Create org-mode links to real things -*- lexical-binding: 
t -*-
+;;; org-real--box.el --- Create org-mode links to real things -*- 
lexical-binding: t -*-
+
+;; Author: Tyler Grinn 
+;; Version: 0.1.0
+;; File: org-real.el
+;; Package-Requires: ((emacs "26.1"))
+;; Keywords: tools
+;; URL: https://gitlab.com/tygrdev/org-real
 
 ;;; Commentary:
 
 ;; Box class definition and related methods
 
+;;; Code:
+
  Patch! 0.0.1 -> 0.1.0+
  Will be removed in version 1.0.0+
 
+(and (fboundp 'org-real--merge) (fmakunbound 'org-real--merge))
 (and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
 (and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
 (and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
@@ -24,12 +34,8 @@
 (require 'eieio)
 (require 'cl-lib)
 
- Class definitions
 
-;; Define empty class for use in collection, redefine afterwards
-;; (defclass org-real--box ()
-  ;; nil
-  ;; "A representation of a box in 3D space.")
+ Class definitions
 
 (defclass org-real--box-collection ()
   ((box :initarg :box
@@ -68,14 +74,6 @@
   "A representation of a box in 3D space.")
 
 
- Constants
-
-(defvar org-real--padding '(2 . 1)
-  "Padding used when displaying a real link.")
-
-(defvar org-real--margin '(2 . 1)
-  "Margin used when displaying a real link.")
-
  Exports
 
 (cl-defmethod org-real--make-instance ((_ (subclass org-real--box)) containers)
@@ -93,7 +91,7 @@ property and optionally a :rel property."
 (org-real--make-instance-helper containers world base))
 world))
 
-(defun org-real--merge (boxes)
+(cl-defmethod org-real--merge (boxes)
   "Merge BOXES into a single box."
   (if (< (length boxes) 2)
   (if (= 0 (length boxes))
@@ -128,12 +126,12 @@ OFFSET is the starting line to start insertion."
   (draw (cons top left)
 (concat "┌" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┐"))
   (if align-bottom
-  (draw (cons (+ top height -1 (cdr org-real--margin)) left)
+  (draw (cons (+ top height) left)
 (concat "┴" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┴"))
 (draw (cons (+ top height -1) left)
   (concat "└" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┘")))
-  (draw (cons (+ top 1 (cdr org-real--padding))
-  (+ left 1 (car org-real--padding)))
+  (draw (cons (+ top 1 (cdr org-real-padding))
+  (+ left 1 (car org-real-padding)))
 name
 primary)
   (let ((r (+ top 1))
@@ -150,7 +148,7 @@ OFFSET is the starting line to start insertion."
 (cl-defmethod org-real--get-width ((box org-real--box))
   "Get the width of BOX."
   (let* ((base-width (+ 2 ; box walls
-(* 2 (car org-real--padding
+(* 2 (car org-real-padding
  (width (+ base-width
(if (slot-boundp box :name)
(with-slots (name) box (length name))
@@ -174,10 +172,10 @@ OFFSET is the starting line to start insertion."
  columns))
  (children-width (seq-reduce
   (lambda (total width)
-(+ total (car org-real--margin) width))
+(+ total (car org-real-margin) width))
   column-widths
-  (* -1 (car org-real--margin)
-(if (> width (+ (* 2 (car org-real--margin)) children-width))
+  (* -1 (car org-real-margin)
+(if (> width (+ (* 2 (car org-real-margin)) children-width))
 width
   (+ base-width children-width))
 
@@ -185,11 +183,11 @@ OFFSET is the starting line to start insertion."
   "Get the height of BOX."
   (let* ((in-front (with-slots (in-front) box in-front))
  (height (+ (if in-front
-(* -1 (cdr org-real--margin))
+(* -1 (cdr org-real-margin))
   0)
-2 ; box walls
-(* 2 (cdr org-real--padding))
-(cdr org-real--margin)))
+3 ; box walls + text
+(cdr org-real-padding)
+(cdr org-real-margin)))
  (children (with-slots (children) 

[elpa] externals/org-real 0974b67 023/160: Make changes to satisfy elc compiler

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 0974b67f54ec392f79dfe5b65a89b42aa79c5cbc
Author: Tyler Grinn 
Commit: Tyler Grinn 

Make changes to satisfy elc compiler
---
 .gitignore  |  2 ++
 org-real.el | 23 +++
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index 05a4712..f67a22e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,6 @@
 /.eldev
 /Eldev-local
 /dist
+*.elc
+
 
diff --git a/org-real.el b/org-real.el
index 00c9b48..0cc3a1d 100644
--- a/org-real.el
+++ b/org-real.el
@@ -169,7 +169,7 @@ Returns a list of plists with a :name property and 
optionally a
   (plist-put container :rel rel)
 container)))
   tokens)))
-(add-to-list 'containers (list :name host
+(push (list :name host) containers)))
 
 (defun org-real--parse-buffer ()
   "Parse all real links in the current buffer."
@@ -463,7 +463,6 @@ describing where BOX is."
 (buffer (get-buffer-create "Org Real")))
 (with-current-buffer buffer
   (erase-buffer)
-  (goto-line 0)
   (toggle-truncate-lines t)
   (if containers (org-real--pp-text containers))
   (let ((offset (- (line-number-at-pos)
@@ -510,12 +509,11 @@ OFFSET is the starting line to start insertion."
(width (org-real--get-width box))
(height (org-real--get-height box))
(name (oref box :name))
-   (children (oref box :children))
(dashed (oref box :behind))
(align-bottom (oref box :in-front))
(primary (oref box :primary)))
   (cl-flet ((draw (coords str &optional primary)
-   (goto-line (car coords))
+   (forward-line (- (car coords) (line-number-at-pos)))
(move-to-column (cdr coords) t)
(if primary
(put-text-property 0 (length str) 'face 
'org-real-primary
@@ -555,11 +553,8 @@ OFFSET is the starting line to start insertion."
  (children (oref box :children)))
 (if (not children)
 width
-  (let* ((column-indices (seq-reduce
-  (lambda (columns child)
-(add-to-list 'columns (oref child :x-order)))
-  children
-  '()))
+  (let* ((column-indices (delete-duplicates
+  (mapcar (lambda (child) (oref child :x-order)) 
children)))
  (columns (mapcar
(lambda (c)
  (seq-filter
@@ -592,11 +587,8 @@ OFFSET is the starting line to start insertion."
  (children (oref box :children)))
 (if (not children)
 height
-  (let* ((row-indices (seq-reduce
-   (lambda (rows child)
- (add-to-list 'rows (oref child :y-order)))
-   children
-   '()))
+  (let* ((row-indices (delete-duplicates
+   (mapcar (lambda (child) (oref child :y-order)) 
children)))
  (rows (mapcar
 (lambda (r)
   (seq-filter
@@ -651,8 +643,7 @@ OFFSET is the starting line to start insertion."
   "Get the left column index of BOX."
   (if (not (slot-boundp box :parent))
   0
-(let* ((offset (+ 2 (* 2 (car org-real--padding)) (car org-real--margin)))
-   (parent (oref box :parent))
+(let* ((parent (oref box :parent))
(left (+ 1
 (car org-real--padding)
 (org-real--get-left parent)))



[elpa] externals/org-real 463da8b 029/160: Refactoring

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 463da8b854d30387326e99038a6a10dae73e3b09
Author: Tyler Grinn 
Commit: Tyler Grinn 

Refactoring
---
 org-real--box.el | 448 +++
 org-real.el  | 419 +--
 2 files changed, 452 insertions(+), 415 deletions(-)

diff --git a/org-real--box.el b/org-real--box.el
new file mode 100644
index 000..eba0c0d
--- /dev/null
+++ b/org-real--box.el
@@ -0,0 +1,448 @@
+;;; org-real.el --- Create org-mode links to real things -*- lexical-binding: 
t -*-
+
+;;; Commentary:
+
+;; Box class definition and related methods
+
+ Patch! 0.0.1 -> 0.1.0
+
+(and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
+(and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
+(and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
+(and (fboundp 'org-real--add-matching) (fmakunbound 'org-real--add-matching))
+(and (fboundp 'org-real--flex-add) (fmakunbound 'org-real--flex-add))
+(and (fboundp 'org-real--expand) (fmakunbound 'org-real--expand))
+(and (fboundp 'org-real--draw) (fmakunbound 'org-real--draw))
+(and (fboundp 'org-real--get-width) (fmakunbound 'org-real--get-width))
+(and (fboundp 'org-real--get-height) (fmakunbound 'org-real--get-height))
+(and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
+(and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
+
+ Requirements:
+
+(require 'eieio)
+(require 'cl-lib)
+
+ Class definition
+
+(defclass org-real--box ()
+  ((name :initarg :name
+ :type string)
+   (rel :initarg :rel
+:type string)
+   (rel-box :initarg :rel-box
+:type org-real--box)
+   (x-order :initarg :x-order
+:initform 0
+:type number)
+   (y-order :initarg :y-order
+:initform 0
+:type number)
+   (in-front :initarg :in-front
+ :initform nil
+ :type boolean)
+   (behind :initarg :behind
+   :initform nil
+   :type boolean)
+   (parent :initarg :parent
+   :type org-real--box)
+   (children :initarg :children
+ :initform '()
+ :type list)
+   (primary :initarg :primary
+:initform nil
+:type boolean)))
+
+ Exports
+
+(defun org-real--create-box (containers)
+  "Create an `org-real--box' from CONTAINERS.
+
+CONTAINERS is a list of plists containing at least a :name
+property and optionally a :rel property.  PARENT and PREV
+parameters are used internally and should not be supplied."
+  (let ((world (org-real--box)))
+(org-real--create-box-helper containers world)
+world))
+
+(defun org-real--merge (boxes)
+  "Merge BOXES into a single box."
+  (if (< (length boxes) 2)
+  (if (= 0 (length boxes))
+  (org-real--box)
+(car boxes))
+(let ((world (org-real--box)))
+  (while boxes
+(org-real--merge-into (pop boxes) world))
+  world)))
+
+ Drawing
+
+(cl-defmethod org-real--draw ((box org-real--box) offset)
+  "Insert an ascii drawing of BOX into the current buffer.
+
+OFFSET is the starting line to start insertion."
+  (let ((children (oref box :children)))
+(if (slot-boundp box :name)
+(let* ((top (+ offset (org-real--get-top box)))
+   (left (org-real--get-left box))
+   (width (org-real--get-width box))
+   (height (org-real--get-height box))
+   (name (oref box :name))
+   (dashed (oref box :behind))
+   (align-bottom (oref box :in-front))
+   (primary (oref box :primary)))
+  (cl-flet ((draw (coords str &optional primary)
+   (forward-line (- (car coords) (line-number-at-pos)))
+   (move-to-column (cdr coords) t)
+   (if primary
+   (put-text-property 0 (length str) 'face 
'org-real-primary
+  str))
+   (insert str)
+   (delete-char (length str
+(draw (cons top left)
+  (concat "┌" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┐"))
+(if align-bottom
+(draw (cons (+ top height -1 (cdr org-real--margin)) left)
+  (concat "┴" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┴"))
+  (draw (cons (+ top height -1) left)
+(concat "└" (make-string (- width 2) (if dashed #x254c 
#x2500)) "┘")))
+(draw (cons (+ top 1 (cdr org-real--padding))
+(+ left 1 (car org-real--padding)))
+  name
+  primary)
+(let ((r (+ top 1))
+  (c1 left)
+  (c2 (+ left width -1)))
+  (dotimes (_ (- height (if align-bottom 1 2)))
+(draw (cons r c1) (if dashed "╎" "│"))
+   

[elpa] externals/org-real a5df40f 026/160: Bump version

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a5df40fc070adb0991e18107515dd30c2c1a3e9e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Bump version
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 0cc3a1d..a260f7f 100644
--- a/org-real.el
+++ b/org-real.el
@@ -1,7 +1,7 @@
 ;;; org-real.el --- Create org-mode links to real things -*- lexical-binding: 
t -*-
 
 ;; Author: Tyler Grinn 
-;; Version: 0.0.1
+;; Version: 0.1.0
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools



[elpa] externals/org-real 6d8351f 038/160: Renamed org-real--box to org-real-box

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 6d8351fe1ed7a6b53d139d1181c0dda9d9c9bbdb
Author: Tyler Grinn 
Commit: Tyler Grinn 

Renamed org-real--box to org-real-box
---
 org-real--box.el => org-real-box.el | 86 ++---
 org-real.el |  8 ++--
 2 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/org-real--box.el b/org-real-box.el
similarity index 90%
rename from org-real--box.el
rename to org-real-box.el
index 3fa1d83..710c78a 100644
--- a/org-real--box.el
+++ b/org-real-box.el
@@ -1,8 +1,8 @@
-;;; org-real--box.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
+;;; org-real-box.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
 
 ;; Author: Tyler Grinn 
 ;; Version: 0.1.0
-;; File: org-real--box.el
+;; File: org-real-box.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
 ;; URL: https://gitlab.com/tygrdev/org-real
@@ -42,20 +42,20 @@
 
  Class definitions
 
-(defclass org-real--box-collection ()
+(defclass org-real-box-collection ()
   ((box :initarg :box
-:type org-real--box)
+:type org-real-box)
(next :initarg :next
- :type org-real--box-collection))
-  "A collection of `org-real--box'es.")
+ :type org-real-box-collection))
+  "A collection of `org-real-box'es.")
 
-(defclass org-real--box ()
+(defclass org-real-box ()
   ((name :initarg :name
  :type string)
(rel :initarg :rel
 :type string)
(rel-box :initarg :rel-box
-:type org-real--box)
+:type org-real-box)
(x-order :initarg :x-order
 :initform 0
 :type number)
@@ -69,10 +69,10 @@
:initform nil
:type boolean)
(parent :initarg :parent
-   :type org-real--box)
+   :type org-real-box)
(children :initarg :children
- :initform (org-real--box-collection)
- :type org-real--box-collection)
+ :initform (org-real-box-collection)
+ :type org-real-box-collection)
(primary :initarg :primary
 :initform nil
 :type boolean))
@@ -81,14 +81,14 @@
 
  Exports
 
-(cl-defmethod org-real--make-instance ((_ (subclass org-real--box)) containers)
-  "Create an instance of `org-real--box' from CONTAINERS.
+(cl-defmethod org-real--make-instance ((_ (subclass org-real-box)) containers)
+  "Create an instance of `org-real-box' from CONTAINERS.
 
 CONTAINERS is a list of plists containing at least a :name
 property and optionally a :rel property."
-  (when-let* ((world (org-real--box))
+  (when-let* ((world (org-real-box))
   (base-container (pop containers))
-  (base (org-real--box :name (plist-get base-container :name
+  (base (org-real-box :name (plist-get base-container :name
 (oset base :parent world)
 (with-slots (children) world
   (setq children (org-real--add-to-list children base)))
@@ -100,16 +100,16 @@ property and optionally a :rel property."
   "Merge BOXES into a single box."
   (if (< (length boxes) 2)
   (if (= 0 (length boxes))
-  (org-real--box)
+  (org-real-box)
 (car boxes))
-(let ((world (org-real--box)))
+(let ((world (org-real-box)))
   (while boxes
 (org-real--merge-into (pop boxes) world))
   world)))
 
  Drawing
 
-(cl-defmethod org-real--draw ((box org-real--box) offset)
+(cl-defmethod org-real--draw ((box org-real-box) offset)
   "Insert an ascii drawing of BOX into the current buffer.
 
 OFFSET is the starting line to start insertion."
@@ -150,7 +150,7 @@ OFFSET is the starting line to start insertion."
  (lambda (child) (org-real--draw child offset))
  children)))
 
-(cl-defmethod org-real--get-width ((box org-real--box))
+(cl-defmethod org-real--get-width ((box org-real-box))
   "Get the width of BOX."
   (let* ((base-width (+ 2 ; box walls
 (* 2 (car org-real-padding
@@ -184,7 +184,7 @@ OFFSET is the starting line to start insertion."
 width
   (+ base-width children-width))
 
-(cl-defmethod org-real--get-height ((box org-real--box))
+(cl-defmethod org-real--get-height ((box org-real-box))
   "Get the height of BOX."
   (let* ((in-front (with-slots (in-front) box in-front))
  (height (+ (if in-front
@@ -212,7 +212,7 @@ OFFSET is the starting line to start insertion."
rows)))
 (+ height (seq-reduce '+ row-heights 0))
 
-(cl-defmethod org-real--get-top ((box org-real--box))
+(cl-defmethod org-real--get-top ((box org-real-box))
   "Get the top row index of BOX."
   (if (not (slot-boundp box :parent))
   0
@@ -233,7 +233,7 @@ OFFSET is the starting line to start insertion."
child
  max
  above
-

[elpa] externals/org-real 89d616e 024/160: Check compilation during ci/cd pipeline

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 89d616e9d82fc1094f8a471c286ec3fc1398667c
Author: Tyler Grinn 
Commit: Tyler Grinn 

Check compilation during ci/cd pipeline
---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e8d988b..4f95502 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ package:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
   script:
 - /root/.eldev/bin/eldev -dtT lint
+- /root/.eldev/bin/eldev -dtT compile
 - /root/.eldev/bin/eldev -dtT package
 - /root/.eldev/bin/eldev -dtT md5
   artifacts:



[elpa] externals/org-real 181c538 043/160: Patch for using cl-defmethod rather than defun

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 181c538c69d457327b791194471d409d2a255ed9
Author: Tyler Grinn 
Commit: Tyler Grinn 

Patch for using cl-defmethod rather than defun

Some defuns were redefined as cl-defmethods and needed to be unbound
first.
---
 org-real.el | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 9193893..e1a7a2f 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 
-;; Version: 0.1.0
+;; Version: 0.1.1
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -17,6 +17,22 @@
 
 ;;; Code:
 
+ Patch! 0.0.1 -> 0.1.0+
+ Will be removed in version 1.0.0+
+
+(and (fboundp 'org-real--merge) (fmakunbound 'org-real--merge))
+(and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
+(and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
+(and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
+(and (fboundp 'org-real--add-matching) (fmakunbound 'org-real--add-matching))
+(and (fboundp 'org-real--flex-add) (fmakunbound 'org-real--flex-add))
+(and (fboundp 'org-real--expand) (fmakunbound 'org-real--expand))
+(and (fboundp 'org-real--draw) (fmakunbound 'org-real--draw))
+(and (fboundp 'org-real--get-width) (fmakunbound 'org-real--get-width))
+(and (fboundp 'org-real--get-height) (fmakunbound 'org-real--get-height))
+(and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
+(and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
+
  Requirements
 
 (require 'eieio)



[elpa] externals/org-real 4a569a1 039/160: Merge branch 'next' into 'main'

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 4a569a106b201df9265032edd580ad216962a37d
Merge: dd03f41 6d8351f
Author: Tyler Grinn 
Commit: Tyler Grinn 

Merge branch 'next' into 'main'

Beta

See merge request tygrdev/org-real!1
---
 .gitlab-ci.yml  |   2 +-
 Eldev   |   8 +-
 README.org  |  10 +-
 org-real-box.el | 560 +
 org-real-pkg.el |   5 +
 org-real.el | 592 ++--
 6 files changed, 722 insertions(+), 455 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f95502..95db3a4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ package:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
   script:
 - /root/.eldev/bin/eldev -dtT lint
-- /root/.eldev/bin/eldev -dtT compile
+- /root/.eldev/bin/eldev -dtT compile -W
 - /root/.eldev/bin/eldev -dtT package
 - /root/.eldev/bin/eldev -dtT md5
   artifacts:
diff --git a/Eldev b/Eldev
index 49da7f0..84e9700 100644
--- a/Eldev
+++ b/Eldev
@@ -1,12 +1,14 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
 (eldev-defcommand
- eventuel-md5 (&rest parameters)
+ org_real-md5 (&rest parameters)
  "Create md5 checksum of tar files in dist folder"
- (mapcar
+ (mapc
   (lambda (file)
 (write-region
  (secure-hash 'md5 file)
  nil
  (concat (file-name-sans-extension file) ".md5")))
-  (directory-files eldev-dist-dir t "\\.el\\'")))
+  (append
+   (directory-files eldev-dist-dir t "\\.tar\\'")
+   (directory-files eldev-dist-dir t "\\.el\\'"
diff --git a/README.org b/README.org
index e759def..6aa89fb 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
 #+TITLE: Org Real
 
-Keep track of real things as org links.
+Keep track of real things as org-mode links.
 
 #+begin_src emacs-lisp
 (use-package org-real
@@ -11,8 +11,8 @@ Keep track of real things as org links.
 
 [[https://gitlab.com/tygrdev/org-real/-/releases][Download the latest release]]
 
-* Status *ALPHA*
-  - TODO Ask to replace all occurences after editing a link
+* Status *BETA*
+  - TODO ERT tests
 
 * Usage
 ** Inserting a link
@@ -72,6 +72,10 @@ Keep track of real things as org links.
 
[[file:demo/edit-link.gif]]
 
+   If any container in the new link does not match an existing
+   container in the buffer, org-real will prompt you to replace all
+   occurences of that thing with the new context and relationships.
+   
 ** Opening links
 
To open a link, place the cursor within the link and press =C-c
diff --git a/org-real-box.el b/org-real-box.el
new file mode 100644
index 000..710c78a
--- /dev/null
+++ b/org-real-box.el
@@ -0,0 +1,560 @@
+;;; org-real-box.el --- Keep track of real things as org-mode links -*- 
lexical-binding: t -*-
+
+;; Author: Tyler Grinn 
+;; Version: 0.1.0
+;; File: org-real-box.el
+;; Package-Requires: ((emacs "26.1"))
+;; Keywords: tools
+;; URL: https://gitlab.com/tygrdev/org-real
+
+;;; Commentary:
+
+;; Box class definition and related methods
+
+;;; Code:
+
+ Patch! 0.0.1 -> 0.1.0+
+ Will be removed in version 1.0.0+
+
+(and (fboundp 'org-real--merge) (fmakunbound 'org-real--merge))
+(and (fboundp 'org-real--map-immediate) (fmakunbound 'org-real--map-immediate))
+(and (fboundp 'org-real--next) (fmakunbound 'org-real--next))
+(and (fboundp 'org-real--merge-into) (fmakunbound 'org-real--merge-into))
+(and (fboundp 'org-real--add-matching) (fmakunbound 'org-real--add-matching))
+(and (fboundp 'org-real--flex-add) (fmakunbound 'org-real--flex-add))
+(and (fboundp 'org-real--expand) (fmakunbound 'org-real--expand))
+(and (fboundp 'org-real--draw) (fmakunbound 'org-real--draw))
+(and (fboundp 'org-real--get-width) (fmakunbound 'org-real--get-width))
+(and (fboundp 'org-real--get-height) (fmakunbound 'org-real--get-height))
+(and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
+(and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
+
+ Requirements:
+
+(require 'eieio)
+(require 'cl-lib)
+
+ Variables from org-real.el
+
+(eval-when-compile
+  (defvar org-real-padding)
+  (defvar org-real-margin))
+
+ Class definitions
+
+(defclass org-real-box-collection ()
+  ((box :initarg :box
+:type org-real-box)
+   (next :initarg :next
+ :type org-real-box-collection))
+  "A collection of `org-real-box'es.")
+
+(defclass org-real-box ()
+  ((name :initarg :name
+ :type string)
+   (rel :initarg :rel
+:type string)
+   (rel-box :initarg :rel-box
+:type org-real-box)
+   (x-order :initarg :x-order
+:initform 0
+:type number)
+   (y-order :initarg :y-order
+:initform 0
+:type number)
+   (in-front :initarg :in-front
+ :initform nil
+ :type boolean)
+   (behind :initarg :behind
+   :initform nil
+   :type boolean)
+   (parent :initarg :parent
+   :type org-real-box)
+   (child

[elpa] externals/org-real 9ac40b5 042/160: v0.1.0

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 9ac40b551937d9ba87d8d81328cb8a55bff4b9ad
Author: Tyler Grinn 
Commit: Tyler Grinn 

v0.1.0

* Added org-real--apply which will apply all changes from the most recent 
org-insert-link to the entire buffer recursively.
* Satisfied all ELC compiler warnings
* Added customization variables org-real-padding and org-real-margin



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

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 8b6a4e15a348451687515d7d1dbac2dcf7e89675
Author: Tyler Grinn 
Commit: Tyler Grinn 

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
 



[elpa] externals/org-real cf2778a 049/160: Whitespace cleanup

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit cf2778a5c0efe51b75e719f56d046d74987363f9
Author: Tyler Grinn 
Commit: Tyler Grinn 

Whitespace cleanup
---
 org-real.el | 33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/org-real.el b/org-real.el
index ae3b649..1c7e875 100644
--- a/org-real.el
+++ b/org-real.el
@@ -250,7 +250,6 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
 (when (string= (org-element-property :type old-link) "real")
   (setq old-containers (reverse (org-real--parse-url
  (org-element-property 
:raw-link old-link
-  
   (when-let* ((new-index 0)
   (old-index (seq-position
   old-containers
@@ -639,7 +638,7 @@ PREV must already existing in PARENT."
  (setq cur-y prev-y)
  (setq cur-behind prev-behind)
  (setq cur-in-front prev-in-front))
-
+
 (if (and prev (member rel '("in" "on" "behind" "in front of")))
 (progn
   (oset box :parent prev)
@@ -788,7 +787,7 @@ of BOX."
  (setq next-y match-y)
  (setq next-behind match-behind)
  (setq next-in-front match-in-front)))
- 
+
(oset next :rel-box match)
(if (member rel '("in" "on" "behind" "in front of"))
(org-real--flex-add next match world)
@@ -862,22 +861,22 @@ that the width of WORLD is kept below 80 characters if 
possible."
   "Make a bracket link, consisting of LINK and DESCRIPTION.
 LINK is escaped with backslashes for inclusion in buffer."
   (let* ((zero-width-space (string ?\x200B))
-(description
- (and (org-string-nw-p description)
-  ;; Description cannot contain two consecutive square
-  ;; brackets, or end with a square bracket.  To prevent
-  ;; this, insert a zero width space character between
-  ;; the brackets, or at the end of the description.
-  (replace-regexp-in-string
-   "\\(]\\)\\(]\\)"
-   (concat "\\1" zero-width-space "\\2")
-   (replace-regexp-in-string "]\\'"
- (concat "\\&" zero-width-space)
- (org-trim description))
+   (description
+(and (org-string-nw-p description)
+ ;; Description cannot contain two consecutive square
+ ;; brackets, or end with a square bracket.  To prevent
+ ;; this, insert a zero width space character between
+ ;; the brackets, or at the end of the description.
+ (replace-regexp-in-string
+"\\(]\\)\\(]\\)"
+(concat "\\1" zero-width-space "\\2")
+(replace-regexp-in-string "]\\'"
+(concat "\\&" zero-width-space)
+(org-trim description))
 (if (not (org-string-nw-p link)) description
   (format "[[%s]%s]"
- (org-link-escape link)
- (if description (format "[%s]" description) "")
+(org-link-escape link)
+(if description (format "[%s]" description) "")
 
 
 (defun org-real--parse-url (str)



[elpa] externals/org-real cdce61e 058/160: Linting

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit cdce61ebba7808c1adc043d6466e7847f4246bfa
Author: Tyler Grinn 
Commit: Tyler Grinn 

Linting
---
 org-real.el | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/org-real.el b/org-real.el
index 08e9ae0..1f9f5cd 100644
--- a/org-real.el
+++ b/org-real.el
@@ -79,7 +79,7 @@
   :group 'org-real)
 
 (defcustom org-real-flex-width 80
-  "When merging links, try to keep width below this"
+  "When merging links, try to keep width below this."
   :type 'number
   :group 'org-real)
 
@@ -419,7 +419,8 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
   "Create an instance of `org-real-box' from CONTAINERS.
 
 CONTAINERS is a list of plists containing at least a :name
-property and optionally a :rel property."
+property and optionally a :rel property.  If SKIP-PRIMARY is
+non-nil, skip setting :primary slot on the last box."
   (when-let* ((world (org-real-box))
   (base-container (pop containers))
   (base (org-real-box :name (plist-get base-container :name
@@ -428,7 +429,7 @@ property and optionally a :rel property."
   (setq children (org-real--push children base)))
 (if containers
 (org-real--make-instance-helper containers world base skip-primary)
-  (unless skip-primary (oset box :primary t)))
+  (unless skip-primary (oset base :primary t)))
 world))
 
 (cl-defmethod org-real--merge (boxes)
@@ -677,7 +678,6 @@ If INCLUDE-ON-TOP is non-nil, also include height on top of 
box."
   "Help create a 3D representation of CONTAINERS.
 
 PREV must already existing in PARENT."
-  (message "Skip primary? %s" skip-primary)
   (let* ((container (pop containers))
  (rel (plist-get container :rel))
  (box (org-real-box :name (plist-get container :name
@@ -810,6 +810,10 @@ If EXCLUDE-CHILDREN, only retrieve sibling boxes."
 (cl-defmethod org-real--add-matching ((box org-real-box)
   (match org-real-box)
   (world org-real-box))
+  "Add BOX to WORLD after finding a matching box MATCH already in WORLD.
+
+MATCH is used to set the :rel-box and :parent slots on relatives
+of BOX."
   (oset match :primary (or (with-slots (primary) match primary)
(with-slots (primary) box primary)))
   (mapc
@@ -820,10 +824,10 @@ If EXCLUDE-CHILDREN, only retrieve sibling boxes."
 (cl-defmethod org-real--add-matching-helper ((next org-real-box)
  (match org-real-box)
  (world org-real-box))
-  "Add BOX to WORLD after finding a matching box MATCH already in WORLD.
+  "Helper for `org-real--add-matching'.
 
-MATCH is used to set the :rel-box and :parent slots on children
-of BOX."
+When MATCH is found, add relative NEXT into WORLD according to
+its relationship to MATCH."
   (with-slots
   (children
parent



[elpa] externals/org-real c1a21a5 050/160: Added 'on top of' preposition; update customization vars

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit c1a21a5c356a4a21bcdf104418866ee33e71657e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added 'on top of' preposition; update customization vars

Added on top of, changed customization variables
---
 garage.org  |  23 +--
 org-real.el | 562 ++--
 2 files changed, 328 insertions(+), 257 deletions(-)

diff --git a/garage.org b/garage.org
index c165c46..aa025d5 100644
--- a/garage.org
+++ b/garage.org
@@ -1,11 +1,14 @@
 * Items in the garage
-  - [[real://garage/workbench?rel=in/wrench?rel=on][wrench]]
-  - [[real://garage/workbench?rel=in/ratchet?rel=on][ratchet]]
-  - [[real://garage/workbench?rel=in/ratchet?rel=on/screwdriver?rel=to the 
left of][screwdriver]]
-  - [[real://garage/east wall?rel=in/rake?rel=on][rake]]
-  - [[real://garage/east wall?rel=in/rake?rel=on/shovel?rel=to the left 
of][shovel]]
-  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left of][hoe]]
-  - 
[[real://garage/workbench?rel=in/wrench?rel=on/paintbrush?rel=above][paintbrush]]
-  - [[real://garage/workbench?rel=in/ratchet?rel=on/hammer?rel=to the right 
of][hammer]]
-  - [[real://garage/workbench?rel=in/ratchet?rel=on/nails?rel=to the right 
of][nails]]
-  - [[real://garage/car?rel=in/air freshener?rel=in][air freshener]]
+  - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of/wrench?rel=to the right of][wrench]]
+  - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of][paintbrush]]
+  - [[real://house/garage?rel=in/workbench?rel=in/screwdriver?rel=on top 
of][screwdriver]]
+  - [[real://house/garage?rel=in/east wall?rel=in/shovel?rel=on][shovel]]
+  - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on][rake]]
+  - [[real://house/garage?rel=in/workbench?rel=in/hammer?rel=on][hammer]]
+  - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on/hoe?rel=to the 
left of][hoe]]
+  - [[real://house/garage?rel=in/car?rel=in/air freshener?rel=in][air 
freshener]]
+  - [[real://house/garage?rel=in/east wall?rel=in][East wall]]
+  - [[real://house/garage?rel=in/workbench?rel=in/ratchet?rel=on][ratchet]]
+  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails]]
+  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails2]]
+
diff --git a/org-real.el b/org-real.el
index 1c7e875..09578b9 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 
-;; Version: 0.1.1
+;; Version: 0.2.0
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools
@@ -33,6 +33,14 @@
 (and (fboundp 'org-real--get-top) (fmakunbound 'org-real--get-top))
 (and (fboundp 'org-real--get-left) (fmakunbound 'org-real--get-left))
 
+ Patch! 0.1.1 > 0.2.0+
+ Will be removed in version 1.0.0+
+
+(let ((customizations (get 'org-real 'custom-group)))
+  (setf customizations (cl-delete "org-real-margin" customizations :key #'car 
:test #'string=))
+  (setf customizations (cl-delete "org-real-padding" customizations :key #'car 
:test #'string=))
+  (put 'org-real 'custom-group customizations))
+
  Requirements
 
 (require 'eieio)
@@ -45,20 +53,24 @@
   "Customization options for org-real"
   :group 'applications)
 
-(defcustom org-real-margin '(2 . 1)
-  "Margin to be used when displaying boxes.
+(defcustom org-real-margin-x 2
+  "Horizontal margin to be used when displaying boxes."
+  :type 'number
+  :group 'org-real)
 
-The first number is the horizontal margin, second is the vertical
-margin"
-  :type 'cons
+(defcustom org-real-margin-y 1
+  "Vertical margin to be used when displaying boxes."
+  :type 'number
   :group 'org-real)
 
-(defcustom org-real-padding '(2 . 1)
-  "Padding to be used when displaying boxes.
+(defcustom org-real-padding-x 2
+  "Horizontal padding to be used when displaying boxes."
+  :type 'number
+  :group 'org-real)
 
-The first number is the horizontal padding, second is the
-vertical padding"
-  :type 'cons
+(defcustom org-real-padding-y 1
+  "Vertical padding to be used when displaying boxes."
+  :type 'number
   :group 'org-real)
 
  Faces
@@ -72,7 +84,7 @@ vertical padding"
  Constants
 
 (defconst org-real-prepositions
-  '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of")
+  '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of" "on top of")
   "List of available prepositions for things.")
 
  Interactive functions
@@ -87,7 +99,6 @@ vertical padding"
(org-real--make-instance 'org-real-box containers))
  (org-real--parse-buffer)
 
-
  Pretty printing
 
 (defun org-real--pp (box &optional containers)
@@ -105,8 +116,8 @@ describing where BOX is."
   (toggle-truncate-lines t)
   (if containers (org-real--pp-text containers))
   (let ((offset (- (line-number-at-pos)
-

[elpa] externals/org-real 01899e9 052/160: More edge cases

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 01899e9108d27a3060bbf64196da570a3e77f6ea
Author: Tyler Grinn 
Commit: Tyler Grinn 

More edge cases
---
 garage.org  |  9 +++---
 org-real.el | 98 ++---
 2 files changed, 54 insertions(+), 53 deletions(-)

diff --git a/garage.org b/garage.org
index aa025d5..9715df5 100644
--- a/garage.org
+++ b/garage.org
@@ -1,14 +1,15 @@
 * Items in the garage
+  - [[real://house/garage?rel=in/east wall?rel=in][East wall]]
   - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of/wrench?rel=to the right of][wrench]]
   - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of][paintbrush]]
-  - [[real://house/garage?rel=in/workbench?rel=in/screwdriver?rel=on top 
of][screwdriver]]
-  - [[real://house/garage?rel=in/east wall?rel=in/shovel?rel=on][shovel]]
+  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top 
of/screwdriver?rel=on top of][screwdriver]]
+  - [[real://house?rel=in front of/garage?rel=in/east 
wall?rel=in/shovel?rel=on][shovel]]
   - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on][rake]]
   - [[real://house/garage?rel=in/workbench?rel=in/hammer?rel=on][hammer]]
   - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on/hoe?rel=to the 
left of][hoe]]
   - [[real://house/garage?rel=in/car?rel=in/air freshener?rel=in][air 
freshener]]
-  - [[real://house/garage?rel=in/east wall?rel=in][East wall]]
-  - [[real://house/garage?rel=in/workbench?rel=in/ratchet?rel=on][ratchet]]
+  - [[real://house/garage?rel=in/workbench?rel=in/ratchet?rel=on top 
of][ratchet]]
   - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails]]
   - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails2]]
+  - [[real://house/garage?rel=in/workbench?rel=in][workbench]]
 
diff --git a/org-real.el b/org-real.el
index 3316a59..c955618 100644
--- a/org-real.el
+++ b/org-real.el
@@ -160,7 +160,6 @@ describing where BOX is."
 
 (defun org-real-follow (url &rest _)
   "Open a real link URL in a popup buffer."
-  (pp include-children)
   (let* ((containers (org-real--parse-url url))
  (box (org-real--make-instance 'org-real-box (copy-tree containers
 (if org-real-include-children
@@ -530,7 +529,7 @@ OFFSET is the starting line to start insertion."
 (cl-defmethod org-real--get-height ((box org-real-box) &optional 
include-on-top)
   "Get the height of BOX.
 
-If INCLUDE-ON-TOP is non-nil, also include height on top of box"
+If INCLUDE-ON-TOP is non-nil, also include height on top of box."
   (let ((on-top-height (if include-on-top (org-real--get-on-top-height box) 
0)))
 (with-slots ((stored-height height) in-front on-top) box
   (if (slot-boundp box :height)
@@ -584,40 +583,31 @@ If INCLUDE-ON-TOP is non-nil, also include height on top 
of box"
(not (or on-top in-front
(org-real--get-all children
   (offset (+ 2 org-real-padding-y org-real-margin-y))
-  (top (+ on-top-height offset (org-real--get-top parent)))
-  (above (seq-filter
-  (lambda (sibling)
-(with-slots ((sibling-x x-order) (sibling-y 
y-order)) sibling
-  (and (= x-order sibling-x)
-   (< sibling-y y-order
-  siblings))
-  (directly-above (and above (seq-reduce
-  (lambda (max child)
-(with-slots ((max-y 
y-order)) max
-  (with-slots ((child-y 
y-order)) child
-(if (> child-y max-y)
-child
-  max
-  above
-  (org-real-box :y-order 
-
-  (above-height (and directly-above (+ org-real-margin-y
-   (apply 'max
-  (mapcar
-   
'org-real--get-height
-   (seq-filter
-(lambda 
(sibling)
-  (= 
(with-slots (y-order) directly-above y-order)
- 
(with-slots (y-order) sibling y-order)))
-
siblings)))

[elpa] externals/org-real f933ebc 055/160: More edge cases

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f933ebc3a72f3780d825cd0697e34110be414868
Author: Tyler Grinn 
Commit: Tyler Grinn 

More edge cases

More edge cases
---
 garage.org  |  30 +++
 org-real.el | 254 ++--
 tests.org   |   2 +-
 3 files changed, 144 insertions(+), 142 deletions(-)

diff --git a/garage.org b/garage.org
index 9715df5..def0412 100644
--- a/garage.org
+++ b/garage.org
@@ -1,15 +1,17 @@
 * Items in the garage
-  - [[real://house/garage?rel=in/east wall?rel=in][East wall]]
-  - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of/wrench?rel=to the right of][wrench]]
-  - [[real://house/garage?rel=in/workbench?rel=in/paintbrush?rel=in front 
of][paintbrush]]
-  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top 
of/screwdriver?rel=on top of][screwdriver]]
-  - [[real://house?rel=in front of/garage?rel=in/east 
wall?rel=in/shovel?rel=on][shovel]]
-  - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on][rake]]
-  - [[real://house/garage?rel=in/workbench?rel=in/hammer?rel=on][hammer]]
-  - [[real://house/garage?rel=in/east wall?rel=in/rake?rel=on/hoe?rel=to the 
left of][hoe]]
-  - [[real://house/garage?rel=in/car?rel=in/air freshener?rel=in][air 
freshener]]
-  - [[real://house/garage?rel=in/workbench?rel=in/ratchet?rel=on top 
of][ratchet]]
-  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails]]
-  - [[real://house/garage?rel=in/workbench?rel=in/nails?rel=on top of][nails2]]
-  - [[real://house/garage?rel=in/workbench?rel=in][workbench]]
-
+  - [[real://garage/workbench?rel=in/paintbrush?rel=in front of][paintbrush]]
+  - [[real://garage/workbench?rel=in/paintbrush?rel=in front of/wrench?rel=to 
the left of][wrench]]
+  - [[real://garage/workbench?rel=in/nails?rel=on top of/screwdriver?rel=on 
top of][screwdriver]]
+  - [[real://garage/workbench?rel=in/ratchet?rel=on top of][ratchet]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above/shovel?rel=above][shovel]]
+  - [[real://garage/east wall?rel=in/rake?rel=on][rake]]
+  - [[real://garage/workbench?rel=in/hammer?rel=on][hammer]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left of][hoe]]
+  - [[real://garage/car?rel=in/air freshener?rel=in][air freshener]]
+  - [[real://garage/workbench?rel=in/nails?rel=on top of][nails]]
+  - [[real://garage/workbench?rel=in][workbench]]
+  - [[real://garage/east wall?rel=in][East wall]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above][snowblower]]
+  - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of][screws]]
+  - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of/saw?rel=to the right of][saw]]
+  - [[real://garage/workbench?rel=in/paintbrush?rel=in front of/wrench?rel=to 
the left of/pliers?rel=to the left of][pliers]]
diff --git a/org-real.el b/org-real.el
index 5f96ce4..51df8b2 100644
--- a/org-real.el
+++ b/org-real.el
@@ -174,6 +174,8 @@ describing where BOX is."
 (org-real--make-instance 'org-real-box containers))
   (seq-filter
(lambda (containers)
+ (setq containers (reverse containers))
+ (pop containers)
  (seq-some
   (lambda (container)
 (string= primary-name (plist-get container 
:name)))
@@ -505,8 +507,11 @@ OFFSET is the starting line to start insertion."
(seq-filter
 (lambda (child) (with-slots (y-order) child (= r 
y-order)))
 children)
-   :test #'(lambda (a b) (string= (with-slots (name) a 
name)
-  (with-slots (name) b 
name)
+   :test #'(lambda (a b)
+ (and (slot-boundp a :name)
+  (slot-boundp b :name)
+  (string= (with-slots (name) a name)
+   (with-slots (name) b 
name))
 row-indices))
  (children-width (apply 'max
 (mapcar
@@ -772,13 +777,15 @@ If EXCLUDE-CHILDREN, only retrieve sibling boxes."
 
 (cl-defmethod org-real--expand ((box org-real-box))
   "Get a list of all boxes, including BOX, that are children of BOX."
-  (with-slots (children) box
-(apply 'append (list box) (mapcar 'org-real--expand (org-real--get-all 
children)
+  (if (slot-boundp box :name)
+  (apply 'append (list box) (mapcar 'org-real--expand (org-real--next 
box)))
+(with-slots (children) box
+  (apply 'append (mapcar 'org-real--expand (org-real--get-all 

[elpa] externals/org-real 1160749 066/160: v0.2.0

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 1160749fcaf956e820c7b6079955591a8b0151ba
Author: Tyler Grinn 
Commit: Tyler Grinn 

v0.2.0

* New preposition: on top of
* Split both org-real-margin and org-real-padding into width and height 
parts
* Allow users to set max width of org-real-world diagram
* Boxes are now stateful: coordinates are calculated at most once per box
* Include context around a thing when opening a link
* Filter completion candidates to help prevent loops



[elpa] externals/org-real b9a7e8a 053/160: Removed existing containers from completion candidates

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit b9a7e8a305a850aa484c07f48e90804ea411fddc
Author: Tyler Grinn 
Commit: Tyler Grinn 

Removed existing containers from completion candidates
---
 org-real.el | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/org-real.el b/org-real.el
index c955618..0fd60ad 100644
--- a/org-real.el
+++ b/org-real.el
@@ -182,7 +182,7 @@ describing where BOX is."
   (let* ((container-matrix (org-real--parse-buffer))
  (containers (if existing
  (org-real--parse-url existing)
-   (org-real--complete-thing "Thing: " container-matrix
+   (org-real--complete-thing "Thing: " container-matrix 
'()
 (catch 'confirm
   (while t
 (org-real--pp (org-real--make-instance 'org-real-box containers) 
containers)
@@ -193,27 +193,35 @@ describing where BOX is."
((eq response 'backspace)
 (pop containers)
 (if (= 0 (length containers))
-(setq containers (org-real--complete-thing "Thing: " 
container-matrix
+(setq containers (org-real--complete-thing "Thing: " 
container-matrix containers
((eq response ?+)
 (let* ((top (plist-get (car containers) :name))
(preposition
 (completing-read (concat "The " top " is: ") 
org-real-prepositions nil t))
(additional-containers
-(org-real--complete-thing (concat "The " top " is " 
preposition " the: ") container-matrix)))
+(org-real--complete-thing (concat "The " top " is " 
preposition " the: ")
+  container-matrix
+  containers)))
   (setcar containers (plist-put (car containers) :rel preposition))
   (setq containers (append additional-containers containers
 (org-real--to-link containers)))
 
-(defun org-real--complete-thing (prompt container-matrix)
+(defun org-real--complete-thing (prompt container-matrix existing)
   "Use `completing-read' with PROMPT to get a list of containers.
 
 CONTAINER-MATRIX is used to generate possible completions.  The
 return value is the longest list of containers from the matrix
 that contains, as the last element, a container with a name
-matching the one returned from `completing-read'."
-  (let* ((completions (mapcar
-   (lambda (container) (plist-get container :name))
-   (apply 'append container-matrix)))
+matching the one returned from `completing-read'.
+
+EXISTING containers will be excluded from the completion."
+  (let* ((existing-names (mapcar (lambda (container) (plist-get container 
:name)) existing))
+ (completions (seq-filter
+   (lambda (name) (not (member name existing-names)))
+   (cl-delete-duplicates
+(mapcar
+ (lambda (container) (plist-get container :name))
+ (apply 'append container-matrix)
  (result (completing-read prompt completions nil 'confirm))
  (existing-containers (car (seq-sort
 (lambda (a b) (> (length a) (length b)))



[elpa] externals/org-real c32c714 074/160: Org real headlines takes over current window

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit c32c7142f23bf0cec080c38f115e219b60947278
Author: Tyler Grinn 
Commit: Tyler Grinn 

Org real headlines takes over current window
---
 org-real.el | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/org-real.el b/org-real.el
index c96bc61..4381146 100644
--- a/org-real.el
+++ b/org-real.el
@@ -142,7 +142,10 @@
 
 MAX-LEVEL is the maximum level to show headlines for."
   (interactive "P")
-  (org-real--pp (org-real--parse-headlines (or max-level 2
+  (org-real--pp
+   (org-real--parse-headlines (or max-level 2))
+   nil
+   'display-buffer-same-window))
 
  Org Real mode
 
@@ -223,18 +226,22 @@ The following commands are available:
 
  Pretty printing
 
-(defun org-real--pp (box &optional containers)
+(defun org-real--pp (box &optional containers display-buffer-fn)
   "Pretty print BOX in a popup buffer.
 
 If CONTAINERS is passed in, also pretty print a sentence
-describing where BOX is."
+describing where BOX is.
+
+DISPLAY-BUFFER-FN is used to display the diagram, by
+default `display-buffer-pop-up-window'."
   (let ((top (org-real--get-top box))
 (width (org-real--get-width box))
 (height (org-real--get-height box))
 (inhibit-read-only t)
 (buffer (get-buffer-create "Org Real")))
 (select-window (display-buffer buffer
-   `(display-buffer-pop-up-window
+   `(,(or display-buffer-fn
+  'display-buffer-pop-up-window)
  (window-width . ,width)
  (window-height . ,height
 (org-real-mode)
@@ -1173,7 +1180,6 @@ MARKER is the position of the first occurrence of the 
link."
   (let ((buffer (marker-buffer marker)))
 (lambda ()
   (interactive)
-  (delete-window)
   (if-let ((window (get-buffer-window buffer)))
   (select-window window)
 (switch-to-buffer buffer))



[elpa] externals/org-real 03234f7 059/160: Requirements before patches

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 03234f7f45b252082f1e14961729be4b2b193f9e
Author: Tyler Grinn 
Commit: Tyler Grinn 

Requirements before patches
---
 org-real.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/org-real.el b/org-real.el
index 1f9f5cd..d075a3b 100644
--- a/org-real.el
+++ b/org-real.el
@@ -17,6 +17,12 @@
 
 ;;; Code:
 
+ Requirements
+
+(require 'eieio)
+(require 'org-element)
+(require 'cl-lib)
+
  Patch! 0.0.1 -> 0.1.0+
  Will be removed in version 1.0.0+
 
@@ -41,12 +47,6 @@
   (setf customizations (cl-delete "org-real-padding" customizations :key #'car 
:test #'string=))
   (put 'org-real 'custom-group customizations))
 
- Requirements
-
-(require 'eieio)
-(require 'org-element)
-(require 'cl-lib)
-
  Customization variables
 
 (defgroup org-real nil



[elpa] externals/org-real a5736f1 070/160: Created buttons that link back to the location of the link

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a5736f1295e4f8efad05243464ee97d3d82b2228
Author: Tyler Grinn 
Commit: Tyler Grinn 

Created buttons that link back to the location of the link
---
 garage.org  |   3 ++
 org-real.el | 171 +---
 2 files changed, 144 insertions(+), 30 deletions(-)

diff --git a/garage.org b/garage.org
index f4a4cdb..c6bee47 100644
--- a/garage.org
+++ b/garage.org
@@ -4,6 +4,9 @@
   - [[real://garage/workbench?rel=in/nails?rel=on top of/screwdriver?rel=on 
top of][screwdriver]]
   - [[real://garage/workbench?rel=in/ratchet?rel=on top of][ratchet]]
   - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above/shovel?rel=above][shovel]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above/shovel?rel=above][shovel]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above/shovel?rel=above][shovel]]
+  - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above/shovel?rel=above][shovel]]
   - [[real://garage/east wall?rel=in/rake?rel=on][rake]]
   - [[real://garage/workbench?rel=in/hammer?rel=on][hammer]]
   - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left of][hoe]]
diff --git a/org-real.el b/org-real.el
index 3d7d208..2df511e 100644
--- a/org-real.el
+++ b/org-real.el
@@ -91,12 +91,16 @@
   "Face for the last thing in a real link."
   :group 'org-real)
 
- Constants
+ Constants & variables
 
 (defconst org-real-prepositions
   '("in" "on" "behind" "in front of" "above" "below" "to the left of" "to the 
right of" "on top of")
   "List of available prepositions for things.")
 
+(defvar org-real--tab-ring '()
+  "List of buffer positions of buttons in an Org Real diagram.")
+(make-variable-buffer-local 'org-real--tab-ring)
+
  Interactive functions
 
 (defun org-real-world ()
@@ -109,6 +113,33 @@
(org-real--make-instance 'org-real-box containers))
  (org-real--parse-buffer)
 
+ Org Real mode
+
+(defun org-real-tab-cycle ()
+  "Cycle through buttons in the current Org Real buffer."
+  (interactive)
+  (if-let ((pos (seq-find (lambda (pos) (> pos (point))) org-real--tab-ring)))
+  (goto-char pos)))
+
+(defun org-real-tab-uncycle ()
+  "Cycle through buttons in the current Org Real buffer in reverse."
+  (interactive)
+  (if-let ((pos (seq-find (lambda (pos) (< pos (point))) (reverse 
org-real--tab-ring
+  (goto-char pos)))
+
+(define-derived-mode org-real-mode special-mode
+  "Org Real"
+  "Mode for viewing an org-real diagram.
+
+The following commands are available:
+
+\\{org-real-mode-map}"
+  :group 'org-mode
+  (toggle-truncate-lines t))
+
+(define-key org-real-mode-map (kbd "TAB") 'org-real-tab-cycle)
+(define-key org-real-mode-map (kbd "") 'org-real-tab-uncycle)
+
  Pretty printing
 
 (defun org-real--pp (box &optional containers)
@@ -122,17 +153,20 @@ describing where BOX is."
 (inhibit-read-only t)
 (buffer (get-buffer-create "Org Real")))
 (with-current-buffer buffer
+  (org-real-mode)
   (erase-buffer)
-  (toggle-truncate-lines t)
+  (setq org-real--tab-ring '())
   (if containers (org-real--pp-text containers))
   (let ((offset (- (line-number-at-pos)
org-real-margin-y
(* 2 org-real-padding-y
 (dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
 (org-real--draw box offset)
-(special-mode)))
+(goto-char 0)
+(setq org-real--tab-ring
+  (seq-sort '< org-real--tab-ring
 (display-buffer buffer `(display-buffer-pop-up-window
- (window-width . 80)
+ (window-width . ,width)
  (window-height . ,height)
 
 (defun org-real--pp-text (containers)
@@ -165,7 +199,7 @@ describing where BOX is."
 
 (defun org-real-follow (url &rest _)
   "Open a real link URL in a popup buffer."
-  (let* ((containers (org-real--parse-url url))
+  (let* ((containers (org-real--parse-url url (point-marker)))
  (box (org-real--make-instance 'org-real-box (copy-tree containers
 (if org-real-include-context
 (let* ((primary-name (plist-get (car (reverse containers)) :name))
@@ -188,7 +222,7 @@ describing where BOX is."
   "Complete a real link or edit EXISTING link."
   (let* ((container-matrix (org-real--parse-buffer))
  (containers (if existing
- (org-real--parse-url existing)
+ (org-real--parse-url existing (point-marker))
(org-real--complete-thing "Thing: " container-matrix 
'()
 (catch 'confirm
   (while t
@@ -284,7 +318,7 @@ ORIG is `org-insert-link', ARGS are the arguments passed to 
it."
   (setq new-link (org-unbracket-string "<" ">" (match-string 0)
 (when (and

[elpa] externals/org-real 186830b 060/160: Detect return and backspace without gui

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 186830b86c151366cdb88067eff997b9e78035f9
Author: Tyler Grinn 
Commit: Tyler Grinn 

Detect return and backspace without gui
---
 org-real.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-real.el b/org-real.el
index d075a3b..513863a 100644
--- a/org-real.el
+++ b/org-real.el
@@ -195,9 +195,9 @@ describing where BOX is."
 (org-real--pp (org-real--make-instance 'org-real-box containers) 
containers)
 (let ((response (read-event "RETURN- Confirm\nBACKSPACE - Remove 
context\n+ - Add context")))
   (cond
-   ((eq response 'return)
+   ((or (eq response 'return) (eq response 13))
 (throw 'confirm containers))
-   ((eq response 'backspace)
+   ((or (eq response 'backspace) (eq response 127))
 (pop containers)
 (if (= 0 (length containers))
 (setq containers (org-real--complete-thing "Thing: " 
container-matrix containers



[elpa] externals/org-real c37d17c 073/160: Bump version

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit c37d17c4f2fcde9fa3638ab2ee13464571443282
Author: Tyler Grinn 
Commit: Tyler Grinn 

Bump version
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index e4463e2..c96bc61 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 
-;; Version: 0.2.0
+;; Version: 0.3.0
 ;; File: org-real.el
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: tools



[elpa] externals/org-real abb5aed 061/160: More edge cases

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit abb5aeda4891ab4eeb0d6495e9c6eca3780c4a82
Author: Tyler Grinn 
Commit: Tyler Grinn 

More edge cases
---
 garage.org  |   2 +-
 org-real.el | 270 
 tests.org   |   3 +-
 3 files changed, 149 insertions(+), 126 deletions(-)

diff --git a/garage.org b/garage.org
index def0412..f4a4cdb 100644
--- a/garage.org
+++ b/garage.org
@@ -13,5 +13,5 @@
   - [[real://garage/east wall?rel=in][East wall]]
   - [[real://garage/east wall?rel=in/rake?rel=on/hoe?rel=to the left 
of/snowblower?rel=above][snowblower]]
   - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of][screws]]
-  - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of/saw?rel=to the right of][saw]]
+  - [[real://garage/workbench?rel=in/hammer?rel=on/screws?rel=to the right 
of/saw?rel=above][saw]]
   - [[real://garage/workbench?rel=in/paintbrush?rel=in front of/wrench?rel=to 
the left of/pliers?rel=to the left of][pliers]]
diff --git a/org-real.el b/org-real.el
index 513863a..8099649 100644
--- a/org-real.el
+++ b/org-real.el
@@ -681,77 +681,97 @@ PREV must already existing in PARENT."
   (let* ((container (pop containers))
  (rel (plist-get container :rel))
  (box (org-real-box :name (plist-get container :name
-(when prev
-  (oset box :rel (plist-get container :rel))
-  (oset box :rel-box prev)
-  (with-slots
-  ((cur-x x-order)
-   (cur-y y-order)
-   (cur-behind behind)
-   (cur-on-top on-top)
-   (cur-in-front in-front))
-  box
+(oset box :rel (plist-get container :rel))
+(oset box :rel-box prev)
+(with-slots
+((cur-x x-order)
+ (cur-y y-order)
+ (cur-behind behind)
+ (cur-on-top on-top)
+ (cur-in-front in-front))
+box
 (with-slots
 ((prev-x x-order)
  (prev-y y-order)
+ parent
  (prev-behind behind)
  (prev-on-top on-top)
  (prev-in-front in-front))
 prev
-  (cond ((or (string= rel "in") (string= rel "on"))
- (setq cur-x prev-x)
- (setq cur-y prev-y)
- (setq cur-behind prev-behind))
-((string= rel "behind")
- (setq cur-x prev-x)
- (setq cur-y prev-y)
- (setq cur-behind t))
-((string= rel "in front of")
- (setq cur-x prev-x)
- (setq cur-y )
- (setq cur-behind prev-behind)
- (setq cur-in-front t))
-((string= rel "on top of")
- (setq cur-x prev-x)
- (setq cur-y -)
- (setq cur-behind prev-behind)
- (setq cur-on-top t))
-((string= rel "above")
- (setq cur-x prev-x)
- (setq cur-y (- prev-y 1))
- (setq cur-behind prev-behind))
-((string= rel "below")
- (setq cur-x prev-x)
- (setq cur-y (+ 1 prev-y))
- (setq cur-behind prev-behind)
- (setq cur-in-front prev-in-front))
-((string= rel "to the left of")
- (setq cur-x (- prev-x 1))
- (setq cur-y prev-y)
- (setq cur-behind prev-behind)
- (setq cur-on-top prev-on-top)
- (setq cur-in-front prev-in-front))
-((string= rel "to the right of")
- (setq cur-x (+ 1 prev-x))
- (setq cur-y prev-y)
- (setq cur-behind prev-behind)
- (setq cur-on-top prev-on-top)
- (setq cur-in-front prev-in-front))
-
-(if (and prev (member rel '("in" "on" "behind" "in front of" "on top of")))
-(progn
-  (oset box :parent prev)
-  (with-slots (children) prev
-(setq children (org-real--push children box)))
-  (if containers
-  (org-real--make-instance-helper containers prev box skip-primary)
-(unless skip-primary (oset box :primary t
-  (oset box :parent parent)
-  (with-slots (children) parent
-(setq children (org-real--push children box)))
-  (if containers
-  (org-real--make-instance-helper containers parent box skip-primary)
-(unless skip-primary (oset box :primary t))
+  (with-slots ((siblings children)) parent
+(let ((row-siblings (seq-filter
+ (lambda (sibling)
+   (with-slots (y-order) sibling
+ (= prev-y y-order)))
+ (org-real--get-all siblings)))
+  (sibling-y-orders (mapcar
+ (lambda (sibling) (with-slots (y-order) 
sibling y-order))

[elpa] externals/org-real 8ab3459 083/160: Added test framework

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 8ab345997a6f7d56405557678470982ee5bf690b
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added test framework
---
 .gitlab-ci.yml|  10 +-
 Eldev |  68 -
 tests.org => demo/example.org |   0
 garage.org => demo/garage.org |   0
 prepositions.org => demo/prepositions.org |   0
 projects.org => demo/projects.org |   0
 examples  |  68 -
 org-real.el   |   7 +-
 tests/edge-cases.org  | 226 ++
 9 files changed, 302 insertions(+), 77 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 95db3a4..ea1c6fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,11 +7,13 @@ package:
   image: silex/emacs:27
   before_script:
 - curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/eldev 
| sh
+- export PATH=$PATH:/root/.eldev/bin
   script:
-- /root/.eldev/bin/eldev -dtT lint
-- /root/.eldev/bin/eldev -dtT compile -W
-- /root/.eldev/bin/eldev -dtT package
-- /root/.eldev/bin/eldev -dtT md5
+- eldev lint
+- eldev compile -W
+- eldev test
+- eldev package
+- eldev md5
   artifacts:
 paths:
   - dist/
diff --git a/Eldev b/Eldev
index 84e9700..7469bfd 100644
--- a/Eldev
+++ b/Eldev
@@ -1,8 +1,8 @@
 ; -*- mode: emacs-lisp; lexical-binding: t -*-
 
 (eldev-defcommand
- org_real-md5 (&rest parameters)
- "Create md5 checksum of tar files in dist folder"
+ org_real-md5 (&rest _)
+ "Create md5 checksum of .tar and .el files in dist folder."
  (mapc
   (lambda (file)
 (write-region
@@ -12,3 +12,67 @@
   (append
(directory-files eldev-dist-dir t "\\.tar\\'")
(directory-files eldev-dist-dir t "\\.el\\'"
+
+(eldev-defcommand
+ org_real-test (&rest _)
+ "Runs tests against all org files in tests folder."
+ :override t
+ (require 'cl-lib)
+ (require 'org-element)
+ (load-file "org-real.el")
+ (let ((failures 0))
+   (cl-flet ((get-expected ()
+   (save-excursion
+ (re-search-forward "#\\+begin_example")
+ (org-element-property :value 
(org-element-at-point
+ (get-actual ()
+ (with-current-buffer (get-buffer "Org Real")
+   (buffer-string)))
+ (print-result (title result)
+   (message "%s : %s"
+(if result
+"\033[0;32mPASS\033[0m"
+  "\033[0;31mFAIL\033[0m")
+title))
+ (set-result (result)
+ (if (not result) (cl-incf failures))
+ (let ((inhibit-message t))
+   (org-todo (if result "PASS" "FAIL")
+ (mapc
+  (lambda (test)
+(with-temp-file test
+  (message "%s:" (file-name-base test))
+  (insert-file-contents test)
+  (org-mode)
+
+  (message "  Opening links:")
+  (org-element-map (org-element-parse-buffer) 'link
+(lambda (link)
+  (goto-char (org-element-property :begin link))
+  (let ((title (and (org-in-regexp org-link-bracket-re)
+(match-string 2)))
+(result (catch 'result
+  (save-window-excursion
+(condition-case nil
+(org-open-at-point)
+  (error (throw 'result nil)))
+(string= (get-expected) (get-actual))
+(print-result title result)
+(set-result result
+
+  (message "  Merging links:")
+  (org-babel-map-src-blocks nil
+(goto-char beg-block)
+(let ((title (org-entry-get nil "ITEM"))
+  (result (catch 'result
+(save-window-excursion
+  (condition-case nil
+  (progn
+(org-edit-special)
+(org-real-world))
+(error (throw 'result nil
+(string= (get-expected) (get-actual)
+  (print-result title result)
+  (set-result result)
+  (directory-files "tests" t "\\.org\\'"))
+   (and (> failures 0) (error "Test run had failures")
diff --git a/tests.org b/demo/example.org
similarity index 100%
rename from tests.org
rename to demo/example.org
diff --git a/garage.org b/demo/garage.org
similarity index 100%
rename from garage.org
rename to demo/garage.org
diff --git a/prepositions.org b/demo/prepositions.org
similarity index 100%
rename from p

[elpa] externals/org-real baf5c9b 072/160: Updated documentation

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit baf5c9bf755b63033503c326c5722a6d0b13d2af
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated documentation

Updated readme

Updated readme
---
 README.org  |  34 
 demo/headline-relationships.png | Bin 0 -> 39954 bytes
 demo/headlines.gif  | Bin 0 -> 190807 bytes
 demo/open-links.gif | Bin 1244371 -> 757813 bytes
 org-real.el |  56 +---
 projects.org|  11 
 6 files changed, 75 insertions(+), 26 deletions(-)

diff --git a/README.org b/README.org
index 0c19448..06e0e05 100644
--- a/README.org
+++ b/README.org
@@ -14,13 +14,10 @@ Keep track of real things as org-mode links.
 and
 
 =M-x package-install-file org-real-x.y.z.el=
-#+begin_src emacs-lisp
-  (require 'org-real)
-#+end_src
 
-* Status *BETA*
-  - TODO ERT tests
+=M-x load-library RET org-real=
 
+* Status *BETA*
 * Usage
 ** Inserting a link
To create a real link in org-mode, use =C-c C-l real RET=.
@@ -96,6 +93,17 @@ and
 
[[file:demo/open-links.gif]]
 
+   In the org real diagram, emacs movement keys will navigate by boxes
+   rather than characters. Each button in the diagram has three
+   options:
+
+   - RET / mouse-1
+ Jump to first occurrence of link
+   - o
+ Cycle occurrences of links in other window
+   - M-RET
+ Open all occurences of links by splitting the current window
+
 ** =org-real-world=

To view all real links in the current buffer in a combined diagram,
@@ -107,3 +115,19 @@ and
 
To view all headlines in an org-mode file as an org-real diagram,
use the interactive function =org-real-headlines=
+
+   [[file:demo/headlines.gif]]
+
+   To modify the relationship between a headline and its parent, add
+   the property REL to the child headline. Valid values are:
+   - on top of
+   - in front of
+   - behind
+   - above
+   - below
+   - to the right of
+   - to the left of
+
+   [[file:demo/headline-relationships.png]]
+
+
diff --git a/demo/headline-relationships.png b/demo/headline-relationships.png
new file mode 100644
index 000..481ad70
Binary files /dev/null and b/demo/headline-relationships.png differ
diff --git a/demo/headlines.gif b/demo/headlines.gif
new file mode 100644
index 000..c127ec1
Binary files /dev/null and b/demo/headlines.gif differ
diff --git a/demo/open-links.gif b/demo/open-links.gif
index 268fd53..7aaccd8 100644
Binary files a/demo/open-links.gif and b/demo/open-links.gif differ
diff --git a/org-real.el b/org-real.el
index 731ce3c..e4463e2 100644
--- a/org-real.el
+++ b/org-real.el
@@ -16,7 +16,17 @@
 ;; current buffer.
 ;;
 ;; The function `org-real-headlines' will display all headlines in the
-;; current org file as an org-real diagram.
+;; current org file as an org-real diagram.  The relationship between
+;; a headline and its parent can be set by using a REL property on the
+;; child headline.  Valid values for REL are:
+;;
+;;   - on top of
+;;   - in front of
+;;   - behind
+;;   - above
+;;   - below
+;;   - to the right of
+;;   - to the left of
 ;;
 ;; When in an Org Real mode diagram, the standard movement keys will
 ;; move by boxes rather than characters.  Each button has the
@@ -223,22 +233,22 @@ describing where BOX is."
 (height (org-real--get-height box))
 (inhibit-read-only t)
 (buffer (get-buffer-create "Org Real")))
-(with-current-buffer buffer
-  (org-real-mode)
-  (erase-buffer)
-  (setq org-real--tab-ring '())
-  (if containers (org-real--pp-text containers))
-  (let ((offset (- (line-number-at-pos)
-   org-real-margin-y
-   (* 2 org-real-padding-y
-(dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
-(org-real--draw box offset)
-(goto-char 0)
-(setq org-real--tab-ring
-  (seq-sort '< org-real--tab-ring
-(display-buffer buffer `(display-buffer-pop-up-window
- (window-width . ,width)
- (window-height . ,height)
+(select-window (display-buffer buffer
+   `(display-buffer-pop-up-window
+ (window-width . ,width)
+ (window-height . ,height
+(org-real-mode)
+(erase-buffer)
+(setq org-real--tab-ring '())
+(if containers (org-real--pp-text containers))
+(let ((offset (- (line-number-at-pos)
+ org-real-margin-y
+ (* 2 org-real-padding-y
+  (dotimes (_ (+ top height)) (insert (concat (make-string width ?\s) 
"\n")))
+  (org-real--draw box offset)
+  (goto-char 0)
+  (setq org-real--tab-ring
+(seq-sort '< org-real--tab-ring)
 
 (defun org-real--pp-text (containers)
   "Insert a textual representation of CONTAINERS into the cu

[elpa] externals/org-real bc2c7ea 068/160: Using infinity

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit bc2c7ead62129e1d02df3bc96b127970f7bd703d
Author: Tyler Grinn 
Commit: Tyler Grinn 

Using infinity
---
 org-real.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/org-real.el b/org-real.el
index ef6f034..b778d48 100644
--- a/org-real.el
+++ b/org-real.el
@@ -657,7 +657,7 @@ If INCLUDE-ON-TOP is non-nil, also include height on top of 
box."
 child
   max
   to-the-left
-  (org-real-box :x-order -)
+  (org-real-box :x-order -1.0e+INF)
 (if directly-left
 (setq stored-left (+ (org-real--get-left directly-left)
  (org-real--get-width directly-left)
@@ -716,11 +716,11 @@ PREV must already exist in PARENT."
 ((string= rel "behind")
  (setq cur-behind t))
 ((string= rel "in front of")
- (setq cur-y )
+ (setq cur-y 1.0e+INF)
  (setq cur-behind prev-behind)
  (setq cur-in-front t))
 ((string= rel "on top of")
- (setq cur-y -)
+ (setq cur-y -1.0e+INF)
  (setq cur-behind prev-behind)
  (setq cur-on-top t))
 ((string= rel "above")
@@ -910,7 +910,7 @@ its relationship to MATCH."
 (setq next-x match-x)
 (setq next-behind match-behind))
((or next-on-top next-in-front)
-(setq next-x (+ 1 (apply 'max -
+(setq next-x (+ 1 (apply 'max 0
  (mapcar
   (lambda (child) (with-slots (x-order) 
child x-order))
   (seq-filter
@@ -961,7 +961,7 @@ characters if possible."
sibling
  max)
all-siblings
-   (org-real-box :y-order -9
+   (org-real-box :y-order -1.0e+INF
   (with-slots
   ((last-sibling-y y-order)
(last-sibling-x x-order))



[elpa] externals/org-real a30638a 097/160: Show all containers while completing

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit a30638aed10797ac73c3dbbd9e45e7621f5901af
Author: Tyler Grinn 
Commit: Tyler Grinn 

Show all containers while completing
---
 org-real.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-real.el b/org-real.el
index 7980f24..698b401 100644
--- a/org-real.el
+++ b/org-real.el
@@ -479,7 +479,7 @@ visibility."
(org-real--complete-thing "Thing: " container-matrix 
'()
 (catch 'confirm
   (while t
-(org-real--pp (org-real--make-instance 'org-real-box containers) 
containers)
+(org-real--pp (org-real--make-instance 'org-real-box containers) 
containers nil nil 0)
 (let ((response (read-event "RETURN- Confirm\nBACKSPACE - Remove 
context\n+ - Add context")))
   (cond
((or (eq response 'return) (eq response 13))



[elpa] externals/org-real ca52aef 110/160: Updated customizations; color scheme

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit ca52aef953e3b5cb496b67ec118091ff88586714
Author: Tyler Grinn 
Commit: Tyler Grinn 

Updated customizations; color scheme
---
 org-real.el | 38 +-
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/org-real.el b/org-real.el
index cc695a0..8018be0 100644
--- a/org-real.el
+++ b/org-real.el
@@ -137,6 +137,16 @@
   :type 'number
   :group 'org-real)
 
+(defcustom org-real-tooltips t
+  "Show tooltips in an org real diagram."
+  :type 'boolean
+  :group 'org-real)
+
+(defcustom org-real-tooltip-timeout 0.5
+  "Idle time before showing tooltip in org real diagram."
+  :type 'number
+  :group 'org-real)
+
  Faces
 
 (defface org-real-default nil
@@ -167,7 +177,7 @@
 
 (face-spec-set
  'org-real-rel
- '((t :foreground "orange"))
+ '((t :foreground "hot pink"))
  'face-defface-spec)
 
 (defface org-real-popup nil
@@ -176,7 +186,7 @@
 
 (face-spec-set
  'org-real-popup
- '((t :background "light slate blue"
+ '((t :background "midnight blue"
   :foreground "white"))
  'face-defface-spec)
 
@@ -1092,15 +1102,17 @@ If INCLUDE-ON-TOP is non-nil, also include height on 
top of box."
   (save-excursion
 (if (eq dir 'entered)
 (progn
-  (setq timer
-(run-with-idle-timer
- 0.3 nil
- (lambda ()
-   (if (slot-boundp box :metadata)
-   (org-real--popup metadata)
- (if (and (slot-boundp box :name) (slot-boundp box 
:rel))
- (with-slots ((rel-name name)) rel-box
-   (org-real--popup (format "The %s is %s the 
%s." name rel rel-name
+  (if org-real-tooltips
+  (setq timer
+(run-with-idle-timer
+ org-real-tooltip-timeout nil
+ (lambda ()
+   (if (slot-boundp box :metadata)
+   (org-real--tooltip metadata)
+ (if (and (slot-boundp box :name) (slot-boundp 
box :rel))
+ (with-slots ((rel-name name)) rel-box
+   (org-real--tooltip (format "The %s is 
%s the %s."
+  name rel 
rel-name)
   (if (slot-boundp box :rel-box)
   (org-real--draw rel-box 'rel))
   (org-real--draw box 'selected))
@@ -1739,9 +1751,9 @@ characters if possible."
 
  Utility expressions
 
-(defun org-real--popup (str)
+(defun org-real--tooltip (str)
   "Show a popup tooltip with STR contents."
-  (popup-tip str
+  (popup-tip (concat "\n" str "\n")
  :parent-offset 1
  :margin org-real-padding-x))
 



[elpa] externals/org-real f74239f 089/160: Show diffs if test failed

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit f74239f07b4baff963615eca01ddce9f3d2973c4
Author: Tyler Grinn 
Commit: Tyler Grinn 

Show diffs if test failed
---
 Eldev | 58 ++
 1 file changed, 38 insertions(+), 20 deletions(-)

diff --git a/Eldev b/Eldev
index 101bcf7..de0ac6c 100644
--- a/Eldev
+++ b/Eldev
@@ -21,31 +21,49 @@
  (require 'org-element)
  (load-file "org-real.el")
  (let ((failures 0))
-   (cl-flet ((get-expected ()
-   (save-excursion
- (re-search-forward "#\\+begin_example")
- (org-element-property :value 
(org-element-at-point
- (get-actual ()
- (with-current-buffer (get-buffer "Org Real")
-   (buffer-string)))
- (print-result (title result)
-   (message "%s : %s"
-(if result
-"\033[0;32mPASS\033[0m"
-  "\033[0;31mFAIL\033[0m")
-title))
- (set-result (result)
- (if (not result) (cl-incf failures))
- (let ((inhibit-message t))
-   (org-todo (if result "PASS" "FAIL")
+   (cl-flet* ((get-expected ()
+(save-excursion
+  (re-search-forward "#\\+begin_example")
+  (org-element-property :value 
(org-element-at-point
+  (get-actual ()
+  (with-current-buffer (get-buffer "Org Real")
+(buffer-string)))
+  (print-result (title result)
+(message "%s : %s"
+ (if result
+ "\033[0;32mPASS\033[0m"
+   "\033[0;31mFAIL\033[0m")
+ title)
+(if (not result)
+(let ((expected (get-expected)))
+  (save-window-excursion
+(with-temp-buffer
+  (insert expected)
+  (diff-buffers (get-buffer "Org Real")
+(current-buffer)
+nil t))
+(with-current-buffer (get-buffer "*Diff*")
+  (message
+   (string-join
+(butlast
+ (butlast
+  (cdddr
+   (split-string
+(buffer-string)
+"\n"
+  "\n")))
+  (set-result (result)
+  (if (not result) (cl-incf failures))
+  (let ((inhibit-message t))
+(org-todo (if result "PASS" "FAIL")
  (mapc
   (lambda (test)
 (with-temp-file test
-  (message "%s:" (file-name-base test))
+  (message "\n%s:\n" (file-name-base test))
   (insert-file-contents test)
   (org-mode)
 
-  (message "  Opening links:")
+  (message "  Opening links:\n")
   (org-element-map (org-element-parse-buffer) 'link
 (lambda (link)
   (goto-char (org-element-property :begin link))
@@ -60,7 +78,7 @@
 (print-result title result)
 (set-result result
 
-  (message "  Merging links:")
+  (message "\n  Merging links:\n")
   (org-babel-map-src-blocks nil
 (goto-char beg-block)
 (let ((title (org-entry-get nil "ITEM"))



[elpa] externals/org-real 7f89820 094/160: Added expansion slots to speed up initial rendering

2021-10-06 Thread ELPA Syncer
branch: externals/org-real
commit 7f89820bdc89ebab45cc43386b40e8f2557d3f75
Author: Tyler Grinn 
Commit: Tyler Grinn 

Added expansion slots to speed up initial rendering
---
 org-real.el | 173 
 1 file changed, 127 insertions(+), 46 deletions(-)

diff --git a/org-real.el b/org-real.el
index 0e99900..9b354a8 100644
--- a/org-real.el
+++ b/org-real.el
@@ -612,6 +612,11 @@ ORIG is `org-insert-link', ARGS are the arguments passed 
to it."
(hidden-children :initarg :hidden-children
 :initform (org-real-box-collection)
 :type org-real-box-collection)
+   (expand-siblings :initarg :expand-siblings
+:type function)
+   (expand-children :initarg :expand-children
+:type function)
+   (extra-data :initarg :extra-data)
(level :initarg :level
   :initform 0
   :type number)
@@ -685,12 +690,23 @@ non-nil, skip setting :primary slot on the last box."
 
 (cl-defmethod org-real--update-visibility ((box org-real-box))
   "Update visibility of BOX and all of its children."
-  (with-slots (level children hidden-children) box
-(let ((hidden (org-real--get-all hidden-children)))
-  (if (or (= 0 org-real--visibility)
-  (<= level org-real--visibility))
-  (if hidden (cl-rotatef children hidden-children))
-(if (not hidden) (cl-rotatef children hidden-children
+  (with-slots (level children hidden-children expand-children) box
+(if (or (= 0 org-real--visibility)
+(<= level org-real--visibility))
+(progn
+  (when (slot-boundp box :expand-children)
+(funcall expand-children box)
+(slot-makeunbound box :expand-children))
+  (if (org-real--get-all hidden-children)
+  (cl-rotatef children hidden-children))
+  (mapc
+   (lambda (child)
+ (with-slots (expand-siblings) child
+   (when (slot-boundp child :expand-siblings)
+ (funcall expand-siblings child)
+ (slot-makeunbound child :expand-siblings
+   (org-real--get-all children)))
+  (if (not (org-real--get-all hidden-children)) (cl-rotatef children 
hidden-children)))
 (mapc 'org-real--update-visibility (append (org-real--get-all children)
(org-real--get-all 
hidden-children)
 
@@ -720,7 +736,8 @@ button drawn."
(left (org-real--get-left box))
(width (org-real--get-width box))
(height (org-real--get-height box))
-   (double (org-real--get-all hidden-children))
+   (double (or (org-real--get-all hidden-children)
+   (slot-boundp box :expand-children)))
(align-bottom (or in-front on-top)))
   (cl-flet* ((draw (coords str &optional primary)
(forward-line (- (car coords) (line-number-at-pos)))
@@ -1184,8 +1201,12 @@ of BOX."
(org-real--next box)))
 
 (cl-defmethod org-real--add-next ((next org-real-box)
-  (prev org-real-box))
-  "Add NEXT to world according to its relationship to PREV."
+  (prev org-real-box)
+  &optional force-visible)
+  "Add NEXT to world according to its relationship to PREV.
+
+If FORCE-VISIBLE, show the box regardless of
+`org-real--visibility'."
   (with-slots
   (children
hidden-children
@@ -1202,6 +1223,7 @@ of BOX."
   (with-slots
   (rel
rel-box
+   extra-data
(next-level level)
(next-y y-order)
(next-x x-order)
@@ -1209,7 +1231,17 @@ of BOX."
(next-in-front in-front)
(next-on-top on-top))
   next
-(let ((next-boxes (org-real--next next)))
+(let* ((next-boxes (org-real--next next))
+   (partitioned (seq-group-by
+ (lambda (next-next)
+   (with-slots (rel) next-next
+ (if (member rel '("in" "on" "behind" "in 
front of" "on top of"))
+ 'children
+   'siblings)))
+ next-boxes))
+   (children-boxes (alist-get 'children partitioned))
+   (sibling-boxes (alist-get 'siblings partitioned)))
+  (setq extra-data partitioned)
   (cond
((member rel '("to the left of" "to the right of"))
 (setq next-level prev-level)
@@ -1265,24 +1297,33 @@ of BOX."
 (setq next-behind prev-behind)))
   (if (not (slot-boundp next :name)) (setq next-level 0))
   (oset next :rel-box prev)
-  (let ((visible (or (= 0 org-real--visibility) (<= next-level 
org-real--visibility
+  (let* ((visible (or force-vis

  1   2   3   >