summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-12-16 17:30:58 -0800
committerFranck Cuny <franck@fcuny.net>2024-12-16 17:30:58 -0800
commit5c8739098518f0c620dc6a37ea107935e591d4e5 (patch)
treeed4ed9aac100625c5a12b9a73f64dd862e3aba97
parentcleanup feeds (diff)
downloademacs.d-5c8739098518f0c620dc6a37ea107935e591d4e5.tar.gz
delete denote related stuff
-rw-r--r--init.el1
-rw-r--r--lisp/my-denote.el65
2 files changed, 0 insertions, 66 deletions
diff --git a/init.el b/init.el
index 1192378..35eb651 100644
--- a/init.el
+++ b/init.el
@@ -48,7 +48,6 @@
(require 'init-notes)
(require 'init-elfeed)
-(require 'my-denote)
(require 'my-uptime)
(require 'network-utils)
diff --git a/lisp/my-denote.el b/lisp/my-denote.el
deleted file mode 100644
index 2513b81..0000000
--- a/lisp/my-denote.el
+++ /dev/null
@@ -1,65 +0,0 @@
-;;; my-denote.el --- summary -*- lexical-binding: t -*-
-;; Author: Franck Cuny <franck@fcuny.net>
-
-;;; Commentary:
-
-;; commentary
-
-;;; Code:
-
-;;; https://protesilaos.com/codelog/2024-09-20-emacs-use-denote-for-meetings-events/
-(defvar my-denote-colleagues '("dbullock" "nirmam" "mark")
- "List of names I collaborate with.
-There is at least one file in the variable `denote-directory' that has
-the name of this person.")
-
-(defvar my-denote-colleagues-prompt-history nil
- "Minibuffer history for `my-denote-colleagues-new-meeting'.")
-
-(defun my-denote-colleagues-prompt ()
- "Prompt with completion for a name among `my-denote-colleagues'.
-Use the last input as the default value."
- (let ((default-value (car my-denote-colleagues-prompt-history)))
- (completing-read
- (format-prompt "New meeting with COLLEAGUE" default-value)
- my-denote-colleagues
- nil :require-match nil
- 'my-denote-colleagues-prompt-history
- default-value)))
-
-(defun my-denote-colleagues-get-file (name)
- "Find file in variable `denote-directory' for NAME colleague.
-If there are more than one files, prompt with completion for one among
-them.
-
-NAME is one among `my-denote-colleagues'."
- (if-let ((files (denote-directory-files name))
- (length-of-files (length files)))
- (cond
- ((= length-of-files 1)
- (car files))
- ((> length-of-files 1)
- (completing-read "Select a file: " files nil :require-match)))
- (user-error "No files for colleague with name `%s'" name)))
-
-(defun my-denote-colleagues-new-meeting ()
- "Prompt for the name of a colleague and insert a timestamped heading therein.
-The name of a colleague corresponds to at least one file in the variable
-`denote-directory'. In case there are multiple files, prompt to choose
-one among them and operate therein.
-
-Names are defined in `my-denote-colleagues'."
- (declare (interactive-only t))
- (interactive)
- (let* ((name (my-denote-colleagues-prompt))
- (file (my-denote-colleagues-get-file name))
- (time (format-time-string "%F %a %R"))) ; remove %R if you do not want the time
- (with-current-buffer (find-file file)
- (goto-char (point-max))
- ;; Here I am assuming we are in `org-mode', hence the leading
- ;; asterisk for the heading. Adapt accordingly.
- (insert (format "* [%s]\n\n" time)))))
-
-(provide 'my-denote)
-
-;;; my-denote.el ends here