[elpa] externals/csv-mode 28073e5d7a: * csv-mode.el: Bump version number

2021-12-27 Thread Simen Heggestøyl
branch: externals/csv-mode
commit 28073e5d7aa073f2aea140dda2a0714056dfa1ca
Author: Simen Heggestøyl 
Commit: Simen Heggestøyl 

* csv-mode.el: Bump version number
---
 csv-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/csv-mode.el b/csv-mode.el
index 0e7b19d197..24ed55b7fb 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: "Francis J. Wright" 
 ;; Maintainer: emacs-de...@gnu.org
-;; Version: 1.17
+;; Version: 1.18
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: convenience
 



[elpa] externals/hyperbole updated (74431604b5 -> 4e1f1b03e9)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch externals/hyperbole.

  from  74431604b5 Add target for elpa-devel install tests (#136)
   new  147852f5de hactypes.el (link-to-texinfo-node): Sub for var name in 
filename
   new  40cbd4bbaf Merge branch 'master' of hyperbole (hanging parens 
removal)
   new  e741a93aa0 hyrolo.el (hyrolo-map-level): Fix {C-h h r o} order cmd 
/ sorting.
   new  5e7d92a5e6 Fix a few minor issues pointed out by Elisp linter
   new  eaa2ac0b13 Fix many outstanding issues for V8 release
   new  7d58968353 Merge 'master' (Mats updates) of hyperbole
   new  4e1f1b03e9 Fix tests that failed on Emacs 27.1.


Summary of changes:
 ChangeLog |  49 +
 DEMO  |  15 +--
 hactypes.el   |   4 +-
 hargs.el  |  10 +-
 hib-doc-id.el |   2 +-
 hmail.el  |  28 +++--
 hmouse-info.el|  11 +-
 hmouse-tag.el |  11 +-
 hpath.el  |  69 ++---
 hui-jmenu.el  |  46 -
 hui-mini.el   |   3 +-
 hui-mouse.el  |   2 +-
 hui-window.el |   2 +-
 hui.el|   1 +
 hycontrol.el  |   2 +
 hyperbole.el  |   9 +-
 hyrolo.el |  98 ++
 kotl/kotl-mode.el | 164 -
 man/hyperbole.html| 255 +++---
 man/hyperbole.info| Bin 554577 -> 554080 bytes
 man/hyperbole.pdf | Bin 1309176 -> 1310127 bytes
 man/hyperbole.texi| 209 ++---
 man/version.texi  |   4 +-
 test/hpath-tests.el   |  38 ---
 test/hsys-org-tests.el|   4 +-
 test/hui-tests.el |   2 +-
 test/kotl-orgtbl-tests.el |   6 +-
 27 files changed, 591 insertions(+), 453 deletions(-)



[elpa] externals/hyperbole e741a93aa0 3/7: hyrolo.el (hyrolo-map-level): Fix {C-h h r o} order cmd / sorting.

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit e741a93aa0e985805563b1d6bba252640edf0b32
Author: Bob Weiner 
Commit: Bob Weiner 

hyrolo.el (hyrolo-map-level): Fix {C-h h r o} order cmd / sorting.
---
 ChangeLog |  7 +
 hyrolo.el | 98 ++-
 2 files changed, 60 insertions(+), 45 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8d0bf9bf69..c1e75f21b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-12-19  Bob Weiner  
+
+* hyrolo.el (hyrolo-map-level): Fix {C-h h r o} order cmd / sorting just hangs.
+Rewrote to fix sorting and simplify debugging.
+Change 'file-exists-p' to 'file-readable-p' so ensure rolo file is readable
+before processing it.
+
 2021-12-12  Bob Weiner  
 
 * hactypes.el (link-to-texinfo-node): Substitute for variable names in file 
linked to.
diff --git a/hyrolo.el b/hyrolo.el
index 66d4fa2bd8..d82e79cf90 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -732,8 +732,10 @@ If ARG is zero, move to the beginning of the current line."
 ;; Derived from `sort-lines' in "sort.el" since through at least Emacs 25.0
 ;; invisible lines are not grouped with the prior visible line, making
 ;; rolo entry (or any record) sorts fail.  This next function fixes that.
+;; Only the last line changes from the original `sort-lines' function.
 (defun hyrolo-sort-lines (reverse beg end)
-  "Sort lines in region alphabetically; argument means descending order.
+  "Sort lines in region alphabetically; REVERSE non-nil means descending order.
+Interactively, REVERSE is the prefix argument, and BEG and END are the region.
 Called from a program, there are three arguments:
 REVERSE (non-nil means reverse order), BEG and END (region to sort).
 The variable `sort-fold-case' determines whether alphabetic case affects
@@ -1162,7 +1164,7 @@ Return number of groupings matched."
   (let ((actual-buf))
 (if (not (and (or (null max-groupings) (< 0 max-groupings))
  (or (setq actual-buf (hyrolo-buffer-exists-p 
hyrolo-file-or-buf))
- (when (file-exists-p hyrolo-file-or-buf)
+ (when (file-readable-p hyrolo-file-or-buf)
(setq actual-buf (find-file-noselect hyrolo-file-or-buf 
t))
t
0
@@ -1176,55 +1178,61 @@ Return number of groupings matched."
;; Pass buffer header if it exists
(if (re-search-forward hyrolo-hdr-regexp nil t 2)
(forward-line))
+   ;; With 'max-groupings' non-nil, loop over all following headers
+   ;; with the same parent matching 'level-regexp'.  Otherwise, maximally
+   ;; loop over 'max-groupings' such headers.
(while (and (or (null max-groupings) (< num-found max-groupings))
(re-search-forward exact-level-regexp nil t))
- (setq num-found (1+ num-found))
- (let* ((opoint (prog1 (point) (beginning-of-line)))
-(grouping-start (point))
-(start grouping-start)
-(level-len (or level-len (- (1- opoint) start)))
-(next-level-len)
-(next-entry-exists)
-(grouping-end)
-(no-subtree))
-   (while (and (progn
- (if (setq next-entry-exists
-   (re-search-forward
-hyrolo-entry-regexp nil t 2))
- (setq next-level-len
-   (- (point)
-  (progn (beginning-of-line)
- (point)))
-   grouping-end
-   (< next-level-len level-len)
-   no-subtree
-   (<= next-level-len level-len))
-   (setq grouping-end t no-subtree t)
-   (goto-char (point-max)))
- (let ((end (point)))
-   (goto-char start)
-   (outline-hide-subtree) ; and hide multiple entry 
lines
-   ;; Move to start of next entry at equal
-   ;; or higher level.
-   (setq start
- (if no-subtree
- end
-   (if (re-search-forward
-hyrolo-entry-regexp nil t)
-   (progn (beginning-of-line) (point))
- (point-max
-   ;; Remember last expression in `progn'
-   ;; must always return non-nil.
-   (goto-char start)))
-   (not grouping-end)))
-   (let ((end (point)))
- (goto-char grouping-start)
- (funcall func grouping-start

[elpa] externals/hyperbole 147852f5de 1/7: hactypes.el (link-to-texinfo-node): Sub for var name in filename

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit 147852f5dead95e0c5e46708252fbdba2a56fb05
Author: Bob Weiner 
Commit: Bob Weiner 

hactypes.el (link-to-texinfo-node): Sub for var name in filename

hui.el (hui:link-possible-types): Require 'texnfo-upd when needed to ensure
  texinfo-copy-node-name is defined before used since it is not autoloaded.

kotl/kotl-mode.el (kotl-mode:insert-region, kotl-mode:insert-tree): Add 
these new commands
  so can insert Koutline parts directly into other buffers without having 
to copy from
  the mail buffer via 'kotl-mode:mail-tree'.

hargs.el (hargs:at-p): Fix so when reading a buffer arg, if tag at point 
does not match
  an existing buffer name, then use the buffer name at point.
 (hargs:read-buffer-name): Add for use by kotl-mode.
---
 ChangeLog | 13 
 hactypes.el   |  2 +-
 hargs.el  | 10 +-
 hmail.el  | 28 +---
 hui-window.el |  2 +-
 hui.el|  1 +
 kotl/kotl-mode.el | 99 ++-
 7 files changed, 118 insertions(+), 37 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ce7469b1c4..8d0bf9bf69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2021-12-12  Bob Weiner  
 
+* hactypes.el (link-to-texinfo-node): Substitute for variable names in file 
linked to.
+
+* hui.el (hui:link-possible-types): Require 'texnfo-upd when needed to ensure
+texinfo-copy-node-name is defined before used since it is not autoloaded.
+
+* kotl/kotl-mode.el (kotl-mode:insert-region, kotl-mode:insert-tree): Add 
these new commands
+so can insert Koutline parts directly into other buffers without having to 
copy from
+the mail buffer via 'kotl-mode:mail-tree'.
+
+* hargs.el (hargs:at-p): Fix so when reading a buffer arg, if tag at point 
does not match
+an existing buffer name, then use the buffer name at point.
+   (hargs:read-buffer-name): Add for use by kotl-mode.
+
 * hyperbole.el (hkey-initialize): Add missing C-c prefix binding for 
hyperbole-mode-map.
 
 2021-12-11  Mats Lidell  
diff --git a/hactypes.el b/hactypes.el
index 33fe8cc57c..99eec0a5e6 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -615,7 +615,7 @@ FILE may be a string or nil, in which case the current 
buffer is used."
   (interactive "fTexinfo file to link to: \nsNode within file to link to: ")
   (let (node-point)
 (if file
-(set-buffer (find-file-noselect file))
+(set-buffer (find-find-noselect (hpath:substitute-value file)))
   (setq file buffer-file-name))
 (save-excursion
   (goto-char (point-min))
diff --git a/hargs.el b/hargs.el
index 3080eb3c86..d619b5766d 100644
--- a/hargs.el
+++ b/hargs.el
@@ -397,7 +397,10 @@ Handles all of the interactive argument types that 
`hargs:iform-read' does."
 (let ((sym (hargs:find-tag-default)))
   (when (or (fboundp sym) (boundp sym)) sym)))
((eq hargs:reading-p 'buffer)
-(hargs:find-tag-default))
+(let ((tag (hargs:find-tag-default)))
+  (if (member tag (mapcar #'buffer-name (buffer-list)))
+  tag
+(buffer-name
((eq hargs:reading-p 'character)
 (following-char))
((eq hargs:reading-p 'key)
@@ -595,6 +598,11 @@ string read or nil."
   (select-window owind)
   (switch-to-buffer obuf
 
+(defun hargs:read-buffer-name (prompt)
+  "Use PROMPT to read an existing buffer name and return it."
+  (hargs:read-match prompt (mapcar #'buffer-name (buffer-list)) nil t nil 
'buffer))
+
+
 (defun hargs:read-match (prompt collection
 &optional predicate must-match initial-input val-type)
   "PROMPT with completion for a value in COLLECTION and return it.
diff --git a/hmail.el b/hmail.el
index 94027e38ec..8c13e16be9 100644
--- a/hmail.el
+++ b/hmail.el
@@ -117,8 +117,8 @@ Optional SUBJECT and HELP message may also be given."
 (setq subject "Be explicit here.  Make a statement or ask a question."))
   (hmail:invoke address nil subject)
   (eval expr)
-  (if (re-search-backward "^Subject: " nil t)
-  (goto-char (match-end 0)))
+  (when (re-search-backward "^Subject: " nil t)
+(goto-char (match-end 0)))
   (message (if (stringp help)
   help
 "Replace subject, compose message, and then mail.")))
@@ -157,9 +157,12 @@ Optional SUBJECT and HELP message may also be given."
 Optional arguments are ADDRESS, CC list and SUBJECT of mail."
   ;; Next 3 lines prevent blank lines between fields due to
   ;; fill-region-as-paragraph within mail-setup.
-  (if (equal address "") (setq address nil))
-  (if (equal cc "") (setq cc nil))
-  (if (equal subject "") (setq subject nil))
+  (when (equal address "")
+(setq address nil))
+  (when (equal cc "")
+(setq cc nil))
+  (when (equal subject "")
+(setq subject nil))
   (compose-mail address subject (if cc (list (cons "CC" cc)
 
 
@@ -182,7 +185,8 @@ Optional arguments a

[elpa] externals/hyperbole 40cbd4bbaf 2/7: Merge branch 'master' of hyperbole (hanging parens removal)

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit 40cbd4bbaf058f97866d882716117dfe56282ce7
Merge: 147852f5de a561a4ace1
Author: Bob Weiner 
Commit: Bob Weiner 

Merge branch 'master' of hyperbole (hanging parens removal)
---
 hargs.el| 12 
 hbut.el |  9 +++--
 hgnus.el|  3 +--
 hib-doc-id.el   |  3 +--
 hib-social.el   |  6 ++
 hinit.el|  3 +--
 hmail.el|  3 +--
 hmh.el  |  6 ++
 hmouse-drv.el   |  3 +--
 hmouse-sh.el| 27 +--
 hpath.el| 12 
 hrmail.el   |  3 +--
 htz.el  |  3 +--
 hui-jmenu.el|  3 +--
 hui-menu.el | 39 +--
 hui-mini.el | 48 
 hui-mouse.el| 18 ++
 hui-select.el   |  9 +++--
 hui.el  | 12 
 hversion.el |  3 +--
 hvm.el  |  9 +++--
 hypb-maintenance.el |  3 +--
 hyrolo-menu.el  | 18 ++
 hyrolo.el   |  6 ++
 kotl/kexport.el |  3 +--
 kotl/kfile.el   |  6 ++
 kotl/kfill.el   |  3 +--
 kotl/kmenu.el   | 25 -
 kotl/kotl-mode.el   | 12 
 kotl/kvspec.el  |  4 +---
 30 files changed, 104 insertions(+), 210 deletions(-)

diff --git a/hargs.el b/hargs.el
index d619b5766d..a0fb7792ff 100644
--- a/hargs.el
+++ b/hargs.el
@@ -346,8 +346,7 @@ Handles all of the interactive argument types that 
`hargs:iform-read' does."
   ;; Possibly non-existent file name
   ((when no-default (hpath:at-p 'file 'non-exist)))
   (no-default nil)
-  ((buffer-file-name))
-  ))
+  ((buffer-file-name
((eq hargs:reading-p 'directory)
 (cond ((derived-mode-p 'dired-mode)
(let ((dir (dired-get-filename nil t)))
@@ -360,12 +359,10 @@ Handles all of the interactive argument types that 
`hargs:iform-read' does."
   ;; Possibly non-existent directory name
   ((when no-default (hpath:at-p 'directory 'non-exist)))
   (no-default nil)
-  (default-directory)
-  ))
+  (default-directory)))
((eq hargs:reading-p 'string)
 (or (hargs:delimited "\"" "\"") (hargs:delimited "'" "'")
-(hargs:delimited "`" "'")
-))
+(hargs:delimited "`" "'")))
((or (eq hargs:reading-p 'actype)
 (eq hargs:reading-p 'actypes))
 (let ((name (hargs:find-tag-default)))
@@ -771,8 +768,7 @@ help when appropriate."
  ;; Get Lisp expression but don't evaluate.
  (?x . (sexpression . (read-minibuffer prompt default)))
  ;; Get Lisp expression and evaluate.
- (?X . (sexpression . (eval-minibuffer prompt default)))
- ))
+ (?X . (sexpression . (eval-minibuffer prompt default)
 
 (defvar hargs:iform-vector nil
   "Vector of forms for each interactive command character code.")
diff --git a/hbut.el b/hbut.el
index 835705fcf4..1f03b8a37c 100644
--- a/hbut.el
+++ b/hbut.el
@@ -812,8 +812,7 @@ Suitable for use as part of `write-file-functions'."
 ;; never holding a buffer which is out of sync with file,
 ;; due to some other user's edits.
 ;; Maybe this should be user or site configurable.
-(or (buffer-modified-p buf) (kill-buffer buf))
-)
+(or (buffer-modified-p buf) (kill-buffer buf)))
   ;; Must return nil, so can be used as part of write-file-functions.
   nil)
 
@@ -934,8 +933,7 @@ Ignore email-related buffers."
(goto-char (+ (point) (- end start)))
(if (not (eq (following-char) ?\ ))
(insert ?\ ))
-   (insert comment-end)
-   )
+   (insert comment-end))
 
 ;;; Regexps derived in part from "filladapt.el" by Kyle E. Jones under
 ;;; the GPL.
@@ -961,8 +959,7 @@ Ignore email-related buffers."
 ;; Fortran comments
 "\n[Cc][ \t]+"
 ;; Postscript comments
-"\n[ \t]*\\(%+[ \t]*\\)+"
-)
+"\n[ \t]*\\(%+[ \t]*\\)+")
   "List of regexps of fill prefixes to remove from the middle of buttons.")
 
 (defunhbut:fill-prefix-remove (label)
diff --git a/hgnus.el b/hgnus.el
index fd0e4ad71b..48efdd26c9 100644
--- a/hgnus.el
+++ b/hgnus.el
@@ -93,8 +93,7 @@ as ARG means don't indent and don't delete any header fields."
   (interactive "P")
   (mail-yank-original arg)
   (exchange-point-and-mark)
-  (run-hooks 'news-reply-header-hook))
-  )
+  (run-hooks 'news-reply-header-hook)))
 
 ;;; 
 ;;; Private variables
diff --git a/hib-doc-id.el b/hib-doc-id.el
index 68f799bf96..fa478cfc13 100644
--- a/hib-doc-id.el
+++ b/hib-doc-id.el
@@ -196,8 +196,7 @@ Also disp

[elpa] externals/hyperbole eaa2ac0b13 5/7: Fix many outstanding issues for V8 release

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit eaa2ac0b13d8d97bf2712ed5056ab7f9685ff078
Author: Bob Weiner 
Commit: Bob Weiner 

Fix many outstanding issues for V8 release

* kotl/kotl-mode.el (kotl-mode:exchange-cells): Signal error if invalid 
type or value
is given for a cell ref.  Also, fix setting of idstamps when label type 
is idstamp.

* hmouse-tag.el (smart-lisp-find-tag): With 'show-doc' arg, if 'tag' is 
unbound, return
nil and ignore this as a tag instead of triggering an error.

* hpath.el (hpath:substitute-value): Fix to properly return unchanged 
'path' when it
contains a PATH-type colon-separated list of directories but no 
matching path is
found.  Previously the 'substitute-in-file-name' call would improperly 
expand the
variable.

* DEMO (Defining New Action Button Types):
  man/hyperbole.texi: (Action Button Link Types):
Fix to refer to PYTHONLIBPATH instead of PYTHONPATH.

* man/hyperbole.texi: (Smart Keys): Add description of how to activate 
Hyperbole
with {C-h h} or change this binding.

* man/hyperbole.texi: (Smart Key Bindings):
Remove discussion of hyperbole-toggle-bindings.  Toggle hyperbole-mode 
instead.

* hmouse-info.el (Info-read-index-item-name): Remove local binding of
Info-complete-menu-buffer to fix completion when linking to Info index 
items.

* hui-jmenu.el (hui-menu-sort-buffer): Replace 'with-current-buffer' with 
'with-temp-buffer'.
   (hui-menu-buffer-mode-name): Fix to replace spaces in 
mode-names with dashes.
---
 ChangeLog  |  29 ++
 DEMO   |  15 ++--
 hmouse-info.el |  11 +--
 hmouse-tag.el  |  11 ++-
 hpath.el   |  66 +++---
 hui-jmenu.el   |  46 +-
 hui-mini.el|   3 +-
 hui-mouse.el   |   2 +-
 hyperbole.el   |   9 +-
 kotl/kotl-mode.el  |  65 +-
 man/hyperbole.html | 255 ++---
 man/hyperbole.info | Bin 554577 -> 554080 bytes
 man/hyperbole.pdf  | Bin 1309176 -> 1310127 bytes
 man/hyperbole.texi | 209 ---
 man/version.texi   |   4 +-
 15 files changed, 382 insertions(+), 343 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c1e75f21b0..6035f2216f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2021-12-26  Bob Weiner  
+
+* kotl/kotl-mode.el (kotl-mode:exchange-cells): Signal error if invalid type 
or value
+is given for a cell ref.  Also, fix setting of idstamps when label type is 
idstamp.
+
+* hmouse-tag.el (smart-lisp-find-tag): With 'show-doc' arg, if 'tag' is 
unbound, return
+nil and ignore this as a tag instead of triggering an error.
+
+* hpath.el (hpath:substitute-value): Fix to properly return unchanged 'path' 
when it
+contains a PATH-type colon-separated list of directories but no matching 
path is
+found.  Previously the 'substitute-in-file-name' call would improperly 
expand the
+variable.
+
+* DEMO (Defining New Action Button Types):
+  man/hyperbole.texi: (Action Button Link Types):
+Fix to refer to PYTHONLIBPATH instead of PYTHONPATH.
+
+* man/hyperbole.texi: (Smart Keys): Add description of how to activate 
Hyperbole
+with {C-h h} or change this binding.
+
+* man/hyperbole.texi: (Smart Key Bindings):
+Remove discussion of hyperbole-toggle-bindings.  Toggle hyperbole-mode 
instead.
+
+* hmouse-info.el (Info-read-index-item-name): Remove local binding of
+Info-complete-menu-buffer to fix completion when linking to Info index 
items.
+
+* hui-jmenu.el (hui-menu-sort-buffer): Replace 'with-current-buffer' with 
'with-temp-buffer'.
+   (hui-menu-buffer-mode-name): Fix to replace spaces in 
mode-names with dashes.
+
 2021-12-19  Bob Weiner  
 
 * hyrolo.el (hyrolo-map-level): Fix {C-h h r o} order cmd / sorting just hangs.
diff --git a/DEMO b/DEMO
index ba754ab02a..7cc94c4e6b 100644
--- a/DEMO
+++ b/DEMO
@@ -813,11 +813,10 @@ button.
 
 *** Defining New Action Button Types
 
-You can do a huge number of things with existing Action Button types
-but sometimes you may want to define your own types for more advanced
-usage.  Hyperbole let's you easily create your own Action Button link
-types without knowing Elisp, if you understand basic pattern
-replacement.
+You can do many things with existing Action Button types but sometimes you
+may want to define your own types for more advanced usage.  Hyperbole lets
+you easily create your own Action Button link types without knowing Elisp, if
+you understand basic regular expression-based pattern replacement.
 
 In your Emacs initialization file, e.g. ~/.emacs, you will add a line of
 the form:
@@ -827,11 +826,13 @@ the form:
 where:
 
 TYPE is the name of the new type you want to create;
+
 LINK-EXPR is a regular expression containing a %s
   replacement string into which Hyperbole will substitute
   the butt

[elpa] externals/hyperbole 4e1f1b03e9 7/7: Fix tests that failed on Emacs 27.1.

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit 4e1f1b03e98942511ecb233ba1e9025304c7deb7
Author: Robert Weiner 
Commit: Robert Weiner 

Fix tests that failed on Emacs 27.1.
---
 hpath.el  |  3 ++-
 test/hpath-tests.el   | 38 ++
 test/hsys-org-tests.el|  4 +++-
 test/hui-tests.el |  2 +-
 test/kotl-orgtbl-tests.el |  6 +++---
 5 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/hpath.el b/hpath.el
index 90440fcd04..f6b122052f 100644
--- a/hpath.el
+++ b/hpath.el
@@ -1561,7 +1561,8 @@ in-buffer path will not match."
(list start end)
 
 (defun hpath:substitute-value (path)
-  "Substitute matching value for Emacs Lisp variables and environment 
variables in PATH and return PATH."
+  "Substitute matching value for Emacs Lisp variables and environment 
variables in PATH and return PATH.
+Format of variables must be \"${variable-name}\"."
(let ((new-path (hpath:substitute-match-value
"\\$@?\{\\([^\}]+\\)@?\}"
path
diff --git a/test/hpath-tests.el b/test/hpath-tests.el
index 24defb1fc3..80532180d6 100644
--- a/test/hpath-tests.el
+++ b/test/hpath-tests.el
@@ -80,33 +80,31 @@
   (hpath:find "-tutorial.el")
   (should was-called
 
-(ert-deftest hpath:subsitute-value-test ()
+(ert-deftest hpath:substitute-value-test ()
   "Environment and Lisp variables shall be substituted in a path."
-  (progn ()
- (setq hypb:lc-var "lower")
- (setq hypb:uc-var "UPPER")
- (setenv "HYPB_TEST_ENV" "env")
+  (progn
+(setq hypb:lc-var "lower")
+(setq hypb:uc-var "UPPER")
+(setenv "HYPB_TEST_ENV" "env")
 
- (should (string= (hpath:substitute-value "/nothing/to/substitute") 
"/nothing/to/substitute"))
+(should (string= (hpath:substitute-value "/nothing/to/substitute") 
"/nothing/to/substitute"))
 
- (should (string= (hpath:substitute-value "${hypb:lc-var}") 
hypb:lc-var))
- (should (string= (hpath:substitute-value "${hypb:uc-var}") 
hypb:uc-var))
- (should (string= (hpath:substitute-value "$HYPB_TEST_ENV") (getenv 
"HYPB_TEST_ENV")))
- (should (string= (hpath:substitute-value "${HYPB_TEST_ENV}") (getenv 
"HYPB_TEST_ENV")))
+(should (string= (hpath:substitute-value "${hypb:lc-var}") hypb:lc-var))
+(should (string= (hpath:substitute-value "${hypb:uc-var}") hypb:uc-var))
+(should (string= (hpath:substitute-value "${HYPB_TEST_ENV}") (getenv 
"HYPB_TEST_ENV")))
 
- (should (string= (hpath:substitute-value 
"prefix${hypb:lc-var}suffix") (concat "prefix" hypb:lc-var "suffix")))
- (should (string= (hpath:substitute-value 
"prefix/$HYPB_TEST_ENV/suffix") (concat "prefix/" (getenv "HYPB_TEST_ENV") 
"/suffix")))
- (should (string= (hpath:substitute-value 
"prefix${HYPB_TEST_ENV}suffix") (concat "prefix" (getenv "HYPB_TEST_ENV") 
"suffix")))
+(should (string= (hpath:substitute-value "prefix${hypb:lc-var}suffix") 
(concat "prefix" hypb:lc-var "suffix")))
+(should (string= (hpath:substitute-value "prefix/${HYPB_TEST_ENV}/suffix") 
(concat "prefix/" (getenv "HYPB_TEST_ENV") "/suffix")))
+(should (string= (hpath:substitute-value "prefix${HYPB_TEST_ENV}suffix") 
(concat "prefix" (getenv "HYPB_TEST_ENV") "suffix")))
 
- (should (string= (hpath:substitute-value 
"${hypb:lc-var}${hypb:uc-var}") (concat hypb:lc-var hypb:uc-var)))
- (should (string= (hpath:substitute-value 
"$HYPB_TEST_ENV/$HYPB_TEST_ENV") (concat (getenv "HYPB_TEST_ENV") "/" (getenv 
"HYPB_TEST_ENV"
- (should (string= (hpath:substitute-value 
"${HYPB_TEST_ENV}${HYPB_TEST_ENV}") (concat (getenv "HYPB_TEST_ENV") (getenv 
"HYPB_TEST_ENV"
+(should (string= (hpath:substitute-value "${hypb:lc-var}${hypb:uc-var}") 
(concat hypb:lc-var hypb:uc-var)))
+(should (string= (hpath:substitute-value 
"${HYPB_TEST_ENV}/${HYPB_TEST_ENV}") (concat (getenv "HYPB_TEST_ENV") "/" 
(getenv "HYPB_TEST_ENV"
+(should (string= (hpath:substitute-value 
"${HYPB_TEST_ENV}${HYPB_TEST_ENV}") (concat (getenv "HYPB_TEST_ENV") (getenv 
"HYPB_TEST_ENV"
 
- (should (string= (hpath:substitute-value 
"prefix${hypb:lc-var}/$HYPB_TEST_ENV/suffix") (concat "prefix" hypb:lc-var "/" 
(getenv "HYPB_TEST_ENV") "/suffix")))
+(should (string= (hpath:substitute-value 
"prefix${hypb:lc-var}/${HYPB_TEST_ENV}/suffix") (concat "prefix" hypb:lc-var 
"/" (getenv "HYPB_TEST_ENV") "/suffix")))
 
- (should (string= (hpath:substitute-value 
"$UNDEFINED_IS_NOT_SUBSTITUTED") "$UNDEFINED_IS_NOT_SUBSTITUTED"))
- (should (string= (hpath:substitute-value 
"${UNDEFINED_IS_NOT_SUBSTITUTED}") "${UNDEFINED_IS_NOT_SUBSTITUTED}"))
- ))
+(should (string= (hpath:substitute-value "$UNDEFINED_IS_NOT_SUBSTITUTED") 
"$UNDEFINED_IS_NOT_SUBSTITUTED"))
+(should (string= (hpath:substitute-value 
"${UNDEFINED_IS_NOT_SUBSTITUTED}") "${UNDEFINED_IS_NOT_SUBSTITUTED}"
 
 (defun hypb-run-shell-test-command (command b

[elpa] externals/hyperbole 7d58968353 6/7: Merge 'master' (Mats updates) of hyperbole

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit 7d589683537dc06d1ca25f78ae605592952c11dc
Merge: eaa2ac0b13 74431604b5
Author: Robert Weiner 
Commit: Robert Weiner 

Merge 'master' (Mats updates) of hyperbole
---
 ChangeLog  |  6 ++
 Makefile   |  4 ++--
 install-test/elpa-devel/.emacs | 12 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6035f2216f..290a560301 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,12 @@
 Change 'file-exists-p' to 'file-readable-p' so ensure rolo file is readable
 before processing it.
 
+2021-12-18  Mats Lidell  
+
+* install-test/elpa-devel/.emacs: Init file for install tests.
+
+* Makefile: install-elpa-devel target.
+
 2021-12-12  Bob Weiner  
 
 * hactypes.el (link-to-texinfo-node): Substitute for variable names in file 
linked to.
diff --git a/Makefile b/Makefile
index 3aed9b0d0a..141258df79 100644
--- a/Makefile
+++ b/Makefile
@@ -423,9 +423,9 @@ endif
 
 # Hyperbole install tests - Verify that hyperbole can be installed
 # using different sources. See folder "install-test"
-.PHONY: install-elpa install-tarball install-straight install-all
+.PHONY: install-elpa install-elpa-devel install-tarball install-straight 
install-all
 install-all: install-elpa install-tarball install-straight
 
-install-elpa install-tarball install-straight:
+install-elpa install-elpa-devel install-tarball install-straight:
@echo "Install Hyperbole using $@"
(cd ./install-test/ && ./local-install-test.sh $(subst install-,,$@))
diff --git a/install-test/elpa-devel/.emacs b/install-test/elpa-devel/.emacs
new file mode 100644
index 00..8e71979f96
--- /dev/null
+++ b/install-test/elpa-devel/.emacs
@@ -0,0 +1,12 @@
+;; .emacs
+
+(require 'package)
+(when (< emacs-major-version 27)
+  (package-initialize))
+(add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/";))
+(unless (package-installed-p 'hyperbole)
+  (package-refresh-contents)
+  (package-install 'hyperbole))
+(hyperbole-mode 1)
+
+(message "%s" "Hyperbole successfully installed")



[elpa] externals/hyperbole 5e7d92a5e6 4/7: Fix a few minor issues pointed out by Elisp linter

2021-12-27 Thread ELPA Syncer
branch: externals/hyperbole
commit 5e7d92a5e605e231aa27fe4f8b7b42443a546fdb
Author: Bob Weiner 
Commit: Bob Weiner 

Fix a few minor issues pointed out by Elisp linter
---
 hactypes.el   | 2 +-
 hib-doc-id.el | 2 +-
 hycontrol.el  | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hactypes.el b/hactypes.el
index 99eec0a5e6..18a288eb9d 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -327,7 +327,7 @@ Interactively, KEY-FILE defaults to the current buffer's 
file name."
 (defact link-to-file (path &optional point)
   "Display a file given by PATH scrolled to optional POINT.
 If POINT is given, display the buffer with POINT at the top of
-the window."
+the window or as close as possible."
   (interactive
(let ((prev-reading-p hargs:reading-p)
 (existing-buf t)
diff --git a/hib-doc-id.el b/hib-doc-id.el
index fa478cfc13..a79c6f2d2e 100644
--- a/hib-doc-id.el
+++ b/hib-doc-id.el
@@ -53,7 +53,7 @@
 ;;  
 ;;  Author:   
 ;;  Copyright:
-;;  Keywords: 
+;;  Keywords: hypertext
 ;;  
 ;;  Online-Format:
 ;;  Online-Loc:   ""
diff --git a/hycontrol.el b/hycontrol.el
index ed160d2e32..cbc73ace58 100644
--- a/hycontrol.el
+++ b/hycontrol.el
@@ -901,6 +901,7 @@ instead of quitting HyControl."
 ;; This just sets the keymap locally and shows the minor mode
 ;; indicator in the buffer's mode-line; the separate global minor mode
 ;; turns things on and off.
+;;;###autoload
 (define-minor-mode hycontrol-local-frames-mode
   "Toggle Hyperbole Frames control minor mode in the current buffer."
   :lighter " HyFrm"
@@ -922,6 +923,7 @@ instead of quitting HyControl."
 ;; This just sets the keymap locally and shows the minor mode
 ;; indicator in the buffer's mode-line; the separate global minor mode
 ;; turns things on and off.
+;;;###autoload
 (define-minor-mode hycontrol-local-windows-mode
   "Toggle Hyperbole Windows control minor mode in the current buffer."
   :lighter " HyWin"



[nongnu] elpa/zig-mode 1ef8a13b93: Add optional ansi-coloration for the zig-fmt buffer (#65)

2021-12-27 Thread ELPA Syncer
branch: elpa/zig-mode
commit 1ef8a13b93b3bdd20f86727b3a71572b02c421ef
Author: Geoffrey J. Teale 
Commit: GitHub 

Add optional ansi-coloration for the zig-fmt buffer (#65)
---
 zig-mode.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/zig-mode.el b/zig-mode.el
index 5b47de3cd4..4064605557 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -126,6 +126,9 @@ If given a SOURCE, execute the CMD on it."
 (defvar zig-return-to-buffer-after-format nil
   "Enable zig-format-buffer to return to file buffer after fmt is done.")
 
+(defvar zig-ansi-color-for-format-errors nil
+  "Enable ansi-coloration of error output from zig fmt.")
+
 ;;;###autoload
 (defun zig-format-buffer ()
   "Format the current buffer using the zig fmt."
@@ -150,6 +153,8 @@ If given a SOURCE, execute the CMD on it."
  (when zig-format-show-buffer
(progn
  (pop-to-buffer fmt-buffer)
+ (when zig-ansi-color-for-format-errors
+   (ansi-color-apply-on-region (point-min) (point-max)))
  (compilation-mode)
  (when zig-return-to-buffer-after-format
(pop-to-buffer file-buffer



[nongnu] elpa/projectile f753cdbcf8 5/9: Update documentation around test/src-dir and update sbt project type

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit f753cdbcf890ea935888d8fa30f5f497e65ae0c4
Author: lWarne 
Commit: Bozhidar Batsov 

Update documentation around test/src-dir and update sbt project type
---
 doc/modules/ROOT/pages/projects.adoc | 50 +---
 projectile.el|  2 ++
 2 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/doc/modules/ROOT/pages/projects.adoc 
b/doc/modules/ROOT/pages/projects.adoc
index fd71282266..9b9627aea3 100644
--- a/doc/modules/ROOT/pages/projects.adoc
+++ b/doc/modules/ROOT/pages/projects.adoc
@@ -483,35 +483,55 @@ This will keep all existing options for the `sbt` project 
type, but change the v
 
 === `:test-dir`/`:src-dir` vs `:related-files-fn`
 
-Setting the `:test-dir` and `:src-dir` options to functions is useful if the
-test location for a given implementation file is almost always going to be in
-the same place across all projects belonging to a given project type, `maven`
-projects are an example of this:
+Whilst setting the `:test-dir` and `:src-dir` to strings is sufficient for most
+purposes, using functions can give more flexibility.  As an example consider
+(also using `f.el`):
 
 [source,elisp]
 
+(defun my-get-python-test-file (impl-file-path)
+  "Return the corresponding test file directory for IMPL-FILE-PATH"
+  (let* ((rel-path (f-relative impl-file-path (projectile-project-root)))
+ (src-dir (car (f-split rel-path
+(cond ((f-exists-p (f-join (projectile-project-root) "test"))
+   (projectile-complementary-dir impl-file-path src-dir "test"))
+  ((f-exists-p (f-join (projectile-project-root) "tests"))
+   (projectile-complementary-dir impl-file-path src-dir "tests"))
+  (t (error "Could not locate a test file for %s!" impl-file-path)
+
+(defun my-get-python-impl-file (test-file-path)
+  "Return the corresponding impl file directory for TEST-FILE-PATH"
+  (if-let* ((root (projectile-project-root))
+(rel-path (f-relative test-file-path root))
+(src-dir-guesses `(,(f-base root) ,(downcase (f-base root)) "src"))
+(src-dir (cl-find-if (lambda (d) (f-exists-p (f-join root d)))
+ src-dir-guesses)))
+  (projectile-complementary-dir test-file-path "tests?" src-dir)
+(error "Could not locate a impl file for %s!" test-file-path)))
+
 (projectile-update-project-type
- 'maven
- :src-dir
- (lambda (file-path) (projectile-complementary-dir file-path "test" "main"))
- :test-dir
- (lambda (file-path) (projectile-complementary-dir file-path "main" "test")))
+ 'python-pkg
+ :src-dir #'my-get-python-impl-dir
+ :test-dir #'my-get-python-test-dir)
 
 
-If instead you work on a lot of elisp projects using `eldev`, the
-`:related-files-fn` option may be more appropriate since the test locations 
tend
-to vary across projects:
+This attempts to recognise projects using both `test` and `tests` as top level
+directories for test files. An alternative using the `related-files-fn` option
+could be:
 
 [source,elisp]
 
 (projectile-update-project-type
- 'emacs-eldev
+ 'python-pkg
  :related-files-fn
  (list
-  (projectile-related-files-fn-test-with-suffix "el" "-test")
-  (projectile-related-files-fn-test-with-prefix "el" "test-")))
+  (projectile-related-files-fn-test-with-suffix "py" "_test")
+  (projectile-related-files-fn-test-with-prefix "py" "test_")))
 
 
+In fact this is a lot more flexible in terms of finding test files in different
+locations, but will not create test files for you.
+
 == Customizing Project Detection
 
 Project detection is pretty simple - Projectile just runs a list of
diff --git a/projectile.el b/projectile.el
index c2b3e33356..75e5b8da77 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3135,6 +3135,8 @@ a manual COMMAND-TYPE command is created with
 ;; Scala
 (projectile-register-project-type 'sbt '("build.sbt")
   :project-file "build.sbt"
+  :src-dir "main"
+  :test-dir "test"
   :compile "sbt compile"
   :test "sbt test"
   :test-suffix "Spec")



[nongnu] elpa/projectile updated (ac60885f2a -> 24de2940a8)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch elpa/projectile.

  from  ac60885f2a Port projectile-time-seconds to future Emacs
   new  43decc573b Port projectile-time-seconds to future Emacs
   new  cd8bcbcb15 Merge pull request #1735 from eggert/timestamp
   new  fad389aecf Make src/test-dir as strings take priority over fallback
   new  139cb02e20 Fix tests
   new  f753cdbcf8 Update documentation around test/src-dir and update sbt 
project type
   new  f7eba5e164 Fix emacs 25 incompat in projectile--complementary-file
   new  b7937e212d [#1734] Add a changelog entry
   new  fab2c546fd Tweak a changelog entry
   new  24de2940a8 Merge commit 'ac60885f2a'


Summary of changes:
 CHANGELOG.md |   3 +-
 doc/modules/ROOT/pages/projects.adoc |  50 +++-
 projectile.el| 113 +--
 test/projectile-test.el  |  41 +++--
 4 files changed, 155 insertions(+), 52 deletions(-)



[nongnu] elpa/projectile b7937e212d 7/9: [#1734] Add a changelog entry

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit b7937e212d84a54802d1c8c48f636e9e159ec35c
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

[#1734] Add a changelog entry
---
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 817ba49cf4..7dfd233d93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@
 * [#1713](https://github.com/bbatsov/projectile/issues/1731): Fix 
`projectile-discover-projects-in-directory` reordering known projects.
 * [#1514](https://github.com/bbatsov/projectile/issues/1514): Fix 
`projectile-ag` global ignores not in effect.
 * [#1714](https://github.com/bbatsov/projectile/issues/1714): Fix 
`projectile-discover-projects-in-directory` not interactive.
+* [#1734](https://github.com/bbatsov/projectile/pull/1734): Make 
`projectile--find-matching-test` use `src-dir/test-dir` properties.
 
 ### Changes
 



[nongnu] elpa/projectile 139cb02e20 4/9: Fix tests

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit 139cb02e20894cdf874d7a65659ef58d4b8f268b
Author: lWarne 
Commit: Bozhidar Batsov 

Fix tests
---
 projectile.el   | 83 -
 test/projectile-test.el | 41 +---
 2 files changed, 90 insertions(+), 34 deletions(-)

diff --git a/projectile.el b/projectile.el
index 7280ebed18..c2b3e33356 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3387,8 +3387,10 @@ string) are replaced with the current project type's 
src-dir property
  (which should be a string) to obtain the new directory.
 
 Nil is returned if either the src-dir or test-dir properties are not strings."
-  (let ((test-dir (projectile-test-directory (projectile-project-type)))
-(impl-dir (projectile-src-directory (projectile-project-type
+  (let ((test-dir (projectile-project-type-attribute
+   (projectile-project-type) 'test-dir))
+(impl-dir (projectile-project-type-attribute
+   (projectile-project-type) 'src-dir)))
 (when (and (stringp test-dir) (stringp impl-dir))
   (projectile-complementary-dir test-dir-path test-dir impl-dir
 
@@ -3400,8 +3402,10 @@ string) are replaced with the current project type's 
test-dir property
  (which should be a string) to obtain the new directory.
 
 Nil is returned if either the src-dir or test-dir properties are not strings."
-  (let ((test-dir (projectile-test-directory (projectile-project-type)))
-(impl-dir (projectile-src-directory (projectile-project-type
+  (let ((test-dir (projectile-project-type-attribute
+   (projectile-project-type) 'test-dir))
+(impl-dir (projectile-project-type-attribute
+   (projectile-project-type) 'src-dir)))
 (when (and (stringp test-dir) (stringp impl-dir))
   (projectile-complementary-dir impl-dir-path impl-dir test-dir
 
@@ -3426,6 +3430,7 @@ Nil is returned if either the src-dir or test-dir 
properties are not strings."
 If `projectile-create-missing-test-files' is non-nil, create the missing
 test file."
   (unless file-name (error "The current buffer is not visiting a file"))
+  (unless (projectile-project-type) (projectile-ensure-project nil))
   (if (projectile-test-file-p file-name)
   ;; find the matching impl file
   (let ((impl-file (projectile-find-matching-file file-name)))
@@ -3440,11 +3445,11 @@ test file."
   (projectile-project-type)))
   (test-file (projectile-find-matching-test file-name))
   (expanded-test-file (projectile-expand-root test-file)))
-  (cond ((file-exists-p expanded-test-file) expanded-test-file)
-(projectile-create-missing-test-files
- (projectile--create-directories-for expanded-test-file)
- expanded-test-file)
-(t (error error-msg)))
+(cond ((file-exists-p expanded-test-file) expanded-test-file)
+  (projectile-create-missing-test-files
+   (projectile--create-directories-for expanded-test-file)
+   expanded-test-file)
+  (t (progn (error error-msg
   (error error-msg
 
 ;;;###autoload
@@ -3544,25 +3549,29 @@ Fallback to DEFAULT-VALUE for missing attributes."
   "Apply DIR-FN and FILENAME-FN to the directory and name of FILE-PATH.
 
 More specifically, return DIR-FN applied to the directory of FILE-PATH
-concatenated with FILENAME-FN applied to the file name of FILE-PATH."
-  (let* ((filename (file-name-nondirectory file-path))
- (complementary-filename (funcall filename-fn filename))
- (dir (funcall dir-fn (file-name-directory file-path
+concatenated with FILENAME-FN applied to the file name of FILE-PATH.
+
+If either function returns nil, return nil."
+  (when-let* ((filename (file-name-nondirectory file-path))
+  (complementary-filename (funcall filename-fn filename))
+  (dir (funcall dir-fn (file-name-directory file-path
 (concat (file-name-as-directory dir) complementary-filename)))
 
 (defun projectile--impl-file-from-src-dir-str (file-name)
-  "Attempt to build a path for the impl file of FILE-NAME using the src-dir 
and test-dir properties of the current project type which should be strings, 
nil returned if this is not the case."
-  (projectile--complementary-file
-   file-name
-   #'projectile--test-to-impl-dir
-   #'projectile--impl-name-for-test-name))
+  "Return a path relative to the project root for the impl file of FILE-NAME 
using the src-dir and test-dir properties of the current project type which 
should be strings, nil returned if this is not the case."
+  (when-let ((complementary-file (projectile--complementary-file
+  file-name
+  #'projectile--test-to-impl-dir
+  #'projectile--impl-name-for-test-name)))
+(file-relative-name complementary-file (projectile-project-root)

[nongnu] elpa/projectile 43decc573b 1/9: Port projectile-time-seconds to future Emacs

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit 43decc573b3849b395a0f16ad9555083fd9f7503
Author: Paul Eggert 
Commit: Paul Eggert 

Port projectile-time-seconds to future Emacs

Don’t assume internal format of Emacs timestamps.

They are documented to change in a future version.
This patch works on older Emacs versions; it can be simplified
to just use time-convert if we assume Emacs 27 or later.
---
 projectile.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/projectile.el b/projectile.el
index 488df282c7..e67f56daef 100644
--- a/projectile.el
+++ b/projectile.el
@@ -955,8 +955,10 @@ to invalidate."
 
 (defun projectile-time-seconds ()
   "Return the number of seconds since the unix epoch."
-  (cl-destructuring-bind (high low _usec _psec) (current-time)
-(+ (lsh high 16) low)))
+  (if (fboundp 'time-convert)
+  (time-convert nil 'integer)
+(cl-destructuring-bind (high low _usec _psec) (current-time)
+  (+ (lsh high 16) low
 
 (defun projectile-cache-project (project files)
   "Cache PROJECTs FILES.



[nongnu] elpa/projectile fad389aecf 3/9: Make src/test-dir as strings take priority over fallback

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit fad389aecfe55e7f11d45bcdca6fa2f52f56ff16
Author: lWarne 
Commit: Bozhidar Batsov 

Make src/test-dir as strings take priority over fallback
---
 projectile.el | 70 +++
 1 file changed, 47 insertions(+), 23 deletions(-)

diff --git a/projectile.el b/projectile.el
index e67f56daef..7280ebed18 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3379,6 +3379,19 @@ TEST-FILE-PATH may be a absolute path, relative path or 
a file name."
   (concat (string-remove-suffix test-suffix test-file-name) "." 
test-file-ext))
  (t (error "Project type `%s' not supported!" project-type)
 
+(defun projectile--test-to-impl-dir (test-dir-path)
+  "Return the directory path of an impl file with test file in TEST-DIR-PATH.
+
+Occurrences of the current project type's test-dir property (which should be a
+string) are replaced with the current project type's src-dir property
+ (which should be a string) to obtain the new directory.
+
+Nil is returned if either the src-dir or test-dir properties are not strings."
+  (let ((test-dir (projectile-test-directory (projectile-project-type)))
+(impl-dir (projectile-src-directory (projectile-project-type
+(when (and (stringp test-dir) (stringp impl-dir))
+  (projectile-complementary-dir test-dir-path test-dir impl-dir
+
 (defun projectile--impl-to-test-dir (impl-dir-path)
   "Return the directory path of a test whose impl file resides in 
IMPL-DIR-PATH.
 
@@ -3386,13 +3399,11 @@ Occurrences of the current project type's src-dir 
property (which should be a
 string) are replaced with the current project type's test-dir property
  (which should be a string) to obtain the new directory.
 
-An error is signalled if either the src-dir or test-dir properties are not
-strings."
+Nil is returned if either the src-dir or test-dir properties are not strings."
   (let ((test-dir (projectile-test-directory (projectile-project-type)))
 (impl-dir (projectile-src-directory (projectile-project-type
-(if (and (stringp test-dir) (stringp impl-dir))
-(projectile-complementary-dir impl-dir-path impl-dir test-dir)
-  (error "Expected the current project's :test-dir and :impl-dir 
properties to be strings but found %s and %s" test-dir impl-dir
+(when (and (stringp test-dir) (stringp impl-dir))
+  (projectile-complementary-dir impl-dir-path impl-dir test-dir
 
 (defun projectile-complementary-dir (dir-path string replacement)
   "Return the \"complementary\" directory of DIR-PATH by replacing STRING in 
DIR-PATH with REPLACEMENT."
@@ -3409,13 +3420,6 @@ strings."
   (file-name-directory path))
 :create-parents)))
 
-(defun projectile--test-file-fallback (file-name)
-  "Attempt to build a path for the test file of FILE-NAME using the src-dir 
and test-dir properties of the current project type which should be strings, an 
error is signalled if this is not the case."
-  (projectile--complementary-file
-   file-name
-   #'projectile--impl-to-test-dir
-   #'projectile--test-name-for-impl-name))
-
 (defun projectile-find-implementation-or-test (file-name)
   "Given a FILE-NAME return the matching implementation or test filename.
 
@@ -3431,15 +3435,17 @@ test file."
"No matching source file found for project type `%s'"
(projectile-project-type
 ;; find the matching test file
-(let* ((test-file (projectile-find-matching-test file-name))
-   (test-file-or-fallback (or test-file 
(projectile--test-file-fallback file-name)))
-   (expanded-test-file (projectile-expand-root test-file-or-fallback)))
+(if-let* ((error-msg (format
+  "No matching test file found for project type `%s'"
+  (projectile-project-type)))
+  (test-file (projectile-find-matching-test file-name))
+  (expanded-test-file (projectile-expand-root test-file)))
   (cond ((file-exists-p expanded-test-file) expanded-test-file)
 (projectile-create-missing-test-files
  (projectile--create-directories-for expanded-test-file)
  expanded-test-file)
-(t (error "No matching test file found for project type `%s'"
-  (projectile-project-type)))
+(t (error error-msg)))
+  (error error-msg
 
 ;;;###autoload
 (defun projectile-find-implementation-or-test-other-window ()
@@ -3544,6 +3550,20 @@ concatenated with FILENAME-FN applied to the file name 
of FILE-PATH."
  (dir (funcall dir-fn (file-name-directory file-path
 (concat (file-name-as-directory dir) complementary-filename)))
 
+(defun projectile--impl-file-from-src-dir-str (file-name)
+  "Attempt to build a path for the impl file of FILE-NAME using the src-dir 
and test-dir properties of the current project type which should be strings, 
nil returned if this is not the case."

[nongnu] elpa/projectile fab2c546fd 8/9: Tweak a changelog entry

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit fab2c546fdf990f010acb0755004a96510dc07db
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Tweak a changelog entry
---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7dfd233d93..f4f3f910db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,7 @@
 
 * [#1699](https://github.com/bbatsov/projectile/pull/1699): 
`projectile-ripgrep` now supports [`rg.el`](https://github.com/dajva/rg.el).
 * [#1712](https://github.com/bbatsov/projectile/issues/1712): Make it possible 
to hide Projectile's menu. See `projectile-show-menu`.
-* [#1718](https://github.com/bbatsov/projectile/issues/1718): Add a project 
definition for GNUMakefile.
+* [#1718](https://github.com/bbatsov/projectile/issues/1718): Add a project 
type definition for `GNUMakefile`.
 
 ### Bugs fixed
 



[nongnu] elpa/projectile f7eba5e164 6/9: Fix emacs 25 incompat in projectile--complementary-file

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit f7eba5e16477d46ed36066b381f2f7073f777c1c
Author: lWarne 
Commit: Bozhidar Batsov 

Fix emacs 25 incompat in projectile--complementary-file
---
 projectile.el | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/projectile.el b/projectile.el
index 75e5b8da77..89e1610e4b 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3442,17 +3442,17 @@ test file."
"No matching source file found for project type `%s'"
(projectile-project-type
 ;; find the matching test file
-(if-let* ((error-msg (format
-  "No matching test file found for project type `%s'"
-  (projectile-project-type)))
-  (test-file (projectile-find-matching-test file-name))
-  (expanded-test-file (projectile-expand-root test-file)))
-(cond ((file-exists-p expanded-test-file) expanded-test-file)
-  (projectile-create-missing-test-files
-   (projectile--create-directories-for expanded-test-file)
-   expanded-test-file)
-  (t (progn (error error-msg
-  (error error-msg
+(let* ((error-msg (format
+   "No matching test file found for project type `%s'"
+   (projectile-project-type)))
+   (test-file (or (projectile-find-matching-test file-name)
+  (error error-msg)))
+   (expanded-test-file (projectile-expand-root test-file)))
+  (cond ((file-exists-p expanded-test-file) expanded-test-file)
+(projectile-create-missing-test-files
+ (projectile--create-directories-for expanded-test-file)
+ expanded-test-file)
+(t (progn (error error-msg)))
 
 ;;;###autoload
 (defun projectile-find-implementation-or-test-other-window ()
@@ -3554,10 +3554,10 @@ More specifically, return DIR-FN applied to the 
directory of FILE-PATH
 concatenated with FILENAME-FN applied to the file name of FILE-PATH.
 
 If either function returns nil, return nil."
-  (when-let* ((filename (file-name-nondirectory file-path))
-  (complementary-filename (funcall filename-fn filename))
-  (dir (funcall dir-fn (file-name-directory file-path
-(concat (file-name-as-directory dir) complementary-filename)))
+  (let ((filename (file-name-nondirectory file-path)))
+(when-let ((complementary-filename (funcall filename-fn filename))
+   (dir (funcall dir-fn (file-name-directory file-path
+ (concat (file-name-as-directory dir) complementary-filename
 
 (defun projectile--impl-file-from-src-dir-str (file-name)
   "Return a path relative to the project root for the impl file of FILE-NAME 
using the src-dir and test-dir properties of the current project type which 
should be strings, nil returned if this is not the case."



[nongnu] elpa/projectile cd8bcbcb15 2/9: Merge pull request #1735 from eggert/timestamp

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit cd8bcbcb15be7b76d73969d2c2504100b77eda26
Merge: 2bb7ec28b1 43decc573b
Author: Bozhidar Batsov 
Commit: GitHub 

Merge pull request #1735 from eggert/timestamp

Port projectile-time-seconds to future Emacs
---
 projectile.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/projectile.el b/projectile.el
index 488df282c7..e67f56daef 100644
--- a/projectile.el
+++ b/projectile.el
@@ -955,8 +955,10 @@ to invalidate."
 
 (defun projectile-time-seconds ()
   "Return the number of seconds since the unix epoch."
-  (cl-destructuring-bind (high low _usec _psec) (current-time)
-(+ (lsh high 16) low)))
+  (if (fboundp 'time-convert)
+  (time-convert nil 'integer)
+(cl-destructuring-bind (high low _usec _psec) (current-time)
+  (+ (lsh high 16) low
 
 (defun projectile-cache-project (project files)
   "Cache PROJECTs FILES.



[nongnu] elpa/projectile 24de2940a8 9/9: Merge commit 'ac60885f2a'

2021-12-27 Thread ELPA Syncer
branch: elpa/projectile
commit 24de2940a8a1f46a7715175a66be67733f1c8fa8
Merge: fab2c546fd ac60885f2a
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Merge commit 'ac60885f2a'



[elpa] externals/mct 0c2ca7c019: Fix possible cycling regression on Emacs 29

2021-12-27 Thread ELPA Syncer
branch: externals/mct
commit 0c2ca7c019af31f650dd099287dd702630d6caba
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Fix possible cycling regression on Emacs 29

The cycling from the top of the Completions to the minibuffer has been
broken on my latest build of Emacs.  I am not sure what is going on, but
this fixes the issue and does not seem to have any drawbacks.
---
 mct.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mct.el b/mct.el
index 3cf5ea97e9..fd953d8a1a 100644
--- a/mct.el
+++ b/mct.el
@@ -601,7 +601,9 @@ ARG is a numeric argument for `previous-completion', as 
described in
 `mct-previous-completion-or-mini'."
   (or (bobp)
   (mct--completions-line-boundary (mct--first-completion-point))
-  (= (save-excursion (previous-completion arg) (point)) (point-min
+  (= (save-excursion (previous-completion arg) (point)) (point-min))
+  ;; FIXME 2021-12-27: Why do we need this now?  Regression upstream?
+  (eq (line-number-at-pos) 1)))
 
 (defun mct-previous-completion-or-mini (&optional arg)
   "Move to the next completion or switch to the minibuffer.



[elpa] externals/vertico updated (490cf0d789 -> efec4b8d20)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch externals/vertico.

  from  490cf0d789 vertico-buffer: Add recursion indicator
   new  107f8e2c26 README: Minor cleanup
   new  efec4b8d20 README: Preserve link


Summary of changes:
 README.org | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)



[elpa] externals/vertico 107f8e2c26 1/2: README: Minor cleanup

2021-12-27 Thread ELPA Syncer
branch: externals/vertico
commit 107f8e2c26f13277bc20536b8b08da71d238a59e
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Minor cleanup
---
 README.org | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 4e00474842..896e415d4e 100644
--- a/README.org
+++ b/README.org
@@ -266,14 +266,16 @@
   :hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
   #+end_src
 
-** Configure Vertico per-command or completion category
+** Configure Vertico per command or per completion category
 
 Vertico offers the =vertico-multiform-mode= which allows you to configure 
Vertico
 per command or per completion category. The =vertico-buffer-mode= enables a
 Helm-like buffer display, which takes more space but also displays more
 candidates. This verbose display mode is useful for commands like 
~consult-imenu~
 or ~consult-outline~ since the buffer display allows you to get a better 
overview
-over the entire current buffer.
+over the entire current buffer. But for other commands you want to keep using
+the default Vertico display. ~vertico-multiform-mode~ solves this configuration
+problem!
 
 #+begin_src emacs-lisp
   ;; Enable vertico-multiform
@@ -294,10 +296,10 @@ over the entire current buffer.
   (consult-grep buffer)))
 #+end_src
 
-You can use your own functions or even lambdas to configure the per command (or
-per category) completion behavior. The function must have the same calling
-convention as a mode, i.e., it takes a single argument, which is either 1 to
-turn on the mode and -1 to turn off the mode.
+You can use your own functions or even lambdas to configure the completion
+behavior per command or per completion category. The function must have the
+calling convention of a mode, i.e., it takes a single argument, which is either
+1 to turn on the mode and -1 to turn off the mode.
 
 #+begin_src emacs-lisp
   ;; Configure `consult-outline' as a scaled down TOC in a separate buffer
@@ -315,14 +317,14 @@ Furthermore you can tune buffer-local settings per 
command (or category).
 '((symbol (vertico-sort-function . vertico-sort-alpha
 #+end_src
 
-Combining these features allows us to fine-tune the completion display per
-command by adjusting the ~vertico-buffer-display-action~. We can for example 
reuse
-the current window for commands of the ~consult-grep~ category (~consult-grep~,
+Combining these features allows us to fine-tune the completion display even 
more
+by adjusting the ~vertico-buffer-display-action~. We can for example reuse the
+current window for commands of the ~consult-grep~ category (~consult-grep~,
 ~consult-git-grep~ and ~consult-ripgrep~). We have to define a display action
-function, which uses the ~(minibuffer-selected-window)~. Note that this
+function, which uses the ~minibuffer-selected-window~. Note that this
 configuration is incompatible with Consult preview, since the previewed buffer
 is usually shown in exactly this window. Nevertheless this snippet demonstrates
-the amount of flexibility of the configuration system.
+the flexibility of the configuration system.
 
 #+begin_src emacs-lisp
   (defun display-buffer-in-selected (buffer alist)



[nongnu] elpa/geiser updated (d4bfb82612 -> f5e7004bf2)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch elpa/geiser.

  from  d4bfb82612 Version bump
   new  9a02421436 more lenient logging limits
   new  48e6a66715 Tweak also max-specdl-size for longer reads
   new  f5e7004bf2 New helper, geiser-eval-wait, to facilitate synchronous 
evaluations


Summary of changes:
 elisp/geiser-connection.el | 24 +++-
 elisp/geiser-log.el|  6 +++---
 elisp/geiser-mode.el   | 13 -
 elisp/geiser-syntax.el |  5 +++--
 4 files changed, 33 insertions(+), 15 deletions(-)



[nongnu] elpa/geiser f5e7004bf2 3/3: New helper, geiser-eval-wait, to facilitate synchronous evaluations

2021-12-27 Thread ELPA Syncer
branch: elpa/geiser
commit f5e7004bf2f5af381dbf3387108cde210a190733
Author: jao 
Commit: jao 

New helper, geiser-eval-wait, to facilitate synchronous evaluations

This should address, for instance, issue #30
---
 elisp/geiser-connection.el | 24 +++-
 elisp/geiser-mode.el   | 13 -
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 745aa14d96..87f5f7f498 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -260,19 +260,25 @@
 (when (process-live-p proc)
   (interrupt-process proc
 
+(defun geiser-con--wait (req timeout)
+  "Wait for the given request REQ to finish, up to TIMEOUT secs, returning its 
result."
+  (let* ((con (geiser-con--request-connection req))
+ (id (geiser-con--request-id req))
+ (timeout (/ (or timeout geiser-connection-timeout) 1000.0))
+ (step (/ timeout 10)))
+(with-timeout (timeout (geiser-con--request-deactivate req))
+  (condition-case nil
+  (while (and (geiser-con--connection-process con)
+  (not (geiser-con--connection-completed-p con id)))
+(accept-process-output proc step))
+(error (geiser-con--request-deactivate req))
+
 (defun geiser-con--send-string/wait (con str cont &optional timeout sbuf)
   (save-current-buffer
 (let ((proc (and con (geiser-con--connection-process con
   (unless proc (error "Geiser connection not active"))
-  (let* ((req (geiser-con--send-string con str cont sbuf))
- (id (geiser-con--request-id req))
- (timeout (/ (or timeout geiser-connection-timeout) 1000.0)))
-(with-timeout (timeout (geiser-con--request-deactivate req))
-  (condition-case nil
-  (while (and (geiser-con--connection-process con)
-  (not (geiser-con--connection-completed-p con id)))
-(accept-process-output proc (/ timeout 10)))
-(error (geiser-con--request-deactivate req
+  (let ((req (geiser-con--send-string con str cont sbuf)))
+(geiser-con--wait req timeout)
 
 
 (provide 'geiser-connection)
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 1e5df0bb61..06e6655973 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -95,11 +95,22 @@ result is an error msg."
   (push-mark)
   (goto-char (point-max)))
 
+(defun geiser-eval-wait (req timeout)
+  "Use REQ, the result of computing an evaluation, to wait for its result.
+
+TIMEOUT is the number of seconds to wait for evaluation
+completion.  Functions returning a waitable REQ are
+`geiser-eval-region' and its derivatives evaluating buffers or
+individual sexps."
+  (geiser-con--wait req timeout))
+
 (defun geiser-eval-region (start end &optional and-go raw nomsg)
   "Eval the current region in the Geiser REPL.
 
 With prefix, goes to the REPL buffer afterwards (as
-`geiser-eval-region-and-go')"
+`geiser-eval-region-and-go').  The evaluation is performed
+asynchronously: this function's return value can be used to wait
+for its completion using `geiser-eval-wait'."
   (interactive "rP")
   (save-restriction
 (narrow-to-region start end)



[nongnu] elpa/geiser 48e6a66715 2/3: Tweak also max-specdl-size for longer reads

2021-12-27 Thread ELPA Syncer
branch: elpa/geiser
commit 48e6a6671571ef60ae764b165a2f152fc6d9e227
Author: jao 
Commit: jao 

Tweak also max-specdl-size for longer reads
---
 elisp/geiser-syntax.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index dd347d3c4b..6cf89a99a0 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -286,10 +286,11 @@ implementation-specific entries for font-lock-keywords.")
 (let* ((start (or start 0))
(end (or end (length string)))
(max-lisp-eval-depth (min 2
- (max max-lisp-eval-depth (- end start)
+ (max max-lisp-eval-depth (- end start
+   (max-specpdl-size (* 2 max-lisp-eval-depth)))
   (with-temp-buffer
 (save-excursion (insert string))
-(cons (ignore-errors (geiser-syntax--read)) (point))
+(cons (geiser-syntax--read) (point))
 
 (defun geiser-syntax--form-from-string (s)
   (car (geiser-syntax--read-from-string s)))



[nongnu] elpa/geiser 9a02421436 1/3: more lenient logging limits

2021-12-27 Thread ELPA Syncer
branch: elpa/geiser
commit 9a02421436d304f64969d5dfca37ae23272570ee
Author: jao 
Commit: jao 

more lenient logging limits
---
 elisp/geiser-log.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/elisp/geiser-log.el b/elisp/geiser-log.el
index 236f691786..13101870ee 100644
--- a/elisp/geiser-log.el
+++ b/elisp/geiser-log.el
@@ -1,6 +1,6 @@
 ;;; geiser-log.el -- logging utilities
 
-;; Copyright (C) 2009, 2010, 2012, 2019 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2012, 2019, 2021 Jose Antonio Ortega Ruiz
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the Modified BSD License. You should
@@ -34,10 +34,10 @@
 (defvar geiser-log--buffer-name "*geiser messages*"
   "Name of the Geiser log buffer.")
 
-(defvar geiser-log--max-buffer-size 32000
+(defvar geiser-log--max-buffer-size 32
   "Maximum size of the Geiser messages log.")
 
-(defvar geiser-log--max-message-size 2048
+(defvar geiser-log--max-message-size 20480
   "Maximum size of individual Geiser log messages.")
 
 (defvar geiser-log-verbose-p nil



[elpa] externals/vertico efec4b8d20 2/2: README: Preserve link

2021-12-27 Thread ELPA Syncer
branch: externals/vertico
commit efec4b8d204672b4b92938d39fcb6ca3e430da0d
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Preserve link
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 896e415d4e..57f953a5be 100644
--- a/README.org
+++ b/README.org
@@ -266,7 +266,7 @@
   :hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
   #+end_src
 
-** Configure Vertico per command or per completion category
+** Configure Vertico per command or completion category
 
 Vertico offers the =vertico-multiform-mode= which allows you to configure 
Vertico
 per command or per completion category. The =vertico-buffer-mode= enables a



[elpa] externals/vertico cc45dbe60a: vertico-buffer: Less verbose mode line

2021-12-27 Thread ELPA Syncer
branch: externals/vertico
commit cc45dbe60af606d9e5781183436f73506f425881
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico-buffer: Less verbose mode line
---
 extensions/vertico-buffer.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/extensions/vertico-buffer.el b/extensions/vertico-buffer.el
index e1c6b98501..b94f8ed058 100644
--- a/extensions/vertico-buffer.el
+++ b/extensions/vertico-buffer.el
@@ -126,11 +126,11 @@
 (setq-local show-trailing-whitespace nil
 truncate-lines t
 mode-line-format
-(list (format " %s %s "
+(list (format " %s "
   (propertize
-   (format (if (< depth 2) "*Vertico*" 
"*Vertico[%s]*") depth)
-   'face 'mode-line-buffer-id)
-  (string-remove-suffix ": " (minibuffer-prompt)))
+   (format (if (< depth 2) "*%s*" "*%s [%s]*")
+   (string-remove-suffix ": " 
(minibuffer-prompt)) depth)
+   'face 'mode-line-buffer-id))
   '(:eval (vertico--format-count)))
 cursor-in-non-selected-windows 'box
 vertico-count (- (/ (window-pixel-height 
vertico-buffer--window)



[elpa] externals/setup 69edf67f0d: Fix issue in last commit

2021-12-27 Thread ELPA Syncer
branch: externals/setup
commit 69edf67f0d6fee8722a2634916d298157822f9bb
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Fix issue in last commit
---
 setup.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.el b/setup.el
index e4445ff7c0..6adb13f00c 100644
--- a/setup.el
+++ b/setup.el
@@ -278,8 +278,8 @@ functions `func'.  Any other value is invalid."
(let ((file (get symbol 'setup-definition-file)))
  (list (elisp--xref-make-xref nil symbol file)
 
-(add-to-list 'elisp--xref-find-def-functions
- #'setup-xref-def-function)
+(add-to-list 'elisp-xref-find-def-functions
+ #'setup--xref-def-function)
 
 
 ;;; Common utility functions for local macros



[nongnu] elpa/rust-mode 8aebccb077: update toc

2021-12-27 Thread ELPA Syncer
branch: elpa/rust-mode
commit 8aebccb077741cc246de22eb3f4f172eac93af84
Author: brotzeit 
Commit: brotzeit 

update toc
---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index e20d7e4f20..7c0232f903 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@
 - [Feature guide](#feature-guide)
 - [Indentation](#indentation)
 - [Code formatting](#code-formatting)
+- [Prettifying](#prettifying)
 - [Running / testing / compiling 
code](#running--testing--compiling-code)
 - [Clippy](#clippy)
 - [Easy insertion of dbg!](#easy-insertion-of-dbg)



[elpa] main da10c6d110: * elpa-packages (svg-tag-mode): Fix typo

2021-12-27 Thread Stefan Monnier via
branch: main
commit da10c6d1100bfbe405d3082eb0f86c64d09b725d
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-packages (svg-tag-mode): Fix typo
---
 elpa-packages | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index d4cee7d06a..24cf90dd06 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -469,7 +469,7 @@
  ("svg-lib":url "https://github.com/rougier/svg-lib";
   :auto-sync t)
  ("svg-tag-mode"   :url "https://github.com/rougier/svg-tag-mode";
-  :auto0sync t)
+  :auto-sync t)
  ("swiper" :url "https://github.com/abo-abo/swiper";)
  ("system-packages":url "https://gitlab.com/jabranham/system-packages";)
  ("systemd":url nil)



[elpa] externals/svg-tag-mode 81cb79335c 02/63: Added installation instructions

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 81cb79335c06a7320db7f534daf0b3c5ec82b09c
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added installation instructions
---
 README.org | 14 +-
 example.el |  4 
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 8775f518de..33c8df51cf 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,18 @@
-*** SVG tag minor mode
+** SVG tag minor mode (Emacs)
 
 A small minor mode to replace keywords or regular expression with SVG rounded
 box labels. See [[file:/example.el][example.el]] for example usage.
 
+*** Installation
+
+#+begin_src elisp
+(quelpa '(svg-tag-mode :repo "rougier/svg-tag-mode"
+   :fetcher github
+   :files ("svg-tag-mode.el")))
+#+end_src
+
+*** Demonstration 
+
+Open [[file:/example.el][example.el]] and evaluate buffer
+
 [[./screenshot.png]]
diff --git a/example.el b/example.el
index cc4c1343dc..51dcf098d3 100644
--- a/example.el
+++ b/example.el
@@ -14,6 +14,8 @@
 ;; For a full copy of the GNU General Public License
 ;; see .
 
+(require 'svg-tag-mode)
+
 (defface svg-tag-note-face
   '((t :foreground "black" :background "white" :box "black"
:family "Roboto Mono" :weight light :height 120))
@@ -42,6 +44,8 @@
 ("\\(=[0-9a-zA-Z- ]+?=\\)" 1
  `(face nil display ,(svg-tag-keyboard (match-string 0))
 
+(svg-tag-mode 1)
+
 ;; A tag function using SVG to display a rounded box with outer and inner
 ;; padding and a controllable box radius. The resulting SVG is perfectly
 ;; aligned with regular text such that a =TAG= can be inserted and edited



[elpa] externals/svg-tag-mode db4d223352 18/63: Fixed documentation

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit db4d2233525f331537dfdce152a09a5bbb33be0e
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed documentation
---
 svg-tag-mode.el | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 29c5d1358b..07f13857eb 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -72,7 +72,7 @@
   :group 'svg-tag)
 
 (defcustom svg-tag-default-line-width 1
-  "Default border line width  (in pixels, null or positive)"
+  "Default border line width  (in pixels, null or positive)."
   :type 'integer
   :group 'svg-tag)
 
@@ -102,10 +102,10 @@ This should be zero for most fonts but some fonts may 
need this."
   '((":TODO:" . (svg-tag-make "TODO")))
   "An alist mapping keywords to tags used to display them.
 
-Each entry has the form (keyword . tag). Keyword is used as part
+Each entry has the form (keyword . tag).  Keyword is used as part
 of a regular expression and tag can be either a svg tag
-previously created by svg-tag-make or a function that takes a
-string as argument and returns a tag. When tag is a function, this
+previously created by `svg-tag-make' or a function that takes a
+string as argument and returns a tag.  When tag is a function, this
 allows to create dynamic tags."
   :group 'svg-tag
   :type '(repeat (cons (string :tag "Keyword")
@@ -113,7 +113,8 @@ allows to create dynamic tags."
 
 
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
-  "Create a SVG image displaying text in a rounded box"
+  "Create a SVG image displaying TEXT in a rounded box using FACE style.
+INNER-PADDING, OUTER-PADDING and RADIUS controls the visual aspect of the box."
   (let* ((face   (or face 'svg-tag-default-face))
  (foreground (face-attribute face :foreground))
  (background (face-attribute face :background))
@@ -155,7 +156,7 @@ allows to create dynamic tags."
(- tag-width line-width) (- tag-height line-width)
:fillbackground
:rx  (- radius (/ line-width 2.0)))
-(svg-text  svg text 
+(svg-text  svg text
:font-family family
:font-weight weight
:font-size   size
@@ -166,7 +167,7 @@ allows to create dynamic tags."
 
 
 (defun tag-svg--build-keywords (item)
-  "Internal, build the list of keywords"
+  "Internal.  Build the list of keyword from ITEM."
   (let ((pattern  (format "\\(%s\\)" (car item)))
 (tag  (cdr item)))
 (when (and (symbolp tag) (fboundp tag))
@@ -175,7 +176,7 @@ allows to create dynamic tags."
 `(,pattern 1 ,tag)))
 
 (defun svg-tag-mode-on ()
-  "Activate SVG tag mode"
+  "Activate SVG tag mode."
   (add-to-list 'font-lock-extra-managed-props 'display)
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
@@ -187,7 +188,7 @@ allows to create dynamic tags."
   (message "SVG tag mode on"))
 
 (defun svg-tag-mode-off ()
-  "Deactivate SVG tag mode"
+  "Deactivate SVG tag mode."
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
(mapcar 'tag-svg--build-keywords svg-tag-tags--active)))



[elpa] externals/svg-tag-mode 90c15ebc07 05/63: Load subr-x for string-trim

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 90c15ebc07860bfbaf4f2d5251f6a3c0f07f11e9
Author: Masahiro Nakamura <13937915+tsu...@users.noreply.github.com>
Commit: Masahiro Nakamura <13937915+tsu...@users.noreply.github.com>

Load subr-x for string-trim
---
 svg-tag-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 2d9b4057ff..3f220843eb 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -61,6 +61,7 @@
 ;;
 ;;; Code:
 (require 'svg)
+(eval-when-compile (require 'subr-x))
 
 (defvar svg-tags nil)
 (defvar active-svg-tags nil)



[elpa] externals/svg-tag-mode d62ae5bc4d 03/63: Typo

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit d62ae5bc4d499471dffe4afabb2a434d8fd9ce67
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Typo
---
 svg-tag-mode.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index d3ca1d700d..2d9b4057ff 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -25,8 +25,8 @@
 
 ;;; Commentary:
 
-;; This minor mode replaces keywords or expressions with a SVG rounded
-;; box label this customizable.
+;; This minor mode replaces keywords or expressions with SVG rounded
+;; box labels that are fully customizable.
 ;;
 ;; Usage example:
 ;; --
@@ -131,13 +131,13 @@
   (if svg-tags
   (font-lock-add-keywords nil svg-tags))
   (setq active-svg-tags (copy-sequence svg-tags))
-  (message "Tag mode on"))
+  (message "SVG tag mode on"))
 
 (defun svg-tag-mode-off ()  
   (if active-svg-tags
   (font-lock-remove-keywords nil active-svg-tags))
   (setq active-svg-tags nil)
-  (message "Tag mode off"))
+  (message "SVG tag mode off"))
 
 (define-minor-mode svg-tag-mode
   "Minor mode for graphical tag as rounded box."



[elpa] externals/svg-tag-mode 3c38d60cb7 06/63: Merge pull request #3 from tsuu32/fix/load-subr-x

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 3c38d60cb7562c0d9d539cbe2c06c225eb8dfd30
Merge: 63d8710d1a 90c15ebc07
Author: Nicolas P. Rougier 
Commit: GitHub 

Merge pull request #3 from tsuu32/fix/load-subr-x

Load subr-x for string-trim
---
 svg-tag-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 2d9b4057ff..3f220843eb 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -61,6 +61,7 @@
 ;;
 ;;; Code:
 (require 'svg)
+(eval-when-compile (require 'subr-x))
 
 (defvar svg-tags nil)
 (defvar active-svg-tags nil)



[elpa] branch externals/svg-tag-mode created (now e2481ae15a)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch externals/svg-tag-mode.

at  e2481ae15a Modified example to highlight real org tags.

This branch includes the following new commits:

   new  664fbec919 First version
   new  81cb79335c Added installation instructions
   new  d62ae5bc4d Typo
   new  63d8710d1a Better example syntax
   new  90c15ebc07 Load subr-x for string-trim
   new  3c38d60cb7 Merge pull request #3 from tsuu32/fix/load-subr-x
   new  a5af3041c4 Added customizable options
   new  fe508895e1 Removed spurious backquote
   new  de9aba3f37 Fix style and naming
   new  4894900f52 Merge pull request #6 from a13/main
   new  fc57d2d4bb Normalized names
   new  e9d0df33a6 Better default
   new  4fe6ce8681 Typo
   new  0944bb3bce Simplified tag setup and added custom variable for tags
   new  2dc379039a Updated example
   new  ffc6631dd2 Cosmetic
   new  7a4e0df952 Added org-mode example
   new  db4d223352 Fixed documentation
   new  72068052ff Fixed default height
   new  9649055e90 Trying to fix header
   new  cec780a16f Added version
   new  0125ceca29 Fix README
   new  4fdc7ffbb3 Fixed font weights
   new  609ed7cc32 Removed free variable
   new  ede0edb5c3 Lint correction
   new  2bcf213527 Added global mode
   new  a9e8d9e705 Fixes followign review at 
https://github.com/melpa/melpa/pull/7217
   new  40d7820143 Moved examples into a directory
   new  60d56f3f41 Fixed terminal mode error
   new  c0492f9046 Fixed links
   new  87489d2845 Fixed warning (see 
https://github.com/melpa/melpa/pull/7217#issuecomment-735307276)
   new  a34a2e1128 Added scale of 1 just in case
   new  2c4a3a02a1 Enforce use of spaces for indentation
   new  78a343f0f3 Cleanup whitespace
   new  95b5404997 Merge pull request #13 from tarsiiformes/cleanup
   new  29ca63cdbb Rewrote the mode using svg-lib
   new  607d05d972 Fix conflict
   new  9ddf0e4f13 Rename screenshot
   new  f6adc4b772 Make sure to remove space from tag.
   new  861c68af89 Updated example 1 to new tags format.
   new  a5098267c9 Updated example 2 to new tags format.
   new  ee16277655 Added examples from documentation
   new  4fb494db21 Changed style of date
   new  e9a6256dee Added org-mode screenshot
   new  8d9dd283fb Updated screenshot
   new  1d0d91bb00 Fixed layout
   new  525901723f Fixed requirements.
   new  837dfbdd06 Fixed documentation.
   new  d9a803a92e Added date without time format example.
   new  8533c6c174 Added progress bar example.
   new  83fc912461 Updated screenshots
   new  aca351185b Fixed documentation.
   new  b865793671 Updated copyright notices.
   new  558ac3d3bd Added edit mode (tag is hidden) when pointer is over a 
tag.
   new  02d60e0a86 Fixed cursor selection.
   new  b5a00a5746 Bumped version number and fixed some documentation.
   new  3e49ddcee2 Cancel tag editing in read-only or view mode.
   new  85aed73bc6 Added custom option to let user decide on action at 
point.
   new  3dd9bef838 Removed `org-plist-delete` dependency.
   new  c78500db2c Fix bugs (typos).
   new  7266de9f9c Simplified advice on org fontify blocks.
   new  60140b7526 Remove ununsed local variables.
   new  e2481ae15a Modified example to highlight real org tags.




[elpa] externals/svg-tag-mode e9d0df33a6 12/63: Better default

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit e9d0df33a696433a777c88932c0260f297cb59bf
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Better default
---
 svg-tag-mode.el | 43 +--
 1 file changed, 33 insertions(+), 10 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 9623050cbf..c1a7dc4423 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -86,6 +86,11 @@
   :type 'integer
   :group 'svg-tag)
 
+(defcustom svg-tag-default-line-width 1
+  "Default border line width  (in pixels, null or positive)"
+  :type 'integer
+  :group 'svg-tag)
+
 (defcustom svg-tag-vertical-offset 0
   "Vertical offset for text (in pixels).
 This should be zero for most fonts but some fonts may need this."
@@ -108,13 +113,31 @@ This should be zero for most fonts but some fonts may 
need this."
   "Default face for tag"
   :group 'svg-tag)
 
+;; (defcustom svg-tag-tags
+;;   '((":TODO:" . (svg-tag-make "TODO")))
+;;   "An alist mapping keywords to tags used to display them.
+
+;; Each entry has the form (keyword . tag). Keyword is used as part
+;; of a regular expression and tag can be either a svg tag
+;; previously created by svg-tag-make or a function that takes a
+;; string as argument and returns a tag. When tag is a function, this
+;; allows to create dynamic tags."
+  
+;;   :group 'svg-tag-mode
+;;   :type '(repeat (cons (string :tag "Keyword")
+;;(sexp   :tag "Tag"
+
+
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   (let* ((face   (or face 'svg-tag-default-face))
  (foreground (face-attribute face :foreground))
  (background (face-attribute face :background))
- (border (plist-get (face-attribute face :box) :color))
- (stroke 1)
- ;; (stroke (plist-get (face-attribute face :box) :line-width))
+ (box(face-attribute face :box))
+ (stroke (or (plist-get (face-attribute face :box) :color)
+ foreground))
+ ;; This does not seem to get the actual box line-width
+ (line-width (or (plist-get (face-attribute face :box) :line-width)
+ svg-tag-default-line-width))
  (family (face-attribute face :family))
  (weight (face-attribute face :weight))
  (size   (/ (face-attribute face :height) 10))
@@ -136,18 +159,18 @@ This should be zero for most fonts but some fonts may 
need this."
  (tag-x (/ (- svg-width tag-width) 2))
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
-
+ 
  (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
-
+ 
 (svg-rectangle svg tag-x 0 tag-width tag-height
-   :fillborder
+   :fillstroke
:rx  radius)
-(svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
-   (- tag-width stroke) (- tag-height stroke)
+(svg-rectangle svg (+ tag-x (/ line-width 2.0)) (/ line-width 2.0)
+   (- tag-width line-width) (- tag-height line-width)
:fillbackground
-   :rx  (- radius (/ stroke 2.0)))
-(svg-text  svg text
+   :rx  (- radius (/ line-width 2.0)))
+(svg-text  svg text 
:font-family family
:font-weight weight
:font-size   size



[elpa] externals/svg-tag-mode 0944bb3bce 14/63: Simplified tag setup and added custom variable for tags

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 0944bb3bce4ba3994ff4796b7e0694f1883e1407
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Simplified tag setup and added custom variable for tags
---
 example.el  | 28 ++---
 svg-tag-mode.el | 65 +++--
 2 files changed, 47 insertions(+), 46 deletions(-)

diff --git a/example.el b/example.el
index 813256b852..aa9a2d07dd 100644
--- a/example.el
+++ b/example.el
@@ -13,35 +13,39 @@
 ;;
 ;; For a full copy of the GNU General Public License
 ;; see .
-(require 'svg-tag-mode)
+;; (require 'svg-tag-mode)
 
 (defface svg-tag-note-face
   '((t :foreground "black" :background "white" :box "black"
:family "Roboto Mono" :weight light :height 120))
   "Face for note tag" :group nil)
+
 (defface svg-tag-keyboard-face
   '((t :foreground "#33" :background "#f9f9f9" :box "#33"
:family "Roboto Mono" :weight light :height 120))
   "Face for keyboard bindings tag" :group nil)
 
-(setq  svg-tag-todo (svg-tag-make "TODO" nil 1 1 2))
-(setq  svg-tag-note (svg-tag-make "NOTE" 'svg-tag-note-face 1 1 2))
+(setq svg-tag-todo
+  (svg-tag-make "TODO" nil 1 1 2))
+
+(setq svg-tag-note
+  (svg-tag-make "NOTE" 'svg-tag-note-face 1 1 2))
+
 (defun svg-tag-round (text)
   (svg-tag-make (substring text 1 -1) 'svg-tag-note-face 1 1 12))
+
 (defun svg-tag-quasi-round (text)
   (svg-tag-make (substring text 1 -1) 'svg-tag-note-face 1 1 8))
+
 (defun svg-tag-keyboard (text)
   (svg-tag-make (substring text 1 -1) 'svg-tag-keyboard-face 1 1 2))
 
-(setq svg-tags
-  '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
-("\\(:NOTE:\\)" 1 `(face nil display ,svg-tag-note))
-("\\(\([0-9a-zA-Z]\)\\)" 1
- `(face nil display ,(svg-tag-round (match-string 0
-("\\(\([0-9a-zA-Z][0-9a-zA-Z]\)\\)" 1
- `(face nil display ,(svg-tag-quasi-round (match-string 0
-("\\(|[0-9a-zA-Z- ]+?|\\)" 1
- `(face nil display ,(svg-tag-keyboard (match-string 0))
+(setq svg-tag-tags
+'((":TODO:" . svg-tag-todo)
+  (":NOTE:" . svg-tag-note)
+  ("\([0-9a-zA-Z]\)". svg-tag-round)
+  ("\([0-9a-zA-Z][0-9a-zA-Z]\)" . svg-tag-quasi-round)
+  ("|[0-9a-zA-Z- ]+?|"  . svg-tag-keyboard)))
 
 (svg-tag-mode 1)
 
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 4b3bb6e1c6..df07b4ac9d 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -33,37 +33,22 @@
 ;;
 ;; 1. Replace :TODO: keyword with default face/padding/radius
 ;;
-;;(setq svg-tag-todo (svg-tag-make "TODO"))
-;;(setq svg-tag-tags
-;;  '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
+;;(setq svg-tag-tags '((":TODO:"  (svg-tag-make "TODO")))
 ;;(svg-tag-mode)
 ;;
 ;;
-;; 2. Replace :TODO: keyword with specific face/padding/radius
-;;
-;;(defface svg-tag-todo-face
-;;  '((t :foreground "black" :background "white" :box "black"
-;;   :family "Roboto Mono" :weight light :height 120))
-;;  "Face for note tag" :group nil)
-;;(setq svg-tag-todo (svg-tag-make "TODO" svg-tag-todo-face 1 1 3))
-;;(setq svg-tag-tags
-;;  '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
-;;(svg-tag-mode)
-;;
-;; 3. Replace any letter betwen @ with a circle
+;; 2. Replace any letter betwen @ with a circle
 ;;
 ;;(defun svg-tag-round (text)
 ;;  (svg-tag-make (substring text 1 -1) nil 1 1 12))
-;;(setq svg-tag-tags
-;;  '(("\\(=[0-9a-zA-Z- ]+?=\\)" 1
-;; `(face nil display ,(svg-tag-round (match-string 0))
+;;(setq svg-tag-tags '(("([0-9])" svg-tag-round)))
 ;;(svg-tag-mode)
 ;;
 ;;; Code:
 (require 'svg)
 (eval-when-compile (require 'subr-x))
 
-(defvar svg-tag-tags nil)
+;; (defvar svg-tag-tags nil)
 (defvar svg-tag-tags--active nil)
 
 (defgroup svg-tag nil
@@ -113,19 +98,18 @@ This should be zero for most fonts but some fonts may need 
this."
   "Default face for tag"
   :group 'svg-tag)
 
-;; (defcustom svg-tag-tags
-;;   '((":TODO:" . (svg-tag-make "TODO")))
-;;   "An alist mapping keywords to tags used to display them.
+(defcustom svg-tag-tags
+  '((":TODO:" . (svg-tag-make "TODO")))
+  "An alist mapping keywords to tags used to display them.
 
-;; Each entry has the form (keyword . tag). Keyword is used as part
-;; of a regular expression and tag can be either a svg tag
-;; previously created by svg-tag-make or a function that takes a
-;; string as argument and returns a tag. When tag is a function, this
-;; allows to create dynamic tags."
-  
-;;   :group 'svg-tag-mode
-;;   :type '(repeat (cons (string :tag "Keyword")
-;;(sexp   :tag "Tag"
+Each entry has the form (keyword . tag). Keyword is used as part
+of a regular expression and tag can be either a svg tag
+previously created by svg-tag-make or a function that takes a
+string as argument and returns a t

[elpa] externals/svg-tag-mode 63d8710d1a 04/63: Better example syntax

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 63d8710d1a742f339d138b83a3ed2630aeb1a28a
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Better example syntax
---
 README.org  |   9 +++--
 example.el  |  24 
 screenshot.png  | Bin 415543 -> 0 bytes
 svg-tag-off.png | Bin 0 -> 289428 bytes
 svg-tag-on.png  | Bin 0 -> 311424 bytes
 5 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/README.org b/README.org
index 33c8df51cf..5f3297a27a 100644
--- a/README.org
+++ b/README.org
@@ -13,6 +13,11 @@ box labels. See [[file:/example.el][example.el]] for example 
usage.
 
 *** Demonstration 
 
-Open [[file:/example.el][example.el]] and evaluate buffer
+Open [[file:/example.el][example.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
+
+*SVG tag mode on*
+[[./svg-tag-on.png]]
+
+*SVG tag mode off*
+[[./svg-tag-off.png]]
 
-[[./screenshot.png]]
diff --git a/example.el b/example.el
index 51dcf098d3..4df1ebed81 100644
--- a/example.el
+++ b/example.el
@@ -13,7 +13,6 @@
 ;;
 ;; For a full copy of the GNU General Public License
 ;; see .
-
 (require 'svg-tag-mode)
 
 (defface svg-tag-note-face
@@ -37,35 +36,36 @@
 (setq svg-tags
   '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
 ("\\(:NOTE:\\)" 1 `(face nil display ,svg-tag-note))
-("\\(\@[0-9a-zA-Z]\@\\)" 1
+("\\(\([0-9a-zA-Z]\)\\)" 1
  `(face nil display ,(svg-tag-round (match-string 0
-("\\(\@[0-9a-zA-Z][0-9a-zA-Z]\@\\)" 1
+("\\(\([0-9a-zA-Z][0-9a-zA-Z]\)\\)" 1
  `(face nil display ,(svg-tag-quasi-round (match-string 0
-("\\(=[0-9a-zA-Z- ]+?=\\)" 1
+("\\(|[0-9a-zA-Z- ]+?|\\)" 1
  `(face nil display ,(svg-tag-keyboard (match-string 0))
 
 (svg-tag-mode 1)
 
 ;; A tag function using SVG to display a rounded box with outer and inner
 ;; padding and a controllable box radius. The resulting SVG is perfectly
-;; aligned with regular text such that a =TAG= can be inserted and edited
+;; aligned with regular text such that a |TAG| can be inserted and edited
 ;; anywhere in the text thanks to font-lock and the display property.
 
 ;;|:TODO:| Make a minor mode
 ;;|:NOTE:| Don't know how to do it, help needed…
 ;;|__| Perfect alignment with regular text
 ;;
-;;  Save . =C-x=+=C-s=  Help ... =C-h=
-;;  Save as .. =C-x=+=C-w=  Cancel . =C-g=
-;;  Open a new file .. =C-x=+=C-f=  Undo ... =C-z=
-;;  Open recent .. =C-x=+=C-r=  Close buffer ... =C-x=+=k=
-;;  Browse directory ..=C-x=+=d=Quit ... =C-x=+=C-c=
+;;  Save . |C-x|+|C-s|  Help ... |C-h|
+;;  Save as .. |C-x|+|C-w|  Cancel . |C-g|
+;;  Open a new file .. |C-x|+|C-f|  Undo ... |C-z|
+;;  Open recent .. |C-x|+|C-r|  Close buffer ... |C-x|+|k|
+;;  Browse directory ..|C-x|+|d|Quit ... |C-x|+|C-c|
 
 ;; 
 ;; :NOTE: Sections can be folded or unfolded. If you think a section has
 ;;disappeared, it's probably because it is folded. To unfold it,
-;;place the cursor on the section title and press the =tab= key.
+;;place the cursor on the section title and press the |tab| key.
 ;; 
-;; @1@@2@@3@@4@@5@@Z@@W@@12@@99@
+;; (1)(2)(3)(4)(5)(Z)(W)(12)(99)
 ;; 
 
+
diff --git a/screenshot.png b/screenshot.png
deleted file mode 100644
index f5fe148da6..00
Binary files a/screenshot.png and /dev/null differ
diff --git a/svg-tag-off.png b/svg-tag-off.png
new file mode 100644
index 00..4a907b128d
Binary files /dev/null and b/svg-tag-off.png differ
diff --git a/svg-tag-on.png b/svg-tag-on.png
new file mode 100644
index 00..a0fc3464e3
Binary files /dev/null and b/svg-tag-on.png differ



[elpa] externals/svg-tag-mode 664fbec919 01/63: First version

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 664fbec919ebba79fb9ca4b8ffc6300e62b776d3
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

First version
---
 LICENSE.txt | 674 
 README.org  |   6 +
 example.el  |  67 ++
 screenshot.png  | Bin 0 -> 415543 bytes
 svg-tag-mode.el | 148 +
 5 files changed, 895 insertions(+)

diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00..f288702d2f
--- /dev/null
+++ b/LICENSE.txt
@@ -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 prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the

[elpa] externals/svg-tag-mode 2dc379039a 15/63: Updated example

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 2dc379039a2e45f20103be9c922bb7059ae3a812
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated example
---
 example.el | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/example.el b/example.el
index aa9a2d07dd..70b983e4b1 100644
--- a/example.el
+++ b/example.el
@@ -49,25 +49,23 @@
 
 (svg-tag-mode 1)
 
-;; A tag function using SVG to display a rounded box with outer and inner
-;; padding and a controllable box radius. The resulting SVG is perfectly
-;; aligned with regular text such that a |TAG| can be inserted and edited
-;; anywhere in the text thanks to font-lock and the display property.
-
-;;|:TODO:| Make a minor mode
-;;|:NOTE:| Don't know how to do it, help needed…
-;;|__| Perfect alignment with regular text
+;;
+;; :NOTE: SVG tag is a minor mode that displays a rounded box with outer
+;;and inner padding and a controllable box radius. The resulting
+;;SVG is perfectly aligned with regular text such that a |TAG|
+;;can be inserted and edited anywhere in the text thanks to
+;;font-lock and the display property.
+;; :TODO: Migrate to ELPA or MELPA
+;; 
+;; More examples:
+;; --
 ;;
 ;;  Save . |C-x|+|C-s|  Help ... |C-h|
 ;;  Save as .. |C-x|+|C-w|  Cancel . |C-g|
 ;;  Open a new file .. |C-x|+|C-f|  Undo ... |C-z|
 ;;  Open recent .. |C-x|+|C-r|  Close buffer ... |C-x|+|k|
 ;;  Browse directory ..|C-x|+|d|Quit ... |C-x|+|C-c|
-
-;; 
-;; :NOTE: Sections can be folded or unfolded. If you think a section has
-;;disappeared, it's probably because it is folded. To unfold it,
-;;place the cursor on the section title and press the |tab| key.
+;;
 ;; 
 ;; (1)(2)(3)(4)(5)(Z)(W)(12)(99)
 ;; 



[elpa] externals/svg-tag-mode 4894900f52 10/63: Merge pull request #6 from a13/main

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 4894900f5263b4e0ec732d0c61f2f4e1d0e4cba5
Merge: fe508895e1 de9aba3f37
Author: Nicolas P. Rougier 
Commit: GitHub 

Merge pull request #6 from a13/main

Fix style and naming
---
 svg-tag-mode.el | 56 +---
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index f93339be0c..5deb132bce 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://github.com/rougier/svg-tag-mode
 ;; Keywords: convenience
 
-;; Package-Requires: ((emacs "25"))
+;; Package-Requires: ((emacs "26.1"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -64,39 +64,39 @@
 (eval-when-compile (require 'subr-x))
 
 (defvar svg-tags nil)
-(defvar active-svg-tags nil)
+(defvar svg-tags--active-tags nil)
 
-(defgroup svg-tag-mode nil
+(defgroup svg-tag nil
   "Replace keywords with SVG rounded box labels"
   :group 'convenience
   :prefix "svg-tag-")
 
 (defcustom svg-tag-default-outer-padding 1
-  "Default outer padding (in characters, null or positive)"
+  "Default outer padding (in characters, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-default-inner-padding 1
-  "Default inner padding (in characters, null or positive)"
+  "Default inner padding (in characters, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-default-radius 3
-  "Default radius  (in pixels, null or positive)"
+  "Default radius  (in pixels, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-vertical-offset 0
   "Vertical offset for text (in pixels).
 This should be zero for most fonts but some fonts may need this."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-horizontal-offset 0
   "Horizontal offset for text (in pixels).
 This should be zero for most fonts but some fonts may need this."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defface svg-tag-default-face
   `((t :foreground "white"
@@ -106,7 +106,7 @@ This should be zero for most fonts but some fonts may need 
this."
:weight ,(face-attribute 'default :weight)
:height 120))
   "Default face for tag"
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   (let* ((face   (or face 'svg-tag-default-face))
@@ -129,25 +129,25 @@ This should be zero for most fonts but some fonts may 
need this."
  (text (string-trim text))
  (tag-width (* (+ (length text) inner-padding) txt-char-width))
  (tag-height (* txt-char-height 0.9))
- 
+
  (svg-width (+ tag-width (* outer-padding txt-char-width)))
  (svg-height tag-height)
 
  (tag-x (/ (- svg-width tag-width) 2))
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
- 
+
  (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
- 
+
 (svg-rectangle svg tag-x 0 tag-width tag-height
:fillborder
:rx  radius)
 (svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
-   (- tag-width stroke) (- tag-height stroke)
+   (- tag-width stroke) (- tag-height stroke)
:fillbackground
:rx  (- radius (/ stroke 2.0)))
-(svg-text  svg text 
+(svg-text  svg text
:font-family family
:font-weight weight
:font-size   size
@@ -158,23 +158,25 @@ This should be zero for most fonts but some fonts may 
need this."
 
 (defun svg-tag-mode-on ()
   (add-to-list 'font-lock-extra-managed-props 'display)
-  (if active-svg-tags
-  (font-lock-remove-keywords nil active-svg-tags))
-  (if svg-tags
-  (font-lock-add-keywords nil svg-tags))
-  (setq active-svg-tags (copy-sequence svg-tags))
+  (when svg-tags--active-tags
+(font-lock-remove-keywords nil svg-tags--active-tags))
+  (when svg-tags
+(font-lock-add-keywords nil svg-tags))
+  (setq svg-tags--active-tags (copy-sequence svg-tags))
   (message "SVG tag mode on"))
 
-(defun svg-tag-mode-off ()  
-  (if active-svg-tags
-  (font-lock-remove-keywords nil active-svg-tags))
-  (setq active-svg-tags nil)
+(defun svg-tag-mode-off ()
+  (when svg-tags--active-tags
+(font-lock-remove-keywords nil svg-tags--active-tags))
+  (setq svg-tags--active-tags nil)
   (message "SVG tag mode off"))
 
 (define-minor-mode svg-tag-mode
   "Minor mode for graphical tag as rounded box."
-  :group 'svg-tag-mode
+  :group 'svg-tag
   (if svg-tag-mode (svg-tag-mode-on) (svg-tag-mode-off))
   (font-lock-flush))
 
 (provide 'svg-

[elpa] externals/svg-tag-mode ffc6631dd2 16/63: Cosmetic

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit ffc6631dd25f433f8ee86ac574d7dc0ecd9c16b6
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Cosmetic
---
 example.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/example.el b/example.el
index 70b983e4b1..bb3572bc73 100644
--- a/example.el
+++ b/example.el
@@ -49,12 +49,11 @@
 
 (svg-tag-mode 1)
 
-;;
 ;; :NOTE: SVG tag is a minor mode that displays a rounded box with outer
-;;and inner padding and a controllable box radius. The resulting
-;;SVG is perfectly aligned with regular text such that a |TAG|
-;;can be inserted and edited anywhere in the text thanks to
-;;font-lock and the display property.
+;; and inner padding and a controllable box radius. The resulting SVG is
+;; perfectly aligned with regular text such that a |TAG| can be inserted
+;; and edited anywhere in the text.
+;;
 ;; :TODO: Migrate to ELPA or MELPA
 ;; 
 ;; More examples:



[elpa] externals/svg-tag-mode fe508895e1 08/63: Removed spurious backquote

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit fe508895e1f3b0e6a8d066e61c3dbec34cdfa3e1
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Removed spurious backquote
---
 svg-tag-mode.el | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index c5237d6837..f93339be0c 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -98,27 +98,23 @@ This should be zero for most fonts but some fonts may need 
this."
   :type 'integer
   :group 'svg-tag-mode)
 
-
 (defface svg-tag-default-face
   `((t :foreground "white"
:background "orange"
-   :box `(:line-width 1 :color "orange" :style nil)
+   :box (:line-width 1 :color "orange" :style nil)
:family ,(face-attribute 'default :family)
:weight ,(face-attribute 'default :weight)
:height 120))
   "Default face for tag"
   :group 'svg-tag-mode)
 
-(plist-get (eval (face-attribute 'svg-tag-default-face :box)) :line-width)
-
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   (let* ((face   (or face 'svg-tag-default-face))
  (foreground (face-attribute face :foreground))
  (background (face-attribute face :background))
- (border (plist-get (eval (face-attribute face :box)) :color))
- ;; Line below doesn't work for unknown reason
- ;; (stroke  (plist-get (eval (face-attribute face :box)) :line-width))
+ (border (plist-get (face-attribute face :box) :color))
  (stroke 1)
+ ;; (stroke (plist-get (face-attribute face :box) :line-width))
  (family (face-attribute face :family))
  (weight (face-attribute face :weight))
  (size   (/ (face-attribute face :height) 10))



[elpa] externals/svg-tag-mode 4fe6ce8681 13/63: Typo

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 4fe6ce868161537a79a7ec290278b8a8606fb0ff
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Typo
---
 svg-tag-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index c1a7dc4423..4b3bb6e1c6 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -184,7 +184,7 @@ This should be zero for most fonts but some fonts may need 
this."
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil svg-tag-tags--active))
   (when svg-tag-tags
-(font-lock-add-keywords nil svg-tags))
+(font-lock-add-keywords nil svg-tag-tags))
   (setq svg-tag-tags--active (copy-sequence svg-tag-tags))
   (message "SVG tag mode on"))
 



[elpa] externals/svg-tag-mode 0125ceca29 22/63: Fix README

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 0125ceca29f45b29c5185043951c2e32322f
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fix README
---
 README.org   |  4 ++--
 example-2.el | 12 +---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 5f3297a27a..84c6abd715 100644
--- a/README.org
+++ b/README.org
@@ -1,7 +1,7 @@
 ** SVG tag minor mode (Emacs)
 
 A small minor mode to replace keywords or regular expression with SVG rounded
-box labels. See [[file:/example.el][example.el]] for example usage.
+box labels. See [[file:example-1.el][example-1.el]] and 
[[file:example-2.el][example-2.el]] for example usage.
 
 *** Installation
 
@@ -13,7 +13,7 @@ box labels. See [[file:/example.el][example.el]] for example 
usage.
 
 *** Demonstration 
 
-Open [[file:/example.el][example.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
+Open [[file:example-1.el][example-1.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
 
 *SVG tag mode on*
 [[./svg-tag-on.png]]
diff --git a/example-2.el b/example-2.el
index 69e91ff0ba..0e98fd8acc 100644
--- a/example-2.el
+++ b/example-2.el
@@ -31,7 +31,7 @@
   "Face for DONE  svg tag" :group nil)
 
 (defface svg-tag-date-face
-  '((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
+  '((t :foreground "black" :background "#ECEFF1" :box "#ECEFF1"
:family "Roboto Mono" :weight light :height 120))
   "Face for date svg tag" :group nil)
 
@@ -70,9 +70,15 @@
 
 (svg-tag-mode 1)
 
-;; To do:   TODO  NEXT  HOLD  DONE  
-;; Tags:   @MEETING:@NOTE:
+;; To do:  TODO  NEXT  HOLD  DONE  
+;; Tags:   :@MEETING:@NOTE:
 ;; Priorities: [#A] [#B] [#C]
 ;; Date:   <2020-11-07 Sat>
 
+;;  DONE Make a pull request on melpa <2020-11-07 
Sat>
+;;  NEXT Wait for review
+;;  TODO Post on Reddit
+
+
+
 



[elpa] externals/svg-tag-mode 2bcf213527 26/63: Added global mode

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 2bcf2135276b634b2cac7b66b4addfefc1ee502f
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added global mode
---
 example-2.el|  2 +-
 svg-tag-mode.el | 12 
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/example-2.el b/example-2.el
index a5f54c978e..9670b35a08 100644
--- a/example-2.el
+++ b/example-2.el
@@ -68,7 +68,7 @@
 ("<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [A-Za-z]\\{3\\}>"
 . svg-tag-make-org-date)))
 
-(svg-tag-mode 1)
+(global-svg-tag-mode)
 
 ;; To do:  TODO  NEXT  HOLD  DONE  
 ;; Tags:   :@MEETING:@NOTE:
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 9ade4494c7..07fe80e433 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -198,7 +198,8 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
 (font-lock-add-keywords nil
 (mapcar 'svg-tag--build-keywords svg-tag-tags)))
   (setq svg-tag-tags--active (copy-sequence svg-tag-tags))
-  (message "SVG tag mode on"))
+  (message "SVG tag mode on")
+  (font-lock-flush))
 
 (defun svg-tag-mode-off ()
   "Deactivate SVG tag mode."
@@ -206,13 +207,16 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the 
visual aspect of the box."
 (font-lock-remove-keywords nil
(mapcar 'svg-tag--build-keywords svg-tag-tags--active)))
   (setq svg-tag-tags--active nil)
-  (message "SVG tag mode off"))
+  (message "SVG tag mode off")
+  (font-lock-flush))
 
 (define-minor-mode svg-tag-mode
   "Minor mode for graphical tag as rounded box."
   :group 'svg-tag
-  (if svg-tag-mode (svg-tag-mode-on) (svg-tag-mode-off))
-  (font-lock-flush))
+  (if svg-tag-mode (svg-tag-mode-on) (svg-tag-mode-off)))
+
+(define-globalized-minor-mode
+   global-svg-tag-mode svg-tag-mode svg-tag-mode-on)
 
 (provide 'svg-tag-mode)
 



[elpa] externals/svg-tag-mode de9aba3f37 09/63: Fix style and naming

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit de9aba3f37f9ed19f79e14f18007fff188900afd
Author: DK 
Commit: DK 

Fix style and naming
---
 svg-tag-mode.el | 56 +---
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index f93339be0c..5deb132bce 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://github.com/rougier/svg-tag-mode
 ;; Keywords: convenience
 
-;; Package-Requires: ((emacs "25"))
+;; Package-Requires: ((emacs "26.1"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -64,39 +64,39 @@
 (eval-when-compile (require 'subr-x))
 
 (defvar svg-tags nil)
-(defvar active-svg-tags nil)
+(defvar svg-tags--active-tags nil)
 
-(defgroup svg-tag-mode nil
+(defgroup svg-tag nil
   "Replace keywords with SVG rounded box labels"
   :group 'convenience
   :prefix "svg-tag-")
 
 (defcustom svg-tag-default-outer-padding 1
-  "Default outer padding (in characters, null or positive)"
+  "Default outer padding (in characters, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-default-inner-padding 1
-  "Default inner padding (in characters, null or positive)"
+  "Default inner padding (in characters, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-default-radius 3
-  "Default radius  (in pixels, null or positive)"
+  "Default radius  (in pixels, null or positive)."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-vertical-offset 0
   "Vertical offset for text (in pixels).
 This should be zero for most fonts but some fonts may need this."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defcustom svg-tag-horizontal-offset 0
   "Horizontal offset for text (in pixels).
 This should be zero for most fonts but some fonts may need this."
   :type 'integer
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defface svg-tag-default-face
   `((t :foreground "white"
@@ -106,7 +106,7 @@ This should be zero for most fonts but some fonts may need 
this."
:weight ,(face-attribute 'default :weight)
:height 120))
   "Default face for tag"
-  :group 'svg-tag-mode)
+  :group 'svg-tag)
 
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   (let* ((face   (or face 'svg-tag-default-face))
@@ -129,25 +129,25 @@ This should be zero for most fonts but some fonts may 
need this."
  (text (string-trim text))
  (tag-width (* (+ (length text) inner-padding) txt-char-width))
  (tag-height (* txt-char-height 0.9))
- 
+
  (svg-width (+ tag-width (* outer-padding txt-char-width)))
  (svg-height tag-height)
 
  (tag-x (/ (- svg-width tag-width) 2))
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
- 
+
  (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
- 
+
 (svg-rectangle svg tag-x 0 tag-width tag-height
:fillborder
:rx  radius)
 (svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
-   (- tag-width stroke) (- tag-height stroke)
+   (- tag-width stroke) (- tag-height stroke)
:fillbackground
:rx  (- radius (/ stroke 2.0)))
-(svg-text  svg text 
+(svg-text  svg text
:font-family family
:font-weight weight
:font-size   size
@@ -158,23 +158,25 @@ This should be zero for most fonts but some fonts may 
need this."
 
 (defun svg-tag-mode-on ()
   (add-to-list 'font-lock-extra-managed-props 'display)
-  (if active-svg-tags
-  (font-lock-remove-keywords nil active-svg-tags))
-  (if svg-tags
-  (font-lock-add-keywords nil svg-tags))
-  (setq active-svg-tags (copy-sequence svg-tags))
+  (when svg-tags--active-tags
+(font-lock-remove-keywords nil svg-tags--active-tags))
+  (when svg-tags
+(font-lock-add-keywords nil svg-tags))
+  (setq svg-tags--active-tags (copy-sequence svg-tags))
   (message "SVG tag mode on"))
 
-(defun svg-tag-mode-off ()  
-  (if active-svg-tags
-  (font-lock-remove-keywords nil active-svg-tags))
-  (setq active-svg-tags nil)
+(defun svg-tag-mode-off ()
+  (when svg-tags--active-tags
+(font-lock-remove-keywords nil svg-tags--active-tags))
+  (setq svg-tags--active-tags nil)
   (message "SVG tag mode off"))
 
 (define-minor-mode svg-tag-mode
   "Minor mode for graphical tag as rounded box."
-  :group 'svg-tag-mode
+  :group 'svg-tag
   (if svg-tag-mode (svg-tag-mode-on) (svg-tag-mode-off))
   (font-lock-flush))
 
 (provide 'svg-tag-mode)
+
+;;; svg-tag-mode.el ends here



[elpa] externals/svg-tag-mode fc57d2d4bb 11/63: Normalized names

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit fc57d2d4bb7bcfca35d4aa875f819a875cfcdddf
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Normalized names
---
 svg-tag-mode.el | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 5deb132bce..9623050cbf 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -34,7 +34,7 @@
 ;; 1. Replace :TODO: keyword with default face/padding/radius
 ;;
 ;;(setq svg-tag-todo (svg-tag-make "TODO"))
-;;(setq svg-tags
+;;(setq svg-tag-tags
 ;;  '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
 ;;(svg-tag-mode)
 ;;
@@ -46,7 +46,7 @@
 ;;   :family "Roboto Mono" :weight light :height 120))
 ;;  "Face for note tag" :group nil)
 ;;(setq svg-tag-todo (svg-tag-make "TODO" svg-tag-todo-face 1 1 3))
-;;(setq svg-tags
+;;(setq svg-tag-tags
 ;;  '(("\\(:TODO:\\)" 1 `(face nil display ,svg-tag-todo))
 ;;(svg-tag-mode)
 ;;
@@ -54,7 +54,7 @@
 ;;
 ;;(defun svg-tag-round (text)
 ;;  (svg-tag-make (substring text 1 -1) nil 1 1 12))
-;;(setq svg-tags
+;;(setq svg-tag-tags
 ;;  '(("\\(=[0-9a-zA-Z- ]+?=\\)" 1
 ;; `(face nil display ,(svg-tag-round (match-string 0))
 ;;(svg-tag-mode)
@@ -63,8 +63,8 @@
 (require 'svg)
 (eval-when-compile (require 'subr-x))
 
-(defvar svg-tags nil)
-(defvar svg-tags--active-tags nil)
+(defvar svg-tag-tags nil)
+(defvar svg-tag-tags--active nil)
 
 (defgroup svg-tag nil
   "Replace keywords with SVG rounded box labels"
@@ -158,17 +158,17 @@ This should be zero for most fonts but some fonts may 
need this."
 
 (defun svg-tag-mode-on ()
   (add-to-list 'font-lock-extra-managed-props 'display)
-  (when svg-tags--active-tags
-(font-lock-remove-keywords nil svg-tags--active-tags))
-  (when svg-tags
+  (when svg-tag-tags--active
+(font-lock-remove-keywords nil svg-tag-tags--active))
+  (when svg-tag-tags
 (font-lock-add-keywords nil svg-tags))
-  (setq svg-tags--active-tags (copy-sequence svg-tags))
+  (setq svg-tag-tags--active (copy-sequence svg-tag-tags))
   (message "SVG tag mode on"))
 
 (defun svg-tag-mode-off ()
-  (when svg-tags--active-tags
-(font-lock-remove-keywords nil svg-tags--active-tags))
-  (setq svg-tags--active-tags nil)
+  (when svg-tag-tags--active
+(font-lock-remove-keywords nil svg-tag-tags--active))
+  (setq svg-tag-tags--active nil)
   (message "SVG tag mode off"))
 
 (define-minor-mode svg-tag-mode



[elpa] externals/svg-tag-mode 83fc912461 51/63: Updated screenshots

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 83fc9124616b43e48769abb7ff0407421250865b
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated screenshots
---
 README.md   |   4 ++--
 images/example-1.png| Bin 0 -> 135200 bytes
 images/example-2.png| Bin 0 -> 97119 bytes
 images/org-mode.png | Bin 67030 -> 0 bytes
 images/svg-tag-mode.png | Bin 19 -> 0 bytes
 5 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index df7bb67256..981fefb7a8 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,9 @@
 
 A minor mode to replace keywords or regular expression with SVG tags.
 
-![](images/svg-tag-mode.png)
+[![](images/example-1.png)](examples/example-1.el)
 
-![](images/org-mode.png)
+[![](images/example-2.png)](examples/example-2.el)
 
 
 ### Usage example
diff --git a/images/example-1.png b/images/example-1.png
new file mode 100644
index 00..76c6e1bcd7
Binary files /dev/null and b/images/example-1.png differ
diff --git a/images/example-2.png b/images/example-2.png
new file mode 100644
index 00..dc94ee5647
Binary files /dev/null and b/images/example-2.png differ
diff --git a/images/org-mode.png b/images/org-mode.png
deleted file mode 100644
index 1ff4d44e99..00
Binary files a/images/org-mode.png and /dev/null differ
diff --git a/images/svg-tag-mode.png b/images/svg-tag-mode.png
deleted file mode 100644
index 741e162c6e..00
Binary files a/images/svg-tag-mode.png and /dev/null differ



[elpa] externals/svg-tag-mode 7a4e0df952 17/63: Added org-mode example

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 7a4e0df952121d9385735174857a60d7822eb0b8
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added org-mode example
---
 example.el => example-1.el | 33 +---
 example-2.el   | 78 ++
 svg-tag-mode.el|  7 +++--
 3 files changed, 104 insertions(+), 14 deletions(-)

diff --git a/example.el b/example-1.el
similarity index 64%
rename from example.el
rename to example-1.el
index bb3572bc73..7942c3ea4a 100644
--- a/example.el
+++ b/example-1.el
@@ -13,7 +13,7 @@
 ;;
 ;; For a full copy of the GNU General Public License
 ;; see .
-;; (require 'svg-tag-mode)
+(require 'svg-tag-mode)
 
 (defface svg-tag-note-face
   '((t :foreground "black" :background "white" :box "black"
@@ -25,11 +25,16 @@
:family "Roboto Mono" :weight light :height 120))
   "Face for keyboard bindings tag" :group nil)
 
+(defface svg-tag-org-face
+  '((t :foreground "#33" :background "#f0" :box "#33"
+   :family "Roboto Mono" :weight light :height 120))
+  "Face for keyboard bindings tag" :group nil)
+
 (setq svg-tag-todo
   (svg-tag-make "TODO" nil 1 1 2))
 
 (setq svg-tag-note
-  (svg-tag-make "NOTE" 'svg-tag-note-face 1 1 2))
+  (svg-tag-make "NOTE" 'svg-tag-note-face 2 0 2))
 
 (defun svg-tag-round (text)
   (svg-tag-make (substring text 1 -1) 'svg-tag-note-face 1 1 12))
@@ -40,12 +45,16 @@
 (defun svg-tag-keyboard (text)
   (svg-tag-make (substring text 1 -1) 'svg-tag-keyboard-face 1 1 2))
 
+(defun svg-tag-org (text)
+  (svg-tag-make (substring text 1 -1) 'svg-tag-org-face 1 1 2))
+
 (setq svg-tag-tags
-'((":TODO:" . svg-tag-todo)
-  (":NOTE:" . svg-tag-note)
-  ("\([0-9a-zA-Z]\)". svg-tag-round)
-  ("\([0-9a-zA-Z][0-9a-zA-Z]\)" . svg-tag-quasi-round)
-  ("|[0-9a-zA-Z- ]+?|"  . svg-tag-keyboard)))
+  '(("@[0-9a-zA-Z]+:"   . svg-tag-org)
+(":TODO:"   . svg-tag-todo)
+(":NOTE:"   . svg-tag-note)
+("\([0-9a-zA-Z]\)"  . svg-tag-round)
+("\([0-9a-zA-Z][0-9a-zA-Z]\)"   . svg-tag-quasi-round)
+("|[0-9a-zA-Z- ⇥>http://www.gnu.org/licenses/>.
+(require 'svg-tag-mode)
+
+(defface svg-tag-todo-face
+  '((t :foreground "#ff" :background "#FFAB91" :box "#FFAB91"
+   :family "Roboto Mono" :weight light :height 120))
+  "Face for TODO  svg tag" :group nil)
+
+(defface svg-tag-next-face
+  '((t :foreground "white" :background "#673AB7" :box "#673AB7"
+   :family "Roboto Mono" :weight light :height 120))
+  "Face for NEXT svg tag" :group nil)
+
+(defface svg-tag-done-face
+  '((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
+   :family "Roboto Mono" :weight light :height 120))
+  "Face for DONE  svg tag" :group nil)
+
+(defface svg-tag-date-face
+  '((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
+   :family "Roboto Mono" :weight light :height 120))
+  "Face for date svg tag" :group nil)
+
+(defface svg-tag-org-face
+  '((t :foreground "black" :background "white" :box "black"
+   :family "Roboto Mono" :weight light :height 120))
+  "Default face for svg tag" :group nil)
+
+(setq radius 2)
+
+(setq svg-tag-org-todo (svg-tag-make "TODO" 'svg-tag-todo-face 1 1 radius))
+(setq svg-tag-org-done (svg-tag-make "DONE" 'svg-tag-done-face 1 1 radius))
+(setq svg-tag-org-hold (svg-tag-make "HOLD" 'svg-tag-done-face 1 1 radius))
+(setq svg-tag-org-next (svg-tag-make "NEXT" 'svg-tag-next-face 1 1 radius))
+(setq svg-tag-org-note (svg-tag-make "NOTE" 'svg-tag-org-face  1 1 radius))
+
+(defun svg-tag-make-org-todo (text)
+  (svg-tag-make (substring text 1 -1) 'svg-tag-done-face 1 1 radius))
+(defun svg-tag-make-org-tag (text)
+  (svg-tag-make (substring text 1 -1) 'svg-tag-org-face 1 1 radius))
+(defun svg-tag-make-org-priority (text)
+  (svg-tag-make (substring text 2 -1) 'svg-tag-org-face 1 0 radius))
+(defun svg-tag-make-org-date (text)
+  (svg-tag-make (substring text 1 -1) 'svg-tag-date-face 0 0 radius))
+
+(setq svg-tag-tags
+  '(("@[0-9a-zA-Z]+:"   . svg-tag-make-org-tag)
+("\\[#[ABC]\\]" . svg-tag-make-org-priority)
+(" TODO "   . svg-tag-org-todo)
+(" DONE "   . svg-tag-org-done)
+(" NEXT "   . svg-tag-org-next)
+(" HOLD "   . svg-tag-org-hold)
+(" NOTE "   . svg-tag-org-note)
+("<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [A-Za-z]\\{3\\}>"
+. svg-tag-make-org-date)))
+
+(svg-tag-mode 1)
+
+;; To do:   TODO  NEXT  HOLD  DONE  
+;; Tags:   @MEETING:@NOTE:
+;; Priorities: [#A] [#B] [#C]
+;; Date:   <2020-11-07 Sat>
+
+
diff --git a/svg-tag-mode.el b

[elpa] externals/svg-tag-mode 87489d2845 31/63: Fixed warning (see https://github.com/melpa/melpa/pull/7217#issuecomment-735307276)

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 87489d28450559078aa15b4a435143a297508e48
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed warning (see 
https://github.com/melpa/melpa/pull/7217#issuecomment-735307276)
---
 svg-tag-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 16b842da17..1347bcaf25 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -191,7 +191,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
 
 (defun svg-tag-mode-on ()
   "Activate SVG tag mode."
-  (add-to-list #'font-lock-extra-managed-props 'display)
+  (add-to-list 'font-lock-extra-managed-props 'display)
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
   (mapcar #'svg-tag--build-keywords svg-tag-tags--active)))



[elpa] externals/svg-tag-mode a5af3041c4 07/63: Added customizable options

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit a5af3041c43a3cb301fad2144023b9e7893359cb
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added customizable options
---
 example.el  |  1 -
 svg-tag-mode.el | 65 -
 2 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/example.el b/example.el
index 4df1ebed81..813256b852 100644
--- a/example.el
+++ b/example.el
@@ -68,4 +68,3 @@
 ;; (1)(2)(3)(4)(5)(Z)(W)(12)(99)
 ;; 
 
-
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 3f220843eb..c5237d6837 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -66,25 +66,59 @@
 (defvar svg-tags nil)
 (defvar active-svg-tags nil)
 
-(defgroup svg-tag nil
-  "SVG tag mode"
-  :group 'faces)
+(defgroup svg-tag-mode nil
+  "Replace keywords with SVG rounded box labels"
+  :group 'convenience
+  :prefix "svg-tag-")
+
+(defcustom svg-tag-default-outer-padding 1
+  "Default outer padding (in characters, null or positive)"
+  :type 'integer
+  :group 'svg-tag-mode)
+
+(defcustom svg-tag-default-inner-padding 1
+  "Default inner padding (in characters, null or positive)"
+  :type 'integer
+  :group 'svg-tag-mode)
+
+(defcustom svg-tag-default-radius 3
+  "Default radius  (in pixels, null or positive)"
+  :type 'integer
+  :group 'svg-tag-mode)
+
+(defcustom svg-tag-vertical-offset 0
+  "Vertical offset for text (in pixels).
+This should be zero for most fonts but some fonts may need this."
+  :type 'integer
+  :group 'svg-tag-mode)
+
+(defcustom svg-tag-horizontal-offset 0
+  "Horizontal offset for text (in pixels).
+This should be zero for most fonts but some fonts may need this."
+  :type 'integer
+  :group 'svg-tag-mode)
+
 
 (defface svg-tag-default-face
-  '((t :foreground "white"
+  `((t :foreground "white"
:background "orange"
-   :box "orange"
-   :family "Roboto Mono"
-   :weight light
+   :box `(:line-width 1 :color "orange" :style nil)
+   :family ,(face-attribute 'default :family)
+   :weight ,(face-attribute 'default :weight)
:height 120))
   "Default face for tag"
   :group 'svg-tag-mode)
 
+(plist-get (eval (face-attribute 'svg-tag-default-face :box)) :line-width)
+
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   (let* ((face   (or face 'svg-tag-default-face))
  (foreground (face-attribute face :foreground))
  (background (face-attribute face :background))
- (border (face-attribute face :box))
+ (border (plist-get (eval (face-attribute face :box)) :color))
+ ;; Line below doesn't work for unknown reason
+ ;; (stroke  (plist-get (eval (face-attribute face :box)) :line-width))
+ (stroke 1)
  (family (face-attribute face :family))
  (weight (face-attribute face :weight))
  (size   (/ (face-attribute face :height) 10))
@@ -93,8 +127,8 @@
  (tag-char-height (window-font-height nil face))
  (txt-char-width  (window-font-width))
  (txt-char-height (window-font-height))
- (inner-padding   (or inner-padding 1))
- (outer-padding   (or outer-padding 0))
+ (inner-padding   (or inner-padding svg-tag-default-inner-padding))
+ (outer-padding   (or outer-padding svg-tag-default-outer-padding))
 
  (text (string-trim text))
  (tag-width (* (+ (length text) inner-padding) txt-char-width))
@@ -107,22 +141,23 @@
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
  
- (radius  (or radius 3))
+ (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
  
 (svg-rectangle svg tag-x 0 tag-width tag-height
:fillborder
:rx  radius)
-(svg-rectangle svg (+ tag-x 0.5) 0.5 (- tag-width 1.0) (- tag-height 1.0)
+(svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
+   (- tag-width stroke) (- tag-height stroke)
:fillbackground
-   :rx  (- radius 0.5))
+   :rx  (- radius (/ stroke 2.0)))
 (svg-text  svg text 
:font-family family
:font-weight weight
:font-size   size
:fillforeground
-   :x   text-x
-   :y   text-y)
+   :x   (+ text-x svg-tag-horizontal-offset)
+   :y   (+ text-y svg-tag-vertical-offset))
 (svg-image svg :ascent 'center)))
 
 (defun svg-tag-mode-on ()



[elpa] externals/svg-tag-mode aca351185b 52/63: Fixed documentation.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit aca351185be66e1ca4f16135b7bcdce5e5461c3b
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed documentation.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 981fefb7a8..357b19716e 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ You need first to set `svg-tag-tags` that is a list of item 
here each
 item has the form `(KEYWORD (TAG COMMAND HELP))` where:
 
 - **KEYWORD** is a regular expression including a matched group of 
-  the form "\\(xxx\\)". If this is not the case the whole
+  the form `\\(xxx\\)`. If this is not the case the whole
   string will be used a the matched group.
 - **TAG** is either a SVG image that will be displayed using the
   'display property or a function that accepts a unique string



[elpa] externals/svg-tag-mode 837dfbdd06 48/63: Fixed documentation.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 837dfbdd06d010e2fa4074a8b8363d6715d7a3e0
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed documentation.
---
 README.md | 2 +-
 examples/example-3.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index b1507b6d85..df7bb67256 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ then you can invoke mode with `M-x svg-tag-mode`. Here are 
some examples:
 ```
 
 
-3. Replace any occurence of `:TODO:` with a static SVG tag displaying
+3. Replace any occurence of `:TODO:` with a dynamic SVG tag displaying
`:TODO:`
 
 ```lisp
diff --git a/examples/example-3.el b/examples/example-3.el
index ddf02f4ba1..c6d88e7c42 100644
--- a/examples/example-3.el
+++ b/examples/example-3.el
@@ -13,7 +13,7 @@
(lambda () (interactive) (message "Hello world!"))
"Print a greeting message"
 
-;; This replaces any occurence of ":TODO:" with a static SVG tag
+;; This replaces any occurence of ":TODO:" with a dynamic SVG tag
 ;; displaying ":TODO:"
 (setq svg-tag-tags
   '((":TODO:" . (svg-tag-make



[elpa] externals/svg-tag-mode 9649055e90 20/63: Trying to fix header

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 9649055e9021fb8b5e9f71a80971162f4efa406a
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Trying to fix header
---
 svg-tag-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 5b20a24645..655a90c4fc 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -1,6 +1,6 @@
-;;; svg-tag-mode.el --- Replace keywords with SVG tags  -*- lexical-binding: t 
-*-
+;;; svg-tag-mode.el --- Replace keywords with SVG tags -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2020  Nicolas P. Rougier
+;; Copyright (C) 2020 Nicolas P. Rougier
 
 ;; Author: Nicolas P. Rougier 
 ;; Homepage: https://github.com/rougier/svg-tag-mode



[elpa] externals/svg-tag-mode 4fdc7ffbb3 23/63: Fixed font weights

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 4fdc7ffbb30175fc483dc4078664b95a5299e150
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed font weights
---
 example-2.el| 18 +++---
 svg-tag-mode.el | 14 +-
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/example-2.el b/example-2.el
index 0e98fd8acc..a5f54c978e 100644
--- a/example-2.el
+++ b/example-2.el
@@ -17,17 +17,17 @@
 
 (defface svg-tag-todo-face
   '((t :foreground "#ff" :background "#FFAB91" :box "#FFAB91"
-   :family "Roboto Mono" :weight light :height 120))
+   :family "Roboto Mono" :weight regular :height 120))
   "Face for TODO  svg tag" :group nil)
 
 (defface svg-tag-next-face
   '((t :foreground "white" :background "#673AB7" :box "#673AB7"
-   :family "Roboto Mono" :weight light :height 120))
+   :family "Roboto Mono" :weight regular :height 120))
   "Face for NEXT svg tag" :group nil)
 
 (defface svg-tag-done-face
   '((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
-   :family "Roboto Mono" :weight light :height 120))
+   :family "Roboto Mono" :weight regular :height 120))
   "Face for DONE  svg tag" :group nil)
 
 (defface svg-tag-date-face
@@ -37,7 +37,7 @@
 
 (defface svg-tag-org-face
   '((t :foreground "black" :background "white" :box "black"
-   :family "Roboto Mono" :weight light :height 120))
+   :family "Roboto Mono" :weight regular :height 120))
   "Default face for svg tag" :group nil)
 
 (setq radius 2)
@@ -75,10 +75,6 @@
 ;; Priorities: [#A] [#B] [#C]
 ;; Date:   <2020-11-07 Sat>
 
-;;  DONE Make a pull request on melpa <2020-11-07 
Sat>
-;;  NEXT Wait for review
-;;  TODO Post on Reddit
-
-
-
-
+;; DONE Make a pull request on melpa <2020-11-07 
Sat>
+;; NEXT Wait for review
+;; TODO Post on Reddit
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index a15a1aeefd..9c664e0402 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -112,6 +112,16 @@ allows to create dynamic tags."
   :type '(repeat (cons (string :tag "Keyword")
(sexp   :tag "Tag"
 
+;; SVG font weights translation
+(setq svg-tag--font-weights '((thin   . 100)
+  (ultralight . 200)
+  (light  . 300)
+  (regular. 400)
+  (medium . 500)
+  (semibold   . 600)
+  (bold   . 700)
+  (extrabold  . 800)
+  (black  . 900)))
 
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   "Create a SVG image displaying TEXT in a rounded box using FACE style.
@@ -126,7 +136,9 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
  (line-width (or (plist-get (face-attribute face :box) :line-width)
  svg-tag-default-line-width))
  (family (face-attribute face :family))
- (weight (face-attribute face :weight))
+;; (weight (face-attribute face :weight))
+ (weight (cdr (assoc (face-attribute face :weight)
+   svg-tag--font-weights)))
  (size   (/ (face-attribute face :height) 10))
 
  (tag-char-width  (window-font-width nil face))



[elpa] externals/svg-tag-mode a9e8d9e705 27/63: Fixes followign review at https://github.com/melpa/melpa/pull/7217

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit a9e8d9e7056da3007729b5bc9e11661adb8036e6
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixes followign review at https://github.com/melpa/melpa/pull/7217
---
 svg-tag-mode.el | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 07fe80e433..d56d6722c4 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -22,7 +22,7 @@
 ;; GNU General Public License for more details.
 
 ;; For a full copy of the GNU General Public License
-;; see .
+;; see .
 
 ;;; Commentary:
 
@@ -91,8 +91,8 @@ This should be zero for most fonts but some fonts may need 
this."
 
 (defface svg-tag-default-face
   `((t :foreground "white"
-   :background "orange"
-   :box (:line-width 1 :color "orange" :style nil)
+   :background "#FFAB91"
+   :box (:line-width 1 :color "#FFAB91" :style nil)
:family ,(face-attribute 'default :family)
:weight ,(face-attribute 'default :weight)
:height ,(- (face-attribute 'default :height) 20)))
@@ -100,7 +100,7 @@ This should be zero for most fonts but some fonts may need 
this."
   :group 'svg-tag)
 
 (defcustom svg-tag-tags
-  '((":TODO:" . (svg-tag-make "TODO")))
+  '((" TODO " . (svg-tag-make "TODO")))
   "An alist mapping keywords to tags used to display them.
 
 Each entry has the form (keyword . tag).  Keyword is used as part
@@ -129,7 +129,6 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
   (let* ((face   (or face 'svg-tag-default-face))
  (foreground (face-attribute face :foreground))
  (background (face-attribute face :background))
- (box(face-attribute face :box))
  (stroke (or (plist-get (face-attribute face :box) :color)
  foreground))
  ;; This does not seem to get the actual box line-width
@@ -190,13 +189,13 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the 
visual aspect of the box."
 
 (defun svg-tag-mode-on ()
   "Activate SVG tag mode."
-  (add-to-list 'font-lock-extra-managed-props 'display)
+  (add-to-list #'font-lock-extra-managed-props 'display)
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
-  (mapcar 'svg-tag--build-keywords svg-tag-tags--active)))
+  (mapcar #'svg-tag--build-keywords svg-tag-tags--active)))
   (when svg-tag-tags
 (font-lock-add-keywords nil
-(mapcar 'svg-tag--build-keywords svg-tag-tags)))
+(mapcar #'svg-tag--build-keywords svg-tag-tags)))
   (setq svg-tag-tags--active (copy-sequence svg-tag-tags))
   (message "SVG tag mode on")
   (font-lock-flush))
@@ -205,7 +204,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
   "Deactivate SVG tag mode."
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
-   (mapcar 'svg-tag--build-keywords svg-tag-tags--active)))
+   (mapcar #'svg-tag--build-keywords svg-tag-tags--active)))
   (setq svg-tag-tags--active nil)
   (message "SVG tag mode off")
   (font-lock-flush))



[elpa] externals/svg-tag-mode 95b5404997 35/63: Merge pull request #13 from tarsiiformes/cleanup

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 95b5404997d7194b4946df0a475fd93203a36cb9
Merge: a34a2e1128 78a343f0f3
Author: Nicolas P. Rougier 
Commit: GitHub 

Merge pull request #13 from tarsiiformes/cleanup

Cleanup whitespace and enforce use of spaces for indentation
---
 svg-tag-mode.el | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index ee839d944e..314421df2d 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -45,7 +45,9 @@
 ;;(setq svg-tag-tags '(("([0-9])" svg-tag-round)))
 ;;(svg-tag-mode)
 ;;
+
 ;;; Code:
+
 (require 'svg)
 (eval-when-compile (require 'subr-x))
 
@@ -137,9 +139,9 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
  (line-width (or (plist-get (face-attribute face :box) :line-width)
  svg-tag-default-line-width))
  (family (face-attribute face :family))
-;; (weight (face-attribute face :weight))
+ ;; (weight (face-attribute face :weight))
  (weight (cdr (assoc (face-attribute face :weight)
-   svg-tag--font-weights)))
+ svg-tag--font-weights)))
  (size   (/ (face-attribute face :height) 10))
 
  (tag-char-width  (window-font-width nil face))
@@ -159,15 +161,18 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the 
visual aspect of the box."
  (tag-x (/ (- svg-width tag-width) 2))
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
- 
+
  (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
- 
+
 (svg-rectangle svg tag-x 0 tag-width tag-height
:fillstroke
:rx  radius)
-(svg-rectangle svg (+ tag-x (/ line-width 2.0)) (/ line-width 2.0)
-   (- tag-width line-width) (- tag-height line-width)
+(svg-rectangle svg
+   (+ tag-x (/ line-width 2.0))
+   (/ line-width 2.0)
+   (- tag-width line-width)
+   (- tag-height line-width)
:fillbackground
:rx  (- radius (/ line-width 2.0)))
 (svg-text  svg text
@@ -220,5 +225,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
global-svg-tag-mode svg-tag-mode svg-tag-mode-on)
 
 (provide 'svg-tag-mode)
-
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
 ;;; svg-tag-mode.el ends here



[elpa] externals/svg-tag-mode 609ed7cc32 24/63: Removed free variable

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 609ed7cc32e7b6dcbb5ce4017ee8b112e6929b03
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Removed free variable
---
 svg-tag-mode.el | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 9c664e0402..26d1ba0d52 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -113,15 +113,15 @@ allows to create dynamic tags."
(sexp   :tag "Tag"
 
 ;; SVG font weights translation
-(setq svg-tag--font-weights '((thin   . 100)
-  (ultralight . 200)
-  (light  . 300)
-  (regular. 400)
-  (medium . 500)
-  (semibold   . 600)
-  (bold   . 700)
-  (extrabold  . 800)
-  (black  . 900)))
+(defvar svg-tag--font-weights '((thin   . 100)
+(ultralight . 200)
+(light  . 300)
+(regular. 400)
+(medium . 500)
+(semibold   . 600)
+(bold   . 700)
+(extrabold  . 800)
+(black  . 900)))
 
 (defun svg-tag-make (text &optional face inner-padding outer-padding radius)
   "Create a SVG image displaying TEXT in a rounded box using FACE style.



[elpa] externals/svg-tag-mode c0492f9046 30/63: Fixed links

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit c0492f90465c163bbd0feccd8da4fba529f63df9
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed links
---
 README.org | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 84c6abd715..ff7e449e7d 100644
--- a/README.org
+++ b/README.org
@@ -1,7 +1,7 @@
 ** SVG tag minor mode (Emacs)
 
 A small minor mode to replace keywords or regular expression with SVG rounded
-box labels. See [[file:example-1.el][example-1.el]] and 
[[file:example-2.el][example-2.el]] for example usage.
+box labels. See [[file:examples/example-1.el][example-1.el]] and 
[[file:examples/example-2.el][example-2.el]] for example usage.
 
 *** Installation
 
@@ -13,7 +13,7 @@ box labels. See [[file:example-1.el][example-1.el]] and 
[[file:example-2.el][exa
 
 *** Demonstration 
 
-Open [[file:example-1.el][example-1.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
+Open [[file:examples/example-1.el][example-1.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
 
 *SVG tag mode on*
 [[./svg-tag-on.png]]



[elpa] externals/svg-tag-mode 72068052ff 19/63: Fixed default height

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 72068052ffd304d80ce02c7cfcd67ed04dac25ff
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed default height
---
 svg-tag-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 07f13857eb..5b20a24645 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -94,7 +94,7 @@ This should be zero for most fonts but some fonts may need 
this."
:box (:line-width 1 :color "orange" :style nil)
:family ,(face-attribute 'default :family)
:weight ,(face-attribute 'default :weight)
-   :height 120))
+   :height ,(- (face-attribute 'default :height) 20)))
   "Default face for tag"
   :group 'svg-tag)
 



[elpa] externals/svg-tag-mode 40d7820143 28/63: Moved examples into a directory

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 40d78201436ee304499e6b968edf3c8e09a4f1aa
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Moved examples into a directory
---
 example-2.el  |  80 ---
 example-1.el => examples/example-1.el |   0
 examples/example-2.el | 142 ++
 3 files changed, 142 insertions(+), 80 deletions(-)

diff --git a/example-2.el b/example-2.el
deleted file mode 100644
index 9670b35a08..00
--- a/example-2.el
+++ /dev/null
@@ -1,80 +0,0 @@
-;; Copyright (C) 2020  Nicolas P. Rougier
-;; This file is not part of GNU Emacs.
-;;
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;;
-;; For a full copy of the GNU General Public License
-;; see .
-(require 'svg-tag-mode)
-
-(defface svg-tag-todo-face
-  '((t :foreground "#ff" :background "#FFAB91" :box "#FFAB91"
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for TODO  svg tag" :group nil)
-
-(defface svg-tag-next-face
-  '((t :foreground "white" :background "#673AB7" :box "#673AB7"
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for NEXT svg tag" :group nil)
-
-(defface svg-tag-done-face
-  '((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for DONE  svg tag" :group nil)
-
-(defface svg-tag-date-face
-  '((t :foreground "black" :background "#ECEFF1" :box "#ECEFF1"
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for date svg tag" :group nil)
-
-(defface svg-tag-org-face
-  '((t :foreground "black" :background "white" :box "black"
-   :family "Roboto Mono" :weight regular :height 120))
-  "Default face for svg tag" :group nil)
-
-(setq radius 2)
-
-(setq svg-tag-org-todo (svg-tag-make "TODO" 'svg-tag-todo-face 1 1 radius))
-(setq svg-tag-org-done (svg-tag-make "DONE" 'svg-tag-done-face 1 1 radius))
-(setq svg-tag-org-hold (svg-tag-make "HOLD" 'svg-tag-done-face 1 1 radius))
-(setq svg-tag-org-next (svg-tag-make "NEXT" 'svg-tag-next-face 1 1 radius))
-(setq svg-tag-org-note (svg-tag-make "NOTE" 'svg-tag-org-face  1 1 radius))
-
-(defun svg-tag-make-org-todo (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-done-face 1 1 radius))
-(defun svg-tag-make-org-tag (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-org-face 1 1 radius))
-(defun svg-tag-make-org-priority (text)
-  (svg-tag-make (substring text 2 -1) 'svg-tag-org-face 1 0 radius))
-(defun svg-tag-make-org-date (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-date-face 0 0 radius))
-
-(setq svg-tag-tags
-  '(("@[0-9a-zA-Z]+:"   . svg-tag-make-org-tag)
-("\\[#[ABC]\\]" . svg-tag-make-org-priority)
-(" TODO "   . svg-tag-org-todo)
-(" DONE "   . svg-tag-org-done)
-(" NEXT "   . svg-tag-org-next)
-(" HOLD "   . svg-tag-org-hold)
-(" NOTE "   . svg-tag-org-note)
-("<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [A-Za-z]\\{3\\}>"
-. svg-tag-make-org-date)))
-
-(global-svg-tag-mode)
-
-;; To do:  TODO  NEXT  HOLD  DONE  
-;; Tags:   :@MEETING:@NOTE:
-;; Priorities: [#A] [#B] [#C]
-;; Date:   <2020-11-07 Sat>
-
-;; DONE Make a pull request on melpa <2020-11-07 
Sat>
-;; NEXT Wait for review
-;; TODO Post on Reddit
diff --git a/example-1.el b/examples/example-1.el
similarity index 100%
rename from example-1.el
rename to examples/example-1.el
diff --git a/examples/example-2.el b/examples/example-2.el
new file mode 100644
index 00..40d55a3d6c
--- /dev/null
+++ b/examples/example-2.el
@@ -0,0 +1,142 @@
+;; Copyright (C) 2020  Nicolas P. Rougier
+;; This file is not part of GNU Emacs.
+;;
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; For a full copy of the GNU General Public License
+;; see .
+(require 'svg-tag-mo

[elpa] externals/svg-tag-mode 2c4a3a02a1 33/63: Enforce use of spaces for indentation

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 2c4a3a02a11aa417d352a8ace2202b5a457171b6
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Enforce use of spaces for indentation
---
 svg-tag-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 1347bcaf25..0a610b904e 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -220,5 +220,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
global-svg-tag-mode svg-tag-mode svg-tag-mode-on)
 
 (provide 'svg-tag-mode)
-
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
 ;;; svg-tag-mode.el ends here



[elpa] externals/svg-tag-mode 29ca63cdbb 36/63: Rewrote the mode using svg-lib

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 29ca63cdbb82fed55830b40f8866de123a5bef5e
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Rewrote the mode using svg-lib
---
 README.md   |  95 
 README.org  |  23 --
 svg-tag-on.png => images/svg-minor-mode.png | Bin
 svg-tag-mode.el | 338 
 svg-tag-off.png | Bin 289428 -> 0 bytes
 5 files changed, 291 insertions(+), 165 deletions(-)

diff --git a/README.md b/README.md
new file mode 100644
index 00..487a39cf5b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,95 @@
+
+## svg-tag-mode
+
+A minor mode to replace keywords or regular expression with SVG tags.
+
+![](images/svg-tag-mode.png)
+
+
+### Usage example
+
+You need first to set `svg-tag-tags` that is a list of item here each
+item has the form `(KEYWORD (TAG COMMAND HELP))` where:
+
+- **KEYWORD** is a regular expression including a matched group of 
+  the form "\\(xxx\\)". If this is not the case the whole
+  string will be used a the matched group.
+- **TAG** is either a SVG image that will be displayed using the
+  'display property or a function that accepts a unique string
+  argument (match-string 1) and returns an SVG image.
+- **COMMAND** is a command to be executed when user clicks on the tag.
+  It can be nil if no command is associated with the tag.
+- **HELP** is a string to be displayed when mouse pointer is over
+  the tag. It can be nil if no command is associated with the tag.
+
+then you can invoke mode with `M-x svg-tag-mode`. Here are some examples:
+
+
+1. Replace any occurence of `:TODO:` with a static SVG tag displaying `TODO`
+
+```lisp
+(setq svg-tag-tags
+  '((":TODO:" . ((svg-tag-make "TODO")
+```
+
+2. Replace any occurence of `:HELLO:` with a static SVG tag displaying
+   `HELLO` that can be clicked to execute the specified command. Help
+   message is displayed when the tag is hovered with the pointer.
+
+```lisp
+(setq svg-tag-tags
+  '((":HELLO:" .  ((svg-tag-make "HELLO")
+   (lambda () (interactive) (message "Hello world!"))
+   "Print a greeting message"
+```
+
+
+3. Replace any occurence of `:TODO:` with a static SVG tag displaying
+   `:TODO:`
+
+```lisp
+(setq svg-tag-tags
+  '((":TODO:" . (svg-tag-make
+```
+
+4. Replace any occurence of `:TODO:` with a dynamic SVG tag displaying `TODO`
+
+```lisp
+(setq svg-tag-tags
+  '((":TODO:" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1))
+```
+
+5. Replaces any occurence of `:XXX:` with a dynamic SVG tag displaying `XXX`
+
+```lisp
+(setq svg-tag-tags
+  '(("\\(:[A-Z]+:\\)" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1))
+```
+
+6. Replaces any occurence of `:XXX|YYY:` with two adjacent dynamic SVG
+   tags displaying `XXX` and `YYY`
+
+```lisp
+(setq svg-tag-tags
+  '(("\\(:[A-Z]+\\)\|[a-zA-Z#0-9]+:" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :inverse t
+  :margin 0 
:crop-right t
+(":[A-Z]+\\(\|[a-zA-Z#0-9]+:\\)" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1
+ :margin 0 :crop-left 
t))
+``` 
+
+7. This replaces any occurence of `:#TAG1:#TAG2:…:$` (`$` means end of
+   line) with a dynamic collection of SVG tags. Note the `#` symbol in
+   front of tags. This is mandatory because Emacs cannot do regex look
+   ahead.
+ 
+```lisp
+(setq svg-tag-tags
+  '(("\\(:#[A-Za-z0-9]+\\)" . ((lambda (tag)
+ (svg-tag-make tag :beg 2
+("\\(:#[A-Za-z0-9]+:\\)$" . ((lambda (tag)
+   (svg-tag-make tag :beg 2 :end -1))
+```   
diff --git a/README.org b/README.org
deleted file mode 100644
index ff7e449e7d..00
--- a/README.org
+++ /dev/null
@@ -1,23 +0,0 @@
-** SVG tag minor mode (Emacs)
-
-A small minor mode to replace keywords or regular expression with SVG rounded
-box labels. See [[file:examples/example-1.el][example-1.el]] and 
[[file:examples/example-2.el][example-2.el]] for example usage.
-
-*** Installation
-
-#+begin_src elisp
-(quelpa '(svg-tag-mode :repo "rougier/svg-tag-mode"
-   :fetcher github
-   :files ("svg-tag-mode.el")))
-#+end_src
-
-*** Demonstration 
-
-Open [[file:examples/example-1.el][example-1.el]] and evaluate buffer (*M-x 
evaluate-buffer*)
-
-*SVG tag mode on*
-[[./svg-tag-on.png]]
-
-*SVG tag mode off*
-[[./svg-tag-off.png]]
-
diff --git a/svg-tag-on.png b/images/svg-minor-mode.png
similarity index 100%
rename from svg-tag-on.png
rename to images/svg-minor-mode.png
diff 

[elpa] externals/svg-tag-mode e9a6256dee 44/63: Added org-mode screenshot

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit e9a6256deefa94d5c0947e68635b99b6aaad96b7
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added org-mode screenshot
---
 README.md   |   2 ++
 images/org-mode.png | Bin 0 -> 67030 bytes
 2 files changed, 2 insertions(+)

diff --git a/README.md b/README.md
index 487a39cf5b..b1507b6d85 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@ A minor mode to replace keywords or regular expression with SVG 
tags.
 
 ![](images/svg-tag-mode.png)
 
+![](images/org-mode.png)
+
 
 ### Usage example
 
diff --git a/images/org-mode.png b/images/org-mode.png
new file mode 100644
index 00..1ff4d44e99
Binary files /dev/null and b/images/org-mode.png differ



[elpa] externals/svg-tag-mode a34a2e1128 32/63: Added scale of 1 just in case

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit a34a2e1128fa99f999c34c3bc6642fb62b887f34
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added scale of 1 just in case
---
 svg-tag-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 1347bcaf25..ee839d944e 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -177,7 +177,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
:fillforeground
:x   (+ text-x svg-tag-horizontal-offset)
:y   (+ text-y svg-tag-vertical-offset))
-(svg-image svg :ascent 'center)))
+(svg-image svg :scale 1 :ascent 'center)))
 
 
 (defun svg-tag--build-keywords (item)



[elpa] externals/svg-tag-mode 607d05d972 37/63: Fix conflict

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 607d05d972e0f308a4c88db95c1b3abc670c6c5f
Merge: 29ca63cdbb 95b5404997
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fix conflict
---
 svg-tag-mode.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 06324c8dc3..dd49c7d81b 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -109,6 +109,7 @@
 ;; Version 0.1:
 ;; - Proof of concept
 ;;
+
 ;;; Code:
 (require 'svg-lib)
 
@@ -274,5 +275,7 @@ allows to create dynamic tags."
global-svg-tag-mode svg-tag-mode svg-tag-mode-on)
 
 (provide 'svg-tag-mode)
-
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; End:
 ;;; svg-tag-mode.el ends here



[elpa] externals/svg-tag-mode 525901723f 47/63: Fixed requirements.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 525901723fb6c98715677b3c49e86dab263890fa
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed requirements.
---
 svg-tag-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 3336fc59a8..12774ef168 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -1,13 +1,13 @@
 ;;; svg-tag-mode.el --- Replace keywords with SVG tags -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2020,2021 Nicolas P. Rougier
+;; Copyright (C) 2020, 2021 Nicolas P. Rougier
 
 ;; Author: Nicolas P. Rougier 
 ;; Homepage: https://github.com/rougier/svg-tag-mode
 ;; Keywords: convenience
 ;; Version: 0.2
 
-;; Package-Requires: ((emacs "27.1" svg-lib "0.3"))
+;; Package-Requires: ((emacs "27.1") (svg-lib "0.3"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -27,7 +27,7 @@
 ;;; Commentary:
 
 ;; This minor mode replaces keywords or expressions with SVG tags
-;; that are fully customizable and clickable.
+;; that are fully customizable and activable.
 ;;
 ;; Usage example:
 ;; --



[elpa] externals/svg-tag-mode cec780a16f 21/63: Added version

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit cec780a16fbafea3870f100225294d4387b9dd14
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added version
---
 svg-tag-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 655a90c4fc..a15a1aeefd 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -5,6 +5,7 @@
 ;; Author: Nicolas P. Rougier 
 ;; Homepage: https://github.com/rougier/svg-tag-mode
 ;; Keywords: convenience
+;; Version: 0.1
 
 ;; Package-Requires: ((emacs "26.1"))
 



[elpa] externals/svg-tag-mode ede0edb5c3 25/63: Lint correction

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit ede0edb5c38803b2899358db544be659aa450f68
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Lint correction
---
 svg-tag-mode.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 26d1ba0d52..9ade4494c7 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -179,7 +179,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
 (svg-image svg :ascent 'center)))
 
 
-(defun tag-svg--build-keywords (item)
+(defun svg-tag--build-keywords (item)
   "Internal.  Build the list of keyword from ITEM."
   (let ((pattern  (format "\\(%s\\)" (car item)))
 (tag  (cdr item)))
@@ -193,10 +193,10 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the 
visual aspect of the box."
   (add-to-list 'font-lock-extra-managed-props 'display)
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
-  (mapcar 'tag-svg--build-keywords svg-tag-tags--active)))
+  (mapcar 'svg-tag--build-keywords svg-tag-tags--active)))
   (when svg-tag-tags
 (font-lock-add-keywords nil
-(mapcar 'tag-svg--build-keywords svg-tag-tags)))
+(mapcar 'svg-tag--build-keywords svg-tag-tags)))
   (setq svg-tag-tags--active (copy-sequence svg-tag-tags))
   (message "SVG tag mode on"))
 
@@ -204,7 +204,7 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
   "Deactivate SVG tag mode."
   (when svg-tag-tags--active
 (font-lock-remove-keywords nil
-   (mapcar 'tag-svg--build-keywords svg-tag-tags--active)))
+   (mapcar 'svg-tag--build-keywords svg-tag-tags--active)))
   (setq svg-tag-tags--active nil)
   (message "SVG tag mode off"))
 



[elpa] externals/svg-tag-mode 8d9dd283fb 45/63: Updated screenshot

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 8d9dd283fb4d5a4d42a5f610b2541b6ec7384a66
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated screenshot
---
 images/svg-tag-mode.png | Bin 311424 -> 19 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/images/svg-tag-mode.png b/images/svg-tag-mode.png
index a0fc3464e3..741e162c6e 100644
Binary files a/images/svg-tag-mode.png and b/images/svg-tag-mode.png differ



[elpa] externals/svg-tag-mode 60d56f3f41 29/63: Fixed terminal mode error

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 60d56f3f41cd9a9e86d80e704feb2407e31f573a
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed terminal mode error
---
 svg-tag-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index d56d6722c4..16b842da17 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -95,7 +95,9 @@ This should be zero for most fonts but some fonts may need 
this."
:box (:line-width 1 :color "#FFAB91" :style nil)
:family ,(face-attribute 'default :family)
:weight ,(face-attribute 'default :weight)
-   :height ,(- (face-attribute 'default :height) 20)))
+   :height ,(if (display-graphic-p)
+(- (face-attribute 'default :height) 20)
+  1)))
   "Default face for tag"
   :group 'svg-tag)
 



[elpa] externals/svg-tag-mode 8533c6c174 50/63: Added progress bar example.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 8533c6c174d6ff97065fec6bce15292c041c5be1
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added progress bar example.
---
 examples/example-2.el | 34 ++
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/examples/example-2.el b/examples/example-2.el
index 90b66f59c4..b041af1f3a 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -19,6 +19,23 @@
 (defconst time-re "[0-9]\\{2\\}:[0-9]\\{2\\}")
 (defconst day-re "[A-Za-z]\\{3\\}")
 
+(defun svg-progress-percent (value)
+  (svg-image (svg-lib-concat
+  (svg-lib-progress-bar (/ (string-to-number value) 100.0)
+nil :margin 0 :stroke 2 :radius 3 :padding 2 
:width 11)
+  (svg-lib-tag (concat value "%")
+   nil :stroke 0 :margin 0)) :ascent 'center))
+
+(defun svg-progress-count (value)
+  (let* ((seq (mapcar #'string-to-number (split-string value "/")))
+ (count (float (car seq)))
+ (total (float (cadr seq
+  (svg-image (svg-lib-concat
+  (svg-lib-progress-bar (/ count total) nil
+:margin 0 :stroke 2 :radius 3 :padding 2 
:width 11)
+  (svg-lib-tag value nil
+   :stroke 0 :margin 0)) :ascent 'center)))
+
 (setq svg-tag-tags
   `(
 ;; Org tags
@@ -27,18 +44,24 @@
:beg 2 :alignment 0
 ("\\(:#[A-Za-z0-9]+:\\)$" . ((lambda (tag)
(svg-tag-make tag :face 'org-tag
- :beg 2 :end -1

+ :beg 2 :end -1
  :alignment 0
-;; Org priority
+;; Task priority
 ("\\[#[A-Z]\\]" . ( (lambda (tag)
   (svg-tag-make tag :face 'org-priority 
 :beg 2 :end -1 :margin 0
 
-;; Org TODO / DONE
+;; Progress
+("\\(\\[[0-9]\\{1,3\\}%\\]\\)" . ((lambda (tag)
+(svg-progress-percent (substring 
tag 1 -2)
+("\\(\\[[0-9]+/[0-9]+\\]\\)" . ((lambda (tag)
+  (svg-progress-count (substring tag 1 
-1)
+
+;; TODO / DONE
 ("TODO" . ((svg-tag-make "TODO" :face 'org-todo :inverse t :margin 0)))
 ("DONE" . ((svg-tag-make "DONE" :face 'org-done :margin 0)))
 
-;; Org date (without day name)
+;; Active date (without day name, with or without time)
 (,(format "\\(<%s>\\)" date-re) .
  ((lambda (tag)
 (svg-tag-make tag :beg 1 :end -1 :margin 0
@@ -49,6 +72,7 @@
  ((lambda (tag)
 (svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0
 
+;; Inactive date  (without day name, with or without time)
  (,(format "\\(\\[%s\\]\\)" date-re) .
   ((lambda (tag)
  (svg-tag-make tag :beg 1 :end -1 :margin 0 :face 'org-date
@@ -64,6 +88,8 @@
 ;; To do: TODO DONE  
 ;; Tags:  :#MEETING:#NOTE:
 ;; Priorities:[#A] [#B] [#C]
+;; Progress:  [1/3]
+;;[42%]
 ;; Active date:   <2021-12-24>
 ;;<2021-12-24 14:00>
 ;; Inactive date: [2021-12-24]



[elpa] externals/svg-tag-mode d9a803a92e 49/63: Added date without time format example.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit d9a803a92eae68af4cbcaf18001b36aed1442803
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added date without time format example.
---
 examples/example-2.el | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/examples/example-2.el b/examples/example-2.el
index 785b012a8d..90b66f59c4 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -39,6 +39,9 @@
 ("DONE" . ((svg-tag-make "DONE" :face 'org-done :margin 0)))
 
 ;; Org date (without day name)
+(,(format "\\(<%s>\\)" date-re) .
+ ((lambda (tag)
+(svg-tag-make tag :beg 1 :end -1 :margin 0
 (,(format "\\(<%s *\\)%s>" date-re time-re) .
  ((lambda (tag)
 (svg-tag-make tag :beg 1 :inverse nil :crop-right t :margin 0
@@ -46,6 +49,9 @@
  ((lambda (tag)
 (svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0
 
+ (,(format "\\(\\[%s\\]\\)" date-re) .
+  ((lambda (tag)
+ (svg-tag-make tag :beg 1 :end -1 :margin 0 :face 'org-date
  (,(format "\\(\\[%s *\\)%s\\]" date-re time-re) .
   ((lambda (tag)
  (svg-tag-make tag :beg 1 :inverse nil :crop-right t :margin 0 
:face 'org-date
@@ -58,5 +64,7 @@
 ;; To do: TODO DONE  
 ;; Tags:  :#MEETING:#NOTE:
 ;; Priorities:[#A] [#B] [#C]
-;; Active date:   <2021-12-24 14:00>
-;; Inactive date: [2021-12-24 14:00]
+;; Active date:   <2021-12-24>
+;;<2021-12-24 14:00>
+;; Inactive date: [2021-12-24]
+;;[2021-12-24 14:00]



[elpa] externals/svg-tag-mode 78a343f0f3 34/63: Cleanup whitespace

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 78a343f0f3c08b6fd17db0a43591a6ae2aa383a0
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Cleanup whitespace
---
 svg-tag-mode.el | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 0a610b904e..7979a83c55 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -45,7 +45,9 @@
 ;;(setq svg-tag-tags '(("([0-9])" svg-tag-round)))
 ;;(svg-tag-mode)
 ;;
+
 ;;; Code:
+
 (require 'svg)
 (eval-when-compile (require 'subr-x))
 
@@ -137,9 +139,9 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual 
aspect of the box."
  (line-width (or (plist-get (face-attribute face :box) :line-width)
  svg-tag-default-line-width))
  (family (face-attribute face :family))
-;; (weight (face-attribute face :weight))
+ ;; (weight (face-attribute face :weight))
  (weight (cdr (assoc (face-attribute face :weight)
-   svg-tag--font-weights)))
+ svg-tag--font-weights)))
  (size   (/ (face-attribute face :height) 10))
 
  (tag-char-width  (window-font-width nil face))
@@ -159,15 +161,18 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the 
visual aspect of the box."
  (tag-x (/ (- svg-width tag-width) 2))
  (text-x (+ tag-x (/ (- tag-width (* (length text) tag-char-width)) 
2)))
  (text-y (- tag-char-height (- txt-char-height tag-char-height)))
- 
+
  (radius  (or radius svg-tag-default-radius))
  (svg (svg-create svg-width svg-height)))
- 
+
 (svg-rectangle svg tag-x 0 tag-width tag-height
:fillstroke
:rx  radius)
-(svg-rectangle svg (+ tag-x (/ line-width 2.0)) (/ line-width 2.0)
-   (- tag-width line-width) (- tag-height line-width)
+(svg-rectangle svg
+   (+ tag-x (/ line-width 2.0))
+   (/ line-width 2.0)
+   (- tag-width line-width)
+   (- tag-height line-width)
:fillbackground
:rx  (- radius (/ line-width 2.0)))
 (svg-text  svg text



[elpa] externals/svg-tag-mode 1d0d91bb00 46/63: Fixed layout

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 1d0d91bb00211db32cc7a8bc0c81db0c38419c61
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed layout
---
 examples/example-1.el | 12 ++--
 examples/example-2.el |  3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/examples/example-1.el b/examples/example-1.el
index 97492c2ad8..feeacfbe5c 100644
--- a/examples/example-1.el
+++ b/examples/example-1.el
@@ -23,7 +23,7 @@
 ("\([0-9a-zA-Z][0-9a-zA-Z]\)" . ((lambda (tag)
(svg-tag-make tag :beg 1 :end -1 
:radius 8
 ("|[0-9a-zA-Z- ]+?|" . ((lambda (tag)
-  (svg-tag-make tag :beg 1 :end -1))
+  (svg-tag-make tag :margin 0 :beg 1 :end 
-1))
 (svg-tag-mode t)
 
 ;; :NOTE: SVG tag is a minor mode that displays a rounded box with outer
@@ -36,11 +36,11 @@
 ;; More examples:
 ;; --
 ;;
-;;  Save . |C-x||C-s|  Help ... |C-h|
-;;  Save as .. |C-x||C-w|  Cancel . |C-g|
-;;  Open a new file .. |C-x||C-f|  Undo ... |C-z|
-;;  Open recent .. |C-x||C-r|  Close buffer ... |C-x||k|
-;;  Browse directory ..|C-x||d|Quit ... |C-x||C-c|
+;;  Save . |C-x| |C-s|  Help ... |C-h|
+;;  Save as .. |C-x| |C-w|  Cancel . |C-g|
+;;  Open a new file .. |C-x| |C-f|  Undo ... |C-z|
+;;  Open recent .. |C-x| |C-r|  Close buffer ... |C-x| |k|
+;;  Browse directory ..|C-x| |d|Quit ... |C-x| |C-c|
 ;;
 ;; 
 ;; (1)(2)(3)(4)(5)(Z)(W)(12)(99) (A)(B)(C)
diff --git a/examples/example-2.el b/examples/example-2.el
index e82a55bec5..785b012a8d 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -51,8 +51,7 @@
  (svg-tag-make tag :beg 1 :inverse nil :crop-right t :margin 0 
:face 'org-date
  (,(format "\\[%s *\\(%s\\]\\)" date-re time-re) .
   ((lambda (tag)
- (svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0 :face 
'org-date
-))
+ (svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0 :face 
'org-date))
 
 (svg-tag-mode t)
 



[elpa] externals/svg-tag-mode ee16277655 42/63: Added examples from documentation

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit ee162776552c6a5441b03c50621065522e34485f
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added examples from documentation
---
 examples/example-3.el | 55 +++
 1 file changed, 55 insertions(+)

diff --git a/examples/example-3.el b/examples/example-3.el
new file mode 100644
index 00..ddf02f4ba1
--- /dev/null
+++ b/examples/example-3.el
@@ -0,0 +1,55 @@
+
+;; This replaces any occurence of ":TODO:" with a static SVG tag
+;; displaying "TODO"
+(setq svg-tag-tags
+  '((":TODO:" . ((svg-tag-make "TODO" :margin 0)
+
+
+;; This replaces any occurence of ":HELLO:" with a static SVG tag that
+;; can be clicked to execute the specified command. Help message is
+;; displayed when the tag is hovered with the pointer.
+(setq svg-tag-tags
+  '((":HELLO:" .  ((svg-tag-make "HELLO")
+   (lambda () (interactive) (message "Hello world!"))
+   "Print a greeting message"
+
+;; This replaces any occurence of ":TODO:" with a static SVG tag
+;; displaying ":TODO:"
+(setq svg-tag-tags
+  '((":TODO:" . (svg-tag-make
+
+;; This replaces any occurence of ":TODO:" with a dynamic SVG tag
+;; displaying "TODO"
+(setq svg-tag-tags
+  '((":TODO:" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1))
+
+;; This replaces any occurence of ":XXX:" with a dynamic SVG tag
+;; displaying "XXX"
+(setq svg-tag-tags
+  '(("\\(:[A-Z]+:\\)" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1))
+
+;; This replaces any occurence of ":XXX|YYY:" with two adjacent
+;; dynamic SVG tags displaying "XXX" and "YYY"
+(setq svg-tag-tags
+  '(("\\(:[A-Z]+\\)\|[a-zA-Z#0-9]+:" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :inverse t
+  :margin 0 
:crop-right t
+(":[A-Z]+\\(\|[a-zA-Z#0-9]+:\\)" . ((lambda (tag)
+   (svg-tag-make tag :beg 1 :end -1
+ :margin 0 :crop-left 
t))
+
+;; This replaces any occurence of ":#TAG1:#TAG2:…:$" ($ means end of
+;; line) with a dynamic collection of SVG tags. Note the # symbol in
+;; front of tags. This is mandatory because Emacs cannot do regex look
+;; ahead.
+(setq svg-tag-tags
+  '(("\\(:#[A-Za-z0-9]+\\)" . ((lambda (tag)
+ (svg-tag-make tag :beg 2
+("\\(:#[A-Za-z0-9]+:\\)$" . ((lambda (tag)
+   (svg-tag-make tag :beg 2 :end -1))
+
+
+
+



[elpa] externals/svg-tag-mode 861c68af89 40/63: Updated example 1 to new tags format.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 861c68af89351ee87fc2085fca3c5151d26db17f
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated example 1 to new tags format.
---
 examples/example-1.el | 52 ++-
 1 file changed, 10 insertions(+), 42 deletions(-)

diff --git a/examples/example-1.el b/examples/example-1.el
index 7942c3ea4a..97492c2ad8 100644
--- a/examples/example-1.el
+++ b/examples/example-1.el
@@ -15,48 +15,16 @@
 ;; see .
 (require 'svg-tag-mode)
 
-(defface svg-tag-note-face
-  '((t :foreground "black" :background "white" :box "black"
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for note tag" :group nil)
-
-(defface svg-tag-keyboard-face
-  '((t :foreground "#33" :background "#f9f9f9" :box "#33"
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for keyboard bindings tag" :group nil)
-
-(defface svg-tag-org-face
-  '((t :foreground "#33" :background "#f0" :box "#33"
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for keyboard bindings tag" :group nil)
-
-(setq svg-tag-todo
-  (svg-tag-make "TODO" nil 1 1 2))
-
-(setq svg-tag-note
-  (svg-tag-make "NOTE" 'svg-tag-note-face 2 0 2))
-
-(defun svg-tag-round (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-note-face 1 1 12))
-
-(defun svg-tag-quasi-round (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-note-face 1 1 8))
-
-(defun svg-tag-keyboard (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-keyboard-face 1 1 2))
-
-(defun svg-tag-org (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-org-face 1 1 2))
-
 (setq svg-tag-tags
-  '(("@[0-9a-zA-Z]+:"   . svg-tag-org)
-(":TODO:"   . svg-tag-todo)
-(":NOTE:"   . svg-tag-note)
-("\([0-9a-zA-Z]\)"  . svg-tag-round)
-("\([0-9a-zA-Z][0-9a-zA-Z]\)"   . svg-tag-quasi-round)
-("|[0-9a-zA-Z- ⇥>

[elpa] externals/svg-tag-mode 3e49ddcee2 57/63: Cancel tag editing in read-only or view mode.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 3e49ddcee288750cf1403a90308f4bb25a94bc3d
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Cancel tag editing in read-only or view mode.
---
 examples/example-1.el | 11 +++
 svg-tag-mode.el   |  8 ++--
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/examples/example-1.el b/examples/example-1.el
index 143b2378a2..a1e0988318 100644
--- a/examples/example-1.el
+++ b/examples/example-1.el
@@ -16,14 +16,17 @@
 (require 'svg-tag-mode)
 
 (setq svg-tag-tags
-  '((":TODO:" . ((svg-tag-make "TODO" :face 'org-tag :inverse t :margin 
0)))
-(":NOTE:" . ((svg-tag-make "NOTE" :margin 0)))
+  '((":TODO:" . ((svg-tag-make "TODO" :face 'org-tag
+   :radius 0 :inverse t :margin 0)))
+(":NOTE:" . ((svg-tag-make "NOTE" :face 'font-lock-comment-face
+   :inverse nil :margin 0 :radius 0)))
 ("\([0-9a-zA-Z]\)" . ((lambda (tag)
 (svg-tag-make tag :beg 1 :end -1 :radius 12
 ("\([0-9a-zA-Z][0-9a-zA-Z]\)" . ((lambda (tag)
(svg-tag-make tag :beg 1 :end -1 
:radius 8
 ("|[0-9a-zA-Z- ]+?|" . ((lambda (tag)
-  (svg-tag-make tag :margin 0 :beg 1 :end 
-1))
+  (svg-tag-make tag :face 
'font-lock-comment-face
+:margin 0 :beg 1 :end -1))
 (svg-tag-mode t)
 
 ;; :NOTE: SVG tag is a minor mode that displays a rounded box with outer
@@ -40,7 +43,7 @@
 ;;  Save as .. |C-x| |C-w|  Cancel . |C-g|
 ;;  Open a new file .. |C-x| |C-f|  Undo ... |C-z|
 ;;  Open recent .. |C-x| |C-r|  Close buffer ... |C-x| |k|
-;;  Browse directory ..|C-x| |d|Quit ... |C-x| |C-c|
+;;  Browse directory . |C-x| |d|Quit ... |C-x| |C-c|
 ;;
 ;; 
 ;; (1)(2)(3)(4)(5)(Z)(W)(12)(99) (A)(B)(C)
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 2ea4b04801..c292d42728 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -198,8 +198,8 @@ allows to create dynamic tags."
(next-property-change position
 (if (eq direction 'left)
 (font-lock-flush beg end )
-  (font-lock-unfontify-region beg end))
-
+  (if (and (not view-read-only) (not buffer-read-only))
+  (font-lock-unfontify-region beg end)))
 ;; (if (eq direction 'entered)
 ;; (message (concat "TAG: "
 ;;  (substring-no-properties
@@ -264,6 +264,10 @@ allows to create dynamic tags."
   (advice-add 'org-fontify-meta-lines-and-blocks
   :after #'svg-tag--remove-text-properties-off)
 
+  ;; Flush buffer when entering read-only
+  (add-hook 'read-only-mode-hook
+#'(lambda () (font-lock-flush (point-min) (point-max
+  
   ;; Redisplay everything to show tags
   (message "SVG tag mode on")
   (cursor-sensor-mode 1)



[elpa] externals/svg-tag-mode f6adc4b772 39/63: Make sure to remove space from tag.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit f6adc4b77279e71c8e56d51d8b6643a258925516
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Make sure to remove space from tag.
---
 svg-tag-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index dd49c7d81b..3336fc59a8 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -163,6 +163,7 @@ allows to create dynamic tags."
   
   (let* ((face (or (plist-get args :face) 'default))
  (inverse (or (plist-get args :inverse) nil))
+ (tag (string-trim tag))
  (beg (or (plist-get args :beg) 0))
  (end (or (plist-get args :end) nil))
  (args (org-plist-delete args 'stroke))



[elpa] externals/svg-tag-mode 60140b7526 62/63: Remove ununsed local variables.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 60140b7526a5d4cbb874e96d97ba1f976ef3a3fa
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Remove ununsed local variables.
---
 svg-tag-mode.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 8607c8d48f..cf2c236bb9 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -324,7 +324,4 @@ allows to create dynamic tags."
global-svg-tag-mode svg-tag-mode svg-tag-mode-on)
 
 (provide 'svg-tag-mode)
-;; Local Variables:
-;; indent-tabs-mode: nil
-;; End:
 ;;; svg-tag-mode.el ends here



[elpa] externals/svg-tag-mode 02d60e0a86 55/63: Fixed cursor selection.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 02d60e0a86f16c4ff3ce114aae2a205a022880ec
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fixed cursor selection.
---
 svg-tag-mode.el | 24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 2cedd1ae97..b329ec6729 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -187,17 +187,21 @@ allows to create dynamic tags."
 (defun svg-tag--cursor-function (win position direction)
   "This function hides the tag when cursor is over it. This
 allows to edit the tag."
-  (let* ((extents (cond ((and (eq direction 'left) (< (point) position))
- `(,position . ,(next-property-change position)))
-((and (eq direction 'left) (> (point) position)) 
- `(,(previous-property-change position) . ,(point)))
-((and (eq direction 'entered) (> (point) position))
- `(,(point) . ,(next-property-change (point
-((and (eq direction 'entered) (< (point) position))
- `(,(previous-property-change (point)) . ,position)
+  (let ((beg (if (eq direction 'entered)
+ (previous-property-change (+ (point) 1))
+   (previous-property-change (+ position 1
+(end (if (eq direction 'entered)
+ (next-property-change (point))
+   (next-property-change position
 (if (eq direction 'left)
-(font-lock-flush (car extents) (cdr extents))
-  (font-lock-unfontify-region (car extents) (cdr extents)
+(font-lock-flush beg end )
+  (font-lock-unfontify-region beg end))
+
+;; (if (eq direction 'entered)
+;; (message (concat "TAG: "
+;;  (substring-no-properties
+;;   (buffer-substring beg end )
+  ))
 
 
 (defun svg-tag--build-keywords (item)



[elpa] externals/svg-tag-mode a5098267c9 41/63: Updated example 2 to new tags format.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit a5098267c9216ea06cfb665e1393450334ac93dd
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated example 2 to new tags format.
---
 examples/example-2.el | 161 +-
 1 file changed, 41 insertions(+), 120 deletions(-)

diff --git a/examples/example-2.el b/examples/example-2.el
index 40d55a3d6c..c980ccd585 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -15,128 +15,49 @@
 ;; see .
 (require 'svg-tag-mode)
 
-(defface svg-tag-org-face
-  '((t :foreground "#33" :background "white"
-   :box (:line-width 1 :color "black" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Default face for svg tag" :group nil)
-
-(defface svg-tag-note-face
-  '((t :foreground "#33" :background "#FF"
-   :box (:line-width 1 :color "#33" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Default face for svg tag" :group nil)
-
-(defface svg-tag-todo-face
-  '((t :foreground "#ff" :background "#FFAB91"
-   :box (:line-width 1 :color "#FFAB91" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for TODO  svg tag" :group nil)
-
-(defface svg-tag-next-face
-  '((t :foreground "white" :background "#673AB7"
-   :box (:line-width 1 :color "#673AB7" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for NEXT svg tag" :group nil)
-
-(defface svg-tag-done-face
-  '((t :foreground "white" :background "#B0BEC5"
-   :box (:line-width 1 :color "#B0BEC5" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for DONE  svg tag" :group nil)
-
-(defface svg-tag-org-tag-face
-  '((t :foreground "#ff" :background "#FFAB91"
-   :box (:line-width 1 :color "#FFAB91" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for TODO  svg tag" :group nil)
-
-(defface svg-tag-date-active-face
-  '((t :foreground "white" :background "#673AB7"
-   :box (:line-width 1 :color "#673AB7" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for active date svg tag" :group nil)
-
-(defface svg-tag-time-active-face
-  '((t :foreground "#673AB7" :background "#ff"
-   :box (:line-width 1 :color "#673AB7" :style nil)
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for active time svg tag" :group nil)
-
-(defface svg-tag-date-inactive-face
-  '((t :foreground "#ff" :background "#B0BEC5"
-   :box (:line-width 1 :color "#B0BEC5" :style nil)
-   :family "Roboto Mono" :weight regular :height 120))
-  "Face for inactive date svg tag" :group nil)
-
-(defface svg-tag-time-inactive-face
-  '((t :foreground "#B0BEC5" :background "#ff"
-   :box (:line-width 2 :color "#B0BEC5" :style nil)
-   :family "Roboto Mono" :weight light :height 120))
-  "Face for inactive time svg tag" :group nil)
-
-(setq svg-tag-org-todo (svg-tag-make "TODO" 'svg-tag-todo-face 1 1 2))
-(setq svg-tag-org-done (svg-tag-make "DONE" 'svg-tag-done-face 1 1 2))
-(setq svg-tag-org-hold (svg-tag-make "HOLD" 'svg-tag-org-face 1 1 2))
-(setq svg-tag-org-next (svg-tag-make "NEXT" 'svg-tag-next-face 1 1 2))
-(setq svg-tag-org-note-tag (svg-tag-make "NOTE" 'svg-tag-note-face 1 1 2))
-(setq svg-tag-org-canceled-tag (svg-tag-make "CANCELED" 'svg-tag-note-face 1 1 
2))
-
-(defun svg-tag-make-org-tag (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-org-tag-face 1 1 2))
-(defun svg-tag-make-org-priority (text)
-  (svg-tag-make (substring text 2 -1) 'svg-tag-org-face 1 0 2))
-
-(defun svg-tag-make-org-date-active (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-date-active-face 0 0 0))
-(defun svg-tag-make-org-time-active (text)
-  (svg-tag-make (substring text 0 -1) 'svg-tag-time-active-face 1 0 0))
-(defun svg-tag-make-org-range-active (text)
-  (svg-tag-make (substring text 0 -1) 'svg-tag-time-active-face 0 0 0))
-
-(defun svg-tag-make-org-date-inactive (text)
-  (svg-tag-make (substring text 1 -1) 'svg-tag-date-inactive-face 0 0 0))
-(defun svg-tag-make-org-time-inactive (text)
-  (svg-tag-make (substring text 0 -1) 'svg-tag-time-inactive-face 1 0 0))
-(defun svg-tag-make-org-range-inactive (text)
-  (svg-tag-make (substring text 0 -1) 'svg-tag-time-inactive-face 0 0 0))
-
-
 (defconst date-re "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}")
 (defconst time-re "[0-9]\\{2\\}:[0-9]\\{2\\}")
 (defconst day-re "[A-Za-z]\\{3\\}")
 
 (setq svg-tag-tags
-  `(("@[0-9a-zA-Z]+:"   . svg-tag-make-org-tag)
-("@NOTE:"   . svg-tag-org-note-tag)
-("@CANCELED:"   . svg-tag-org-canceled-tag)
-("\\[#[ABC]\\]" . svg-tag-make-org-priority)
-(" TODO "   . svg-tag-org-todo)
-(" DONE "   . svg-tag-org-done)
-(" NEXT "  

[elpa] externals/svg-tag-mode c78500db2c 60/63: Fix bugs (typos).

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit c78500db2c4b360f79919a8518c7b62003921a30
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Fix bugs (typos).
---
 svg-tag-mode.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index d65d68a126..fa1aa641a4 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -131,7 +131,7 @@
 (const :tag "No action" nil))
   :group 'svg-tag)
 
-(defun svg-tags---plist-delete (plist property)
+(defun svg-tag--plist-delete (plist property)
   "Delete PROPERTY from PLIST.
 This is in contrast to merely setting it to 0."
   (let (p)
@@ -186,7 +186,7 @@ allows to create dynamic tags."
  (end (or (plist-get args :end) nil))
  (args (svg-tag--plist-delete args 'stroke))
  (args (svg-tag--plist-delete args 'foreground))
- (args (svg-tag--delete args 'background))
+ (args (svg-tag--plist-delete args 'background))
  (args (svg-tag--plist-delete args 'font-weight)))
 (if inverse
 (apply #'svg-lib-tag (substring tag beg end) nil
@@ -240,6 +240,7 @@ allows to create dynamic tags."
 (setq tag ``(face nil
  display ,,tag
  cursor-sensor-functions ,'(svg-tag--cursor-function)
+ cursor-sensor-functions (svg-tag--cursor-function)
  ,@(if ,callback '(pointer hand))
  ,@(if ,help `(help-echo ,,help))
  ,@(if ,callback `(keymap (keymap (mouse-1  . ,,callback))



[elpa] externals/svg-tag-mode 9ddf0e4f13 38/63: Rename screenshot

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 9ddf0e4f13a421af60a662efb3aba685a1e947e2
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Rename screenshot
---
 images/{svg-minor-mode.png => svg-tag-mode.png} | Bin
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/images/svg-minor-mode.png b/images/svg-tag-mode.png
similarity index 100%
rename from images/svg-minor-mode.png
rename to images/svg-tag-mode.png



[elpa] externals/svg-tag-mode 85aed73bc6 58/63: Added custom option to let user decide on action at point.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 85aed73bc6d96d0d198860f41772b1f12a03e0e5
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added custom option to let user decide on action at point.
---
 svg-tag-mode.el | 33 ++---
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index c292d42728..bc0c84da96 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -124,10 +124,16 @@
   :group 'convenience
   :prefix "svg-tag-")
 
-(setq svg-tag-tags `((" TODO " . ((svg-tag-make "TODO") nil nil
+(defcustom svg-tag-action-at-point 'echo
+  "Action to be executed when the cursor enter a tag area"
+  :type '(radio (const :tag "Edit tag"  edit)
+(const :tag "Echo tag"  echo)
+(const :tag "No action" nil))
+  :group 'svg-tag)
+
 
 (defcustom svg-tag-tags
-  `((" TODO " . ((svg-tag-make "TODO") nil nil)))
+  `(("^TODO" . ((svg-tag-make "TODO") nil nil)))
   "An alist mapping keywords to tags used to display them.
 
 Each entry has the form (keyword . tag).  Keyword is used as part
@@ -196,15 +202,20 @@ allows to create dynamic tags."
 (end (if (eq direction 'entered)
  (next-property-change (point))
(next-property-change position
-(if (eq direction 'left)
-(font-lock-flush beg end )
-  (if (and (not view-read-only) (not buffer-read-only))
-  (font-lock-unfontify-region beg end)))
-;; (if (eq direction 'entered)
-;; (message (concat "TAG: "
-;;  (substring-no-properties
-;;   (buffer-substring beg end )
-  ))
+
+(if (eq svg-tag-action-at-point 'edit)
+(if (eq direction 'left)
+(font-lock-flush beg end )
+  (if (and (not view-read-only) (not buffer-read-only))
+  (font-lock-unfontify-region beg end
+
+(if (eq svg-tag-action-at-point 'echo)
+(if (eq direction 'entered)
+(let ((message-log-max nil))
+  (message (concat "TAG: "
+   (substring-no-properties
+(string-trim
+ (buffer-substring beg end ))
 
 (defun svg-tag--build-keywords (item)
   "Process an item in order to install it as a new keyword."



[elpa] externals/svg-tag-mode b5a00a5746 56/63: Bumped version number and fixed some documentation.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit b5a00a57464a5f4a8e0692aa075a61e92845bffc
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Bumped version number and fixed some documentation.
---
 svg-tag-mode.el | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index b329ec6729..2ea4b04801 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Nicolas P. Rougier 
 ;; Homepage: https://github.com/rougier/svg-tag-mode
 ;; Keywords: convenience
-;; Version: 0.2
+;; Version: 0.3
 
 ;; Package-Requires: ((emacs "27.1") (svg-lib "0.3"))
 
@@ -63,7 +63,7 @@
 ;;(lambda () (interactive) (message "Hello world!"))
 ;;"Print a greeting message"
 ;;
-;; ;; This replaces any occurence of ":TODO:" with a static SVG tag
+;; ;; This replaces any occurence of ":TODO:" with a dynamic SVG tag
 ;; ;; displaying ":TODO:"
 ;; (setq svg-tag-tags
 ;;   '((":TODO:" . (svg-tag-make
@@ -102,6 +102,9 @@
 ;;
 ;;; NEWS:
 ;;
+;; Version 0.3:
+;; - Tags are now editable when cursor is inside.
+;;
 ;; Version 0.2:
 ;; - Added activable tags
 ;; - svg-lib dependency
@@ -185,8 +188,8 @@ allows to create dynamic tags."
args
 
 (defun svg-tag--cursor-function (win position direction)
-  "This function hides the tag when cursor is over it. This
-allows to edit the tag."
+  "This function hides the tag when cursor is over it, allowing
+ to edit it."
   (let ((beg (if (eq direction 'entered)
  (previous-property-change (+ (point) 1))
(previous-property-change (+ position 1
@@ -203,7 +206,6 @@ allows to edit the tag."
 ;;   (buffer-substring beg end )
   ))
 
-
 (defun svg-tag--build-keywords (item)
   "Process an item in order to install it as a new keyword."
 



[elpa] externals/svg-tag-mode 4fb494db21 43/63: Changed style of date

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 4fb494db21478354ed0599444e9add455d60745f
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Changed style of date
---
 examples/example-2.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/example-2.el b/examples/example-2.el
index c980ccd585..e82a55bec5 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -41,17 +41,17 @@
 ;; Org date (without day name)
 (,(format "\\(<%s *\\)%s>" date-re time-re) .
  ((lambda (tag)
-(svg-tag-make tag :beg 1 :inverse t :crop-right t :margin 0
+(svg-tag-make tag :beg 1 :inverse nil :crop-right t :margin 0
 (,(format "<%s *\\(%s>\\)" date-re time-re) .
  ((lambda (tag)
-(svg-tag-make tag :end -1 :crop-left t :margin 0
+(svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0
 
  (,(format "\\(\\[%s *\\)%s\\]" date-re time-re) .
   ((lambda (tag)
- (svg-tag-make tag :beg 1 :inverse t :crop-right t :margin 0 :face 
'org-date
+ (svg-tag-make tag :beg 1 :inverse nil :crop-right t :margin 0 
:face 'org-date
  (,(format "\\[%s *\\(%s\\]\\)" date-re time-re) .
   ((lambda (tag)
- (svg-tag-make tag :end -1 :crop-left t :margin 0 :face 
'org-date
+ (svg-tag-make tag :end -1 :inverse t :crop-left t :margin 0 :face 
'org-date
 ))
 
 (svg-tag-mode t)



[elpa] externals/svg-tag-mode b865793671 53/63: Updated copyright notices.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit b865793671c1de132c82e944527b34d79c6ef86a
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Updated copyright notices.
---
 examples/example-1.el |  2 +-
 examples/example-2.el |  2 +-
 examples/example-3.el | 15 +++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/examples/example-1.el b/examples/example-1.el
index feeacfbe5c..143b2378a2 100644
--- a/examples/example-1.el
+++ b/examples/example-1.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2020  Nicolas P. Rougier
+;; Copyright (C) 2020, 2021  Nicolas P. Rougier
 ;; This file is not part of GNU Emacs.
 ;;
 ;; This file is free software; you can redistribute it and/or modify
diff --git a/examples/example-2.el b/examples/example-2.el
index b041af1f3a..ea0ce6e4a8 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2020  Nicolas P. Rougier
+;; Copyright (C) 2020, 2021  Nicolas P. Rougier
 ;; This file is not part of GNU Emacs.
 ;;
 ;; This file is free software; you can redistribute it and/or modify
diff --git a/examples/example-3.el b/examples/example-3.el
index c6d88e7c42..7b1f62d25e 100644
--- a/examples/example-3.el
+++ b/examples/example-3.el
@@ -1,3 +1,18 @@
+;; Copyright (C) 2020, 2021  Nicolas P. Rougier
+;; This file is not part of GNU Emacs.
+;;
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; For a full copy of the GNU General Public License
+;; see .
 
 ;; This replaces any occurence of ":TODO:" with a static SVG tag
 ;; displaying "TODO"



[elpa] externals/svg-tag-mode 558ac3d3bd 54/63: Added edit mode (tag is hidden) when pointer is over a tag.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 558ac3d3bd286a26eb01907f0109fd6728227852
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Added edit mode (tag is hidden) when pointer is over a tag.
---
 svg-tag-mode.el | 23 +--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 12774ef168..2cedd1ae97 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -184,6 +184,22 @@ allows to create dynamic tags."
:background (face-background face nil 'default)
args
 
+(defun svg-tag--cursor-function (win position direction)
+  "This function hides the tag when cursor is over it. This
+allows to edit the tag."
+  (let* ((extents (cond ((and (eq direction 'left) (< (point) position))
+ `(,position . ,(next-property-change position)))
+((and (eq direction 'left) (> (point) position)) 
+ `(,(previous-property-change position) . ,(point)))
+((and (eq direction 'entered) (> (point) position))
+ `(,(point) . ,(next-property-change (point
+((and (eq direction 'entered) (< (point) position))
+ `(,(previous-property-change (point)) . ,position)
+(if (eq direction 'left)
+(font-lock-flush (car extents) (cdr extents))
+  (font-lock-unfontify-region (car extents) (cdr extents)
+
+
 (defun svg-tag--build-keywords (item)
   "Process an item in order to install it as a new keyword."
 
@@ -197,6 +213,7 @@ allows to create dynamic tags."
   (setq tag `(,tag (match-string 1
 (setq tag ``(face nil
  display ,,tag
+ cursor-sensor-functions ,'(svg-tag--cursor-function)
  ,@(if ,callback '(pointer hand))
  ,@(if ,help `(help-echo ,,help))
  ,@(if ,callback `(keymap (keymap (mouse-1  . ,,callback))
@@ -237,12 +254,13 @@ allows to create dynamic tags."
   ;; is a hack to prevent org mode from removing SVG tags that use the
   ;; 'display property
   (advice-add 'org-fontify-meta-lines-and-blocks
-:before #'notebook--remove-text-properties-on)
+:before #'svg-tag--remove-text-properties-on)
   (advice-add 'org-fontify-meta-lines-and-blocks
-  :after #'notebook--remove-text-properties-off)
+  :after #'svg-tag--remove-text-properties-off)
 
   ;; Redisplay everything to show tags
   (message "SVG tag mode on")
+  (cursor-sensor-mode 1)
   (font-lock-flush))
 
 (defun svg-tag-mode-off ()
@@ -263,6 +281,7 @@ allows to create dynamic tags."
   
   ;; Redisplay everything to hide tags
   (message "SVG tag mode off")
+  (cursor-sensor-mode -1)
   (font-lock-flush))
 
 (define-minor-mode svg-tag-mode



[elpa] externals/svg-tag-mode 3dd9bef838 59/63: Removed `org-plist-delete` dependency.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 3dd9bef8387752bb170186e09da6e1f18332d8b3
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Removed `org-plist-delete` dependency.
---
 svg-tag-mode.el | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index bc0c84da96..d65d68a126 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -131,6 +131,15 @@
 (const :tag "No action" nil))
   :group 'svg-tag)
 
+(defun svg-tags---plist-delete (plist property)
+  "Delete PROPERTY from PLIST.
+This is in contrast to merely setting it to 0."
+  (let (p)
+(while plist
+  (if (not (eq property (car plist)))
+ (setq p (plist-put p (car plist) (nth 1 plist
+  (setq plist (cddr plist)))
+p))
 
 (defcustom svg-tag-tags
   `(("^TODO" . ((svg-tag-make "TODO") nil nil)))
@@ -175,10 +184,10 @@ allows to create dynamic tags."
  (tag (string-trim tag))
  (beg (or (plist-get args :beg) 0))
  (end (or (plist-get args :end) nil))
- (args (org-plist-delete args 'stroke))
- (args (org-plist-delete args 'foreground))
- (args (org-plist-delete args 'background))
- (args (org-plist-delete args 'font-weight)))
+ (args (svg-tag--plist-delete args 'stroke))
+ (args (svg-tag--plist-delete args 'foreground))
+ (args (svg-tag--delete args 'background))
+ (args (svg-tag--plist-delete args 'font-weight)))
 (if inverse
 (apply #'svg-lib-tag (substring tag beg end) nil
:stroke 0
@@ -238,7 +247,7 @@ allows to create dynamic tags."
 
 (defun svg-tag--remove-text-properties (oldfun start end props  &rest args)
   "This applies remove-text-properties with 'display removed from props"
-  (apply oldfun start end (org-plist-delete props 'display) args))
+  (apply oldfun start end (svg-tag--plist-delete props 'display) args))
 
 (defun svg-tag--remove-text-properties-on (args)
   "This installs an advice around remove-text-properties"



[elpa] externals/svg-tag-mode 7266de9f9c 61/63: Simplified advice on org fontify blocks.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit 7266de9f9c59df3dc79118bd3c3fbed7f7116f8d
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Simplified advice on org fontify blocks.
---
 svg-tag-mode.el | 52 +---
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index fa1aa641a4..8607c8d48f 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -202,9 +202,11 @@ allows to create dynamic tags."
:background (face-background face nil 'default)
args
 
-(defun svg-tag--cursor-function (win position direction)
-  "This function hides the tag when cursor is over it, allowing
- to edit it."
+(defun svg-tag--cursor-function (_win position direction)
+  "This function processes action at point. Action can be:
+- Display the textual tag in the echo area
+- Dispaly the textual tag inline (this allow to edit it
+- Do nothing"
   (let ((beg (if (eq direction 'entered)
  (previous-property-change (+ (point) 1))
(previous-property-change (+ position 1
@@ -239,27 +241,28 @@ allows to create dynamic tags."
   (setq tag `(,tag (match-string 1
 (setq tag ``(face nil
  display ,,tag
- cursor-sensor-functions ,'(svg-tag--cursor-function)
  cursor-sensor-functions (svg-tag--cursor-function)
  ,@(if ,callback '(pointer hand))
  ,@(if ,help `(help-echo ,,help))
+ ;; FIXME: Don't hard-code the internal representation
+ ;; of keymaps.
  ,@(if ,callback `(keymap (keymap (mouse-1  . ,,callback))
 `(,pattern 1 ,tag)))
 
-(defun svg-tag--remove-text-properties (oldfun start end props  &rest args)
+(defun svg-tag--remove-text-properties (oldfun start end props &rest args)
   "This applies remove-text-properties with 'display removed from props"
   (apply oldfun start end (svg-tag--plist-delete props 'display) args))
 
-(defun svg-tag--remove-text-properties-on (args)
-  "This installs an advice around remove-text-properties"
-  (advice-add 'remove-text-properties
-  :around #'svg-tag--remove-text-properties))
-
-(defun svg-tag--remove-text-properties-off (args)
-  "This removes the advice around remove-text-properties"
-  (advice-remove 'remove-text-properties
- #'svg-tag--remove-text-properties))
-
+(defun svg-tag--org-fontify-meta-lines-and-blocks (oldfun &rest args)
+  "This installs our hack on remove-text-properties."
+  (unwind-protect
+  (progn
+(advice-add 'remove-text-properties
+:around #'svg-tag--remove-text-properties)
+(apply oldfun args))
+(advice-remove 'remove-text-properties
+ #'svg-tag--remove-text-properties)))
+
 (defun svg-tag-mode-on ()
   "Activate SVG tag mode."
   (add-to-list 'font-lock-extra-managed-props 'display)
@@ -277,13 +280,11 @@ allows to create dynamic tags."
   ;; Make a copy of newly installed tags
   (setq svg-tag--active-tags (copy-sequence svg-tag-tags))
 
-  ;; Install advices on remove-text-properties (before & after). This
-  ;; is a hack to prevent org mode from removing SVG tags that use the
-  ;; 'display property
-  (advice-add 'org-fontify-meta-lines-and-blocks
-:before #'svg-tag--remove-text-properties-on)
+  ;; Install an advice on org-fontify that will install a local advice
+  ;; on remove-text-properties. This is a hack to prevent org mode
+  ;; from removing SVG tags that use the 'display property
   (advice-add 'org-fontify-meta-lines-and-blocks
-  :after #'svg-tag--remove-text-properties-off)
+  :around #'svg-tag--org-fontify-meta-lines-and-blocks)
 
   ;; Flush buffer when entering read-only
   (add-hook 'read-only-mode-hook
@@ -303,13 +304,10 @@ allows to create dynamic tags."
   (mapcar #'svg-tag--build-keywords svg-tag--active-tags)))
   (setq svg-tag--active-tags nil)
 
-  ;; Remove advices on remove-text-properties (before & after)
+  ;; Remove advices on org-fontify-meta-lines-and-blocks
   (advice-remove 'org-fontify-meta-lines-and-blocks
- #'svg-tag--remove-text-properties-on)
-  (advice-remove 'org-fontify-meta-lines-and-blocks
- #'svg-tag--remove-text-properties-off)
-  (remove-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)
-  
+ #'svg-tag--org-fontify-meta-lines-and-blocks)
+
   ;; Redisplay everything to hide tags
   (message "SVG tag mode off")
   (cursor-sensor-mode -1)



[elpa] externals/svg-tag-mode e2481ae15a 63/63: Modified example to highlight real org tags.

2021-12-27 Thread ELPA Syncer
branch: externals/svg-tag-mode
commit e2481ae15adb979333b51fc83cab982e4a095152
Author: Nicolas P. Rougier 
Commit: Nicolas P. Rougier 

Modified example to highlight real org tags.
---
 examples/example-2.el | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/examples/example-2.el b/examples/example-2.el
index ea0ce6e4a8..cc17058cc4 100644
--- a/examples/example-2.el
+++ b/examples/example-2.el
@@ -39,13 +39,14 @@
 (setq svg-tag-tags
   `(
 ;; Org tags
-("\\(:#[A-Za-z0-9]+\\)" . ((lambda (tag)
- (svg-tag-make tag :face 'org-tag
-   :beg 2 :alignment 0
-("\\(:#[A-Za-z0-9]+:\\)$" . ((lambda (tag)
-   (svg-tag-make tag :face 'org-tag
- :beg 2 :end -1
- :alignment 0
+("\\(:[A-Za-z0-9]+\\)" . ((lambda (tag)
+  (svg-tag-make (string-trim tag ":+" ":+")
+:margin 1 :alignment 0
+("\\(:[A-Za-z0-9]+:+\\)" . ((lambda (tag)
+   (svg-tag-make (string-trim tag ":+" ":+")
+:margin 1 :alignment 0
+("\\(:[A-Za-z0-9]+[ \-]\\)" . ((lambda (tag) tag)))
+
 ;; Task priority
 ("\\[#[A-Z]\\]" . ( (lambda (tag)
   (svg-tag-make tag :face 'org-priority 
@@ -86,7 +87,7 @@
 (svg-tag-mode t)
 
 ;; To do: TODO DONE  
-;; Tags:  :#MEETING:#NOTE:
+;; Tags:  :MEETING:NOTE:
 ;; Priorities:[#A] [#B] [#C]
 ;; Progress:  [1/3]
 ;;[42%]



[elpa] externals/coterm updated (8e24e4eb07 -> 376b819ec0)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch externals/coterm.

  from  8e24e4eb07 Improve mpv prompt detection
   new  710e7d3087 Fix cursor restoration escape code
   new  376b819ec0 Support sequence \e[f (apt uses it as an equivalent to 
\e[H)


Summary of changes:
 coterm.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)



[elpa] externals/coterm 710e7d3087 1/2: Fix cursor restoration escape code

2021-12-27 Thread ELPA Syncer
branch: externals/coterm
commit 710e7d3087cc21cebeacf7168b6043d4930cf019
Author: Miha Rihtaršič 
Commit: Miha Rihtaršič 

Fix cursor restoration escape code
---
 coterm.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/coterm.el b/coterm.el
index 5806f3c616..ad06ce5c69 100644
--- a/coterm.el
+++ b/coterm.el
@@ -1025,9 +1025,10 @@ buffer and the scrolling region must cover the whole 
screen."
ansi-color-context)))
(?8 (ins) ;; Restore cursor (terminfo: rc)
(when-let ((cursor coterm--t-saved-cursor))
- (setq coterm--t-row (max (car cursor) (1- 
coterm--t-height)))
+ (setq coterm--t-saved-cursor nil)
+ (setq coterm--t-row (min (car cursor) (1- 
coterm--t-height)))
  (setq cursor (cdr cursor))
- (setq coterm--t-col (max (car cursor) (1- 
coterm--t-width)))
+ (setq coterm--t-col (min (car cursor) (1- 
coterm--t-width)))
  (setq cursor (cdr cursor))
  (setq ansi-color-context-region (car cursor))
  (setq ansi-color-context (cadr cursor))



[elpa] externals/coterm 376b819ec0 2/2: Support sequence \e[f (apt uses it as an equivalent to \e[H)

2021-12-27 Thread ELPA Syncer
branch: externals/coterm
commit 376b819ec01077a623556d557c86cf9438975881
Author: Miha Rihtaršič 
Commit: Miha Rihtaršič 

Support sequence \e[f (apt uses it as an equivalent to \e[H)
---
 coterm.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coterm.el b/coterm.el
index ad06ce5c69..a546758020 100644
--- a/coterm.el
+++ b/coterm.el
@@ -1056,7 +1056,7 @@ buffer and the scrolling region must cover the whole 
screen."
 (split-string ctl-params ";")))
(ins)
(pcase char
- (?H ;; cursor motion (terminfo: cup,home)
+ ((or ?H ?f) ;; cursor motion (terminfo: cup,home)
   (setq coterm--t-row
 (1- (max 1 (min (car-or-1) coterm--t-height
   (setq coterm--t-col



[elpa] externals/embark-consult updated (ab1ee58dcc -> c672dcf1eb)

2021-12-27 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  ab1ee58dcc Missed a spot in the documentation clean up
  adds  c672dcf1eb Don't inject target into pre-action hook minibuffers!

No new revisions were added by this update.

Summary of changes:
 embark.el | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)



  1   2   >