[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/toc-org 5a2d7e58dd 028/128: add org-toc-2 alias
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/toc-org 5a2d7e58dd 028/128: add org-toc-2 alias |
Date: |
Sun, 2 Jan 2022 09:59:07 -0500 (EST) |
branch: elpa/toc-org
commit 5a2d7e58dd82e11e3e5c1fe114120d801073a943
Author: Sergei Nosov <sergei.nosov@gmail.com>
Commit: Sergei Nosov <sergei.nosov@gmail.com>
add org-toc-2 alias
---
README.org | 38 +++++++++++++++++++++++++++-----------
org-toc.el | 1 +
2 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 599c2091d5..dcc7fd762b 100644
--- a/README.org
+++ b/README.org
@@ -12,6 +12,7 @@ It is similar to the
[[https://github.com/ardumont/markdown-toc][markdown-toc]]
- [[#installation][Installation]]
- [[#via-packageel][via package.el]]
- [[#manual][Manual]]
+ - [[#potential-name-conflict][Potential name conflict]]
- [[#use][Use]]
- [[#different-href-styles][Different href styles]]
- [[#example][Example]]
@@ -24,14 +25,15 @@ It is similar to the
[[https://github.com/ardumont/markdown-toc][markdown-toc]]
This is the simplest method if you have the package.el module (built-in since
Emacs 24.1) you can simply use =M-x package-install= after setting up the
[[http://melpa.org/#/getting-started][MELPA]]
repository and then put the following snippet in your ~/.emacs file
+
#+BEGIN_SRC elisp
- (eval-after-load "org-toc-autoloads"
- '(progn
- (if (require 'org-toc nil t)
- (add-hook 'org-mode-hook 'org-toc-enable)
- (warn "org-toc not found"))))
+ (if (require 'org-toc-2 nil t)
+ (add-hook 'org-mode-hook 'org-toc-enable)
+ (warn "org-toc not found"))
#+END_SRC
+
** Manual
+
- Create folder ~/.emacs.d if you don't have it
- Go to it and clone org-toc there
#+BEGIN_SRC sh
@@ -40,10 +42,22 @@ repository and then put the following snippet in your
~/.emacs file
- Put this in your ~/.emacs file
#+BEGIN_SRC elisp
(add-to-list 'load-path "~/.emacs.d/org-toc")
- (when (require 'org-toc nil t)
- (add-hook 'org-mode-hook 'org-toc-enable))
+ (if (require 'org-toc-2 nil t)
+ (add-hook 'org-mode-hook 'org-toc-enable)
+ (warn "org-toc not found"))
#+END_SRC
+** Potential name conflict
+
+If you install =contrib= Org modules, you may face a name conflict, since
+there's a package with the same name there. /Current/ package provides both
+=org-toc= and =org-toc-2= features to require. So, you should, probably, use
the
+latter to avoid potential conflicts. The former is provided for backward
+compatibility.
+
+There still might be issues with autoloading in case both packages are
+installed. But those should be easy to workaround (e.g. don't use autoloads).
+
* Use
After the installation, every time you'll be saving an org file, the first
@@ -66,10 +80,12 @@ formats:
You can also use =@= as separator, instead of =_=.
*Note* In your emacs' setup, you can bind a tag =:TOC:= to a binding =T=:
-#+begin_src emacs-lisp
-(add-to-list 'org-tag-alist '("TOC" . ?T))
-#+end_src
-Now `C-c C-q T RET` and you are done putting the =:TOC:= entry.
+
+#+BEGIN_SRC emacs-lisp
+ (add-to-list 'org-tag-alist '("TOC" . ?T))
+#+END_SRC
+
+Now =C-c C-q T RET= and you are done putting the =:TOC:= entry.
* Different href styles
diff --git a/org-toc.el b/org-toc.el
index 04a3879066..6b5a97833a 100644
--- a/org-toc.el
+++ b/org-toc.el
@@ -280,5 +280,6 @@ following tag formats:
;; compile-command: "emacs -batch -l ert -l *.el -f
ert-run-tests-batch-and-exit && emacs -batch -f batch-byte-compile *.el 2>&1 |
sed -n '/Warning\|Error/p' | xargs -r ls"
;; End:
+(provide 'org-toc-2)
(provide 'org-toc)
;;; org-toc.el ends here
- [nongnu] elpa/toc-org acca680bc5 098/128: Add somewhat working TOC generation for markdown files, (continued)
- [nongnu] elpa/toc-org acca680bc5 098/128: Add somewhat working TOC generation for markdown files, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 0b759818ee 025/128: fix byte-compilation warning, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org a0fd8ffb8a 047/128: make internal linking work with Org 8.3, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 7fae24baa9 030/128: revert org-toc-2 documentation changes, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org af1ffb17c2 050/128: Better toc-org-special-chars-regexp, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 158934fefd 064/128: Merge pull request #31 from azizyemloul/delete-heading-trailing-spaces, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org a0e8ca05e8 066/128: Merge pull request #33 from iqbalansari/master, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 39fbbda8df 081/128: handle custom keywords specified in the files, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 8dbb3df422 125/128: Fix byte-compiler warning in Emacs 28, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org a3d953a5fa 076/128: Update and clarify primary docstring to explain :noexport:, etc., ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 5a2d7e58dd 028/128: add org-toc-2 alias,
ELPA Syncer <=
- [nongnu] elpa/toc-org da99c5d801 023/128: require ert, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 63a0144afa 031/128: fix documentation, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org cfb309e8ab 035/128: fix typo, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 1a213baa8a 048/128: don't alter the type and path if we don't recognize it as a TOC entry, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org d23140d604 056/128: Merge pull request #21 from snosov1/fix-properties-handling, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 17c6cf1d1a 060/128: add tests, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 01cb78ead6 063/128: Use `delete-region` instead of kill-line while creating the TOC, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org d3d3503b34 062/128: Delete trailing whitespaces from links, ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org 4d076d1e9d 118/128: Respect the file-local value of org-list-indent-offset., ELPA Syncer, 2022/01/02
- [nongnu] elpa/toc-org f3218fdaf1 123/128: Add license and copyright header to toc-org-test.el, ELPA Syncer, 2022/01/02