This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/elisp-xref-find-def-in-source (sym) | |
"Find elisp files in the source directory." | |
(let* ((elisp-xref-find-def-functions nil) ; recurses otherwise | |
(records (elisp--xref-find-definitions sym))) | |
(dolist (rec records) | |
(when-let* ((file (xref-elisp-location-file (xref-item-location rec))) | |
( (and (stringp file) | |
(string-match (rx ".el" (? ".gz") eos) file) | |
(file-in-directory-p file lisp-directory))) | |
(relname (file-relative-name file lisp-directory)) |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(:jsonrpc "2.0" :id 63 :method "completionItem/resolve" :params | |
(:label #("acorr" 0 1 ...) :kind 3 :data | |
(:uri | |
"file:///Users/jdsmith/code/python/test/test_axes.py" | |
:position ... :funcParensDisabled t :symbolLabel | |
"acorr") | |
:sortText "09.9999.acorr")) | |
[jsonrpc] e[19:11:33.283] --> textDocument/didChange | |
(:jsonrpc "2.0" :method "textDocument/didChange" :params | |
(:textDocument |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when-let ((basic (org-cite-get-processor 'basic)) | |
(activate (org-cite-processor-activate basic))) | |
(org-cite-register-processor | |
'activate-hide-@cite :activate | |
(lambda (citation) | |
"Activate CITATION, then make leadup to first ref invisible." | |
(funcall activate citation) | |
(when-let ((first-ref (car (org-cite-get-references citation))) | |
(beg (car (org-cite-boundaries citation)))) | |
(put-text-property (1+ beg) (car (org-cite-key-boundaries first-ref)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local cw = require "hs.caffeinate.watcher" | |
function cleanup_tramp_on_sleep(ev_type) | |
if ev_type == cw.systemWillSleep then | |
hs.execute("/usr/local/bin/emacsclient -e " .. | |
"'(when (tramp-list-connections) " .. | |
" (message \"Cleaning up TRAMP before sleep\") " .. | |
" (tramp-cleanup-all-connections))'") | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local hotkey = require "hs.hotkey" | |
local window = require "hs.window" | |
local hse, hsee, hst = hs.eventtap,hs.eventtap.event,hs.timer | |
local spaces = require "hs.spaces" | |
function flashScreen(screen) | |
local flash=hs.canvas.new(screen:fullFrame()):appendElements({ | |
action = "fill", | |
fillColor = { alpha = 0.35, red=1}, | |
type = "rectangle"}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; JD Smith 2024, based on https://www.emacswiki.org/emacs/BufferLocalKeys | |
(defvar-local custom-buffer-local-keys nil | |
"Key-bindings to be set up local to the current buffer. | |
A single (KEY . BINDING) cons or list of such conses, of the form | |
`bind-keys' accepts. Set this as a file-local variable to make | |
bindings local to that buffer only.") | |
;; Only include this if you trust the files you open | |
(put 'custom-buffer-local-keys 'safe-local-variable 'consp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; org-refile-attach.el --- Move attachments on org refile -*- lexical-binding: t; -*- | |
;; Copyright (C) 2024 J.D. Smith | |
;;; Commentary: | |
;; org-refile-attach enables moving attachments associated with a | |
;; given heading and sub-headings upon refiling it. | |
;; XXX: This a proof of concept, and does not handle moving arbitrary | |
;; sub-trees or regions correctly | |
;;; Code: | |
(require 'org-attach) | |
(require 'org-element) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/org-toggle-emphasis (type) | |
"Toggle org emphasis TYPE (a character) at point." | |
(cl-labels ((in-emph (re) | |
"See if in org emphasis given by RE." | |
(and (org-in-regexp re 2) | |
(>= (point) (match-beginning 3)) | |
(<= (point) (match-end 4)))) | |
(de-emphasize () | |
"Remove most recently matched org emphasis markers." | |
(save-excursion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; eglot-booster.el --- boost eglot using emacs-lsp-booster -*- lexical-binding: t; -*- | |
;; Copyright (C) 2024 J.D. Smith | |
;;; Commentary: | |
;; **UPDATE** This has been superseded by the following package: | |
;; https://github.com/jdtsmith/eglot-booster | |
;; | |
;; Boost eglot with emacs-lsp-booster. | |
;; 1. Download a recent emacs-lsp-booster from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Simple test exhibiting motion errors with inline images. | |
;; See Bug#67604 | |
;; 1. Eval this buffer (M-x eval-buffer). | |
;; 2. A buffer with 3 colored SVG blocks will appear. | |
;; 3. Adjust your frame's width until the green image just wraps to | |
;; the 2nd screen line, then reduce width by one more char. | |
;; 4. In the buffer with the images, M-x my/find-skip-bug. If it | |
;; succeeds, it will report the pixel offset where the bug | |
;; occurred. NOTE: The Green image must appear at the start of a | |
;; line, or a "false positive" bug ID has occurred. Increase your |
NewerOlder