#emacstip — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #emacstip, aggregated by home.social.
-
so, i managed to figure out how to include my Emacs config in the website without actually having it on the website. probably a bit hacky but in my
publish.eli have:;; retrieve literate emacs config from it's git repo
(if (file-exists-p "configuration.org")
(delete-file "configuration.org"))
(url-copy-file "https://git.sr.ht/~peregrinator/.emacs.d/blob/main/configuration.org" "configuration.org")and then I include that in the empty Org file in my content sources as:
#+title: Literate Emacs Configuration
#+include: "../../configuration.org" :lines "8-"so that the last metadata line (i.e. date) is also included along with the rest of the content
-
so, i managed to figure out how to include my Emacs config in the website without actually having it on the website. probably a bit hacky but in my
publish.eli have:;; retrieve literate emacs config from it's git repo
(if (file-exists-p "configuration.org")
(delete-file "configuration.org"))
(url-copy-file "https://git.sr.ht/~peregrinator/.emacs.d/blob/main/configuration.org" "configuration.org")and then I include that in the empty Org file in my content sources as:
#+title: Literate Emacs Configuration
#+include: "../../configuration.org" :lines "8-"so that the last metadata line (i.e. date) is also included along with the rest of the content
-
so, i managed to figure out how to include my Emacs config in the website without actually having it on the website. probably a bit hacky but in my
publish.eli have:;; retrieve literate emacs config from it's git repo
(if (file-exists-p "configuration.org")
(delete-file "configuration.org"))
(url-copy-file "https://git.sr.ht/~peregrinator/.emacs.d/blob/main/configuration.org" "configuration.org")and then I include that in the empty Org file in my content sources as:
#+title: Literate Emacs Configuration
#+include: "../../configuration.org" :lines "8-"so that the last metadata line (i.e. date) is also included along with the rest of the content
-
so, i managed to figure out how to include my Emacs config in the website without actually having it on the website. probably a bit hacky but in my
publish.eli have:;; retrieve literate emacs config from it's git repo
(if (file-exists-p "configuration.org")
(delete-file "configuration.org"))
(url-copy-file "https://git.sr.ht/~peregrinator/.emacs.d/blob/main/configuration.org" "configuration.org")and then I include that in the empty Org file in my content sources as:
#+title: Literate Emacs Configuration
#+include: "../../configuration.org" :lines "8-"so that the last metadata line (i.e. date) is also included along with the rest of the content
-
so, i managed to figure out how to include my Emacs config in the website without actually having it on the website. probably a bit hacky but in my
publish.eli have:;; retrieve literate emacs config from it's git repo
(if (file-exists-p "configuration.org")
(delete-file "configuration.org"))
(url-copy-file "https://git.sr.ht/~peregrinator/.emacs.d/blob/main/configuration.org" "configuration.org")and then I include that in the empty Org file in my content sources as:
#+title: Literate Emacs Configuration
#+include: "../../configuration.org" :lines "8-"so that the last metadata line (i.e. date) is also included along with the rest of the content
-
#EmacsTip: Want to remove the Nth element from a list? Just do (pop (nthcdr N LIST)).
-
#emacstip Reading the builtin manuals using `M-x info`! Got some spare time? Read a couple of interesting looking manual pages.
Navigation tips: `n` or `p` for next and previous nodes, `u` to go up one node. Press enter to follow a link. `l` to go back to where you where if followed a link or pressed a key you didn't intend. Finally, `?` to see a list of commands and general help information.
Some starting manuals to explore: the #emacs manual, Emacs Lisp Intro and Magit manuals.
-
#emacstip Reading the builtin manuals using `M-x info`! Got some spare time? Read a couple of interesting looking manual pages.
Navigation tips: `n` or `p` for next and previous nodes, `u` to go up one node. Press enter to follow a link. `l` to go back to where you where if followed a link or pressed a key you didn't intend. Finally, `?` to see a list of commands and general help information.
Some starting manuals to explore: the #emacs manual, Emacs Lisp Intro and Magit manuals.
-
#emacstip Use the interfactive function `base64-encode-region` to encode the current region in base64!
-
#emacstip Use the interfactive function `base64-encode-region` to encode the current region in base64!
-
#emacstip Use the interfactive function `base64-encode-region` to encode the current region in base64!
-
#EmacsTip: Patch definitions in #Emacs packages with #ElPatch!
-
-
CW: add emacs, gnus version numbers in email header
for some emails sent to our mailing list contain user-agent: emacs version x, gnus version x after to, from, subject in email headers.
actual
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"desired
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"
user-agent: emacs version x, gnus version xwhat should i add in .emacs or .gnus?
#LinuxForEveryone #debian #emacstip #gnus #gnu #helpwanted #question #emailclients #emailgeeks #email #emacs #emacs28
-
CW: add emacs, gnus version numbers in email header
for some emails sent to our mailing list contain user-agent: emacs version x, gnus version x after to, from, subject in email headers.
actual
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"desired
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"
user-agent: emacs version x, gnus version xwhat should i add in .emacs or .gnus?
#LinuxForEveryone #debian #emacstip #gnus #gnu #helpwanted #question #emailclients #emailgeeks #email #emacs #emacs28
-
CW: add emacs, gnus version numbers in email header
for some emails sent to our mailing list contain user-agent: emacs version x, gnus version x after to, from, subject in email headers.
actual
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"desired
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"
user-agent: emacs version x, gnus version xwhat should i add in .emacs or .gnus?
#LinuxForEveryone #debian #emacstip #gnus #gnu #helpwanted #question #emailclients #emailgeeks #email #emacs #emacs28
-
CW: add emacs, gnus version numbers in email header
for some emails sent to our mailing list contain user-agent: emacs version x, gnus version x after to, from, subject in email headers.
actual
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"desired
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"
user-agent: emacs version x, gnus version xwhat should i add in .emacs or .gnus?
#LinuxForEveryone #debian #emacstip #gnus #gnu #helpwanted #question #emailclients #emailgeeks #email #emacs #emacs28
-
CW: add emacs, gnus version numbers in email header
for some emails sent to our mailing list contain user-agent: emacs version x, gnus version x after to, from, subject in email headers.
actual
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"desired
to: "recipient email id"
from: "sender email id"
subject: "something which is short & precise"
user-agent: emacs version x, gnus version xwhat should i add in .emacs or .gnus?
#LinuxForEveryone #debian #emacstip #gnus #gnu #helpwanted #question #emailclients #emailgeeks #email #emacs #emacs28
-
#EmacsTip: Recursive minibuffer is a great feature of Emacs. With minibuffer you can invoke a command on an usual buffer, and with recursive minibuffer you can invoke a command on a minibuffer (recursive or not). The built-in #MbDepth package is also very useful, it'll show the recursion depth of the current minibuffer when in a recursive minibuffer.
https://www.gnu.org/software/emacs/manual//html_node/elisp/Recursive-Mini.html
-
#EmacsTip: Have many windows in your Emacs and want to switch windows quickly without touching the mouse? Try #IWindow, or #AceWindow, they allow to switch to any window rapidly even when you have hundreds of windows. Have problem choosing one? Just roll a dice, both have extremely similar interface.
https://codeberg.org/akib/emacs-iwindow
https://github.com/abo-abo/ace-window -
#EmacsTip: How about highlight commands in Eshell? Check out #EshellSyntaxHighlighting!
-
#EmacsTip: Do you think your #Gnus summary buffer should be better/more like email client/fancier/cooler/<insert anything here>? Check out the "gnus-summary-line-format" user option, customize it to make #Gnus look whatever you want!
Here is the documentation: (info "(gnus) Summary Buffer Lines")
And if you like your browser: https://www.gnu.org/software/emacs/manual/html_node/gnus/Summary-Buffer-Lines.html -
#EmacsTip: Want to your auto-completion UI (#Company, #Corfu, etc) in your shell? Check out #BashCompletion, it allows you to use #GNU #Bash as a completion backend in your #ShellMode, #Eshell or #Term.
https://github.com/szermatt/emacs-bash-completion
#Emacs #BashCompletion #Completion #AutoCompletion #GNU #Bash
-
#EmacsTip: You don't need to use the default scroll bar in #Emacs. The #mlscroll package implements a nice and fast mode line scroll bar, which you can use even in a text terminal.
-
#EmacsTip: If you are new to #Emacs, you should use a ready-made configuration for the first time. If you want a sophisticated editor, go to starter kits like #DoomEmacs or #Spacemacs. But if you want something that you can learn from, and still pretty complete, Emacs Configuration Generator by @pkal is definitely for you.
#Emacs #EmacsConfiguration #InitEl #EmacsConfigurationGenerator
-
#EmacsTip: There's even a system information package similar to #Neofetch in #Emacs, #ElFetch!
-
#EmacsTip: Remove visual distractions with #Darkroom!
-
#EmacsTip: Do want the power of Emacs in your shell? Enter #ShellMode, a specialized mode for command shell. It allows you to write shell command, run Emacs commands on your incomplete shell command and output. Before you say that it isn't a proper terminal emulator, I would like say, it is! With #Coterm, you can run any full screen terminal program in #ShellMode.
Shell: https://www.gnu.org/software/emacs/manual/html_node/emacs/Interactive-Shell.html
Coterm: https://elpa.gnu.org/packages/coterm.html -
#EmacsTip: #AggressiveIndent keeps your code always indented, so that you can focus on what matters, programming, instead of wasting your valuable time indenting the code.
https://github.com/Malabarba/aggressive-indent-mode
#Emacs #AggressiveIndent #Indent #AutoIndent #Indentation #AutoIndentation
-
#EmacsTip: You can even do #InstantMessaging with #XMPP (also known as #Jabber) in #Emacs with #JabberEl!
Hosted on @Codeberg:
https://codeberg.org/emacs-jabber/emacs-jabber -
#EmacsTip: The default #minibuffer #completion #UI may seem to be boring. So there is #Vertico, a vertical completion UI. Unlike many other completion UIs, it's 100% compatible with #Emacs completion API, so all #Emacs packages that properly support #Emacs also support #Vertico. #Vertico has a customizable #UI, just check out its README to get an idea.
-
#EmacsTip: Do you know what's the most flexible and powerful email client? It's #Gnus, an #Usenet newsreader! It's so much extensible that other Email clients that:
"gnus is to emacs users what emacs is to other users" --- Topic for #gnus on @liberachat
https://www.gnu.org/software/emacs/manual/html_node/gnus/index.html
-
#EmacsTip: Do really need to type something as long as "add-file-local-variable-prop-line" to invoke a command? No, #Orderless makes the completion UI much more smart and convenient. In addition to literal matches, it allows you to use #RegularExpression and other things to find something. And best thing about it is: you don't need to remember the exact name, just type some part of it in any order, and #Emacs will complete it for you.
-
#EmacsTip: Quickly mark your misspelled words on-the-fly with #SpellFu in #Emacs! Install from #NonGNUELPA.
Hosted on @Codeberg:
https://codeberg.org/ideasman42/emacs-spell-fu -
#EmacsTip: Does someone use old but good #IRC? #Emacs has nine different clients for #IRC! Choose between #ERC, #Circe, #rcirc. There are six more clients, despite being less popular and discontinued, are worth checking out: #IrChat, #Liece, #Riece, #ZenIRC, #ii-mode and #WeeChatEl.
ERC:
https://www.gnu.org/software/emacs/erc.html
https://en.wikipedia.org/wiki/ERC_(software)Circe:
https://github.com/emacs-circe/circeRcirc:
https://www.gnu.org/software/emacs/manual/html_node/rcirc/index.html
https://en.wikipedia.org/wiki/Rcirc#EmacsWiki (describes them all):
https://www.emacswiki.org/emacs/InternetRelayChat -
#EmacsTip: Ever tried to run a command but something unexpected happened because you pressed a wrong key, and you can't figure out what command did you just run? Press C-h l (view-lossage), all key sequences you used will be listed in a Help buffer, along with the commands you ran by those key sequences.
-
Very good explanation of Emacs completion styles:
Highly recommend it.
-
Recently discovered a highlight feature of emacs, which makes it dead simple to change the face for a particular text. Check M-s h C-h, also take a look at hi-lock.el.
Thanks to Bhaskar Chowdhury.
-
When editing a file in Emacs `C-h S` allows to see the documentation for symbol at point or other item relevant to major mode (can be typed in minibuffer prompt).
For Texinfo files it will be searching entries in Texinfo manual, for shell files it will look up Bash, gawk, sed, coreutils, diff info pages.
This behavior is controlled by info-lookup-alist variable. Learn more with `C-h v info-lookup-alist RET`.
-
When editing a file in Emacs `C-h S` allows to see the documentation for symbol at point or other item relevant to major mode (can be typed in minibuffer prompt).
For Texinfo files it will be searching entries in Texinfo manual, for shell files it will look up Bash, gawk, sed, coreutils, diff info pages.
This behavior is controlled by info-lookup-alist variable. Learn more with `C-h v info-lookup-alist RET`.
-
If I have a sudo or other interactive command in a Makefile I run compile/project-compile with universal argument to make Emacs prompt for interactive shell input.
C-u M-x compile
M-x recompile -
If I have a sudo or other interactive command in a Makefile I run compile/project-compile with universal argument to make Emacs prompt for interactive shell input.
C-u M-x compile
M-x recompile -
Did you know that you can navigate magit status buffer elements with imenu?
consult-imenu in my case.
-
The dired trick from Protesilaos' video:
`C-u s` in dired buffer allows to set ls switches and immediately update the content.
For example -R will show all subdirectories the same way as `dired-maybe-insert-subdir` do for one dir, changing some other switches will provide different output format.
I use it rarely, but sometimes it's handy. Read `man ls` for more information.
-
The dired trick from Protesilaos' video:
`C-u s` in dired buffer allows to set ls switches and immediately update the content.
For example -R will show all subdirectories the same way as `dired-maybe-insert-subdir` do for one dir, changing some other switches will provide different output format.
I use it rarely, but sometimes it's handy. Read `man ls` for more information.
-
To make guix search and other commands not to throw "WARNING: terminal is not fully functional", I set PAGER environment variable in my eshell to empty value.
(add-hook 'eshell-mode-hook (lambda () (setenv "PAGER" "")))My other eshell settings:
https://git.sr.ht/~abcdw/rde/tree/e0b49054ccc1a624c09cfa456fa0885731de8f1b/rde/features/emacs.scm#L404