From 09ab6f5aa56731d324caedd547fd90afd8da88b4 Mon Sep 17 00:00:00 2001 From: Korytov Pavel Date: Wed, 16 Feb 2022 10:58:18 +0300 Subject: [PATCH 1/3] docs: add MELPA link --- README.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 28a3030..6ada790 100644 --- a/README.org +++ b/README.org @@ -1,5 +1,7 @@ #+TITLE: org-journal-tags +[[https://melpa.org/#/org-journal-tags][file:https://melpa.org/packages/org-journal-tags-badge.svg]] + A package to make sense of +my life+ [[https://github.com/bastibe/org-journal][org-journal]] records. The package adds the =org-journal:= link type to Org Mode. When placed in an org-journal file, it serves as a "tag" that references one or many paragraphs of the journal or the entire section. These tags are aggregated in the database that can be queried in various ways. @@ -16,10 +18,10 @@ For instance, when I'm writing down the progress on a job project, I can leave a If no tag fits the subject matter, the journal can be queried by regular expression, e.g. by searching some regex within a specific time frame. Subsequent searches are also significantly faster than the built-in org-journal search functionality because of caching of the journal files. * Installation -As the package isn’t yet available anywhere but in this repository, you can clone the repository, add it to the load-path and require the package. My preferred way is =use use-package= with =straight=: +The package is available on MELPA. Install it however you normally install packages, my preferred way is =use-package= with =straight=: #+begin_src emacs-lisp (use-package org-journal-tags - :straight (:host github :repo "SqrtMinusOne/org-journal-tags") + :straight t :after (org-journal) :config (org-journal-tags-autosync-mode)) From f8ad372c5839eeb882d2bd256ddd740e900aad95 Mon Sep 17 00:00:00 2001 From: Korytov Pavel Date: Wed, 16 Feb 2022 11:01:59 +0300 Subject: [PATCH 2/3] fix: homepage URL --- org-journal-tags.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-journal-tags.el b/org-journal-tags.el index 03098fb..87b57c9 100644 --- a/org-journal-tags.el +++ b/org-journal-tags.el @@ -6,7 +6,7 @@ ;; Maintainer: Korytov Pavel ;; Version: 0.1.0 ;; Package-Requires: ((emacs "27.1") (org-journal "2.1.2") (magit-section "3.3.0") (transient "0.3.7")) -;; Homepage: https://github.com/SqrtMinusOne/org-journal-tags.el +;; Homepage: https://github.com/SqrtMinusOne/org-journal-tags ;; This file is NOT part of GNU Emacs. From b395f5c90aa06885aa9441217cc0abaaa53ccc11 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sat, 5 Mar 2022 23:19:01 +0300 Subject: [PATCH 3/3] fix: handle the broken database gracefully --- org-journal-tags.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org-journal-tags.el b/org-journal-tags.el index 87b57c9..1112c29 100644 --- a/org-journal-tags.el +++ b/org-journal-tags.el @@ -247,7 +247,11 @@ The properties are: (with-temp-buffer (insert-file-contents org-journal-tags-db-file) (goto-char (point-min)) - (setf org-journal-tags-db (read (current-buffer)))))) + (condition-case err + (setf org-journal-tags-db (read (current-buffer))) + (error (progn + (message "Recreating the database because of an error") + (setf org-journal-tags-db (org-journal-tags-db--empty)))))))) (defun org-journal-tags-db-ensure () "Ensure that the database has been loaded."