summaryrefslogtreecommitdiff
path: root/emacs_init
diff options
context:
space:
mode:
authoryaideltg <github.j9jab@aleeas.com>2023-05-14 10:10:13 +0200
committeryaideltg <github.j9jab@aleeas.com>2023-05-14 10:10:13 +0200
commitd32d463f72a7e5df6f2fd16ecb3301c50e13367b (patch)
tree1fa3872fd5f518224e3cc68d296e4e0797a5d8d4 /emacs_init
parentd1f09edab9e71a7f4292096021fdd4c667136918 (diff)
downloadconfiguration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.tar.gz
configuration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.tar.bz2
configuration files-d32d463f72a7e5df6f2fd16ecb3301c50e13367b.zip
Added the Latex styles and visual-line-mode hook for org documents
Diffstat (limited to 'emacs_init')
-rw-r--r--emacs_init/dot_emacs.org20
1 files changed, 11 insertions, 9 deletions
diff --git a/emacs_init/dot_emacs.org b/emacs_init/dot_emacs.org
index c970d84..92923d1 100644
--- a/emacs_init/dot_emacs.org
+++ b/emacs_init/dot_emacs.org
@@ -664,6 +664,7 @@ because it uses [[*Denote][Denote's]] tags in the file name to detect the projec
:ensure t
:hook
(org-mode . flyspell-mode)
+ (org-mode . visual-line-mode)
:config
(setq org-startup-indented t) ;; Activating Org Indent Mode by default
@@ -983,6 +984,7 @@ Facilitating the automatic loggin to the IRC server by using auth-source library
#+begin_src emacs-lisp
(use-package denote
:ensure t
+ :demand t
:config
;;
;; General key bindings
@@ -995,7 +997,8 @@ Facilitating the automatic loggin to the IRC server by using auth-source library
(setq denote-org-front-matter
"#+title: %s\n#+date: %s\n#+filetags: %s\n#+identifier: %s\n#+author: yaidel\n#+startup: content\n\n")
:bind
- ("C-c n n" . denote-open-or-create)
+ ("C-c n f" . denote-open-or-create)
+ ("C-c n n" . denote)
("C-c n l" . denote-link-or-create)
("C-c n B" . denote-link-find-file)
("C-c n b" . denote-link-backlinks)
@@ -1075,8 +1078,6 @@ Anyhow, the files will be deleted once emacs is closed and reopened, due to the
;; (add-hook 'after-save-hook #'my-denote-remove-from-agenda)
#+end_src
------------
-
Furthermore, to those using Org-roam, https://d12frosted.io/ has a perfect solution to add files with TODOs to
the =org-agenda-files= variable. In fact, that solution is much better than adding all files with the
=_project= keyword in their name, but it is not possible to implement while using Denote. Because Denote do
@@ -1089,21 +1090,22 @@ Define a function to handle the creation of the journal entry:
#+begin_src emacs-lisp
(defun my-denote-journal ()
- "Check if a file containing the given string exists in the
- directory and open it in a new buffer.
- If the file does not exist, create it with a 'denote' string."
+ "Create an entry tagged 'journal' with the date as its title.
+ If a journal for the current day exists, visit it. If multiple
+ entries exist, prompt with completion for a choice between them.
+ Else create a new file."
(interactive)
- (let* ((string (denote-sluggify (format-time-string "%A %e %B %Y")))
+ (let* ((today (format-time-string "%A %e %B %Y"))
+ (string (denote-sluggify today))
(files (denote-directory-files-matching-regexp string)))
(cond
((> (length files) 1)
(find-file (completing-read "Select file: " files nil :require-match)))
(files
(find-file (car files)))
- ;; If we reach this point, the file doesn't exist, so we create it
(t
(denote
- (format-time-string "%A %e %B %Y") ; format the note's name like Tuesday 14 June 2022
+ today
'("journal"))))))
#+end_src