Skip to content

Commit

Permalink
7.0.7 test release: many changes, new logo; fixed def macros
Browse files Browse the repository at this point in the history
  • Loading branch information
rswdp committed Oct 3, 2019
1 parent 62a9db3 commit 62f3fd2
Show file tree
Hide file tree
Showing 24 changed files with 203 additions and 113 deletions.
52 changes: 52 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
2019-10-01 Bob Weiner <[email protected]>

* hact.el (htype:delete): Removed improper quote in (fboundp 'sym) call.
(htype:symbol): Reverted to prior version which properly creates
previously undefined Elisp symbols, thereby fixing htype:create.
(actype:create): Made symtable:add call part of compile-time macro value.

2019-09-24 Mats Lidell <[email protected]>

* Makefile (ELC_COMPILE): Added missing kprop-em.elc.

2019-09-23 Bob Weiner <[email protected]>

* hui.el (hui:link-directly): Called symtable:actype-p replacing invalid
htype:actype-p call.

* hmouse-drv.el (hkey-buffer-move): Wrapped (require 'windmove) in eval-and-compile
to remove a byte-compiler warning.

2019-09-22 Bob Weiner <[email protected]>

* hact.el (action:path-args-rel): Added file-name-directory call so always
sends a directory as the second argument, preventing off-by-one level
of relative directory generation.

2019-09-19 Bob Weiner <[email protected]>

* hmouse-drv.el (hkey-help): Added display of ibtype, if any.

* hbut.el (ibtype:def-symbol): Added.

* hact.el (actype:def-symbol): Change mislabeled 'sym-name' to 'name'.

2019-09-18 Bob Weiner <[email protected]>

* kotl/kotl-mode.el (kotl-mode:top-cells): Removed (kvspec:activate)
which was using the unchanged viewspec that improperly set the view.

* hibtypes.el (action): Updated to handle boolean function results.
hactypes.el (display-boolean): Added to display the result of Action ibtypes
boolean function calls.
man/hyperbole.texi (Action Buttons): Added paragraph on boolean
predicate result display.

==============================================================================
V7.0.7 changes ^^^^:
==============================================================================

2019-09-17 Bob Weiner <[email protected]>

* hui.el (hui:action):
Expand Down Expand Up @@ -181,6 +229,10 @@

* DEMO: Changed most 'click' uses in DEMO to 'press'.

==============================================================================
V7.0.6 changes ^^^^:
==============================================================================

* man/hyperbole.texi (Implicit Button Type Summaries): Changed to Implicit
Button Types.
(Implicit Button Type): Changed to Implicit Button
Expand Down
2 changes: 1 addition & 1 deletion HY-ABOUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Designed and Written by Bob Weiner
Maintained by Mats Lidell and Bob Weiner
https://www.gnu.org/software/hyperbole/
Version 7.0.6
Version 7.0.7

Say thanks if you like Hyperbole:
https://saythanks.io/to/rswgnu
Expand Down
22 changes: 12 additions & 10 deletions HY-NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
by Bob Weiner

===========================================================================
* V7.0.6
* V7.0.7
===========================================================================

BUTTONS
Expand All @@ -28,23 +28,25 @@
<glink: global button label to link to> link-to-gbut
<ilink: implicit button label to link to: optional ibut file> link-to-ibut

- Other new implicit button types:
- Other New Implicit Button Types:
debugger-source: Jump to the source of errors from the Python pytype package
ipython-stack-frame: Jump to the source of ipython stack traces and exceptions

- Much Faster Implicit Buttons: Major speedup in implicit button identification
and activation even with the new generalized Action implicit button type
syntax, due to internal optimizations.

- Pathname implicit buttons now flash when activated.
- Pathname Flashing: Pathname implicit buttons now flash when activated.

- Pathname implicit buttons may contain both link anchors and line and column
numbers. Link anchors now work for shell script editing modes as well
using comment lines as anchors. Format is:
"<path>[#<link-anchor>]:<line-num>[:<col-num>]"
- Pathname References: Pathname implicit buttons may contain both link anchors
and line and column numbers. Format is:
"<path>[#<link-anchor>]:<line-num>[:<col-num>]"

- Variables in paths no longer require a trailing directory separator.
Both of these are live Hyperbole paths:
- Shell Script Link Anchors: Link anchors now work for shell script editing modes
as well using comment lines as the anchors, e.g. "myscript.sh#Env Variables".

- Dir Variable Separators: Variables in paths no longer require a trailing directory
separator. Both of these are live Hyperbole paths:
"${hyperb:dir}DEMO#Smart Mouse Keys"
"${hyperb:dir}/DEMO#Smart Mouse Keys"

Expand All @@ -61,7 +63,7 @@
- Implicit Button Types: Split off type descriptions to this new
subsection and added these types: ripgrep-msg, ipython-stack-frame,
ilink (link to implicit button), glink (link to global button), and
ib elink (link to explicit button).
elink (link to explicit button).

- DEMO (Action Buttons): Added description and examples.

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

# This ver setup won't work under any make except GNU make, so set it manually.
#HYPB_VERSION = "`head -3 hversion.el | tail -1 | sed -e 's/.*|\(.*\)|.*/\1/'`"
HYPB_VERSION = 7.0.6
HYPB_VERSION = 7.0.7

# Emacs executable used to byte-compile .el files into .elc's.
# Possibilities include: emacs, infodock, etc.
Expand Down Expand Up @@ -174,7 +174,8 @@ ELC_COMPILE = hactypes.elc hibtypes.elc hib-debbugs.elc hib-doc-id.elc hib-kbd.
hpath.elc hrmail.elc hsettings.elc hsmail.elc hsys-org.elc hsys-www.elc htz.elc \
hycontrol.elc hui-jmenu.elc hui-menu.elc hui-mini.elc hui-mouse.elc hui-select.elc \
hui-treemacs.elc hui-window.elc hui.elc hvar.elc hversion.elc hvm.elc hypb.elc hyperbole.elc \
hyrolo-demo.elc hyrolo-logic.elc hyrolo-menu.elc hyrolo.elc hywconfig.elc set.elc
hyrolo-demo.elc hyrolo-logic.elc hyrolo-menu.elc hyrolo.elc hywconfig.elc \
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 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GNU Hyperbole 7.0.6 - The Everyday Hypertextual Information Manager
# GNU Hyperbole 7.0.7 - The Everyday Hypertextual Information Manager

[Say thanks if you like Hyperbole.(https://saythanks.io/to/rswgnu)]

Expand Down
2 changes: 1 addition & 1 deletion README.md.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1>
<a id="user-content-gnu-hyperbole-706---the-everyday-hypertextual-information-manager" class="anchor" href="#gnu-hyperbole-706---the-everyday-hypertextual-information-manager" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>GNU Hyperbole 7.0.6 - The Everyday Hypertextual Information Manager</h1>
<a id="user-content-gnu-hyperbole-707---the-everyday-hypertextual-information-manager" class="anchor" href="#gnu-hyperbole-707---the-everyday-hypertextual-information-manager" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>GNU Hyperbole 7.0.7 - The Everyday Hypertextual Information Manager</h1>
<p>[Say thanks if you like Hyperbole.(<a href="https://saythanks.io/to/rswgnu" rel="nofollow">https://saythanks.io/to/rswgnu</a>)]</p>

<p><strong>Table of Contents</strong></p>
Expand Down
22 changes: 12 additions & 10 deletions hact.el
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ symbol or if SYMTABLE is invalid."
(setq def-name name
elisp-name (concat (symtable:name symtable) "::" name)
elisp-symbol (funcall intern-op elisp-name)))
;; Comment this out so can look for and try to remove symbols yet not defined.
;; Comment this out so can look for and try to remove symbols not yet defined.
;; (unless elisp-symbol
;; (error "(symtable:operate): Use `%s' to create a new type named `%s' before using `%s' on it"
;; (if (equal (plist-get symtable 'name) "actypes") "defact" "defib")
Expand Down Expand Up @@ -216,7 +216,7 @@ Return the new function symbol derived from TYPE."
"Delete a Hyperbole TYPE derived from TYPE-CATEGORY (both symbols).
Return the Hyperbole symbol for the TYPE if it existed, else nil."
(let* ((sym (htype:symbol type type-category))
(exists (fboundp 'sym)))
(exists (fboundp sym)))
(setplist sym nil)
(symtable:delete type (symtable:select type-category))
(symset:delete type type-category 'symbols)
Expand Down Expand Up @@ -246,8 +246,8 @@ When optional SYM is given, returns the name for that symbol only, if any."
;;; ------------------------------------------------------------------------

(defun htype:symbol (type type-category)
"Return Hyperbole type symbol composed from TYPE and TYPE-CATEGORY (both symbols)."
(symtable:get type (symtable:select type-category)))
"Return possibly new Hyperbole type symbol composed from TYPE and TYPE-CATEGORY (both symbols)."
(intern (concat (symbol-name type-category) "::" (symbol-name type))))

;;; ========================================================================
;;; action class
Expand Down Expand Up @@ -373,9 +373,10 @@ Other paths are simply expanded. Non-path arguments are returned unchanged."
(let ((loc (hattr:get 'hbut:current 'loc)))
(mapcar (lambda (arg)
(hpath:relative-to arg
(if (stringp loc)
loc
(buffer-local-value 'default-directory loc))))
(file-name-directory
(if (stringp loc)
loc
(buffer-local-value 'default-directory loc)))))
args-list)))


Expand Down Expand Up @@ -429,7 +430,7 @@ performing ACTION."
actype
(symbol-name actype))))
(when (string-match "\\`actypes::" name)
(make-symbol (substring sym-name (match-end 0))))))
(make-symbol (substring name (match-end 0))))))

(defun actype:eval (actype &rest args)
"Performs action formed from ACTYPE and rest of ARGS and returns value.
Expand Down Expand Up @@ -485,8 +486,9 @@ The type uses PARAMS to perform DEFAULT-ACTION (list of the rest of the
arguments). A call to this function is syntactically the same as for
`defun', but a doc string is required.
Return symbol created when successful, else nil."
(symtable:add type symtable:actypes)
(list 'htype:create type 'actypes doc params default-action `'(definition-name ,type)))
`(progn
(symtable:add ',type symtable:actypes)
(htype:create ,type actypes ,doc ,params ,default-action '(definition-name ,type))))

(defalias 'defact 'actype:create)
(put 'actype:create 'lisp-indent-function 'defun)
Expand Down
10 changes: 9 additions & 1 deletion hactypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@ inserted, delete the completions window."
(delete-window))
(hargs:completion)))

(defact display-boolean (bool-expr)
"Display a message showing the result value of a BOOL-EXPR.
Return any non-nil value or t."
(let ((result (eval bool-expr)))
(message "Boolean result (%s) = %s" (if result "True" "False") (prin1-to-string result))
(or result t)))

(defact display-variable (var)
"Display a message showing `var` (a symbol) and its value."
"Display a message showing `var` (a symbol) and its value.
Return any non-nil value or t."
(message "%s = %s" var (symbol-value var))
(or (symbol-value var) t))

Expand Down
14 changes: 11 additions & 3 deletions hbut.el
Original file line number Diff line number Diff line change
Expand Up @@ -1490,11 +1490,19 @@ buttons of this type; most useful when TO-P is also given.
Return symbol created when successful, else nil. Nil indicates that action
type for ibtype is presently undefined."
(when type
(symtable:add type symtable:ibtypes)
(let ((to-func (when to-p (action:create nil (list to-p))))
(at-func (list at-p)))
`(htype:create ,type ibtypes ,doc nil ,at-func
(list 'to-p ,to-func 'style ,style)))))
`(progn (symtable:add ',type symtable:ibtypes)
(htype:create ,type ibtypes ,doc nil ,at-func
'(to-p ,to-func style ,style))))))

(defun ibtype:def-symbol (ibtype)
"Return the abbreviated symbol for IBTYPE used in its `defib'; IBTYPE may be a string or symbol."
(let ((name (if (stringp ibtype)
ibtype
(symbol-name ibtype))))
(when (string-match "\\`ibtypes::" name)
(make-symbol (substring name (match-end 0))))))

(defun ibtype:delete (type)
"Delete an implicit button TYPE (a symbol).
Expand Down
6 changes: 3 additions & 3 deletions hib-social.el
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,10 @@ PROJECT value is provided, it defaults to the value of
(setq reference (substring reference (match-end 0)))))))
(if (and (stringp user) (stringp project))
(funcall hibtypes-social-display-function
(setq a (if reference
(if reference
(format url-to-format user project ref-type reference)
;; Remove trailing /
(substring (format url-to-format user project "" "") 0 -1))))
;; Remove trailing /
(substring (format url-to-format user project "" "") 0 -1)))
(cond ((and (null user) (null project))
(error "(gitlab-reference): Set `hibtypes-gitlab-default-user' and `hibtypes-gitlab-default-project'"))
((null user)
Expand Down
17 changes: 11 additions & 6 deletions hibtypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,17 @@ arg1 ... argN '>'. For example, <mail [email protected]>."
(ibut:label-set lbl start-pos end-pos)
(setq action (read (concat "(" lbl ")"))
args (cdr action))
(when (and (null args) (symbolp actype) (boundp actype)
(or var-flag (not (fboundp actype))))
;; Is a variable, display its value as the action
(setq args `(',actype)
action `(display-variable ',actype)
actype 'display-variable))
(cond ((and (symbolp actype) (fboundp actype)
(string-match "-p\\'" (symbol-name actype)))
;; Is a function with a boolean result
(setq action `(display-boolean ',action)
actype 'display-boolean))
((and (null args) (symbolp actype) (boundp actype)
(or var-flag (not (fboundp actype))))
;; Is a variable, display its value as the action
(setq args `(',actype)
action `(display-variable ',actype)
actype 'display-variable)))
;; Necessary so can return a null value, which actype:act cannot.
(let ((hrule:action (if (eq hrule:action #'actype:identity)
hrule:action
Expand Down
7 changes: 5 additions & 2 deletions hmouse-drv.el
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ the given direction."
(_ (error "(hkey-buffer-move): Invalid movement direction, '%s'" direction))))
(hkey-swap-buffers w1 (selected-window)))
;; ... but if not available, use the Emacs builtin windmove package.
(require 'windmove)
(eval-and-compile
(require 'windmove))
(windmove-do-window-select direction arg)))

;;; ************************************************************************
Expand Down Expand Up @@ -841,7 +842,9 @@ Return non-nil iff associated help documentation is found."
calls)

(when (memq cmd-sym '(hui:hbut-act hui:hbut-help))
(princ (format "BUTTON SPECIFICS:\n\n%s\n"
(princ (format "%s BUTTON SPECIFICS:\n\n%s\n"
(ibtype:def-symbol
(hattr:get 'hbut:current 'categ))
(actype:doc 'hbut:current t)))
(hattr:report
(nthcdr 2 (hattr:list 'hbut:current))))
Expand Down
Loading

0 comments on commit 62f3fd2

Please sign in to comment.