Skip to content

Instantly share code, notes, and snippets.

View jwiegley's full-sized avatar

John Wiegley jwiegley

View GitHub Profile
Debugger entered--Lisp error: "Making gptel-model buffer-local while locally let-bound!"
make-local-variable(gptel-model)
gptel--sanitize-model()
gptel-request(("*** TASK Provide roadmap options to John tomorrow including lean path and alternatives :Jesse:\n:PROPERTIES:\n:OFFSET: 32:35\n:LAST_REVIEW: [2025-08-09 Sat]\n:NEXT_REVIEW: [2025-08-09 Sat]\n:REVIEWS: 1\n:ID: 7BA3D39A-3D68-4042-B206-BE96C24163CA\n:CREATED: [2025-08-09 Sat 10:54]\n:LOCATION: 38.569498,-121.388618\n:END:\n*** TASK Schedule follow-up meeting next week to continue prioritization discussions :Jesse:\n:PROPERTIES:\n:OFFSET: 33:01\n:LAST_REVIEW: [2025-08-09 Sat]\n:NEXT_REVIEW: [2025-08-09 Sat]\n:REVIEWS: 1\n:ID: 4AF0BAC1-0253-4BC8-9534-075183776F47\n:CREATED: [2025-08-09 Sat 10:54]\n:LOCATION: 38.569498,-121.388618\n:END:\n" "What is the required change?" "Shorten it as described.") :dry-run nil :system "Given a list of tasks, shorten the title so that it is no longer than 67 characters long. You can move th
{
"model": "athena/Qwen3-30B-A3B-Thinking-2507",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Respond concisely."
},
{
"role": "user",
"content": [
*Prompt*: What is the best Emacs command for filtering items in the Org-mode agenda view?
*Response*:
#+begin_tool (find_functions :keyword ["org-agenda-filter" "org-agen ...)
(:name "find_functions" :args (:keyword ["org-agenda-filter" "org-agenda-filter-by" "org-agenda" "filter" "agenda" "org"]))
Functions containing '[org-agenda-filter org-agenda-filter-by org-agenda filter agenda org]':
org-agenda-filter-by-category Filter lines in the agenda buffer that have a specific category.
org-agenda-filter-by-effort Filter agenda entries by effort.
(pretty-hydra-define
multiple-cursors
(:color teal :quit-key "q")
("Mark/Unmark"
(("c" mc/mark-all-dwim "DWIM")
("A" mc/mark-all-in-region "in region")
("r" mc/mark-all-regexp "regexp")
("%" mc/mark-all-in-region-regexp "re in region")
("<C-m> ." ace-mc-add-multiple-cursors "ace add")
("<C-m> M-." ace-mc-add-single-cursor "ace add sing")
;;; -*- lexical-binding: t -*-
(require 'cl-lib)
(let* ((mutex (make-mutex))
(cond-var (make-condition-variable mutex))
waiting
(thread-a
(make-thread
#'(lambda ()

PARA and the value of meaningful distinctions

There have been many trends in the data and task management world, from day planners, to GTD, to bullet journals, to the PARA method – and many more. This article takes a look at PARA in particular, but also pulls back a bit as

@jwiegley
jwiegley / emacs-llvm-jit.diff
Created June 18, 2025 18:46
Initial implementation of a JIT for Emacs bytecode
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 3e79cae4..1db39bae 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -669,7 +669,18 @@ scan_c_file (char *filename, const char *mode)
int extension = filename[strlen (filename) - 1];
if (extension == 'o')
- filename[strlen (filename) - 1] = 'c';
+ {
*Prompt*: Emacs lisp code to sort the first column alphabetically, and delete all columns containing "N/A" in buffer "test.csv". /no_think
*Response*:
Here's an Emacs Lisp script to:
1. Open the buffer =test.csv=.
2. Sort the buffer alphabetically by the *first column*.
3. Delete all rows where *any column contains "N/A"*.
#+begin_src elisp
*Response*:
Here's the Emacs Lisp code to set the *second column (DRAFT)* to =8000= for rows where it's empty:
#+begin_src emacs-lisp
(defun set-draft-column ()
"Set empty DRAFT column to 8000 in current CSV buffer."
(interactive)
(goto-char (point-min))
(forward-line 1) ; Skip header
(while (not (eobp))
(use-package gptel-commit
:no-require t
:after (gptel git-commit)
:preface
(defun my/gptel-commit-summary ()
"Insert a commit message header line in the format I use, followed by a
standard magit (GNU style) changelog.
Don't get the LLM to write the commit message itself, because it's bad
at inferring my intent.