[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 357a098 06/50: Initial org-tbl support
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 357a098 06/50: Initial org-tbl support |
Date: |
Wed, 17 Mar 2021 18:44:13 -0400 (EDT) |
branch: externals/hyperbole
commit 357a09848a0ceedc6a9554769d3f2f7c38281e0f
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Initial org-tbl support
---
Changes | 21 ++++++++++++++++++---
Makefile | 4 ++--
hibtypes.el | 25 +++++++++++++------------
hpath.el | 35 +++++++++++++++++------------------
kotl/kotl-mode.el | 15 ++++++++++++++-
5 files changed, 64 insertions(+), 36 deletions(-)
diff --git a/Changes b/Changes
index f97cd67..dbb52b9 100644
--- a/Changes
+++ b/Changes
@@ -1,16 +1,31 @@
+2020-10-11 Bob Weiner <rsw@gnu.org>
+
+* Makefile (EL_KOTL, ELC_COMPILE): Added kotl/kotl-orgtbl.{el,elc}.
+ kotl/kotl-orgtbl.el (orgtbl-tab): Added to support Org Table minor-mode use
+ in Koutlines.
+ kotl/kotl-mode.el (hsys-orgtbl): Require this new library.
+ (kotl-mode-map): Bind M- arrow keys to closely match those
+ in Org mode for tree promotion/demotion and moving text lines up and down.
+
+2020-10-10 Bob Weiner <rsw@gnu.org>
+
+* kotl/kotl-mode.el (orgtbl-tab): Updated Org minor-mode table use of {TAB}
key to
+ allow promotion and demotion of koutline trees when given an explicit
prefix
+ argument. Otherwise, tabs through and justifies table fields normally.
+
2020-10-04 Bob Weiner <rsw@gnu.org>
-* kotl/kexport.el (kexport:html-replacement-alist): Correct \\0 with \0 so html
+* kotl/kexport.el (kexport:html-replacement-alist): Corrected \\0 with \0 so
html
export works properly.
-* hibtypes.el (hsys-www): Move to lower priority than pathname implicit buttons
+* hibtypes.el (hsys-www): Moved to lower priority than pathname implicit
buttons
so they can handle file:// links, especially with :line-number suffixes.
Fixes bug#43794.
* hsys-org.el (hsys-org-mode-p): Added org-agenda-mode check.
hib-org.el (org-mode): Changed to apply inhibit-hsys-org to org-agenda-mode
as well.
-* hibtypes.el (hib-debbugs): Raise priority above social and markdown links.
+* hibtypes.el (hib-debbugs): Raised priority above social and markdown links.
(org-link-outside-org-mode): Added to lower priority below
other Hyperbole link types and removed from hsys-org.el.
diff --git a/Makefile b/Makefile
index 5d5d102..b4ea0a8 100644
--- a/Makefile
+++ b/Makefile
@@ -162,7 +162,7 @@ EL_COMPILE = hact.el hactypes.el hargs.el hbdata.el
hbmap.el hbut.el \
hyrolo-demo.el hyrolo-logic.el hyrolo-menu.el hyrolo.el
hywconfig.el set.el
EL_KOTL = kotl/kexport.el kotl/kfile.el kotl/kfill.el kotl/kimport.el
kotl/klabel.el \
- kotl/klink.el kotl/kmenu.el kotl/knode.el kotl/kotl-mode.el \
+ kotl/klink.el kotl/kmenu.el kotl/knode.el kotl/kotl-mode.el
kotl/kotl-orgtbl.el \
kotl/kcell.el kotl/kproperty.el kotl/kprop-em.el \
kotl/kview.el kotl/kvspec.el
@@ -178,7 +178,7 @@ ELC_COMPILE = hactypes.elc hibtypes.elc hib-debbugs.elc
hib-doc-id.elc hib-kbd.
set.elc kprop-em.elc
ELC_KOTL = kotl/kexport.elc kotl/kfile.elc kotl/kfill.elc kotl/kimport.elc
kotl/klabel.elc \
- kotl/klink.elc kotl/kmenu.elc kotl/knode.elc kotl/kotl-mode.elc \
+ kotl/klink.elc kotl/kmenu.elc kotl/knode.elc kotl/kotl-mode.elc
kotl/kotl-orgtbl.elc \
kotl/kcell.elc kotl/kproperty.elc \
kotl/kview.elc kotl/kvspec.elc
diff --git a/hibtypes.el b/hibtypes.el
index 949bb6a..da8b254 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -81,8 +81,9 @@ handle any links they recognize first."
(unless inhibit-hsys-org
(require 'hsys-org)
(let ((start-end (hsys-org-link-at-p)))
- (hsys-org-set-ibut-label start-end)
- (hact 'org-open-at-point-global))))
+ (when start-end
+ (hsys-org-set-ibut-label start-end)
+ (hact 'org-open-at-point-global)))))
;; Org links in Org mode are handled at a higher priority in "hib-org.el"
@@ -960,16 +961,16 @@ removed from pathname when searching for a valid match.
See `hpath:find' function documentation for special file display options."
(let ((path-line-and-col (hpath:delimited-possible-path)))
(when (and (stringp path-line-and-col)
- (string-match hibtypes-path-line-and-col-regexp
path-line-and-col))
- (let ((file (save-match-data (expand-file-name
(hpath:substitute-value (match-string-no-properties 1 path-line-and-col)))))
- (line-num (string-to-number (match-string-no-properties 3
path-line-and-col)))
- (col-num (when (match-end 4)
- (string-to-number
(match-string-no-properties 5 path-line-and-col)))))
- (when (save-match-data (setq file (hpath:is-p file)))
- (ibut:label-set file (match-beginning 1) (match-end 1))
- (if col-num
- (hact 'link-to-file-line-and-column file line-num col-num)
- (hact 'link-to-file-line file line-num)))))))
+ (string-match hibtypes-path-line-and-col-regexp
path-line-and-col))
+ (let ((file (save-match-data (expand-file-name (hpath:substitute-value
(match-string-no-properties 1 path-line-and-col)))))
+ (line-num (string-to-number (match-string-no-properties
3 path-line-and-col)))
+ (col-num (when (match-end 4)
+ (string-to-number
(match-string-no-properties 5 path-line-and-col)))))
+ (when (save-match-data (setq file (hpath:is-p file)))
+ (ibut:label-set file (match-beginning 1) (match-end 1))
+ (if col-num
+ (hact 'link-to-file-line-and-column file line-num
col-num)
+ (hact 'link-to-file-line file line-num)))))))
;;; ========================================================================
;;; Jumps to source of Emacs Lisp byte-compiler error messages.
diff --git a/hpath.el b/hpath.el
index 46ae8a6..8585d04 100644
--- a/hpath.el
+++ b/hpath.el
@@ -1297,8 +1297,8 @@ in-buffer path will not match."
;; orig point and return (start . end).
(setq start (match-beginning 0) end (match-end 0)
found (and (<= start opoint) (>= end opoint)))))
- (if found
- (list start end)))))
+ (when found
+ (list start end)))))
(defun hpath:substitute-value (path)
"Substitute matching value for Emacs Lisp variables and environment
variables in PATH and return PATH."
@@ -1343,22 +1343,21 @@ After any match, the resulting path will contain a
varible reference like ${vari
result var val)
(while (and vars (null new-path))
(setq var (car vars) vars (cdr vars))
- (if (boundp var)
- (progn (setq val (symbol-value var))
- (cond ((stringp val)
- (if (setq result
- (hpath:substitute-var-name var val path))
- (setq new-path result)))
- ((null val))
- ((listp val)
- (while (and val (null new-path))
- (if (setq result
- (hpath:substitute-var-name var (car val)
path))
- (setq new-path result))
- (setq val (cdr val))))
- (t (error "(hpath:substitute-var): `%s' has invalid
value for hpath:variables" var))))))
- (or new-path path)
- )))
+ (when (boundp var)
+ (setq val (symbol-value var))
+ (cond ((stringp val)
+ (if (setq result
+ (hpath:substitute-var-name var val path))
+ (setq new-path result)))
+ ((null val))
+ ((listp val)
+ (while (and val (null new-path))
+ (when (setq result
+ (hpath:substitute-var-name var (car val) path))
+ (setq new-path result))
+ (setq val (cdr val))))
+ (t (error "(hpath:substitute-var): `%s' has invalid value for
hpath:variables" var)))))
+ (or new-path path))))
;;
;; The following function recursively resolves all POSIX links to their
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index f623df5..71d6000 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -18,6 +18,10 @@
(eval-and-compile (mapc #'require '(delsel hsettings hmail kfile kvspec kcell
outline)))
+(eval-after-load "org-table"
+ '(require 'kotl-orgtbl))
+
+
;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
@@ -1867,6 +1871,7 @@ If at tail cell already, do nothing and return nil."
(error "(kotl-mode:up-level): No parent level to which to move")
)))))
+
;;; ------------------------------------------------------------------------
;;; Predicates
;;; ------------------------------------------------------------------------
@@ -3173,7 +3178,15 @@ Leave point at end of line now residing at START."
(define-key kotl-mode-map "\C-cu" 'kotl-mode:up-level)
(define-key kotl-mode-map "\C-c\C-u" 'kotl-mode:up-level)
(define-key kotl-mode-map "\C-c\C-v" 'kvspec:activate)
- (define-key kotl-mode-map "\C-x\C-w" 'kfile:write))
+ (define-key kotl-mode-map "\C-x\C-w" 'kfile:write)
+ (define-key kotl-mode-map [M-up] 'kotl-mode:transpose-lines-up)
+ (define-key kotl-mode-map (kbd "ESC <up>") 'kotl-mode:transpose-lines-up)
+ (define-key kotl-mode-map [M-down] 'kotl-mode:transpose-line-down)
+ (define-key kotl-mode-map (kbd "ESC <down>") 'kotl-mode:line-down)
+ (define-key kotl-mode-map [M-left] 'kotl-mode:promote-tree)
+ (define-key kotl-mode-map (kbd "ESC <left>") 'kotl-mode:promote-tree)
+ (define-key kotl-mode-map [M-right] 'kotl-mode:demote-tree)
+ (define-key kotl-mode-map (kbd "ESC <right>") 'kotl-mode:demote-tree))
;; When delete-selection-mode (pending-delete-mode) is enabled, make
;; these commands delete the region.
- [elpa] externals/hyperbole updated (d65920b -> 4eef4e9), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole c0e48fb 01/50: Use \0 for matched Nth substitution (#37), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 531cf87 02/50: Handle Org links in non-Org mode buffers with a low priority ibtype, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole afbae3a 04/50: Do not save temp buffer, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole c1ac392 05/50: Use emacs lisp for updating the web repo, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 357a098 06/50: Initial org-tbl support,
Stefan Monnier <=
- [elpa] externals/hyperbole 0e8d33e 03/50: Add Makefile.maintenance, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole de9e60f 09/50: Fix bug#43692, failed to do substitute fixed case for path variables, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 66b35cc 07/50: Add kotl/kotl-orgtbl.el, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 8d77205 08/50: 7.1.3a - Add key bindings and finish Kotl Org table mode support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 4ddeaf6 10/50: Remove Makefile.maintenance, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 28a1e0c 18/50: Use xdg-open to dispatch to user preferences for display alist (#40), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 7b92152 11/50: Merge pull request #39 from rswgnu/add-maintenance-makefile-with-web-site-support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 7be77e0 12/50: Update git cache interactively, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole ad16470 13/50: Document Koutline Org table support; allow ibtype reprioritization, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 9f5a787 14/50: Add hypb-maintenance.el, Stefan Monnier, 2021/03/17