[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/toc-org c662f96040 090/128: add quote functionality
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/toc-org c662f96040 090/128: add quote functionality |
Date: |
Sun, 2 Jan 2022 09:59:12 -0500 (EST) |
branch: elpa/toc-org
commit c662f96040d8dfa393e3da288644a926dd49b5ac
Author: Sergei Nosov <sergei.nosov@gmail.com>
Commit: Sergei Nosov <sergei.nosov@gmail.com>
add quote functionality
---
toc-org.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/toc-org.el b/toc-org.el
index 861a55ace9..63a35f7db2 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -54,6 +54,8 @@ files on GitHub)"
;; just in case, simple regexp "^*.*:toc:\\($\\|[^ ]*:$\\)"
(defconst toc-org-toc-org-regexp
"^*.*:toc\\([@_][0-9]\\|\\([@_][0-9][@_][a-zA-Z]+\\)\\)?:\\($\\|[^ ]*?:$\\)"
"Regexp to find the heading with the :toc: tag")
+(defconst toc-org-quote-tag-regexp "^*.*:quote:\\($\\|[^ ]*?:$\\)"
+ "Regexp to find the heading with the :quote: tag")
(defconst toc-org-noexport-regexp
"\\(^*+\\)\s+.*:noexport\\([@_][0-9]\\)?:\\($\\|[^ ]*?:$\\)"
"Regexp to find the extended version of :noexport: tag")
(defconst toc-org-tags-regexp "\s*:[[:word:]:@_]*:\s*$"
@@ -351,14 +353,19 @@ not :noexport_#:."
(downcase (substring tag 3))
toc-org-hrefify-default))
(hrefify-string (concat "toc-org-hrefify-" hrefify-tag))
- (hrefify (intern-soft hrefify-string)))
+ (hrefify (intern-soft hrefify-string))
+ (put-quote (save-match-data (string-match
toc-org-quote-tag-regexp (match-string 0))))
+ (toc-prefix (if put-quote "#+BEGIN_QUOTE\n" ""))
+ (toc-suffix (if put-quote "#+END_QUOTE\n" "")))
(if hrefify
(let ((new-toc
- (toc-org-hrefify-toc
- (toc-org-flush-subheadings (toc-org-raw-toc) depth)
- hrefify
- (when toc-org-hrefify-hash
- (clrhash toc-org-hrefify-hash)))))
+ (concat toc-prefix
+ (toc-org-hrefify-toc
+ (toc-org-flush-subheadings (toc-org-raw-toc)
depth)
+ hrefify
+ (when toc-org-hrefify-hash
+ (clrhash toc-org-hrefify-hash)))
+ toc-suffix)))
(unless dry-run
(newline (forward-line 1))
- [nongnu] elpa/toc-org 970560a874 069/128: fix travis build, (continued)
- [nongnu] elpa/toc-org 970560a874 069/128: fix travis build, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 39d983c381 074/128: add noexport support, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 663e5ec281 116/128: Correct sample configuration to valid code, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org c83c19ddb4 093/128: Merge pull request #59 from snosov1/add-quote, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 35781c6313 126/128: Merge pull request #82 from skangas/add-license, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 08ed3f0883 061/128: Merge pull request #30 from snosov1/fix-28, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 56b48ec37b 033/128: rename to toc-org, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 11ce8a843f 052/128: strip priorities (fixes #18), ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org a19c3f5f94 091/128: test quote functionality, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 32975071df 039/128: mention former name in description, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org c662f96040 090/128: add quote functionality,
ELPA Syncer <=
- [nongnu] elpa/toc-org 4cd71edc29 082/128: bump emacs25 version, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 827dc448e0 013/128: push .travis.yml, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 11be82816a 019/128: Merge pull request #4 from ardumont/add-tag-setup, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org b4dbeb936c 024/128: simply require ert, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 3dd30029b6 043/128: strip TODO and DONE states, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 7eb2874ed3 041/128: require org, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 3e0bdb5a29 054/128: fix properties handling (see #20), ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 7c54f809d6 058/128: Merge pull request #23 from snosov1/fix-eof-toc, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org b0cac21cdf 059/128: handle statistics cookies and #+OPTIONS: todo:t, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 44c2e17543 070/128: Merge pull request #36 from snosov1/move-tests, ELPA Syncer, 2022/01/02