[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-tag-mode 40d7820143 28/63: Moved examples into a di
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-tag-mode 40d7820143 28/63: Moved examples into a directory |
Date: |
Mon, 27 Dec 2021 15:57:58 -0500 (EST) |
branch: externals/svg-tag-mode
commit 40d78201436ee304499e6b968edf3c8e09a4f1aa
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
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..0000000000
--- 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 <http://www.gnu.org/licenses/>.
-(require 'svg-tag-mode)
-
-(defface svg-tag-todo-face
- '((t :foreground "#ffffff" :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 0000000000..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 <http://www.gnu.org/licenses/>.
+(require 'svg-tag-mode)
+
+(defface svg-tag-org-face
+ '((t :foreground "#333333" :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 "#333333" :background "#FFFFFF"
+ :box (:line-width 1 :color "#333333" :style nil)
+ :family "Roboto Mono" :weight regular :height 120))
+ "Default face for svg tag" :group nil)
+
+(defface svg-tag-todo-face
+ '((t :foreground "#ffffff" :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 "#ffffff" :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 "#ffffff"
+ :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 "#ffffff" :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 "#ffffff"
+ :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 " . svg-tag-org-next)
+ (" HOLD " . svg-tag-org-hold)
+
+ (,(concat "<" date-re "[ >]") .
svg-tag-make-org-date-active)
+ (,(concat "<" date-re " " day-re "[ >]") .
svg-tag-make-org-date-active)
+ (,(concat time-re ">") .
svg-tag-make-org-time-active)
+ (,(concat time-re "-" time-re ">") .
svg-tag-make-org-range-active)
+
+ (,(concat "\\[" date-re "[] ]") .
svg-tag-make-org-date-inactive)
+ (,(concat "\\[" date-re " " day-re "[] ]") .
svg-tag-make-org-date-inactive)
+ (,(concat time-re "\\]") .
svg-tag-make-org-time-inactive)
+ (,(concat time-re "-" time-re "\\]") .
svg-tag-make-org-range-inactive)))
+
+(svg-tag-mode)
+
+;; To do: TODO NEXT HOLD DONE
+;; Tags: @MEETING:@NOTE:
+;; Priorities: [#A] [#B] [#C]
+;; Active date: <2020-11-07>
+;; <2020-11-07 Sat>
+;; <2020-11-07 Sat 14:00>
+;; <2020-11-07 Sat 14:00-15:00>
+
+;; Inactive date: [2020-11-07]
+;; [2020-11-07 Sat]
+;; [2020-11-07 Sat 14:00]
+;; [2020-11-07 Sat 14:00-15:00]
- [elpa] externals/svg-tag-mode e9d0df33a6 12/63: Better default, (continued)
- [elpa] externals/svg-tag-mode e9d0df33a6 12/63: Better default, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a5af3041c4 07/63: Added customizable options, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 0944bb3bce 14/63: Simplified tag setup and added custom variable for tags, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode db4d223352 18/63: Fixed documentation, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 9649055e90 20/63: Trying to fix header, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode cec780a16f 21/63: Added version, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 4fdc7ffbb3 23/63: Fixed font weights, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 609ed7cc32 24/63: Removed free variable, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 0125ceca29 22/63: Fix README, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a9e8d9e705 27/63: Fixes followign review at https://github.com/melpa/melpa/pull/7217, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 40d7820143 28/63: Moved examples into a directory,
ELPA Syncer <=
- [elpa] externals/svg-tag-mode c0492f9046 30/63: Fixed links, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 78a343f0f3 34/63: Cleanup whitespace, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 29ca63cdbb 36/63: Rewrote the mode using svg-lib, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode f6adc4b772 39/63: Make sure to remove space from tag., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a5098267c9 41/63: Updated example 2 to new tags format., ELPA Syncer, 2021/12/27
- [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