emacs

How to find the highlight face in emacs?

https://www.reddit.com/r/emacs/comments/fcernd/how_to_find_the_highlight_face_in_emacs/ The doom themes I try all have too un-obvious a background color for selected text – the text of future matches when doing an interactive search, or the highlight color of matches while I’m spell-checking, or the mark area when I am highlighting a section of text. I assume these are all the same face, because they look the same. Does anyone know which face this should be so I can customize it, and secondly, can tell me how I could figure out the answer to this question on my own without reading a lot of code?

Image previews with helm-follow-mode

When using helm-find-file you can use helm-follow-mode to cause images to show themselves as you move over them, replacing the need to start up some other program to preview images. The shortcut for that while within helm-find-file is C-c C-f. By default, you will be ejected from the follow mode as soon as you move over a non-image file. The following customizatoin will give it a little more tolerance: (setq helm-follow-input-idle-delay 0.

Emacs Gnus delay (schedule) email sending

I always forget how to schedule my emails and it’s a pain to look up because Gnus uses the word “delay” instead of “schedule”, so here it is. Note that for gnus message scheduling (delaying) to work, you will need a line like this in your init file: (gnus-delay-initialize) In a message buffer with Gnus you can execute C-c C-j (gnus-delay-article) to schedule an item for a later sending. After that I see it scheduled in my nndraft:delayed folder with a “date” line describing the time at which it will be sent.

Bulk multi-line find and replacement with Dired instead of SED

Scenario: I have a directory full of code files (in this case, 51 of them) that each need a find-and-replace executed; however, it is adding a line to part of the code, so replace one line with several. This means that SED cannot do the trick; you’ll get errors like, > > > sed: -e expression #1, char 49: unterminated `s' command Rather than spending the time figuring out how to encode things for SED, the simplest solution was just to use emacs inimitable dired.

Newsticker failure

https://emacs.stackexchange.com/questions/55125/newsticker-failure-wrong-type-argument-listp/55126 Suddenly newsticker is failing to load. I get the following stack trace on error. I have made no recent upgrades. Debugger entered–Lisp error: (wrong-type-argument listp \.\.\.) newsticker–stat-num-items(Bus\ Driver\ Diaries new immortal) apply(newsticker–stat-num-items Bus\ Driver\ Diaries (new immortal)) newsticker–stat-num-items-for-group(Bus\ Driver\ Diaries new immortal) newsticker–treeview-tree-get-tag(“Bus Driver Diaries” nil “feeds-4”) #f(compiled-function (g) #<bytecode 0x2370c3d>)(“Bus Driver Diaries”) mapcar(#f(compiled-function (g) #<bytecode 0x2370c3d>) (“Sacha Chua” “Good Questions” “Quote of the day” “Tory C Anderson” “Bus Driver Diaries” “Dadacity” “Austen Knows Best” “Every Day Miracles” “Vi Hart” “Brain Pickings” “Inside Clojure” “Reddit Clojure” “Reddit Emacs” “Reddit Postgres” “Reddit Programming Languages”))

How to Save an Emacs Keyboard Macro Permanently

Courtesy of gnu manual, we can permanently save a keyboard macro for future use: https://www.gnu.org/software/emacs/manual/html_node/emacs/Save-Keyboard-Macro.html The steps are as follows: perform macro (start with f3, then do your stuff and return to where you started, then stop recording with <f4>) name that macro kmacro-name-last-macro insert macro code into buffer insert-kbd-macro <RET> macro-name I want the ability to go into a let-form and, in the spirit of REPL debugging and development, bind the X VAL part of a (let [ .

Easy incrementing find and replace in emacs

I start with a list with a bunch of entries like this: newsletter W02 newsletter W02 newsletter W02 newsletter W02 EDIT: New Solutions It turns out that emacs automatically initializes a variable that tracks how many interations your replacement function has made, and in lisp mode you can get to it with \#. This way, the single line necessary to number all my newsletters becomes this: W\(02\) → W\,(format "%02d" (+ 4 \#))) and, of course, you can adjust that 4 to whatever you need it to be for your starting digit.

Make GNUs "sent" show recipient, not author

https://www.reddit.com/r/emacs/comments/e66ewg/make_gnus_sent_show_recipient_not_author/ I’m a GNUs user and am pretty happy with it. However, I have a “Sent” message group where the summary line is the same as everywhere else, meaning it includes the author (me!) and not the recipient. How can I change the summary line format in just the outgoing buffers (or, alternatively, if the author is me)? For reference, here’s my current insensitive line-format variable: (setq gnus-summary-line-format "%U%R%([%-30,30f]:%) %-50,40s(%&user-date;)\n") The winning solution?

Emacs can't show light background

Although I’ve long had a habit of frequently changing my themes, even having a key chord set for that, at some point recently I became unable to switch to any light-background theme; it was always some shade of black. This became a real problem since Wikipedia in eww became unreadable for equations. I looked into this and found the answer from Sacha Chua, who pointed me to M-x customize-face default which had somehow had my default background set to some dark dark gray (I’m guessing when I was playing with persp mode).

Auto-add BCC address to notmuch/message-mode messages

I use GNUs for most of my email needs, but also have notmuch for rapid search of my inbox. Trouble is, when I choose a message in that notmuch search, it doesn’t open it with gnus but with its own message-mode spinoff called Message[Notmuch]. In GNUS I have an automatically added BCC address (my “sent-mail” inbox, which is downloaded across devices to sync what I’ve sent). How can I get the same automatic BCC added to anything I send in reply with Message[Notmuch]?