summaryrefslogtreecommitdiff
path: root/smart-documents.org
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2022-01-02 17:50:52 +0100
committerMarius Peter <blendoit@gmail.com>2022-01-02 17:50:52 +0100
commitb90bcd4f2574c1585f3f7d79f160bccea72073dd (patch)
treeb6ec23dbd901178c60f1bd91e7e98cce2d6a9d55 /smart-documents.org
parent59bba2661da5ebce3f25136269413b9962992462 (diff)
Installing Guix fr now!
Diffstat (limited to 'smart-documents.org')
-rw-r--r--smart-documents.org112
1 files changed, 73 insertions, 39 deletions
diff --git a/smart-documents.org b/smart-documents.org
index 14879a6..46597ee 100644
--- a/smart-documents.org
+++ b/smart-documents.org
@@ -42,6 +42,7 @@ personal GNU Emacs customizations with a tutorial. This paper is a
** TODO <apps> button as master {{{sd}}} entry point
+** TODO Turn ~left-fringe~ into ~org-agenda~ buffer drawer
* Introduction
@@ -181,7 +182,7 @@ logic.
In this section, we'll be tidying up the =.emacs.d/= directory---by
default, many Emacs packages create files useful for themselves in our
-~user-emacs-directory~. This leads to undesirable clutter. Certain
+[[help:user-emacs-directory][user-emacs-directory]]. This leads to undesirable clutter. Certain
packages create files that log recently visited files ([[Recently
visited files]]); log location of known projects ([[Projects' bookmarks]]);
log location in recently visited files ([[Location in previously visited
@@ -189,10 +190,18 @@ file]]) The commonality between all these files is that they tend to
reference... other files. Thus, I decided to refer to them as meta
files.
+A meta files should follow the following best principles:
+
+- Be located at [[help:sd-path-meta][sd-path-meta]] :: This ensures a tidy
+ [[help:user-emacs-directory][user-emacs-directory]].
+- Be explicit :: Meta filenames should not begin with a period: they
+ would be hidden by default on GNU/Linux systems. Novices must see
+ all files by default.
+
#+BEGIN_SRC emacs-lisp :tangle yes
(defcustom sd-path-meta
(concat user-emacs-directory "meta/")
- "Directory (which is a file, really) containing files about files.")
+ "Directory containing files about files.")
#+END_SRC
**** Recently visited files
@@ -202,6 +211,13 @@ files.
(concat sd-path-meta "recentf"))
#+END_SRC
+**** File bookmarks
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (setq bookmark-default-file
+ (concat sd-path-meta "bookmarks"))
+#+END_SRC
+
**** Projects' bookmarks
#+BEGIN_SRC emacs-lisp :tangle yes
@@ -209,6 +225,24 @@ files.
(concat sd-path-meta "projectile-bookmarks.eld"))
#+END_SRC
+**** Org id locations
+
+#+begin_quote
+We track IDs through files, so that links work globally. The file
+defined at [[help:org-id-locations-file][org-id-locations-file]] maintains a hash table for IDs and
+writes this table to disk when exiting Emacs. Because of this, it
+works best if you use a single Emacs process, not many.
+
+Paraphrased from [[help:org-id-track-globally][the Emacs help interface]].
+#+end_quote
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (setq org-id-locations-file
+ (concat sd-path-meta "org-id-locations"))
+ ;; The leading period is removed because no files are hidden in the
+ ;; metafiles' directory.
+#+END_SRC
+
**** Location in previously visited file
#+BEGIN_SRC emacs-lisp :tangle yes
@@ -322,8 +356,8 @@ Transparency.
: (set-frame-parameter (selected-frame) 'alpha <both>)
#+BEGIN_SRC emacs-lisp :tangle yes
- (set-frame-parameter (selected-frame) 'alpha '(95 . 70))
- (add-to-list 'default-frame-alist '(alpha . (95 . 70)))
+ (set-frame-parameter (selected-frame) 'alpha '(90 . 70))
+ (add-to-list 'default-frame-alist '(alpha . (90 . 70)))
#+END_SRC
** Secrets
@@ -811,18 +845,16 @@ Everlasting Father, Prince of Peace.
:bind (("C-f" . swiper)))
#+END_SRC
-*** Web browsing
+*** COMMENT Web browsing
Thanks
Xah![fn::[[http://ergoemacs.org/emacs/emacs_set_default_browser.html]]]
+We use a browser depending on the url.
#+BEGIN_SRC emacs-lisp :tangle yes
- ;; use browser depending on url
- (setq
- browse-url-browser-function
- '(
- ("wikipedia\\.org" . browse-url-firefox)
- ("github" . browse-url-chromium)
+ (setq browse-url-browser-function
+ '(("wikipedia\\.org" . browse-url-firefox)
+ ("github\\.com" . browse-url-chromium)
("thefreedictionary\\.com" . eww-browse-url)
("." . browse-url-default-browser)
))
@@ -1791,34 +1823,36 @@ for our header line buttons for navigating through open windows.
Now, we describe the actual format of the header line.
#+BEGIN_SRC emacs-lisp :tangle yes
- (setq-default
- header-line-format
- '(:eval
- (list
- (if (eq (length (window-list)) 1)
- (propertize " ↤ "
- 'face 'org-meta-line
- 'mouse-face 'highlight
- 'keymap sd-header-line-previous-buffer-keymap
- 'help-echo "Return to previous window.")
- (list (propertize " ❌ "
- 'face 'org-meta-line
- 'mouse-face 'org-todo
- 'keymap sd-header-line-kill-buffer-keymap
- 'help-echo "Close this window.")
- (propertize " ⇱"
- 'face 'org-meta-line
- 'mouse-face 'highlight
- 'keymap sd-header-line-maximize-window-keymap
- 'help-echo "Maximize this window.")
- (propertize "⇲ "
- 'face 'org-meta-line
- 'mouse-face 'highlight
- 'keymap sd-header-line-minimize-window-keymap
- 'help-echo "Minimize this window.")))
- mode-line-buffer-identification)))
-
- (image-animate sd-icon-loading 0 t)
+ (use-package all-the-icons)
+
+ (setq-default
+ header-line-format
+ '(:eval
+ (list
+ (if (eq (length (window-list)) 1)
+ (propertize " ↤ "
+ 'face 'org-meta-line
+ 'mouse-face 'highlight
+ 'keymap sd-header-line-previous-buffer-keymap
+ 'help-echo "Return to previous window.")
+ (list (propertize " ❌ "
+ 'face 'org-meta-line
+ 'mouse-face 'org-todo
+ 'keymap sd-header-line-kill-buffer-keymap
+ 'help-echo "Close this window.")
+ (propertize " ⇱"
+ 'face 'org-meta-line
+ 'mouse-face 'highlight
+ 'keymap sd-header-line-maximize-window-keymap
+ 'help-echo "Maximize this window.")
+ (propertize "⇲ "
+ 'face 'org-meta-line
+ 'mouse-face 'highlight
+ 'keymap sd-header-line-minimize-window-keymap
+ 'help-echo "Minimize this window.")))
+ mode-line-buffer-identification)))
+
+ (image-animate sd-icon-loading 0 t)
#+END_SRC
**** Mode line
Copyright 2019--2024 Marius PETER