Compare commits
No commits in common. "9b5d5cbca6982a6168d465a98cf79831dd522fb5" and "b3bcfb2701e90c20f370ab4b2b6239274ad532cc" have entirely different histories.
9b5d5cbca6
...
b3bcfb2701
79
config.org
79
config.org
|
@ -1908,7 +1908,7 @@ files.
|
||||||
***** Emojis
|
***** Emojis
|
||||||
|
|
||||||
Emacs (28+) has an ~emoji~ script table. We're about to use it, but before doing
|
Emacs (28+) has an ~emoji~ script table. We're about to use it, but before doing
|
||||||
so we're going to excise a few characters that I actually want rendered as
|
so we're going to excise a few characteris that I actually want rendered as
|
||||||
using the symbol font (not as emojis).
|
using the symbol font (not as emojis).
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -2034,7 +2034,7 @@ We can then use this to create a =doctor= check.
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Furthermore, when fonts /are/ missing, it could be good to check the state of
|
Furthermore, when fonts /are/ missing, it could be good to check the state of
|
||||||
affairs on startup.
|
affairs on statup.
|
||||||
|
|
||||||
#+name: warn-missing-fonts
|
#+name: warn-missing-fonts
|
||||||
#+begin_src emacs-lisp :tangle no :noweb yes :noweb-ref none
|
#+begin_src emacs-lisp :tangle no :noweb yes :noweb-ref none
|
||||||
|
@ -2311,7 +2311,7 @@ htmlize package doesn't.
|
||||||
Let's make creating an Org buffer just that little bit easier.
|
Let's make creating an Org buffer just that little bit easier.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(evil-define-command +evil-buffer-org-new (_count file)
|
(evil-define-command +evil-buffer-org-new (count file)
|
||||||
"Creates a new ORG buffer replacing the current window, optionally
|
"Creates a new ORG buffer replacing the current window, optionally
|
||||||
editing a certain FILE"
|
editing a certain FILE"
|
||||||
:repeat nil
|
:repeat nil
|
||||||
|
@ -2340,11 +2340,11 @@ Let's make creating an Org buffer just that little bit easier.
|
||||||
Emacs can render an image as the splash screen, but I think we can do better
|
Emacs can render an image as the splash screen, but I think we can do better
|
||||||
than just a completely static image. Since, SVG images in particular are
|
than just a completely static image. Since, SVG images in particular are
|
||||||
supported, we can use them as the basis for a fancier splash screen image setup
|
supported, we can use them as the basis for a fancier splash screen image setup
|
||||||
--- with themeable, resizing images.
|
--- with themable, resizing images.
|
||||||
|
|
||||||
With the effort I'm putting into this, it would be nice to have a good image,
|
With the effort I'm putting into this, it would be nice to have a good image,
|
||||||
and [[https://github.com/MarioRicalde][@MarioRicalde]] came up with a cracker! He's also provided me with a nice
|
and [[https://github.com/MarioRicalde][@MarioRicalde]] came up with a cracker! He's also provided me with a nice
|
||||||
Emacs-style /E/. I was using the black-hole image, but when I stripped down the
|
Emacs-style /E/. I was using the blackhole image, but when I stripped down the
|
||||||
splash screen to something more minimal I switched to just using the /E/.
|
splash screen to something more minimal I switched to just using the /E/.
|
||||||
|
|
||||||
#+attr_latex: :width 0.2\linewidth
|
#+attr_latex: :width 0.2\linewidth
|
||||||
|
@ -2496,7 +2496,7 @@ transparent overlay).
|
||||||
(message "Done"))))
|
(message "Done"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
To make it easier to produce themeable images, we can also provide an Inkscape
|
To make it easier to produce themable images, we can also provide an Inkscape
|
||||||
colour palette.
|
colour palette.
|
||||||
|
|
||||||
#+begin_src text :tangle ~/.config/inkscape/palettes/Emacs Fancy Splash.gpl :mkdirp yes
|
#+begin_src text :tangle ~/.config/inkscape/palettes/Emacs Fancy Splash.gpl :mkdirp yes
|
||||||
|
@ -2727,7 +2727,7 @@ in hooks that call functions with arguments."
|
||||||
|
|
||||||
**** ASCII banner
|
**** ASCII banner
|
||||||
|
|
||||||
If we're operating in a terminal (or =emacclient=) we see an ASCII banner instead
|
If we're operating in a terminal (or =emacclient=) we see an ascii banner instead
|
||||||
of the graphical one. I'd also like to use something simple for this.
|
of the graphical one. I'd also like to use something simple for this.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -3196,8 +3196,8 @@ to add a few bells and whistles --- namely:
|
||||||
+ Accepting stdin by putting it in a temporary file and immediately opening it.
|
+ Accepting stdin by putting it in a temporary file and immediately opening it.
|
||||||
+ Guessing that the =tty= is a good idea when ~$DISPLAY~ is unset (relevant with SSH
|
+ Guessing that the =tty= is a good idea when ~$DISPLAY~ is unset (relevant with SSH
|
||||||
sessions, among other things).
|
sessions, among other things).
|
||||||
+ With a whiff of 24-bit colour support, sets ~TERM~ variable to a =terminfo= that
|
+ With a whiff of 24-bit color support, sets ~TERM~ variable to a =terminfo= that
|
||||||
(probably) announces 24-bit colour support.
|
(probably) announces 24-bit color support.
|
||||||
+ Changes GUI =emacsclient= instances to be non-blocking by default (~--no-wait~),
|
+ Changes GUI =emacsclient= instances to be non-blocking by default (~--no-wait~),
|
||||||
and instead take a flag to suppress this behaviour (~-w~).
|
and instead take a flag to suppress this behaviour (~-w~).
|
||||||
|
|
||||||
|
@ -3276,7 +3276,7 @@ else
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Now, to set an alias to use =e= with Magit, and then for maximum laziness we can
|
Now, to set an alias to use =e= with magit, and then for maximum laziness we can
|
||||||
set aliases for the terminal-forced variants.
|
set aliases for the terminal-forced variants.
|
||||||
#+begin_src shell :tangle no
|
#+begin_src shell :tangle no
|
||||||
alias m='e --eval "(progn (magit-status) (delete-other-windows))"'
|
alias m='e --eval "(progn (magit-status) (delete-other-windows))"'
|
||||||
|
@ -3810,7 +3810,7 @@ There's still a room for a little tweaking though...
|
||||||
:header-args:emacs-lisp: :noweb-ref magit-tweaks
|
:header-args:emacs-lisp: :noweb-ref magit-tweaks
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
When creating a new project, I often want the remote to be to my personal Forgejo
|
When creating a new project, I often want the remote to be to my personal forgejo
|
||||||
instance. Let's make that a bit more streamlined by introducing a quick-entry
|
instance. Let's make that a bit more streamlined by introducing a quick-entry
|
||||||
"default forge" option.
|
"default forge" option.
|
||||||
|
|
||||||
|
@ -3820,13 +3820,12 @@ instance. Let's make that a bit more streamlined by introducing a quick-entry
|
||||||
Set to nil to disable this functionality.")
|
Set to nil to disable this functionality.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
While we're at it, when creating a remote with the same name as my Github
|
While we're at it, when creating a remote with the same name as my github
|
||||||
username in a project where an HTTPS GitHub remote already exists, let's make
|
username in a project where an https github remote already exists, let's make
|
||||||
the pre-filled remote URL use ssh.
|
the pre-filled remote url use ssh.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defadvice! +magit-remote-add--streamline-forge-a (args)
|
(defadvice! +magit-remote-add--streamline-forge-a (args)
|
||||||
"Prompt to setup a remote using `+magit-default-forge-remote'."
|
|
||||||
:filter-args #'magit-remote-add
|
:filter-args #'magit-remote-add
|
||||||
(interactive
|
(interactive
|
||||||
(let ((default-name
|
(let ((default-name
|
||||||
|
@ -3924,12 +3923,11 @@ follow [[https://orgmode.org/worg/org-contribute.html#commit-messages][a certain
|
||||||
((string-match-p "\\.el$" last-file)
|
((string-match-p "\\.el$" last-file)
|
||||||
(when (re-search-backward "^\\(?:[+-]? *\\|@@[ +-\\d,]+@@ \\)(\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\)" temp-point t)
|
(when (re-search-backward "^\\(?:[+-]? *\\|@@[ +-\\d,]+@@ \\)(\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\)" temp-point t)
|
||||||
(re-search-forward "\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\) \\([^[:space:]\n]+\\)" nil t)
|
(re-search-forward "\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\) \\([^[:space:]\n]+\\)" nil t)
|
||||||
(push (match-string 1) file-changes)))
|
(add-to-list 'file-changes (match-string 1))))
|
||||||
((string-match-p "\\.org$" last-file)
|
((string-match-p "\\.org$" last-file)
|
||||||
(when (re-search-backward "^[+-]\\*+ \\|^@@[ +-\\d,]+@@ \\*+ " temp-point t)
|
(when (re-search-backward "^[+-]\\*+ \\|^@@[ +-\\d,]+@@ \\*+ " temp-point t)
|
||||||
(re-search-forward "@@ \\*+ " nil t)
|
(re-search-forward "@@ \\*+ " nil t)
|
||||||
(push (buffer-substring-no-properties (point) (line-end-position)) file-changes)))))))
|
(add-to-list 'file-changes (buffer-substring-no-properties (point) (line-end-position)))))))))
|
||||||
(setq file-changes (delete-dups file-changes))
|
|
||||||
(push (list last-file file-changes) change-data)
|
(push (list last-file file-changes) change-data)
|
||||||
(setq change-data (delete '(nil nil) change-data))
|
(setq change-data (delete '(nil nil) change-data))
|
||||||
(concat
|
(concat
|
||||||
|
@ -3964,7 +3962,7 @@ heading line selection for elisp and Org files.
|
||||||
**** Magit delta
|
**** Magit delta
|
||||||
|
|
||||||
[[https://github.com/dandavison/delta/][Delta]] is a git diff syntax highlighter written in rust. The author also wrote a
|
[[https://github.com/dandavison/delta/][Delta]] is a git diff syntax highlighter written in rust. The author also wrote a
|
||||||
package to hook this into the Magit diff view (which don't get any syntax
|
package to hook this into the magit diff view (which don't get any syntax
|
||||||
highlighting by default). This requires the ~delta~ binary. It's packaged on some
|
highlighting by default). This requires the ~delta~ binary. It's packaged on some
|
||||||
distributions, but most reliably installed through Rust's package manager cargo.
|
distributions, but most reliably installed through Rust's package manager cargo.
|
||||||
|
|
||||||
|
@ -3989,7 +3987,7 @@ want to look into later.
|
||||||
It's nice to be able to interact with MPRIS players. This would just be a
|
It's nice to be able to interact with MPRIS players. This would just be a
|
||||||
dependency of =org-music= or =doom-modeline-media-player=, but I haven't made it
|
dependency of =org-music= or =doom-modeline-media-player=, but I haven't made it
|
||||||
available on any an elisp archives. Thankfully most Emacs package managers make
|
available on any an elisp archives. Thankfully most Emacs package managers make
|
||||||
using Git repository URLs pretty easy these days.
|
using Git repository urls pretty easy these days.
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle packages.el
|
#+begin_src emacs-lisp :tangle packages.el
|
||||||
(package! mpris :recipe (:local-repo "lisp/mpris"))
|
(package! mpris :recipe (:local-repo "lisp/mpris"))
|
||||||
|
@ -4243,23 +4241,9 @@ function, we can create an abbrev minor mode and link that up.
|
||||||
"Turn on `autocorrect-mode' in the current buffer."
|
"Turn on `autocorrect-mode' in the current buffer."
|
||||||
(autocorrect-mode 1))
|
(autocorrect-mode 1))
|
||||||
|
|
||||||
#+end_src
|
(defun autocorrect--enabled-p ()
|
||||||
|
"Return non-nil if autocorrect-mode is enabled in the current buffer."
|
||||||
While we're at it, it would probably be nice to write an abbrev predicate
|
autocorrect-mode)
|
||||||
function that can also take into account a user function that determines if
|
|
||||||
expansion is appropriate.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(defcustom autocorrect-predicates nil
|
|
||||||
"Predicate functions called at point with argument START.
|
|
||||||
These functions should return t if autocorrection is valid at START."
|
|
||||||
:type '(repeat function))
|
|
||||||
|
|
||||||
(defun autocorrect--appropriate-p ()
|
|
||||||
"Return non-nil it is currently appropriate to make an autocorrection.
|
|
||||||
See `autocorrect-predicates'."
|
|
||||||
(and autocorrect-mode
|
|
||||||
(run-hook-with-args-until-failure 'autocorrect-predicates (point))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Given that our autocorrect abbrev table is operating rather distinctly from the
|
Given that our autocorrect abbrev table is operating rather distinctly from the
|
||||||
|
@ -4284,7 +4268,7 @@ too. We could just not save it, but it seems nice to get the count information.
|
||||||
Also set it as a parent of `global-abbrev-table'."
|
Also set it as a parent of `global-abbrev-table'."
|
||||||
(unless autocorrect-abbrev-table
|
(unless autocorrect-abbrev-table
|
||||||
(setq autocorrect-abbrev-table
|
(setq autocorrect-abbrev-table
|
||||||
(make-abbrev-table (list :enable-function #'autocorrect--appropriate-p)))
|
(make-abbrev-table (list :enable-function #'autocorrect--enabled-p)))
|
||||||
(abbrev-table-put
|
(abbrev-table-put
|
||||||
global-abbrev-table :parents
|
global-abbrev-table :parents
|
||||||
(cons autocorrect-abbrev-table
|
(cons autocorrect-abbrev-table
|
||||||
|
@ -4475,13 +4459,8 @@ the global abbrev list.
|
||||||
(cl-loop for dict in jinx--dicts
|
(cl-loop for dict in jinx--dicts
|
||||||
thereis (jinx--mod-check dict word))))
|
thereis (jinx--mod-check dict word))))
|
||||||
|
|
||||||
(defun autocorrect-jinx-appropriate (pos)
|
|
||||||
"Return non-nil if it is appropriate to spellcheck at POS according to jinx."
|
|
||||||
(and (not (jinx--face-ignored-p pos))
|
|
||||||
(not (jinx--regexp-ignored-p pos))))
|
|
||||||
|
|
||||||
(setq autocorrect-check-spelling-function #'autocorrect-jinx-check-spelling)
|
(setq autocorrect-check-spelling-function #'autocorrect-jinx-check-spelling)
|
||||||
(add-to-list 'autocorrect-predicates #'autocorrect-jinx-appropriate)
|
|
||||||
(advice-add 'jinx--correct-replace :before #'autocorrect-jinx-record-correction)
|
(advice-add 'jinx--correct-replace :before #'autocorrect-jinx-record-correction)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -4692,7 +4671,7 @@ For when you want to change the case pattern for a symbol.
|
||||||
:desc "Upper_Score" "u" #'string-inflection-capital-underscore
|
:desc "Upper_Score" "u" #'string-inflection-capital-underscore
|
||||||
:desc "UP_CASE" "U" #'string-inflection-upcase)
|
:desc "UP_CASE" "U" #'string-inflection-upcase)
|
||||||
(after! evil
|
(after! evil
|
||||||
(evil-define-operator evil-operator-string-inflection (beg end _type)
|
(evil-define-operator evil-operator-string-inflection (beg end type)
|
||||||
"Define a new evil operator that cycles symbol casing."
|
"Define a new evil operator that cycles symbol casing."
|
||||||
:move-point nil
|
:move-point nil
|
||||||
(interactive "<R>")
|
(interactive "<R>")
|
||||||
|
@ -4896,7 +4875,7 @@ is adjust the size slightly 🙂.
|
||||||
|
|
||||||
**** Media player
|
**** Media player
|
||||||
|
|
||||||
Sometimes (particularly when reading a novel, with Emacs full-screened) it would
|
Sometimes (particularly when reading a novel, with Emacs fullscreened) it would
|
||||||
be nice to know what I'm listening to. We can put this information in the
|
be nice to know what I'm listening to. We can put this information in the
|
||||||
modeline with my media player package.
|
modeline with my media player package.
|
||||||
|
|
||||||
|
@ -5022,14 +5001,13 @@ We can lazy load this using the start/stop commands.
|
||||||
I initially installed ~scrot~ for this, since it was the default capture program.
|
I initially installed ~scrot~ for this, since it was the default capture program.
|
||||||
However it raised ~glib error: Saving to file ... failed~ each time it was run.
|
However it raised ~glib error: Saving to file ... failed~ each time it was run.
|
||||||
Google didn't reveal any easy fixed, so I switched to [[https://github.com/naelstrof/maim][maim]]. We now need to pass
|
Google didn't reveal any easy fixed, so I switched to [[https://github.com/naelstrof/maim][maim]]. We now need to pass
|
||||||
it the window ID. This doesn't change throughout the lifetime of an Emacs
|
it the window ID. This doesn't change throughout the lifetime of an emacs
|
||||||
instance, so as long as a single window is used ~xdotool getactivewindow~ will
|
instance, so as long as a single window is used ~xdotool getactivewindow~ will
|
||||||
give a satisfactory result.
|
give a satisfactory result.
|
||||||
|
|
||||||
It seems that when new colours appear, that tends to make ~gifsicle~ introduce
|
It seems that when new colours appear, that tends to make ~gifsicle~ introduce
|
||||||
artefacts. To avoid this we pre-populate the colour map using the current doom
|
artefacts. To avoid this we pre-populate the colour map using the current doom
|
||||||
theme.
|
theme.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package! gif-screencast
|
(use-package! gif-screencast
|
||||||
:commands gif-screencast-mode
|
:commands gif-screencast-mode
|
||||||
|
@ -5135,7 +5113,6 @@ For ease of use, let's also set up an easy way of setting the ~:font~ attribute.
|
||||||
(defcustom variable-pitch-serif-font (font-spec :family "serif")
|
(defcustom variable-pitch-serif-font (font-spec :family "serif")
|
||||||
"The font face used for `variable-pitch-serif'."
|
"The font face used for `variable-pitch-serif'."
|
||||||
:group 'basic-faces
|
:group 'basic-faces
|
||||||
:type '(restricted-sexp :tag "font-spec" :match-alternatives (fontp))
|
|
||||||
:set (lambda (symbol value)
|
:set (lambda (symbol value)
|
||||||
(set-face-attribute 'variable-pitch-serif nil :font value)
|
(set-face-attribute 'variable-pitch-serif nil :font value)
|
||||||
(set-default-toplevel-value symbol value)))
|
(set-default-toplevel-value symbol value)))
|
||||||
|
@ -14219,7 +14196,3 @@ which is perfect for our needs.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-to-list 'magic-mode-alist (cons "\\`GIMP Palette\n" #'gimp-palette-mode))
|
(add-to-list 'magic-mode-alist (cons "\\`GIMP Palette\n" #'gimp-palette-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# jinx-local-words: "confpkg confpkgs smartparens tempbuffer"
|
|
||||||
# End:
|
|
||||||
|
|
Loading…
Reference in New Issue