Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8f0f99121f
|
|||
|
81212e7c60
|
|||
|
c32fc49d3d
|
|||
|
e67035032f
|
@@ -1,6 +1,7 @@
|
|||||||
#+title: org-unique-id
|
#+title: org-unique-id
|
||||||
#+author: Lucien Cartier-Tilet
|
#+author: Lucien Cartier-Tilet
|
||||||
#+email: lucien@phundrak.com
|
#+email: lucien@phundrak.com
|
||||||
|
[[https://github.com/Phundrak/org-unique-id/actions/workflows/workflow.yml][file:https://github.com/Phundrak/org-unique-id/actions/workflows/workflow.yml/badge.svg]]
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
~org-unique-id~ is a utility package for org users that are tired
|
~org-unique-id~ is a utility package for org users that are tired
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
|
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
;; Version: 0.3.0
|
;; Version: 0.3.1
|
||||||
;; Package-Requires: ((emacs "25.1") (org "9.3"))
|
;; Package-Requires: ((emacs "25.1") (org "9.3"))
|
||||||
;; Homepage: https://labs.phundrak.com/phundrak/org-unique-id
|
;; Homepage: https://labs.phundrak.com/phundrak/org-unique-id
|
||||||
;; Keywords: convenience
|
;; Keywords: convenience
|
||||||
@@ -127,13 +127,14 @@ somewhere, i.e. #+OPTIONS: auto-id:t"
|
|||||||
This function executes `org-unique-id' when the buffer’s major
|
This function executes `org-unique-id' when the buffer’s major
|
||||||
mode is `org-mode', when the buffer is not read-only, and if
|
mode is `org-mode', when the buffer is not read-only, and if
|
||||||
\\='auto-id:t\\' is found in an #+OPTIONS line."
|
\\='auto-id:t\\' is found in an #+OPTIONS line."
|
||||||
(let ((case-fold-search t))
|
(interactive)
|
||||||
(when (and (eq major-mode 'org-mode)
|
(when (and (eq major-mode 'org-mode)
|
||||||
(eq buffer-read-only nil)
|
(eq buffer-read-only nil)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((case-fold-search t))
|
(goto-char (point-min))
|
||||||
(re-search-forward "^#\\+OPTIONS:.*auto-id:t" (point-max) t))))
|
(let ((case-fold-search t))
|
||||||
(org-unique-id))))
|
(re-search-forward "^#\\+OPTIONS:.*auto-id:t" (point-max) t))))
|
||||||
|
(org-unique-id)))
|
||||||
|
|
||||||
(provide 'org-unique-id)
|
(provide 'org-unique-id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user