From 69116a4da49448e79ac03aedceeecd9f5ae9b2d4 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Sun, 24 Apr 2022 17:05:27 -0700 Subject: [PATCH] v2.2.2 (#2171) --- CHANGELOG.md | 3 +- doc/org-roam.org | 4 +-- doc/org-roam.texi | 4 +-- extensions/org-roam-dailies.el | 2 +- extensions/org-roam-graph.el | 2 +- extensions/org-roam-overlay.el | 2 +- extensions/org-roam-protocol.el | 2 +- org-roam-capture.el | 2 +- org-roam-compat.el | 2 +- org-roam-db.el | 2 +- org-roam-migrate.el | 2 +- org-roam-node.el | 4 ++- org-roam.el | 49 ++++++++++++++++----------------- 13 files changed, 41 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e081cde..287600e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## TBD +## 2.2.2 ### Breaking ### Added - [#2138](https://github.com/org-roam/org-roam/pull/2138) export: add new module +- [#2170](https://github.com/org-roam/org-roam/pull/2170) log: add new module for working with org logs - [#2158](https://github.com/org-roam/org-roam/pull/2158) db: support emacsql-sqlite-builtin and emacsql-sqlite-module - [#2160](https://github.com/org-roam/org-roam/pull/2160) core: support a list of `org-roam-file-exclude-regexp` diff --git a/doc/org-roam.org b/doc/org-roam.org index bdc1ad1..c3e259e 100644 --- a/doc/org-roam.org +++ b/doc/org-roam.org @@ -17,7 +17,7 @@ This manual is for Org-roam version 2.2.1. #+BEGIN_QUOTE -Copyright (C) 2020-2021 Jethro Kuan +Copyright (C) 2020-2022 Jethro Kuan You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either @@ -1809,7 +1809,7 @@ When GOTO is non-nil, go the note without creating an entry." :END: #+BEGIN_QUOTE -Copyright (C) 2020-2021 Jethro Kuan +Copyright (C) 2020-2022 Jethro Kuan You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/doc/org-roam.texi b/doc/org-roam.texi index 23717e9..238041b 100644 --- a/doc/org-roam.texi +++ b/doc/org-roam.texi @@ -8,7 +8,7 @@ @copying @quotation -Copyright (C) 2020-2021 Jethro Kuan +Copyright (C) 2020-2022 Jethro Kuan You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -47,7 +47,7 @@ General Public License for more details. This manual is for Org-roam version 2.2.1. @quotation -Copyright (C) 2020-2021 Jethro Kuan +Copyright (C) 2020-2022 Jethro Kuan You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either diff --git a/extensions/org-roam-dailies.el b/extensions/org-roam-dailies.el index e80c37f..4da3e29 100644 --- a/extensions/org-roam-dailies.el +++ b/extensions/org-roam-dailies.el @@ -1,6 +1,6 @@ ;;; org-roam-dailies.el --- Daily-notes for Org-roam -*- coding: utf-8; lexical-binding: t; -*- ;;; -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Copyright © 2020 Leo Vivier ;; Author: Jethro Kuan diff --git a/extensions/org-roam-graph.el b/extensions/org-roam-graph.el index 522c477..b65ea7f 100644 --- a/extensions/org-roam-graph.el +++ b/extensions/org-roam-graph.el @@ -1,6 +1,6 @@ ;;; org-roam-graph.el --- Basic graphing functionality for Org-roam -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/extensions/org-roam-overlay.el b/extensions/org-roam-overlay.el index 74fdb3a..8756775 100644 --- a/extensions/org-roam-overlay.el +++ b/extensions/org-roam-overlay.el @@ -1,6 +1,6 @@ ;;; org-roam-overlay.el --- Link overlay for [id:] links to Org-roam nodes -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/extensions/org-roam-protocol.el b/extensions/org-roam-protocol.el index 5198ed0..23280e1 100644 --- a/extensions/org-roam-protocol.el +++ b/extensions/org-roam-protocol.el @@ -1,6 +1,6 @@ ;;; org-roam-protocol.el --- Protocol handler for roam:// links -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam ;; Keywords: org-mode, roam, convenience diff --git a/org-roam-capture.el b/org-roam-capture.el index c3c90db..fff9706 100644 --- a/org-roam-capture.el +++ b/org-roam-capture.el @@ -1,6 +1,6 @@ ;;; org-roam-capture.el --- Capture functionality -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/org-roam-compat.el b/org-roam-compat.el index bcfea2d..e190f55 100644 --- a/org-roam-compat.el +++ b/org-roam-compat.el @@ -1,6 +1,6 @@ ;;; org-roam-compat.el --- Backward compatibility code -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/org-roam-db.el b/org-roam-db.el index 9608a1c..cf1a832 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -1,6 +1,6 @@ ;;; org-roam-db.el --- Org-roam database API -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/org-roam-migrate.el b/org-roam-migrate.el index ac8c38b..e9a8ae6 100644 --- a/org-roam-migrate.el +++ b/org-roam-migrate.el @@ -1,6 +1,6 @@ ;;; org-roam-migrate.el --- Migration utilities from v1 to v2 -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam diff --git a/org-roam-node.el b/org-roam-node.el index 090f427..d885a62 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -1,6 +1,6 @@ ;;; org-roam-node.el --- Interfacing and interacting with nodes -*- lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam @@ -802,6 +802,8 @@ hence \"everywhere\"." :exclusive 'no)))) (add-hook 'org-roam-find-file-hook #'org-roam--register-completion-functions-h) +(add-hook 'org-roam-indirect-buffer-hook #'org-roam--register-completion-functions-h) + (defun org-roam--register-completion-functions-h () "Setup `org-roam-completion-functions' for `completion-at-point'." (dolist (f org-roam-completion-functions) diff --git a/org-roam.el b/org-roam.el index 534aeec..767d753 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1,6 +1,6 @@ ;;; org-roam.el --- A database abstraction layer for Org-mode -*- coding: utf-8; lexical-binding: t; -*- -;; Copyright © 2020-2021 Jethro Kuan +;; Copyright © 2020-2022 Jethro Kuan ;; Author: Jethro Kuan ;; URL: https://github.com/org-roam/org-roam @@ -192,30 +192,29 @@ FILE is an Org-roam file if: - It's located somewhere under `org-roam-directory' - It has a matching file extension (`org-roam-file-extensions') - It doesn't match excluded regexp (`org-roam-file-exclude-regexp')" - (when (or file (buffer-file-name (buffer-base-buffer))) - (let* ((path (or file (buffer-file-name (buffer-base-buffer)))) - (ext (org-roam--file-name-extension path)) - (ext (if (string= ext "gpg") - (org-roam--file-name-extension (file-name-sans-extension path)) - ext)) - (org-roam-dir-p (org-roam-descendant-of-p path org-roam-directory)) - (valid-file-ext-p (member ext org-roam-file-extensions)) - (match-exclude-regexp-p - (cond - ((not org-roam-file-exclude-regexp) nil) - ((stringp org-roam-file-exclude-regexp) - (string-match-p org-roam-file-exclude-regexp path)) - ((listp org-roam-file-exclude-regexp) - (let (is-match) - (dolist (exclude-re org-roam-file-exclude-regexp) - (setq is-match (or is-match (string-match-p exclude-re path)))) - is-match))))) - (save-match-data - (and - path - org-roam-dir-p - valid-file-ext-p - (not match-exclude-regexp-p)))))) + (let* ((path (or file (buffer-file-name (buffer-base-buffer)))) + (ext (when path (org-roam--file-name-extension path))) + (ext (if (string= ext "gpg") + (org-roam--file-name-extension (file-name-sans-extension path)) + ext)) + (org-roam-dir-p (org-roam-descendant-of-p path org-roam-directory)) + (valid-file-ext-p (member ext org-roam-file-extensions)) + (match-exclude-regexp-p + (cond + ((not org-roam-file-exclude-regexp) nil) + ((stringp org-roam-file-exclude-regexp) + (string-match-p org-roam-file-exclude-regexp path)) + ((listp org-roam-file-exclude-regexp) + (let (is-match) + (dolist (exclude-re org-roam-file-exclude-regexp) + (setq is-match (or is-match (string-match-p exclude-re path)))) + is-match))))) + (save-match-data + (and + path + org-roam-dir-p + valid-file-ext-p + (not match-exclude-regexp-p))))) (defun org-roam-list-files () "Return a list of all Org-roam files under `org-roam-directory'.