dev: merging from main

This commit is contained in:
Matt Nish-Lapidus 2024-07-01 10:51:39 -04:00
commit 5b6bb0b064
24 changed files with 213 additions and 666 deletions

View file

@ -1,106 +0,0 @@
#+title: :app twitter
#+subtitle: Be superficial in plain text
#+created: October 11, 2019
#+since: 2.0.0
#+begin_quote
*This module is deprecated.* Changes upstream to Twitter's API has rendered
twittering-mode non-functional, and there is no known alternative.
#+end_quote
* Description :unfold:
Enjoy twitter from emacs.
- View various timelines side by side, e.g. user's timeline, home, etc.
- Post new tweets
- Send direct messages
- Retweet
- Follow and un-follow users
- Favorite tweets
** Maintainers
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
** Module flags
/This module has no flags./
** Packages
- [[doom-package:avy]]
- [[doom-package:twittering-mode]]
** Hacks
/No hacks documented for this module./
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
This module requires:
- One of the following (for SSL connections; required by Twitter's API):
- [[http://curl.haxx.se/][cURL]]
- [[http://www.gnu.org/software/wget/][GNU Wget]]
- [[http://www.openssl.org/][OpenSSL]]
- [[http://www.gnu.org/software/gnutls/][GnuTLS]]
- [[http://www.gnupg.org/][GnuPG]], for encrypting the OAuth token, stored locally.
- [[http://www.gzip.org/][gzip]], for compressing retrieved profile pictures,
- [[http://www.imagemagick.org/][ImageMagick]], for displaying and resizing profile pictures.
Build Emacs with ImageMagick support using the ~--with-imagemagick~ flag ([[https://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL][how
to build Emacs from source]]).
* TODO Usage
#+begin_quote
󱌣 This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote
* TODO Configuration
#+begin_quote
󱌣 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
** Commands & Keybindings
Here is a list of available commands and their default keybindings (defined in
[[./config.el][config.el]]):
| command | key / ex command | description |
|---------------------+------------------+-------------------------------------------------------------|
| ~+twitter/quit~ | [[kbd:][q]] | Close current window |
| ~+twitter/quit-all~ | [[kbd:][Q]] | Close all twitter windows and buffers, and delete workspace |
And when [[doom-module::editor evil +everywhere]] is active:
| command | key / ex command | description |
|--------------------------------------------------+------------------+------------------------------------------------------------------|
| ~twittering-favorite~ | [[kbd:][f]] | Favorite/Like a tweet |
| ~twittering-unfavorite~ | [[kbd:][F]] | Un-favorite/Un-like a tweet |
| ~twittering-follow~ | [[kbd:][C-f]] | Follow user |
| ~twittering-unfollow~ | [[kbd:][C-F]] | Un-follow user |
| ~twittering-delete-status~ | [[kbd:][d]] | Delete a tweet |
| ~twittering-retweet~ | [[kbd:][r]] | Retweet |
| ~twittering-toggle-or-retrieve-replied-statuses~ | [[kbd:][R]] | Toggle or retrieve replies |
| ~twittering-update-status-interactive~ | [[kbd:][o]] | Update tweets |
| ~+twitter/ace-link~ | [[kbd:][O]] | Open some visible link from a ~twittering-mode~ buffer using ace |
| ~twittering-search~ | [[kbd:][/]] | Search |
| ~twittering-goto-next-status~ | [[kbd:][J]] | Go to next tweet |
| ~twittering-goto-previous-status~ | [[kbd:][K]] | Go to previous tweet |
| ~twittering-goto-first-status~ | [[kbd:][gg]] | Go to first tweet |
| ~twittering-goto-last-status~ | [[kbd:][G]] | Go to last tweet |
| ~twittering-goto-next-status-of-user~ | [[kbd:][gj]] | Go to next tweet of user |
| ~twittering-goto-previous-status-of-user)))~ | [[kbd:][gk]] | Go to previous tweet of user |
* Troubleshooting
[[doom-report:][Report an issue?]]
** ~twittering-mode~ overrides the [[kbd:][SPC]] key
Currently ~twittering-mode~ binds [[kbd:][SPC]], breaking its functionality as a leader
key for evil users. To work around this issue you may use [[kbd:][M-SPC]] instead.
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* TODO Appendix
#+begin_quote
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote

View file

@ -1,104 +0,0 @@
;;; app/twitter/autoload.el -*- lexical-binding: t; -*-
(defvar +twitter-workspace-name "*Twitter*"
"The name to use for the twitter workspace.")
;;;###autoload
(defun +twitter-display-buffer-fn (buf)
"A replacement display-buffer command for `twittering-pop-to-buffer-function'
that works with the ui/popup module."
(let ((win (selected-window)))
(display-buffer buf)
;; This is required because the new window generated by `pop-to-buffer'
;; may hide the region following the current position.
(twittering-ensure-whole-of-status-is-visible win)))
;;;###autoload
(defun +twitter-buffer-p (buf)
"Return non-nil if BUF is a `twittering-mode' buffer."
(eq 'twittering-mode (buffer-local-value 'major-mode buf)))
;;
;; Commands
(defvar +twitter--old-wconf nil)
;;;###autoload
(defun =twitter (arg)
"Opens a workspace dedicated to `twittering-mode'."
(interactive "P")
(condition-case _
(progn
(if (and (not arg) (modulep! :ui workspaces))
(+workspace/new +twitter-workspace-name)
(setq +twitter--old-wconf (current-window-configuration))
(delete-other-windows)
(switch-to-buffer (doom-fallback-buffer)))
(call-interactively #'twit)
(unless (get-buffer (car twittering-initial-timeline-spec-string))
(error "Failed to open twitter"))
(switch-to-buffer (car twittering-initial-timeline-spec-string))
(dolist (name (cdr twittering-initial-timeline-spec-string))
(split-window-horizontally)
(switch-to-buffer name))
(balance-windows)
(call-interactively #'+twitter/rerender-all))
('error (+twitter/quit-all))))
;;;###autoload
(defun +twitter/quit ()
"Close the current `twitter-mode' buffer."
(interactive)
(when (eq major-mode 'twittering-mode)
(twittering-kill-buffer)
(cond ((one-window-p) (+twitter/quit-all))
((modulep! :ui workspaces)
(+workspace/close-window-or-workspace))
((delete-window)))))
;;;###autoload
(defun +twitter/quit-all ()
"Close all open `twitter-mode' buffers and the associated workspace, if any."
(interactive)
(when (modulep! :ui workspaces)
(+workspace/delete +twitter-workspace-name))
(when +twitter--old-wconf
(set-window-configuration +twitter--old-wconf)
(setq +twitter--old-wconf nil))
(dolist (buf (doom-buffers-in-mode 'twittering-mode (buffer-list) t))
(twittering-kill-buffer buf)))
;;;###autoload
(defun +twitter/rerender-all ()
"Rerender all `twittering-mode' buffers."
(interactive)
(dolist (buf (doom-buffers-in-mode 'twittering-mode (buffer-list) t))
(with-current-buffer buf
(twittering-rerender-timeline-all buf)
(setq-local line-spacing 0.2)
(goto-char (point-min)))))
;;;###autoload
(defun +twitter/ace-link ()
"Open a visible link, username or hashtag in a `twittering-mode' buffer."
(interactive)
(require 'avy)
;; REVIEW Is this necessary anymore with `link-hint'
(let ((pt (avy-with +twitter/ace-link
(avy--process
(+twitter--collect-links)
(avy--style-fn avy-style)))))
(when (number-or-marker-p pt)
(goto-char pt)
(let ((uri (get-text-property (point) 'uri)))
(if uri (browse-url uri))))))
(defun +twitter--collect-links ()
(let ((end (window-end))
points)
(save-excursion
(goto-char (window-start))
(while (and (< (point) end)
(ignore-errors (twittering-goto-next-thing) t))
(push (point) points))
(nreverse points))))

View file

@ -1,76 +0,0 @@
;;; app/twitter/config.el -*- lexical-binding: t; -*-
(use-package! twittering-mode
:commands twit
:config
(setq twittering-private-info-file
(expand-file-name "twittering-mode.gpg" doom-data-dir)
twittering-use-master-password t
twittering-request-confirmation-on-posting t
;; twittering-icon-mode t
;; twittering-use-icon-storage t
;; twittering-icon-storage-file (concat doom-cache-dir "twittering-mode-icons.gz")
;; twittering-convert-fix-size 12
twittering-timeline-header ""
twittering-timeline-footer ""
twittering-edit-skeleton 'inherit-any
twittering-status-format "%FACE[font-lock-function-name-face]{ @%s} %FACE[italic]{%@} %FACE[error]{%FIELD-IF-NONZERO[❤ %d]{favorite_count}} %FACE[warning]{%FIELD-IF-NONZERO[↺ %d]{retweet_count}}
%FOLD[ ]{%FILL{%t}%QT{
%FOLD[ ]{%FACE[font-lock-function-name-face]{@%s}\t%FACE[shadow]{%@}
%FOLD[ ]{%FILL{%t}}
}}}
%FACE[twitter-divider]{ }
"
;; twittering-timeline-spec-alias '()
twittering-initial-timeline-spec-string
'(":home" ":mentions" ":direct_messages"))
(set-popup-rule! "^\\*twittering-edit" :size 15 :ttl nil :quit nil :select t)
(defface twitter-divider
'((((background dark)) (:underline (:color "#141519")))
(((background light)) (:underline (:color "#d3d3d3"))))
"The vertical divider between tweets."
:group 'twittering-mode)
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
(when (modulep! :ui popup)
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
;; Custom header-line for twitter buffers
(add-hook! 'twittering-mode-hook
(defun +twitter-switch-mode-and-header-line-h ()
(setq header-line-format mode-line-format
mode-line-format nil)))
;; `epa--decode-coding-string' isn't defined in later versions of Emacs 27
(unless (fboundp 'epa--decode-coding-string)
(defalias 'epa--decode-coding-string #'decode-coding-string))
(define-key! twittering-mode-map
"q" #'+twitter/quit
"Q" #'+twitter/quit-all
[remap twittering-kill-buffer] #'+twitter/quit
[remap delete-window] #'+twitter/quit
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
(when (modulep! :editor evil +everywhere)
(define-key! twittering-mode-map
[remap evil-window-delete] #'+twitter/quit
"f" #'twittering-favorite
"F" #'twittering-unfavorite
"\C-f" #'twittering-follow
"\C-F" #'twittering-unfollow
"d" #'twittering-delete-status
"r" #'twittering-retweet
"R" #'twittering-toggle-or-retrieve-replied-statuses
"o" #'twittering-update-status-interactive
"O" #'+twitter/ace-link
"/" #'twittering-search
"J" #'twittering-goto-next-status
"K" #'twittering-goto-previous-status
"g" nil
"gg" #'twittering-goto-first-status
"G" #'twittering-goto-last-status
"gj" #'twittering-goto-next-status-of-user
"gk" #'twittering-goto-previous-status-of-user)))

View file

@ -1,5 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; app/twitter/packages.el
(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
(package! avy :pin "be612110cb116a38b8603df367942e2bb3d9bdbe")

View file

@ -25,6 +25,9 @@ This module provides syntax checking and error highlighting, powered by
** Hacks
- If ~lsp-ui-mode~ is active, most of the aesthetic functionality of this module
is turned off, as they show the same information.
- If childframes are enabled, and the flycheck childframe is shown, it will be
hidden on the next user input (as well as the default behavior: to hide it the
next time the user is idle for ~flycheck-display-errors-delay~ seconds).
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.

View file

@ -74,6 +74,21 @@
(setq flycheck-posframe-warning-prefix "! "
flycheck-posframe-info-prefix "··· "
flycheck-posframe-error-prefix "X ")
;; HACK: Hide the flycheck posframe immediately on the next keypress/user
;; action, otherwise it lingers until the next time the user is idle.
(defun +syntax--flycheck-posframe-hide-h ()
(unless (flycheck-posframe-check-position)
(posframe-hide flycheck-posframe-buffer))
(remove-hook 'post-command-hook #'+syntax--flycheck-posframe-hide-h))
(defadvice! +syntax-hide-posframe-on-next-command-a (fn &rest args)
:around #'flycheck-posframe-show-posframe
(letf! ((defun posframe-show (&rest args)
(add-hook 'post-command-hook #'+syntax--flycheck-posframe-hide-h)
(apply posframe-show args)))
(apply fn args)))
(after! company
;; Don't display popups if company is open
(add-hook 'flycheck-posframe-inhibit-functions #'company--active-p))

View file

@ -469,15 +469,7 @@
(:when (modulep! :completion ivy)
:desc "Jump to channel" "j" #'+irc/ivy-jump-to-channel)
(:when (modulep! :completion vertico)
:desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel)))
;;; <leader> T --- twitter
(:when (modulep! :app twitter)
(:prefix-map ("T" . "twitter")
:desc "Open twitter app" "T" #'=twitter
:desc "Quit twitter" "q" #'+twitter/quit
:desc "Rerender twits" "r" #'+twitter/rerender-all
:desc "Ace link" "l" #'+twitter/ace-link)))
:desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel))))
;;

View file

@ -155,14 +155,6 @@ directives. By default, this only recognizes C directives.")
:after-until #'evil-global-marker-p
(and (>= char ?2) (<= char ?9)))
;; REVIEW Fix #2493: dir-locals cannot target fundamental-mode when evil-mode
;; is active. See hlissner/doom-emacs#2493. Revert this if
;; emacs-evil/evil#1268 is resolved upstream.
(defadvice! +evil--fix-local-vars-a (&rest _)
:before #'turn-on-evil-mode
(when (eq major-mode 'fundamental-mode)
(hack-local-variables)))
;; HACK Invoking helpful from evil-ex throws a "No recursive edit is in
;; progress" error because, between evil-ex and helpful,
;; `abort-recursive-edit' gets called one time too many.

View file

@ -37,4 +37,8 @@
(defun +lisp/find-file-in-quicklisp ()
"Find a file belonging to a library downloaded by Quicklisp."
(interactive)
(doom-project-find-file "~/quicklisp/dists/"))
(doom-project-find-file
(or (cl-loop for dir in +lisp-quicklisp-paths
if (file-directory-p dir)
return (expand-file-name "dists/" dir))
(user-error "Couldn't find your Quicklisp directory (customize `+lisp-quicklisp-paths')"))))

View file

@ -1,5 +1,9 @@
;;; lang/common-lisp/config.el -*- lexical-binding: t; -*-
(defcustom +lisp-quicklisp-paths '("~/quicklisp" "~/.quicklisp")
"A list of directories to search for Quicklisp's site files."
:type '(repeat directory))
;; `lisp-mode' is loaded at startup. In order to lazy load its config we need to
;; pretend it isn't loaded
(defer-feature! lisp-mode)

View file

@ -104,6 +104,12 @@
(bound-and-true-p lsp--buffer-deferred)
(not (executable-find python-shell-interpreter t)))
(anaconda-mode +1))))
(add-hook! 'eglot-server-initialized-hook
(defun +python-disable-anaconda-mode-h (&rest _)
"Ensure `anaconda-mode' doesn't interfere with `eglot'."
(when (bound-and-true-p anaconda-mode)
(anaconda-mode -1))))
:config
(set-company-backend! 'anaconda-mode '(company-anaconda))
(set-lookup-handlers! 'anaconda-mode

View file

@ -54,9 +54,6 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir)
lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir))
;; REVIEW Remove this once this is fixed upstream.
(add-to-list 'lsp-client-packages 'lsp-racket)
(add-hook! 'doom-escape-hook
(defun +lsp-signature-stop-maybe-h ()
"Close the displayed `lsp-signature'."

View file

@ -1,61 +0,0 @@
#+title: :tools rgb
#+subtitle: Creating color strings
#+created: May 06, 2020
#+since: 21.12.0
#+begin_quote
*This module is deprecated.* The module is too trivial to warrant a module.
#+end_quote
* Description :unfold:
Highlights color hex values and names with the color itself, and provides tools
to easily modify color values or formats.
** Maintainers
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
** Module flags
/This module has no flags./
** Packages
- [[doom-package:kurecolor]]
- [[doom-package:rainbow-mode]]
** Hacks
/No hacks documented for this module./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
/This module has no external requirements./
* Usage
=rainbow-mode= provides automatic highlighting to hex color codes, and in
relevant modes, color names (e.g. html color names in =css-mode= or LaTeX color
names in =latex-mode=)
=kurecolor= provides commands to easily change the brightness, saturation, and
hue of hex colors (and a useful hydra for this, if =:ui hydra= is enabled), as
well as conversion between hex and css colors
* Configuration
=hl-line-mode= overrides the color highlighting of =rainbow-mode=, limiting the
use of that plugin and on-site color changes using =kurecolor=. To automatically
disable it only when =rainbow-mode= is active, you can add the following hook:
#+begin_src emacs-lisp
;; in $DOOMDIR/config.el
(add-hook! 'rainbow-mode-hook
(hl-line-mode (if rainbow-mode -1 +1)))
#+end_src
* Troubleshooting
/There are no known problems with this module./ [[doom-report:][Report one?]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* TODO Appendix
#+begin_quote
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote

View file

@ -1,14 +0,0 @@
;;; tools/rgb/autoload.el -*- lexical-binding: t; -*-
;;;###if (modulep! :ui hydra)
;;;###autoload (autoload '+rgb/kurecolor-hydra/body "tools/rgb/autoload" nil t)
(defhydra +rgb/kurecolor-hydra (:color pink :hint nil)
"
Inc/Dec _w_/_W_ brightness _d_/_D_ saturation _e_/_E_ hue "
("w" kurecolor-decrease-brightness-by-step)
("W" kurecolor-increase-brightness-by-step)
("d" kurecolor-decrease-saturation-by-step)
("D" kurecolor-increase-saturation-by-step)
("e" kurecolor-decrease-hue-by-step)
("E" kurecolor-increase-hue-by-step)
("q" nil "cancel" :color blue))

View file

@ -1,5 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; tools/rgb/packages.el
(package! rainbow-mode :pin "0740f31f300982534183a2f60b1918de418a6f2c")
(package! kurecolor :pin "fbf98e1e384dd11bbb5764ae54b36353f0691d1e")

View file

@ -1,61 +0,0 @@
#+title: :tools taskrunner
#+subtitle: Taskrunner for all your projects
#+created: November 09, 2019
#+since: 21.12.0
#+begin_quote
*This module is deprecated.* The module is too trivial and taskrunner is no
longer maintained.
#+end_quote
* Description :unfold:
This module integrates [[doom-package:taskrunner]] into Doom Emacs, which scraps runnable tasks
from build systems like make, gradle, npm and the like.
** Maintainers
/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]]
** Module flags
/This module has no flags./
** Packages
- [[doom-package:emacs-taskrunner]]
- [[doom-package:helm-taskrunner]] if [[doom-module::completion helm]]
- [[doom-package:ivy-taskrunner]] if [[doom-module::completion ivy]]
** Hacks
/No hacks documented for this module./
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
/This module has no external requirements./
* TODO Usage
#+begin_quote
󱌣 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
Keybindings:
| Binding | Description |
| ~p z~ | ~List project tasks~ |
* TODO Configuration
#+begin_quote
󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]]
#+end_quote
* Troubleshooting
/There are no known problems with this module./ [[doom-report:][Report one?]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* TODO Appendix
#+begin_quote
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote

View file

@ -1,9 +0,0 @@
;;; app/taskrunner/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +taskrunner/project-tasks ()
"Invokes `ivy-taskrunner' or `helm-tasksrunner', depending on which is
available."
(interactive)
(cond ((modulep! :completion ivy) (ivy-taskrunner))
((modulep! :completion helm) (helm-taskrunner))))

View file

@ -1,14 +0,0 @@
;;; tools/taskrunner/config.el -*- lexical-binding: t; -*-
(after! taskrunner
(set-popup-rule! taskrunner--buffer-name-regexp :quit t))
(use-package! helm-taskrunner
:when (modulep! :completion helm)
:defer t
:config (helm-taskrunner-minor-mode +1))
(use-package! ivy-taskrunner
:when (modulep! :completion ivy)
:defer t
:config (ivy-taskrunner-minor-mode +1))

View file

@ -1,14 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; tools/taskrunner/packages.el
(package! taskrunner :pin "716323aff410b4d864d137c9ebe4bbb5b8587f5e")
(when (modulep! :completion helm)
(package! helm-taskrunner
:pin "70ef8117aafdc01a1f06151a82cecb9a2fcf4d32"
:recipe (:host github :repo "emacs-taskrunner/helm-taskrunner")))
(when (modulep! :completion ivy)
(package! ivy-taskrunner
:pin "c731ee6279f65061ef70e79d3818ea1d9678e6da"
:recipe (:host github :repo "emacs-taskrunner/ivy-taskrunner")))