[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-tag-mode ee16277655 42/63: Added examples from docu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-tag-mode ee16277655 42/63: Added examples from documentation |
Date: |
Mon, 27 Dec 2021 15:57:59 -0500 (EST) |
branch: externals/svg-tag-mode
commit ee162776552c6a5441b03c50621065522e34485f
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
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 0000000000..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 e9a6256dee 44/63: Added org-mode screenshot, (continued)
- [elpa] externals/svg-tag-mode e9a6256dee 44/63: Added org-mode screenshot, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 525901723f 47/63: Fixed requirements., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 8d9dd283fb 45/63: Updated screenshot, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode aca351185b 52/63: Fixed documentation., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 558ac3d3bd 54/63: Added edit mode (tag is hidden) when pointer is over a tag., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 72068052ff 19/63: Fixed default height, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 9ddf0e4f13 38/63: Rename screenshot, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode b865793671 53/63: Updated copyright notices., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 95b5404997 35/63: Merge pull request #13 from tarsiiformes/cleanup, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 861c68af89 40/63: Updated example 1 to new tags format., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode ee16277655 42/63: Added examples from documentation,
ELPA Syncer <=
- [elpa] externals/svg-tag-mode 8533c6c174 50/63: Added progress bar example., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode d9a803a92e 49/63: Added date without time format example., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 3e49ddcee2 57/63: Cancel tag editing in read-only or view mode., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 7266de9f9c 61/63: Simplified advice on org fontify blocks., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 1d0d91bb00 46/63: Fixed layout, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 02d60e0a86 55/63: Fixed cursor selection., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode b5a00a5746 56/63: Bumped version number and fixed some documentation., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 85aed73bc6 58/63: Added custom option to let user decide on action at point., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode e2481ae15a 63/63: Modified example to highlight real org tags., ELPA Syncer, 2021/12/27