From 67d520b28d8bebeb12405138283880ad48aef125 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sun, 27 Aug 2023 09:09:54 +0300 Subject: emacs: rewrite org-insert-book --- emacs.org | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emacs.org b/emacs.org index 7a1fd17..8f66539 100755 --- a/emacs.org +++ b/emacs.org @@ -391,9 +391,8 @@ Generate a random password between 20 and 40 characters (defun org-insert-book () "Insert org-link from ~/Library for book" (interactive) - (let ((book-path (read-file-name "Book: " "~/Library/")) - (book-description (read-string "Title: "))) - (org-insert-link nil book-path book-description))) + (let* ((book-path (read-file-name "Book: " "~/Library/"))) + (org-insert-link nil book-path (file-name-base book-path)))) ;;; Keybindings (define-key org-mode-map (kbd "C-c b") 'org-insert-book) -- cgit v1.2.3