path: root/blog/entry/apr22emacs.mdwn
diff options
authorSean Whitton <>2022-04-21 13:42:06 -0700
committerSean Whitton <>2022-04-21 13:43:12 -0700
commit898462f5217e22daa1a570b395d5527a6b88e9a0 (patch)
tree17ae25633650a7d84dbc7e2383c95697f7f637d4 /blog/entry/apr22emacs.mdwn
parenta839dcf91ac58f36a7eccd50b6f5295f725eab14 (diff)
new blog entry
Diffstat (limited to 'blog/entry/apr22emacs.mdwn')
1 files changed, 61 insertions, 0 deletions
diff --git a/blog/entry/apr22emacs.mdwn b/blog/entry/apr22emacs.mdwn
new file mode 100644
index 0000000..6e84cc7
--- /dev/null
+++ b/blog/entry/apr22emacs.mdwn
@@ -0,0 +1,61 @@
+[[!meta title="Recent additions I've made to GNU Emacs"]]
+[[!tag tech Emacs]]
+Here are a few new features I've added to upstream GNU Emacs recently. Text
+is adapted from the in-tree documentation I wrote for the new features.
+Thanks to everyone who offered feedback on my patches.
+# New feature to easily bypass Eshell's own pipelining
+Prefixing `|`, `<` or `>` with an asterisk, i.e. `*|`, `*<` or `*>`, will
+cause the whole command to be passed to the operating system shell. This is
+particularly useful to bypass Eshell's own pipelining support for pipelines
+which will move a lot of data.
+This has long been an obstacle when it comes to using Eshell as one's main
+shell. The new syntax is easy to use and covers a lot of different use cases.
+# New Eshell module to help supplying absolute file names to remote commands
+After enabling the new `eshell-elecslash` module, typing a forward slash as
+the first character of a command line argument will automatically insert the
+Tramp prefix. The automatic insertion applies only when `default-directory`
+is remote and the command is a Lisp function. This frees you from having to
+keep track of whether commands are Lisp function or external when supplying
+absolute file name arguments.
+This is another attempt to solve an Eshell papercut. Suppose you execute
+ cd /
+ find /etc -name "*gnu*"
+and in reviewing the output of the command, you identify a file `/etc/gnugnu`
+that should be moved somewhere else. So you type
+ mv /etc/gnugnu /tmp
+But since `mv` refers to the local Lisp function `eshell/mv`, not a remote
+shell command (unlike find(1)), to say this is to request that the local file
+`/etc/gnugnu` be moved into the local `/tmp` directory. After you enable
+`eshell-elecslash`, to then when you type the above `mv` invocation you will
+get the following input, which is what you intended:
+ mv / /
+# `imenu` is now bound to `M-g i` globally
+This is a useful command but everyone has to come up with their own binding
+for it. No longer.
+# New macro-writing macros, `cl-with-gensyms` and `cl-once-only`
+These two macros are quite interesting. In the history of Common Lisp-style
+macros, these are the only two macro-writing macros that have emerged as
+essential tools for intermediate and advanced macrology. Most any other
+macro-writing macros are either project- or programmer-specific. In his book
+on Lisp macros [Doug Hoyte
+proposes]( an alternative
+to `defmacro`, `defmacro!`, which is just the same as `defmacro` except that
+it builds in a facilty equivalent to `cl-with-gensyms` and `cl-once-only`.
+I've long wanted to have these macros available in core Emacs Lisp, too, and
+now they are.