branch: externals/org-real commit baf5c9bf755b63033503c326c5722a6d0b13d2af Author: Tyler Grinn <tylergr...@gmail.com> Commit: Tyler Grinn <tylergr...@gmail.com>
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 0000000..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 0000000..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 current buffer." @@ -1160,10 +1170,14 @@ MARKERS is a list of locations of each button in the buffer." "Jump to the first occurrence of a link in the same window. MARKER is the position of the first occurrence of the link." - (lambda () - (interactive) - (switch-to-buffer (marker-buffer marker)) - (goto-char (marker-position marker)))) + (let ((buffer (marker-buffer marker))) + (lambda () + (interactive) + (delete-window) + (if-let ((window (get-buffer-window buffer))) + (select-window window) + (switch-to-buffer buffer)) + (goto-char (marker-position marker))))) (defun org-real--jump-all (markers) "View all occurrences of a link in the same window. diff --git a/projects.org b/projects.org new file mode 100644 index 0000000..63ebb1e --- /dev/null +++ b/projects.org @@ -0,0 +1,11 @@ +* Personal +** Banking +** Healthcare +* Ideas +** Keyboard pants +** Org real +* Work +** Configure emacs +** Install adobe illustrator + +