I use emacs – with a server1 and client setup – so that I
can quickly open new files in it using
emacsclient. My typical setup
is to have
tmux on one monitor and a single emacs(client)
frame on another. But there are times when I do not want to
shift focus from one monitor to another, like when I just need to
review some log file. So I started using an alias to
emacs -nw -Q to
quickly open log files, review, filter, and
Of course, that’s not where this post ends. An alias was no longer adequate to do what I wanted it to do more ..
I typically do my text editing in the emacs frame, while do just
non-editing actions like viewing, navigating, searching, filtering in
quick emacs sessions from
I wanted that “tmux emacs” to be independent of my config, independent
of the server – Just something really quick that I can launch, do,
and quit. I wanted something like
less, but better .. better in
- Do syntax highlighting
- Render Org-mode files
- A better navigable man page viewer
- Dired, especially
wdired(batch edit symbolic links, for example?)2
- Show colored diffs
- Filter log files to only show or not show lines matching a regexp
- Start auto-reverting log files when I want (like
- Quickly change frame and font sizes
- .. and more; basically everything that emacs has to offer!
I call it
eless and here’s a little taste of what it looks like:
As a bonus:
Try it out and let me know how you find it. As you will see,
eless is a bash script where most of it is a string containing a
sane emacs configuration for
view-mode. I wanted
eless to be a
monolithic script, and not a multi-file setup.
eless -h | eless
- Always start the emacs process in a sub-shell, and
/dev/ttyinto that emacs instance.
That way, that emacs instance would always think that it is receiving input from tty – even when the wrapper bash script is receiving input from the pipe.