I hereby claim:
- I am agzam on github.
- I am agzam (https://keybase.io/agzam) on keybase.
- I have a public key whose fingerprint is E099 A300 39C1 2143 0579 BA65 CFE1 2444 AF47 BD1D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| e[dit] | evil-edit |
| w[rite] | evil-write |
| wa[ll] | evil-write-all |
| sav[eas] | evil-save |
| r[ead] | evil-read |
| b[uffer] | evil-buffer |
| bn[ext] | evil-next-buffer |
| bp[revious] | evil-prev-buffer |
| bN[ext] | bprevious |
| sb[uffer] | evil-split-buffer |
| (defun diff-buffers (buffer-A buffer-B) | |
| "Diff two buffers." | |
| (interactive | |
| (let* ((only-two? (eq 2 (count-windows))) | |
| (wins (sort (window-list) | |
| (lambda (a b) (< (window-use-time a) | |
| (window-use-time b))))) | |
| (b1 (if only-two? | |
| (window-buffer (first wins)) | |
| (read-buffer "Buffer A to compare"))) |
| (defun toggle-frame-maximized-undecorated () | |
| (interactive) | |
| (let* ((frame (selected-frame)) | |
| (on? (and (frame-parameter frame 'undecorated) | |
| (eq (frame-parameter frame 'fullscreen) 'maximized))) | |
| (geom (frame-monitor-attribute 'geometry)) | |
| (x (first geom)) | |
| (y (second geom)) | |
| (display-height (first (last geom)))) | |
| (if on? |
| ;; If you subscribed to mailing list(s) in gnu.org or googlegroups.com | |
| ;; and using mu4e as your mailing app, very often you need to | |
| ;; find a message in lists.gnu.org/archive or googlegroups.com | |
| ;; | |
| ;; For example, when you don't have the context of a particular thread | |
| ;; and all prior messages got deleted locally. | |
| ;; | |
| ;; This mu4e action allows you | |
| ;; to quickly find selected email post in the archive | |
| ;; and open in the browser |
| (define-ibuffer-filter unsaved-file-buffers | |
| "Toggle current view to buffers whose file is unsaved." | |
| (:description "file is unsaved") | |
| (ignore qualifier) | |
| (and (buffer-local-value 'buffer-file-name buf) | |
| (buffer-modified-p buf))) | |
| (define-key ibuffer-mode-map (kbd "/ u") #'ibuffer-filter-by-unsaved-file-buffers) | |
It is possible to customize the behavior of org-insert-link, so for example when you insert a link in Org-mode (using C-c C-l) that is a URL to a GitHub issue or a GitHub PR, the description of that link automatically turns into the title of that GitHub item.
For the following snippet to work, you’d have to correctly set github-forge authentication. Which boils down to creating a personal access token on GitHub and adding the following line to your ~/.authinfo (or ~/.authinfo.gpg)
machine api.github.com login USERNAME^forge password TOKEN
| (defun diff-last-two-kills (&optional ediff?) | |
| "Diff last couple of things in the kill-ring. With prefix open ediff." | |
| (interactive "P") | |
| (let* ((old "/tmp/old-kill") | |
| (new "/tmp/new-kill") | |
| (prev-ediff-quit-hook ediff-quit-hook)) | |
| (cl-flet ((kill-temps | |
| () | |
| (dolist (f (list old new)) | |
| (kill-buffer (find-buffer-visiting f))) |
| (defun toggle-frame-maximized-undecorated () | |
| (interactive) | |
| (let* ((frame (selected-frame)) | |
| (on? (and (frame-parameter frame 'undecorated) | |
| (eq (frame-parameter frame 'fullscreen) 'maximized))) | |
| (geom (frame-monitor-attribute 'geometry)) | |
| (x (nth 0 geom)) | |
| (y (nth 1 geom)) | |
| (display-height (nth 3 geom)) | |
| (display-width (nth 2 geom)) |
| (defun mu4e-action-find-in-mailing-list (msg) | |
| "Find message in mailing-list archives" | |
| (interactive) | |
| (let* ((mlist (mu4e-message-field msg :mailing-list)) | |
| (msg-id (mu4e-message-field msg :message-id)) | |
| (url | |
| (pcase mlist | |
| ;; gnu.org | |
| ((pred (lambda (x) (string-suffix-p "gnu.org" x))) |