4 Commits
0.3.0 ... 0.3.1

Author SHA1 Message Date
8f0f99121f Bump version to 0.3.1 2022-08-24 18:25:44 +02:00
81212e7c60 Remove redundant let, ensure the whole buffer is checked for auto-id
Redundant let was left over from past refactoring. This commit removes
it.

It also ensures the search for auto-id:t is made throughout the whole
buffer.
2022-08-24 18:22:53 +02:00
c32fc49d3d Make org-unique-id-maybe interactive 2022-08-24 18:17:16 +02:00
e67035032f Add CI badge to README 2022-08-24 03:50:03 +02:00
2 changed files with 10 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
#+title: org-unique-id
#+author: Lucien Cartier-Tilet
#+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
~org-unique-id~ is a utility package for org users that are tired

View File

@@ -2,7 +2,7 @@
;; Author: 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"))
;; Homepage: https://labs.phundrak.com/phundrak/org-unique-id
;; Keywords: convenience
@@ -127,13 +127,14 @@ somewhere, i.e. #+OPTIONS: auto-id:t"
This function executes `org-unique-id' when the buffers major
mode is `org-mode', when the buffer is not read-only, and if
\\='auto-id:t\\' is found in an #+OPTIONS line."
(let ((case-fold-search t))
(when (and (eq major-mode 'org-mode)
(eq buffer-read-only nil)
(save-excursion
(let ((case-fold-search t))
(re-search-forward "^#\\+OPTIONS:.*auto-id:t" (point-max) t))))
(org-unique-id))))
(interactive)
(when (and (eq major-mode 'org-mode)
(eq buffer-read-only nil)
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
(re-search-forward "^#\\+OPTIONS:.*auto-id:t" (point-max) t))))
(org-unique-id)))
(provide 'org-unique-id)