-
Notifications
You must be signed in to change notification settings - Fork 2
/
org-zettel-ref-mode.el
41 lines (32 loc) · 1.24 KB
/
org-zettel-ref-mode.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
;;; org-zettel-ref-mode.el --- Zettelsken-style Reference Note in Org mode -*- lexical-binding: t; -*-
;; Copyright (C) 2024 Yibie
;; Author: Yibie <[email protected]>
;; Version: 0.4
;; Package-Requires: ((emacs "29.1") (org "9.3"))
;; Keywords: outlines
;; URL: https://github.com/yibie/org-zettel-ref-mode
;;; Commentary:
;; This package provides a mode for creating and managing a reference
;; overview file for marked text and quick notes in Org mode.
;;; Code:
(require 'org-zettel-ref-core)
(require 'org-zettel-ref-ui)
(require 'org-zettel-ref-db)
(require 'org-zettel-ref-utils)
(require 'org-zettel-ref-list)
;;;###autoload
(define-minor-mode org-zettel-ref-mode
"Minor mode for managing reference notes in Org mode."
:init-value nil
:lighter " ZettelRef"
:keymap (let ((map (make-sparse-keymap)))
(define-key map (kbd org-zettel-ref-quick-markup-key) #'org-zettel-ref-quick-markup)
map)
(if org-zettel-ref-mode
(if (buffer-file-name)
(org-zettel-ref-mode-enable)
(setq org-zettel-ref-mode nil)
(message "org-zettel-ref-mode can only be enabled in buffers with associated files."))
(org-zettel-ref-mode-disable)))
(provide 'org-zettel-ref-mode)
;;; org-zettel-ref-mode.el ends here