[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/toc-org 3dd30029b6 043/128: strip TODO and DONE states
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/toc-org 3dd30029b6 043/128: strip TODO and DONE states |
Date: |
Sun, 2 Jan 2022 09:59:08 -0500 (EST) |
branch: elpa/toc-org
commit 3dd30029b61a7843ed5ff72bb7365400e3133d4f
Author: Sergei Nosov <sergei.nosov@gmail.com>
Commit: Sergei Nosov <sergei.nosov@gmail.com>
strip TODO and DONE states
---
toc-org.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/toc-org.el b/toc-org.el
index dc66b8d40f..62511c6ce6 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -57,6 +57,8 @@ files on GitHub)"
"Regexp to find the heading with the :toc: tag")
(defconst toc-org-tags-regexp "\s*:[[:word:]:@]*:\s*$"
"Regexp to find tags on the line")
+(defconst toc-org-states-regexp "^*+\s+\\(TODO\s+\\|DONE\s+\\)"
+ "Regexp to find states on the line")
(defconst toc-org-special-chars-regexp "[][~`!@#$%^&*()+={}|\:;\"'<,>.?/]"
"Regexp with the special characters (which are omitted in hrefs
by GitHub)")
@@ -98,6 +100,11 @@ tags."
(beginning-of-line)
(delete-region (point) (progn (forward-line 1) (point)))
+ ;; strip states
+ (goto-char (point-min))
+ (while (re-search-forward toc-org-states-regexp nil t)
+ (replace-match "" nil nil nil 1))
+
;; strip tags
;; TODO :export: and :noexport: tags semantic should be probably
@@ -120,7 +127,7 @@ tags."
gold)))
(declare-function toc-org-test-raw-toc-gold-test "toc-org") ;; suppress
compiler warning
- (let ((beg "* About\n:TOC:\n drawer\n:END:\n\ntoc-org is a utility to have
an up-to-date table of contents in the\norg files without exporting (useful
primarily for readme files on\nGitHub).\n\nIt is similar to the
[[https://github.com/ardumont/markdown-toc][markdown-toc]] package, but works
for org files.\n:TOC:\n drawer\n:END:\n\n* Table of Contents
")
+ (let ((beg "* TODO About\n:TOC:\n drawer\n:END:\n\ntoc-org is a utility to
have an up-to-date table of contents in the\norg files without exporting
(useful primarily for readme files on\nGitHub).\n\nIt is similar to the
[[https://github.com/ardumont/markdown-toc][markdown-toc]] package, but works
for org files.\n:TOC:\n drawer\n:END:\n\n* Table of Contents
")
(gold "* About\n"))
;; different TOC styles
- [nongnu] elpa/toc-org 08ed3f0883 061/128: Merge pull request #30 from snosov1/fix-28, (continued)
- [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, 2022/01/02
- [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 <=
- [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
- [nongnu] elpa/toc-org 421956e9cc 078/128: remove opening space in each toc item, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 379b457fcf 107/128: fix subheading link in readme, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org f0b94e07bb 075/128: Merge pull request #39 from snosov1/add-noexport-support, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 274e821fd4 079/128: update emacs to 25 for travis testing, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 5deaec41ed 109/128: Update README.org, ELPA Syncer, 2022/01/02