||1 year ago|
|CONTRIBUTING.org||1 year ago|
|LICENSE.md||1 year ago|
|README.org||1 year ago|
|org-unique-id.el||1 year ago|
org-unique-id is a utility package for org users that are tired
dealing with random org IDs for their headers that change on each org
to HTML export (and other kinds of exports). This package creates
meaningful custom IDs for org headers that won’t change unless the
user modifies them manually.
This package can be installed like any other simple package. Your
first option is to download
org-unique-id or clone this package in
load-path and add the following to your configuration:
(require 'org-unique-id) (add-hook 'org-mode-hook (lambda () (add-hook 'before-save-hook (lambda () (when (and (eq major-mode 'org-mode) (eq buffer-read-only nil)) (org-unique-id))))))
You can also use a package manager such as Quelpa or Straight in order
to load automatically your package. In my case, I prefer the latter
(use-package org-unique-id :require t :after org :straight (org-unique-id :type git :host github :repo "Phundrak/org-unique-id") :init (add-hook 'org-mode-hook (lambda () (add-hook 'before-save-hook (lambda () (when (and (eq major-mode 'org-mode) (eq buffer-read-only nil)) (org-unique-id)))))))
I also add
:build t to my straight recipe to ensure my package is compiled.
If you know how to handle this with a pure Straight recipe, or with a Quelpa recipe, don’t hesitate to submit a PR to add it to this README!
Also, DAMN that’s one hell of a hook, if you know anything simpler than this, please submit it!
org-unique-id is available under the GNU GPL-3.0 license. You can find
the full text in LICENSE.md.