summaryrefslogtreecommitdiff
path: root/emacs.org
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-08-27 09:09:54 +0300
committerThanos Apollo <[email protected]>2023-08-27 09:09:54 +0300
commit67d520b28d8bebeb12405138283880ad48aef125 (patch)
treef9a5e72cf0a727217a505c501f9ae37288c99952 /emacs.org
parent5383fd14d4b0aa5d693055e8d203220495d27c24 (diff)
emacs: rewrite org-insert-book
Diffstat (limited to 'emacs.org')
-rwxr-xr-xemacs.org5
1 files 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)