summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-09-03 02:15:07 -0500
committerCraig Jennings <c@cjennings.net>2025-09-03 02:15:07 -0500
commit0776230fe41e2e125ebc06b8490f1b935c750c01 (patch)
treec6bbfd1840c83512e132a9a56c5a58e930205f3d
parentbfc14644f721789e7d2ff4ecd695c70bf4336bf4 (diff)
downloaddotemacs-0776230fe41e2e125ebc06b8490f1b935c750c01.tar.gz
dotemacs-0776230fe41e2e125ebc06b8490f1b935c750c01.zip
updated tasks
-rw-r--r--todo.org740
1 files changed, 426 insertions, 314 deletions
diff --git a/todo.org b/todo.org
index 6f7b5955..6e75c9a6 100644
--- a/todo.org
+++ b/todo.org
@@ -1,4 +1,116 @@
* Emacs Open Work
+** DOING [#A] Jumper Package
+*** Specification
+**** variable:custom: jumper-max-locations
+maximum number of locations to store: default 10
+**** variable:internal: jumper--registers
+vector of used registers:
+(make-register jumper-max-locations nil)
+**** variable:internal: jumper--last-location-register
+register used to store the last location: ?z
+**** method:internal: jumper--point-matches-register
+#+begin_src emacs-lisp
+ ;; First store a position in register 'a'
+ (point-to-register ?a)
+
+ ;; Later, check if current position matches what's in register 'a'
+ (if (cj/point-matches-register ?a)
+ (message "Current position matches register 'a'")
+ (message "Current position differs from register 'a'"))
+
+
+ (defun cj/point-matches-register (register)
+ "Return t if current position matches position stored in REGISTER.
+ REGISTER is a character representing the register to check against.
+ Returns nil if the register doesn't exist or doesn't contain position information."
+ (let ((reg-val (get-register register)))
+ (when (and reg-val
+ (markerp reg-val)
+ (marker-buffer reg-val)
+ (eq (current-buffer) (marker-buffer reg-val))
+ (= (point) (marker-position reg-val)))
+ t)))
+#+end_src
+**** method:
+**** method: save-last-position
+saves location to register z: (point-to-register ?z)
+**** method: save-to-next-register
+gets next free register in the sequence
+calls (save-last-position)
+saves using (point-to-register REGISTER &optional ARG)
+*** 2025-09-02 Tue @ 14:06:03 -0500 Functionality Description
+Tentative Package Name: Jumper
+I typically use registers to jump between places, but I often forget the keybindings. Also, I sometimes overwrite registers by hitting the wrong key. Many Emacs users don't even know about registers. I've seen posts from software developers asking how to conveniently store and jump to specific locations in a large code base.
+
+To solve this I'd like to write a little elisp package that leverages Emacs vanilla register functionality to make jumping between locations using registers simple and transparent. The user won't have to think about registers or what character they've stored their location in at all. All keybindings will be based on keys from home row of the keyboard.
+
+Preliminaries:
+We will map the functionality to the keybinding prefix C-; j, but the prefix should be easy to configure.
+
+Let's imagine a set of characters in a sequence. They could be any characters, but for the sake of simplicity we'll use the numbers from 0 to 9, and a one more character used for the "last location" -- the character "z".
+
+What follows is a description of the workflow:
+**** Adding Locations
+keybinding: <prefix> space (store destination)
+If the user is visiting a buffer and presses <prefix> space,
+- the current location is stored in the next free register. if this is the first time they are storing a location, the first free register is 0.
+user feedback: a message is displayed in the echo area saying "location stored."
+If the user stays on the same location and presses prefix <space> again, they should receive a message in the echo area saying the location is already stored, and no changes to the register is made.
+
+If the user moves to a new location and presses prefix <space> again, the next free register is used to store the location, in this case it would be 1. They can then iterate and store additional locations up to the last character in the sequence up to the limit of 10 registers (0 through 9). If they try to store a register after all 10 registers are filled, they will receive a message ("sorry - all jump locations are filled!").
+**** Jump-To A Location
+keybinding: <prefix> j (jump to destination)
+NOTE: Whenever the user presses <prefix> j, that location is automatically stored in the "last location" register z.
+***** When only one location is stored, and the user presses <prefix> j:
+If there is only one location stored, the user IS at the location, and they press <prefix> j, they see an echo area message "you're already at the stored location."
+If there is only one location stored in the sequence, and the user is NOT at that location, their location is stored in register z, then the user is immediately to their destination location via (jump-to-register).
+user feedback: a message is displayed in the echo area saying "jumped to location."
+If the user presses <prefix> J again, they are automatically taken back to the location in register z. and the same user feedback message is displayed.
+In other words, after the user stores one location and moves elsewhere, pressing <prefix> j will jump back and forth between the two places.
+***** When multiple locations are stored, and the user presses <prefix> j:
+A completing read is displayed with all the locations between 0 and 9 along with register z (their last location) at the bottom.
+Each line contains the letter as well as the content that the register would normally display. In other words, it could just be the register list is displayed, but narrowed down to 0 - 9 and z.
+
+When the user chooses a location 0 -9, z from completing read:
+- The current location is stored in register z, replacing their last location
+- They are taken to the location via (jump-to-register).
+user feedback: a message is displayed in the echo area saying "jumped to location."
+**** Removing Locations
+keybinding: <prefix> d
+A completing read is displayed with the first item (where the cursor is on) being "Cancel".
+The rest of the registers are displayed in descending order, i.e., from 9 to 0.
+Note: the z register is not displayed.
+Selecting a register from the list:
+- removes that item from the list, and removes the location stored in the register.
+- if the item is NOT the top one in the register, it reorders the rest of the sequence
+ in other words, if 0 - 9 are all stored, and:
+ the user removes item 7:
+ - location 8 is restored in 7
+ - location 9 is stored in 8
+ the user removes item 0
+ - location 1 is stored in 0
+ - location 2 is stored in 1
+ - location 3 is stored in 2
+ - location 4 is stored in 3
+ - location 5 is stored in 4
+ - location 6 is stored in 5
+ - location 7 is stored in 6
+ - location 8 is stored in 7
+ - location 9 is stored in 8
+user feedback: a message is displayed in the echo area saying "location removed."
+**** Open Questions
+- Are there buffers which the user should not be able to store in a register?
+- How can we prevent the user from creating issues by adding to the registers 0 through 9 by M-x point-to-register or it's keybinding? Is there a way to block or reserve those registers? Or is it better to just choose a sequence that is the least likely to be used by a human user? If so, what would that sequence be?
+- Is 10 registers enough for a normal developer?
+- I should probably
+- Can I use a vector/list internally and map to registers behind the scenes?
+Depending on context, can I add the
+- Function name at point
+- File name + line number
+- First few words of the line
+Do we think the reordering behavior when deleting locations might confuse users? How to simplify?
+What happens if a buffer is deleted that doesn't have a file associated with it? If we're using registers underneath, how do registers handle this?
+
** DOING [#A] Test Webclipper Functionality
1. *From eww*: Navigate to a webpage in eww, then use =C-c c w= to capture it
2. *Check the result*: The webpage should be saved as a new org-roam node in your roam-dir with:
@@ -14,9 +126,9 @@
**** 2025-09-01 Mon @ 12:49:21 -0500 Fixed org-element issue
it's a bug in not loading org-element. Added this to my config
- ;; bug workaround for org-element--get-category: Invalid function: org-element-with-disabled-cache
- ;; https://github.com/doomemacs/doomemacs/issues/7347
- (load-library "org-element.el")
+;; bug workaround for org-element--get-category: Invalid function: org-element-with-disabled-cache
+;; https://github.com/doomemacs/doomemacs/issues/7347
+(load-library "org-element.el")
**** Problem Statement
C-c n i then type a recipe name.
@@ -26,100 +138,100 @@ The category value seems unaligned
*** TODO [#B] Add Org Capture Template for Vocabulary Words
*** DONE [#A] Add Org Templates Back to Emacs Repository!
CLOSED: [2025-09-01 Mon 12:51]
-** TODO [#A] Gptel Add Ability to Save and Reload Conversations
+** TODO [#A] GPTel Add Ability to Save and Reload Conversations
** TODO [#A] Delete whitespace from region is broken
** TODO [#A] Mu4e Fixes
*** DONE [#A] mu4e contacts not expanding on forwarding emails
CLOSED: [2025-08-29 Fri 16:09]
-removed org-contacts functionaality and it returned!
+removed org-contacts functionaality and it returned!
*** DONE [#A] Add org-msg
CLOSED: [2025-08-30 Sat 12:12]
https://github.com/jeremy-compostella/org-msg
*** TODO [#A] Fix org-contacts functionality
** TODO [#A] file-config.el cj/xdg-open blocks Emacs process
-Should change to non-blocking -- maybe use Emacs internal async?
+Should change to non-blocking -- maybe use Emacs internal async?
** TODO [#B] Add All Ert Tests Into Separate Directory
Tests should be added to a separate directory rather than the end of each elisp file.
-Gather them together, move them there, and make it easy to run tests per module and workflow.
+Gather them together, move them there, and make it easy to run tests per module and workflow.
** TODO [#B] Get Tufte.css working and as a separate entry
Below is one way to get Org-mode’s HTML exporter to play nicely with Tufte-CSS. The basic recipe is:
- 1. Inject Tufte’s stylesheet into every HTML export
- 2. Teach Org to emit the little “margin-toggle” + “sidenote” markup that tufte.css expects for footnotes
- 3. (Optionally) wrap images in <figure> so you get tufte-style captions out of the box
+1. Inject Tufte’s stylesheet into every HTML export
+2. Teach Org to emit the little “margin-toggle” + “sidenote” markup that tufte.css expects for footnotes
+3. (Optionally) wrap images in <figure> so you get tufte-style captions out of the box
Along the way you’ll see where Org’s default HTML‐classes line up with tufte.css and where you have to override them.
-— 1 Inject tufte.css into your exports
-Put tufte.css somewhere your exported HTML can see it (for example
+— 1 Inject tufte.css into your exports
+Put tufte.css somewhere your exported HTML can see it (for example
~/.emacs.d/assets/tufte.css or a URL on your webserver). Then in your init.el:
- (with-eval-after-load 'ox-html
- ;; 1a) tell Org to link in your tufte.css
- (setq org-html-head-extra
- "<link rel=\"stylesheet\" href=\"/assets/tufte.css\" type=\"text/css\"/>")
- ;; 1b) enable HTML5 “fancy” output (so you get <figure> around images)
- (setq org-html-html5-fancy t
- org-html-inline-images t))
+(with-eval-after-load 'ox-html
+;; 1a) tell Org to link in your tufte.css
+(setq org-html-head-extra
+"<link rel=\"stylesheet\" href=\"/assets/tufte.css\" type=\"text/css\"/>")
+;; 1b) enable HTML5 “fancy” output (so you get <figure> around images)
+(setq org-html-html5-fancy t
+org-html-inline-images t))
-— 2 Turn Org footnotes into Tufte sidenotes
-By default Org emits
- <sup class=…><a href="#fn:1" id="fnref:1">[1]</a></sup>
- …and then a big =<div id="footnotes">= at the bottom.
+— 2 Turn Org footnotes into Tufte sidenotes
+By default Org emits
+<sup class=…><a href="#fn:1" id="fnref:1">[1]</a></sup>
+…and then a big =<div id="footnotes">= at the bottom.
-Tufte-CSS wants each footnote inline, wrapped in
- <label class="margin-toggle">⊕</label>
- <input type="checkbox" class="margin-toggle"/>
- <span class="sidenote">…your note…</span>
+Tufte-CSS wants each footnote inline, wrapped in
+<label class="margin-toggle">⊕</label>
+<input type="checkbox" class="margin-toggle"/>
+<span class="sidenote">…your note…</span>
We can override two Org variables:
- (with-eval-after-load 'ox-html
- ;; format of each inline footnote reference
- (setq org-html-footnote-format
- (concat
- "<label for=\"%1$s\" class=\"margin-toggle\">"
- "&#8853;</label>"
- "<input type=\"checkbox\" id=\"%1$s\" class=\"margin-toggle\"/>"
- "<span class=\"sidenote\">%2$s</span>"))
- ;; drop Org’s default footnote list at the end
- (setq org-html-footnote-separator ""))
+(with-eval-after-load 'ox-html
+;; format of each inline footnote reference
+(setq org-html-footnote-format
+(concat
+"<label for=\"%1$s\" class=\"margin-toggle\">"
+"&#8853;</label>"
+"<input type=\"checkbox\" id=\"%1$s\" class=\"margin-toggle\"/>"
+"<span class=\"sidenote\">%2$s</span>"))
+;; drop Org’s default footnote list at the end
+(setq org-html-footnote-separator ""))
Once you do that, exporting an Org file with footnotes will generate the markup tufte.css needs to float them in the margin.
-— 3 (Optionally) get <figure> + <figcaption> around images
+— 3 (Optionally) get <figure> + <figcaption> around images
If you set =org-html-html5-fancy= to t (see step 1) Org will automatically emit:
- <figure>
- <img src="…"/>
- <figcaption>Your caption</figcaption>
- </figure>
+<figure>
+<img src="…"/>
+<figcaption>Your caption</figcaption>
+</figure>
and tufte.css already has rules for =<figure class="figure">= etc.
-— 4 Common pitfalls
- • Make sure your href in =org-html-head-extra= actually points to the css that the browser can load (absolute vs. relative).
- • If you still see a “Footnotes” section at the bottom, double-check that =org-html-footnote-separator= is set to the empty string and that your init-file got re-evaluated.
- • On Windows or if you’re testing locally, run e.g. =python3 -m http.server= inside your export folder so your browser can fetch the CSS.
+— 4 Common pitfalls
+• Make sure your href in =org-html-head-extra= actually points to the css that the browser can load (absolute vs. relative).
+• If you still see a “Footnotes” section at the bottom, double-check that =org-html-footnote-separator= is set to the empty string and that your init-file got re-evaluated.
+• On Windows or if you’re testing locally, run e.g. =python3 -m http.server= inside your export folder so your browser can fetch the CSS.
-— 5 Unit test for your footnote hack
+— 5 Unit test for your footnote hack
Drop this in =~/.emacs.d/tests/test-org-tufte.el= and run =M-x ert RET t RET=:
- (require 'ert)
- ;; load your config; adjust the path if necessary
- (load-file "~/.emacs.d/init.el")
+(require 'ert)
+;; load your config; adjust the path if necessary
+(load-file "~/.emacs.d/init.el")
- (ert-deftest org-tufte-footnote-format-test ()
- "Ensure each footnote reference becomes a margin-toggle + sidenote."
- (let/ ((id "fn:42")
- (content "My note.")
- (html (format org-html-footnote-format id content)))
- (should (string-match-p "class=\"margin-toggle\"" html))
- (should (string-match-p "<span class=\"sidenote\">My note\\.</span>" html))
- ;; it must not accidentally reintroduce Org’s bottom-of-page footnote div
- (should-not (string-match-p "div id=\"footnotes\"" html))))
+(ert-deftest org-tufte-footnote-format-test ()
+"Ensure each footnote reference becomes a margin-toggle + sidenote."
+(let/ ((id "fn:42")
+(content "My note.")
+(html (format org-html-footnote-format id content)))
+(should (string-match-p "class=\"margin-toggle\"" html))
+(should (string-match-p "<span class=\"sidenote\">My note\\.</span>" html))
+;; it must not accidentally reintroduce Org’s bottom-of-page footnote div
+(should-not (string-match-p "div id=\"footnotes\"" html))))
-Once that test passes, you know your footnotes are being rewritten into Tufte-style side notes. From there, you can sprinkle in additional filters (e.g. wrap =<blockquote>= in a =.sidenote= class, override list/p table styles, etc.) or just let the rest of tufte.css style Org’s default tags (h1, p, ul, table, code, etc.).
+Once that test passes, you know your footnotes are being rewritten into Tufte-style side notes. From there, you can sprinkle in additional filters (e.g. wrap =<blockquote>= in a =.sidenote= class, override list/p table styles, etc.) or just let the rest of tufte.css style Org’s default tags (h1, p, ul, table, code, etc.).
Enjoy your beautifully-typeset Org → HTML exports in true Tufte style!
@@ -150,9 +262,9 @@ A) Code in ~/.emacs.d/init.el
; Use appointment data from org-mode
(defun my-org-agenda-to-appt ()
- (interactive)
- (setq appt-time-msg-list nil)
- (org-agenda-to-appt))
+(interactive)
+(setq appt-time-msg-list nil)
+(org-agenda-to-appt))
; Update alarms when...
; (1) ... Starting Emacs
@@ -163,9 +275,9 @@ A) Code in ~/.emacs.d/init.el
; (3) ... When TODO.txt is saved
(add-hook 'after-save-hook
- '(lambda ()
- (if (string= (buffer-file-name) (concat (getenv "HOME") "/ideas/TODO.txt"))
- (my-org-agenda-to-appt))))
+'(lambda ()
+(if (string= (buffer-file-name) (concat (getenv "HOME") "/ideas/TODO.txt"))
+(my-org-agenda-to-appt))))
; Display appointments as a window manager notification
(setq appt-disp-window-function 'my-appt-display)
@@ -174,10 +286,10 @@ A) Code in ~/.emacs.d/init.el
(setq my-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
(defun my-appt-display (min-to-app new-time msg)
- (if (atom min-to-app)
- (start-process "my-appt-notification-app" nil my-appt-notification-app min-to-app msg)
- (dolist (i (number-sequence 0 (1- (length min-to-app))))
- (start-process "my-appt-notification-app" nil my-appt-notification-app (nth i min-to-app) (nth i msg)))))
+(if (atom min-to-app)
+(start-process "my-appt-notification-app" nil my-appt-notification-app min-to-app msg)
+(dolist (i (number-sequence 0 (1- (length min-to-app))))
+(start-process "my-appt-notification-app" nil my-appt-notification-app (nth i min-to-app) (nth i msg)))))
B) Code in ~/bin/appt-notification
@@ -205,10 +317,10 @@ https://difftastic.wilfred.me.uk/installation.html (basically $ sudo pacman -S d
Emacs Package
https://github.com/pkryger/difftastic.el
#+begin_src emacs-lisp
-(use-package difftastic
- :defer t
- :vc (:url "https://github.com/pkryger/difftastic.el.git"
- :rev :newest)))
+ (use-package difftastic
+ :defer t
+ :vc (:url "https://github.com/pkryger/difftastic.el.git"
+ :rev :newest))
#+end_src
** TODO [#B] Emacs Add Magit Forge Functionality
@@ -218,35 +330,35 @@ https://magit.vc/manual/forge/Setup-for-Githubcom.html
Example usage from sqrtminusone
#+begin_src emacs-lisp
-(use-package forge
- :after magit
- :straight t
- :config
- (add-to-list 'forge-alist '("gitlab.etu.ru"
- "gitlab.etu.ru/api/v4"
- "gitlab.etu.ru"
- forge-gitlab-repository)))
+ (use-package forge
+ :after magit
+ :straight t
+ :config
+ (add-to-list 'forge-alist '("gitlab.etu.ru"
+ "gitlab.etu.ru/api/v4"
+ "gitlab.etu.ru"
+ forge-gitlab-repository)))
#+end_src
** TODO [#B] Change Elfeed to Be About Playing Podcasts
** TODO [#C] Evolve Dupre Theme
Here are some ideas for making dupre-theme a bit more “complete” and future-proof as an Emacs theme. You don’t have to do all of them, of course, but most “modern” themes ship a fair number of these extra faces and integrations.
-*** TODO [#A] Fill out the “standard” Emacs faces
- • error / warning / success
- • link / link-visited / shadow
- • highlight / secondary-selection
- • tooltip / tooltip-selection / tooltip-tip
- • underline / strike-through
- • match / search / lazy-highlight (you already have some isearch)
- • info-title-1…info-title-5, info-header-node, help-*-face
-*** TODO [#A] Cosmetic / code-style notes
- • Factor out a helper macro to reduce repetition:
- #+begin_src elisp
- (defmacro dupre-face (face &rest specs)
- `(,face ((t ,specs))))
- #+end_src
- • Use =custom-theme-set-faces= only once; wrap your =when (>= emacs-major-version…)= inside it rather than nesting top-level.
- • Move your ERT tests into a separate file like =dupre-theme-test.el= so that the main theme file stays lean.
+*** TODO [#A] Fill out the “standard” Emacs faces
+• error / warning / success
+• link / link-visited / shadow
+• highlight / secondary-selection
+• tooltip / tooltip-selection / tooltip-tip
+• underline / strike-through
+• match / search / lazy-highlight (you already have some isearch)
+• info-title-1…info-title-5, info-header-node, help-*-face
+*** TODO [#A] Cosmetic / code-style notes
+• Factor out a helper macro to reduce repetition:
+#+begin_src elisp
+ (defmacro dupre-face (face &rest specs)
+ `(,face ((t ,specs))))
+#+end_src
+• Use =custom-theme-set-faces= only once; wrap your =when (>= emacs-major-version…)= inside it rather than nesting top-level.
+• Move your ERT tests into a separate file like =dupre-theme-test.el= so that the main theme file stays lean.
*** TODO [#A] Fix launch problem with dupre
**** cj [2025-08-16 23:45:50]
@@ -262,21 +374,21 @@ emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
#+begin_src shell
-Warning: due to a long standing Gtk+ bug
-https://gitlab.gnome.org/GNOME/gtk/issues/221
-Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
-Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
-.emacs.d/elpa/hydra-0.15.0/hydra.el: Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’
-Loading delsel (native compiled elisp)...
-Loading delsel (native compiled elisp)...done
-[yas] Prepared just-in-time loading of snippets successfully.
-Starting new Ispell process aspell with en_US dictionary... \
-Starting new Ispell process aspell with en_US dictionary...done
-Starting Emacs daemon.
-Emacs daemon should have started, trying to connect again
-Waiting for Emacs...
-[25-08-16 23:44:56] cjennings velox:~
-% sudo killall emacs
+ Warning: due to a long standing Gtk+ bug
+ https://gitlab.gnome.org/GNOME/gtk/issues/221
+ Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
+ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
+ .emacs.d/elpa/hydra-0.15.0/hydra.el: Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’
+ Loading delsel (native compiled elisp)...
+ Loading delsel (native compiled elisp)...done
+ [yas] Prepared just-in-time loading of snippets successfully.
+ Starting new Ispell process aspell with en_US dictionary... \
+ Starting new Ispell process aspell with en_US dictionary...done
+ Starting Emacs daemon.
+ Emacs daemon should have started, trying to connect again
+ Waiting for Emacs...
+ [25-08-16 23:44:56] cjennings velox:~
+ % sudo killall emacs
#+end_src
Is there something about how this theme is written that may be causing this? If it's unlikely, how would you recommend I diagnose this problem?
@@ -286,12 +398,12 @@ Is there something about how this theme is written that may be causing this? If
**** ChatGPT: o4-mini [2025-08-16 23:51:03]
It turns out that nothing mystical is happening in your =dupre-theme.el= that would prevent the Emacs server from creating its socket. When =emacsclient= says:
- emacsclient: can't find socket; have you started the server?
+emacsclient: can't find socket; have you started the server?
it really does mean “there is no running Emacs –daemon laying down =<…>/server/= for me to talk to.” By itself, loading a custom theme (even one with a few Unicode ellipses or =display-graphic-p= branches) will not stop the server socket from being created. What is much more often the culprit is:
- 1. Mis-using =emacsclient -a ''= so that it never actually starts the server, or
- 2. Having a startup error in your init file (or theme) that aborts =server-start= before the socket ever gets written.
+1. Mis-using =emacsclient -a ''= so that it never actually starts the server, or
+2. Having a startup error in your init file (or theme) that aborts =server-start= before the socket ever gets written.
Here is how I’d go about diagnosing (and fixing) the situation:
@@ -299,7 +411,7 @@ Here is how I’d go about diagnosing (and fixing) the situation:
From a shell, run
- emacs --daemon --debug-init --eval "(message \"daemon ok\")"
+ emacs --daemon --debug-init --eval "(message \"daemon ok\")"
– you should see a process stick around, and if you look at =~/.emacs.d/server/= you should find a valid socket file.
@@ -307,220 +419,220 @@ Here is how I’d go about diagnosing (and fixing) the situation:
2) Once you can start the daemon by hand, verify that =emacsclient -c= can actually talk to it:
- emacsclient -c -n
+ emacsclient -c -n
The =-n= is “don’t wait for the client buffer to finish,” so you’ll get your GUI frame immediately. If that works, the server is up and your sockets are good.
3) If you /really/ want =emacsclient -c -a ''= to both start Emacs –daemon /and/ immediately pop a graphical frame, you have two choices:
- • Let =-a= fall back to =emacs --daemon=. On many platforms simply omitting the =-a= will do this.
+ • Let =-a= fall back to =emacs --daemon=. On many platforms simply omitting the =-a= will do this.
• Explicitly tell it:
- emacsclient -c -a "emacs --daemon" # note the command in quotes
+ emacsclient -c -a "emacs --daemon" # note the command in quotes
On macOS/Homebrew, for instance, people often do
- alias ec='emacsclient -c -a "emacs --daemon"'
+ alias ec='emacsclient -c -a "emacs --daemon"'
- so that if there is no server, emacsclient will shell out to =emacs --daemon=, launch it, and /then/ connect.
+ so that if there is no server, emacsclient will shell out to =emacs --daemon=, launch it, and /then/ connect.
4) If you still suspect your theme is triggering a startup error (and killing the daemon before it gets to =(server-start)=), you can sprinkle a tiny bit of ELisp into your init:
#+begin_src elisp
- ;; very early in ~/.emacs or init.el
- (setq debug-on-error t)
- (add-hook 'after-init-hook
- (lambda ()
- (message "finished init; about to (server-start)")))
-
- (require 'server)
- (unless (server-running-p)
- (server-start))
+ ;; very early in ~/.emacs or init.el
+ (setq debug-on-error t)
+ (add-hook 'after-init-hook
+ (lambda ()
+ (message "finished init; about to (server-start)")))
+
+ (require 'server)
+ (unless (server-running-p)
+ (server-start))
#+end_src
Then run:
- emacs --daemon --debug-init
+ emacs --daemon --debug-init
and watch =~/.emacs.d/server/server= get created or watch the =*Messages*= buffer or your =~/.emacs.d/emacs-debug.log= (if you redirect =--debug-init= output). If there is a hard error in your theme, you will get a backtrace in your =*Backtrace*= buffer.
5) Finally, a sanity check for your theme file. Launch Emacs /without/ your init:
- emacs -Q
+ emacs -Q
Then:
- M-x load-file RET /path/to/dupre-theme.el RET
- M-x load-theme RET dupre RET
+ M-x load-file RET /path/to/dupre-theme.el RET
+ M-x load-theme RET dupre RET
- If this produces any errors or warnings in =*Messages*= or =*Warnings*=, you have your smoking gun.
+ If this produces any errors or warnings in =*Messages*= or =*Warnings*=, you have your smoking gun.
---
Summary
-------
-• *The theme itself isn’t going to silently block server-socket creation.*
-• *You almost certainly have either:*
- – A mis-invocation of =emacsclient -a ''= so that it never starts Emacs –daemon.
- – A genuine startup error in your init or in the theme that kills Emacs before =(server-start)= runs.
-• *Use*
- emacs --daemon --debug-init
- plus removing chunks of your init until you find the offending form.
-• *Test your theme in a vanilla Emacs (=-Q=)* to see any compile/load errors.
+• *The theme itself isn’t going to silently block server-socket creation.*
+• *You almost certainly have either:*
+– A mis-invocation of =emacsclient -a ''= so that it never starts Emacs –daemon.
+– A genuine startup error in your init or in the theme that kills Emacs before =(server-start)= runs.
+• *Use*
+emacs --daemon --debug-init
+plus removing chunks of your init until you find the offending form.
+• *Test your theme in a vanilla Emacs (=-Q=)* to see any compile/load errors.
Once you have a clean =emacs --daemon= up and running you will find that
- emacsclient -c # or with your favorite fallback: -a "emacs --daemon"
+emacsclient -c # or with your favorite fallback: -a "emacs --daemon"
just works, whether you are on wombat, solarized, or good old dupre.
*** TODO [#B] Make sure you define a “minimum package” set of faces so that folks don’t see glaring unstyled text in any part of Emacs, even if they never install extra packages.
-*** TODO [#B] Improve terminal support:
- • Detect true-color (=(display-graphic-p)=) vs 256-color vs 16-color and fall-back gracefully.
- • Provide “256-color” approximations (you already do this), but you might want a simpler palette for legacy terminals.
+*** TODO [#B] Improve terminal support:
+• Detect true-color (=(display-graphic-p)=) vs 256-color vs 16-color and fall-back gracefully.
+• Provide “256-color” approximations (you already do this), but you might want a simpler palette for legacy terminals.
*** TODO [#B] Other Packages
The rest is just more of the same—pick the most common modes/packages you and your users rely on and give them a quick coat of paint. Once you’ve rounded out those faces you’ll have hit what most people expect from a “complete” modern Emacs theme.
Based on a quick skim of your modules/ directory (and the packages they pull in via use-package), here’s a non-exhaustive list of the major packages you’re using—along with the faces you should think about adding to dupre-theme so that nothing ends up looking “unstyled.”
-1. completion/mini-frameworks
- • vertico (vertico-current, vertico-group-title, vertico-separator, vertico-doc)
- • orderless (orderless-match-face-0…3)
- • consult (consult-preview-line, consult-narrow, consult-region, consult-file)
- • marginalia (marginalia-annotation, marginalia-document, marginalia-cache)
- • embark (embark-general, embark-heading, embark-target, embark-helpful)
- • corfu + cape (corfu-default, corfu-current, corfu-bar, cape-file, cape-keyword etc.)
- • company (company-tooltip, company-tooltip-selection, company-scrollbar­-thumb)
-
-2. ivy/counsel/swiper (if you ever load them side-by-side)
- • ivy-current-match, ivy-minibuffer-match-face-1…4
- • counsel-outline, swiper-match-face-1…
-
-3. syntax checkers & LSP
- • flycheck (flycheck-error, flycheck-warning, flycheck-info)
- • eglot or lsp-mode (lsp-face-highlight-textual, lsp-face-highlight-read, lsp-face-semantic-type-…)
- • tree-sitter (tree-sitter-hl-face:function, :variable, :property, …)
-
-4. git & diffs
- • magit (magit-section, magit-section-title, magit-hunk-heading, magit-branch, magit-log)
- • diff-hl / git-gutter (diff-hl-face-insert, diff-hl-face-delete, git-gutter:added, git-gutter:deleted)
- • diff-mode (diff-added, diff-removed, diff-context, diff-file-header)
-
-5. project management & navigation
- • projectile (projectile-project-name, projectile-project-root)
- • treemacs (treemacs-root-face, treemacs-directory-face, treemacs-file-face)
-
-6. Org-mode
- • org-document-title, org-level-1…org-level-8
- • org-checkbox, org-todo, org-done, org-warning, org-date, org-code, org-block
- • plus any “pretty” add-ons you use (org-bullets, org-modern, etc.)
-
-7. Hydra / which-key / key-help
- • which-key (which-key-key-face, which-key-group-description-face, which-key-local-map-description-face)
- • hydra (hydra-face-red, hydra-face-blue, hydra-face-teal, hydra-face-amaranth)
-
-8. visual helpers
- • rainbow-delimiters-depth-1…9
- • highlight-indent-guides-odd/even
- • highlight-parentheses-/
- • beacon (beacon), whitespace (whitespace-space, whitespace-tab, whitespace-newline)
- • display-line-numbers (line-number, line-number-current-line—you already have these)
-
-9. UI polishers
- • all-the-icons (all-the-icons-blue, all-the-icons-red, …) on modeline or treemacs
- • doom-modeline (doom-modeline-bar, doom-modeline-buffer-path)
- • fancy-splash/dashboard-faces if you use a startup screen
-
-10. terminals & shells
- • vterm (vterm-copy-region-highlight)
- • ansi-colors (ansi-color-face-bold, ansi-color-face-italic, ansi-color-[0…7])
+1. completion/mini-frameworks
+ • vertico (vertico-current, vertico-group-title, vertico-separator, vertico-doc)
+ • orderless (orderless-match-face-0…3)
+ • consult (consult-preview-line, consult-narrow, consult-region, consult-file)
+ • marginalia (marginalia-annotation, marginalia-document, marginalia-cache)
+ • embark (embark-general, embark-heading, embark-target, embark-helpful)
+ • corfu + cape (corfu-default, corfu-current, corfu-bar, cape-file, cape-keyword etc.)
+ • company (company-tooltip, company-tooltip-selection, company-scrollbar­-thumb)
+
+2. ivy/counsel/swiper (if you ever load them side-by-side)
+ • ivy-current-match, ivy-minibuffer-match-face-1…4
+ • counsel-outline, swiper-match-face-1…
+
+3. syntax checkers & LSP
+ • flycheck (flycheck-error, flycheck-warning, flycheck-info)
+ • eglot or lsp-mode (lsp-face-highlight-textual, lsp-face-highlight-read, lsp-face-semantic-type-…)
+ • tree-sitter (tree-sitter-hl-face:function, :variable, :property, …)
+
+4. git & diffs
+ • magit (magit-section, magit-section-title, magit-hunk-heading, magit-branch, magit-log)
+ • diff-hl / git-gutter (diff-hl-face-insert, diff-hl-face-delete, git-gutter:added, git-gutter:deleted)
+ • diff-mode (diff-added, diff-removed, diff-context, diff-file-header)
+
+5. project management & navigation
+ • projectile (projectile-project-name, projectile-project-root)
+ • treemacs (treemacs-root-face, treemacs-directory-face, treemacs-file-face)
+
+6. Org-mode
+ • org-document-title, org-level-1…org-level-8
+ • org-checkbox, org-todo, org-done, org-warning, org-date, org-code, org-block
+ • plus any “pretty” add-ons you use (org-bullets, org-modern, etc.)
+
+7. Hydra / which-key / key-help
+ • which-key (which-key-key-face, which-key-group-description-face, which-key-local-map-description-face)
+ • hydra (hydra-face-red, hydra-face-blue, hydra-face-teal, hydra-face-amaranth)
+
+8. visual helpers
+ • rainbow-delimiters-depth-1…9
+ • highlight-indent-guides-odd/even
+ • highlight-parentheses-/
+ • beacon (beacon), whitespace (whitespace-space, whitespace-tab, whitespace-newline)
+ • display-line-numbers (line-number, line-number-current-line—you already have these)
+
+9. UI polishers
+ • all-the-icons (all-the-icons-blue, all-the-icons-red, …) on modeline or treemacs
+ • doom-modeline (doom-modeline-bar, doom-modeline-buffer-path)
+ • fancy-splash/dashboard-faces if you use a startup screen
+
+10. terminals & shells
+ • vterm (vterm-copy-region-highlight)
+ • ansi-colors (ansi-color-face-bold, ansi-color-face-italic, ansi-color-[0…7])
To figure out exactly which ones you have in your modules, you can do for example:
#+begin_src elisp
-;; from your ~/.emacs.d
-(let (pkgs)
- (dolist (f (directory-files "~/.emacs.d/modules" t "\\.el$"))
- (with-temp-buffer
- (insert-file-contents f)
- (goto-char (point-min))
- (while (re-search-forward "use-package +\\([^ ]+\\)" nil t)
- (push (intern (match-string 1)) pkgs))))
- (delete-dups pkgs))
+ ;; from your ~/.emacs.d
+ (let (pkgs)
+ (dolist (f (directory-files "~/.emacs.d/modules" t "\\.el$"))
+ (with-temp-buffer
+ (insert-file-contents f)
+ (goto-char (point-min))
+ (while (re-search-forward "use-package +\\([^ ]+\\)" nil t)
+ (push (intern (match-string 1)) pkgs))))
+ (delete-dups pkgs))
#+end_src
Then for each of those packages, grep in their repo for =defface= or check their manual to see which faces they define, and add reasonable dupre-colours for them. Once you’ve covered that list, you’ll have a “complete” theme that won’t leave any of your modules half-unstyled.
-*** TODO [#C] Support the built-in “tab-bar” and “tab-group” faces (Emacs 27+)
- • tab-bar / tab-bar-tab / tab-bar-tab-inactive
- • tab-bar-close / tab-bar-separator
- • tab-group-title / tab-group-separator
-*** TODO [#C] Add faces for =dired=, =diff=, =flycheck=/=flymake=, =magit= (or git-gutter),
- =ediff=, =erc= etc. For example:
- • diff-added, diff-removed, diff-context, diff-file-header
- • flycheck-error, flycheck-warning, flycheck-info
- • magit-section, magit-log, magit-hunk-heading, magit-branch, etc.
-*** TODO [#C] Org-mode
- • org-level-1…org-level-8, org-document-title
- • org-checkbox, org-code, org-date, org-todo, org-done, org-warning
- • org-block, org-block-begin-line, org-block-end-line
-*** TODO [#C] Completion frameworks & minibuffer enhancements
- • ivy-current-match / ivy-minibuffer-match-face-1…4
- • swiper-line-face
- • vertico-current / marginalia-…
- • corfu-default / corfu-bar / cape / orderless-match-face-…
-*** TODO [#C] LSP / tree-sitter / syntax-aware faces
- • lsp-face-highlight-textual, lsp-face-highlight-read, etc.
- • tree-sitter-hl-face:variable, :function, :property, etc.
-*** TODO [#C] Which-Key, Hydras, rainbow-delimiters, etc.
- • which-key-key-face, which-key-local-map-description-face
- • hydra-face-red / teal / blue
- • rainbow-delimiters-depth-1…9
-
-*** TODO [#C] Theme Metadata & Packaging
- • Add =;; Package-Requires: ((emacs "26.1"))= if you need a minimum.
- • Consider adding a README with screenshots.
- • A simple Makefile or script to refresh “theme metadata” (=M-x theme-inspect=, MELPA recipe).
-
-*** TODO [#C] Tests
- • Extend your ERT suite to cover more faces (org, diff, flycheck…).
- • You might write a small helper that loops over a list of faces and asserts they’re defined without errors.
+*** TODO [#C] Support the built-in “tab-bar” and “tab-group” faces (Emacs 27+)
+• tab-bar / tab-bar-tab / tab-bar-tab-inactive
+• tab-bar-close / tab-bar-separator
+• tab-group-title / tab-group-separator
+*** TODO [#C] Add faces for =dired=, =diff=, =flycheck=/=flymake=, =magit= (or git-gutter),
+=ediff=, =erc= etc. For example:
+• diff-added, diff-removed, diff-context, diff-file-header
+• flycheck-error, flycheck-warning, flycheck-info
+• magit-section, magit-log, magit-hunk-heading, magit-branch, etc.
+*** TODO [#C] Org-mode
+• org-level-1…org-level-8, org-document-title
+• org-checkbox, org-code, org-date, org-todo, org-done, org-warning
+• org-block, org-block-begin-line, org-block-end-line
+*** TODO [#C] Completion frameworks & minibuffer enhancements
+• ivy-current-match / ivy-minibuffer-match-face-1…4
+• swiper-line-face
+• vertico-current / marginalia-…
+• corfu-default / corfu-bar / cape / orderless-match-face-…
+*** TODO [#C] LSP / tree-sitter / syntax-aware faces
+• lsp-face-highlight-textual, lsp-face-highlight-read, etc.
+• tree-sitter-hl-face:variable, :function, :property, etc.
+*** TODO [#C] Which-Key, Hydras, rainbow-delimiters, etc.
+• which-key-key-face, which-key-local-map-description-face
+• hydra-face-red / teal / blue
+• rainbow-delimiters-depth-1…9
+
+*** TODO [#C] Theme Metadata & Packaging
+• Add =;; Package-Requires: ((emacs "26.1"))= if you need a minimum.
+• Consider adding a README with screenshots.
+• A simple Makefile or script to refresh “theme metadata” (=M-x theme-inspect=, MELPA recipe).
+
+*** TODO [#C] Tests
+• Extend your ERT suite to cover more faces (org, diff, flycheck…).
+• You might write a small helper that loops over a list of faces and asserts they’re defined without errors.
*** Example Sample Faces
Below is a small excerpt showing how you might start adding some of the “missing” standard faces and a couple org faces:
#+begin_src elisp
-(custom-theme-set-faces
- 'dupre
-
- ;; … your existing faces …
-
- ;; standard global faces
- `(error ((t (:foreground ,dupre-intense-red :weight bold))))
- `(warning ((t (:foreground ,dupre-yellow+1 :weight bold))))
- `(success ((t (:foreground ,dupre-green+1 :weight bold))))
- `(link ((t (:foreground ,dupre-blue+1 :underline t))))
- `(shadow ((t (:foreground ,dupre-gray))))
- `(highlight ((t (:background ,dupre-bg+1))))
- `(tooltip ((t (:foreground ,dupre-fg :background ,dupre-bg+2))))
- `(tooltip-selection ((t (:background ,dupre-bg+0))))
-
- ;; Org-mode sample
- `(org-document-title ((t (:foreground ,dupre-yellow+2 :weight bold :height 1.2))))
- `(org-level-1 ((t (:foreground ,dupre-blue+2 :weight bold))))
- `(org-level-2 ((t (:foreground ,dupre-green+1))))
- `(org-checkbox ((t (:foreground ,dupre-yellow :weight bold))))
- `(org-todo ((t (:foreground ,dupre-red :weight bold))))
- `(org-done ((t (:foreground ,dupre-green+2 :weight bold))))
- )
+ (custom-theme-set-faces
+ 'dupre
+
+ ;; … your existing faces …
+
+ ;; standard global faces
+ `(error ((t (:foreground ,dupre-intense-red :weight bold))))
+ `(warning ((t (:foreground ,dupre-yellow+1 :weight bold))))
+ `(success ((t (:foreground ,dupre-green+1 :weight bold))))
+ `(link ((t (:foreground ,dupre-blue+1 :underline t))))
+ `(shadow ((t (:foreground ,dupre-gray))))
+ `(highlight ((t (:background ,dupre-bg+1))))
+ `(tooltip ((t (:foreground ,dupre-fg :background ,dupre-bg+2))))
+ `(tooltip-selection ((t (:background ,dupre-bg+0))))
+
+ ;; Org-mode sample
+ `(org-document-title ((t (:foreground ,dupre-yellow+2 :weight bold :height 1.2))))
+ `(org-level-1 ((t (:foreground ,dupre-blue+2 :weight bold))))
+ `(org-level-2 ((t (:foreground ,dupre-green+1))))
+ `(org-checkbox ((t (:foreground ,dupre-yellow :weight bold))))
+ `(org-todo ((t (:foreground ,dupre-red :weight bold))))
+ `(org-done ((t (:foreground ,dupre-green+2 :weight bold))))
+ )
#+end_src
** TODO [#C] Revisit and Refactor Localrepo Functionality
** TODO [#C] Fix Exporting Documents to HTML.
-This appears to work with emacs -q. What's up with your config?
+This appears to work with emacs -q. What's up with your config?
** TODO [#C] Rename 'sync-dir' Variable in Init File to 'org-dir'
[[https://github.com/ryuslash/mode-icons][ryuslash/mode-icons: Show icons instead of mode names]]
@@ -535,75 +647,75 @@ Reverso
reverso.el is a package of mine that provides Emacs interface for https://reverso.net.
#+begin_src emacs-lisp
-(use-package reverso
- :straight (:host github :repo "SqrtMinusOne/reverso.el")
- :init
- (my-leader-def "ar" #'reverso)
- :commands (reverso)
- :config
- (setq reverso-languages '(russian english german))
- (reverso-history-mode))
+ (use-package reverso
+ :straight (:host github :repo "SqrtMinusOne/reverso.el")
+ :init
+ (my-leader-def "ar" #'reverso)
+ :commands (reverso)
+ :config
+ (setq reverso-languages '(russian english german))
+ (reverso-history-mode))
#+end_src
** TODO [#C] Emacs Config: Narrowing Org doesn't allow refresh by type
-After generating an org agenda list, I can narrow the type to all DONE or IN-PROGRESS. However when I use my custom functions to just get the agenda for the current buffer, I can't. The scope has now widened and the refresh is for all buffers.
+After generating an org agenda list, I can narrow the type to all DONE or IN-PROGRESS. However when I use my custom functions to just get the agenda for the current buffer, I can't. The scope has now widened and the refresh is for all buffers.
** TODO [#C] Add a Restrict to Subtree Org Agenda Command
In Org-mode the “agenda” machinery by default doesn’t pay any attention to your buffer­narrow — it always scans whole files in your =org-agenda-files=. However, you can teach Org-agenda to only look between two points (the start and end of your current subtree) by using the built-in “restrict” hooks:
- 1. =org‐agenda‐restrict= – turn on restriction
- 2. =org‐agenda‐restrict‐begin= – a marker or position where scanning begins
- 3. =org‐agenda‐restrict‐end= – where it ends
- 4. (optionally) set =org-agenda-files= to just your current file
+1. =org‐agenda‐restrict= – turn on restriction
+2. =org‐agenda‐restrict‐begin= – a marker or position where scanning begins
+3. =org‐agenda‐restrict‐end= – where it ends
+4. (optionally) set =org-agenda-files= to just your current file
Here is a drop-in =org-agenda-custom-commands= entry that will give you a “Subtree TODOs” view limited to the subtree you’re on. Put this in your Emacs init:
#+begin_src emacs-lisp
-;; -------------------------------------------------------------------
-;; 1) Define a custom agenda command "C" (hit C-c a C)
-;; that shows only TODO entries in the current subtree.
-;; -------------------------------------------------------------------
-(with-eval-after-load 'org
- (add-to-list 'org-agenda-custom-commands
- '("C" ; the key you press after C-c a
- "Subtree TODOs" ; a descriptive name
- ((todo "" ; match any TODO keyword
- ;; === per-block settings ===
- ;; only look in this file
- (org-agenda-files (list buffer-file-name))
- ;; enable the restriction engine
- (org-agenda-restrict t)
- ;; start at the top of the current heading
- (org-agenda-restrict-begin
- (progn (org-back-to-heading t) (point)))
- ;; end at the end of this subtree
- (org-agenda-restrict-end
- (progn (org-end-of-subtree t) (point))))
- ;; you can add more blocks here if you like
- ))))
+ ;; -------------------------------------------------------------------
+ ;; 1) Define a custom agenda command "C" (hit C-c a C)
+ ;; that shows only TODO entries in the current subtree.
+ ;; -------------------------------------------------------------------
+ (with-eval-after-load 'org
+ (add-to-list 'org-agenda-custom-commands
+ '("C" ; the key you press after C-c a
+ "Subtree TODOs" ; a descriptive name
+ ((todo "" ; match any TODO keyword
+ ;; === per-block settings ===
+ ;; only look in this file
+ (org-agenda-files (list buffer-file-name))
+ ;; enable the restriction engine
+ (org-agenda-restrict t)
+ ;; start at the top of the current heading
+ (org-agenda-restrict-begin
+ (progn (org-back-to-heading t) (point)))
+ ;; end at the end of this subtree
+ (org-agenda-restrict-end
+ (progn (org-end-of-subtree t) (point))))
+ ;; you can add more blocks here if you like
+ ))))
#+end_src
How this works, step by step:
- • We bind a new custom command under the key “C” (so you’ll type =C-c a C=).
- • In that command we use the =todo= matcher =""= to catch every headline whose state is one of your TODO keywords.
- • We dynamically set
- – =org-agenda-files= to just the current buffer’s file,
- – =org-agenda-restrict= to non-nil so Org will honor the begin/end markers,
- – =org-agenda-restrict-begin= to the position of the current heading,
- – =org-agenda-restrict-end= to the end of the subtree.
+• We bind a new custom command under the key “C” (so you’ll type =C-c a C=).
+• In that command we use the =todo= matcher =""= to catch every headline whose state is one of your TODO keywords.
+• We dynamically set
+– =org-agenda-files= to just the current buffer’s file,
+– =org-agenda-restrict= to non-nil so Org will honor the begin/end markers,
+– =org-agenda-restrict-begin= to the position of the current heading,
+– =org-agenda-restrict-end= to the end of the subtree.
When you invoke it (=C-c a C=), Org will only scan headlines in that slice of the file and will build you a mini-agenda of TODO items from exactly that subtree.
Quick alternative: if you don’t need the full agenda machinery (dates, deadlines, etc.) but just want a fast outline of your TODOs under the current heading, you can also use the sparse-tree command:
- • =C-c / t= ⇒ shows only the TODO headings in the narrowed or whole buffer as an indented outline.
+• =C-c / t= ⇒ shows only the TODO headings in the narrowed or whole buffer as an indented outline.
— Tips & Pitfalls —
- • Make sure your file is saved and in =org-agenda-files= (the snippet above forces it).
- • Remember to call =org-narrow-to-subtree= (or let the command compute its own begin/end via =org-back-to-heading=/=org-end-of-subtree=).
- • If you rename or move your file, Emacs must still see =buffer-file-name= valid.
- • You can duplicate the above snippet for other TODO states, agenda views, or matchers (deadlines, tags, etc.)
+• Make sure your file is saved and in =org-agenda-files= (the snippet above forces it).
+• Remember to call =org-narrow-to-subtree= (or let the command compute its own begin/end via =org-back-to-heading=/=org-end-of-subtree=).
+• If you rename or move your file, Emacs must still see =buffer-file-name= valid.
+• You can duplicate the above snippet for other TODO states, agenda views, or matchers (deadlines, tags, etc.)
With this in place you effectively get an agenda tailored to exactly the bit of tree you’re working on.
@@ -624,7 +736,7 @@ Captured On: [2025-05-29 Thu 04:24]
Captured On: [2025-05-29 Thu 04:23]
** TODO [#D] Add test document to test graphviz-dot-mode
-** TODO [#D] Consider Replicating Some of This Auctex and PDF Tools Code
+** TODO [#D] Consider Replicating Some of This Auctex and PDF Tools Code
[[https://www.reddit.com/r/emacs/comments/cd6fe2/how_to_make_emacs_a_latex_ide/][How to make Emacs a Latex IDE? : r/emacs]]
Captured On: [2025-08-14 Thu 03:43]
* Emacs Config Ideas/References