RSSAmplifier

Blog

#:acid 'words

about EDE Desktop, Lisp and other hacks...

acidwords.comRSS feed ↗18 posts

Latest posts

evil-mode in terminal without Alt/Meta

This morning I found the following post on reddit /r/emacs: Evil mode on a vt100 and I recalled having the same issue with terminal Emacs in xterm. By default, xterm emulates VT102, and behaving like VT100, will not send Alt/Meta key to Emacs without this workaround.In short, the workaround to send M-x in evil-mode even if Alt/Meta doesn't work is to use this combo: \ Esc-x. \ will temporarily…

Faster man pages rendering

If you try to open rclone or gcc man pages with Emacs, you'd be surprised how unpleasant that experience can be. Those pages are over 30K lines and Emacs will became unresponsive easily. For how long will depend on your CPU.To speed up things, setting Man-fontify-manpage-flag to nil can alleviate this problem - it will disable highlighting of a man page and buffer can be somehow usable.…

Edit files in (remote) Docker containers

I always had problems remembering Docker commands: to run a shell in a container, should I use docker run or docker exec? Wait, I probably need to "attach" the terminal to the running container. No problem, let's try docker attach. Ooops...These commands initially made no much sense to me - run and exec sounds like an alias to me and attach; well, Docker authors clearly had the idea that attaching…

Open (un)compressed file in Emacs

In Emacs, when you open a compressed file like foo.txt.gz, it will transparently decompress it (using gzip in the case above) and open as a regular file. However, what will happen if the above file is not compressed at all?Here is my case. I'm using excellent rclone to open remote S3 drives by mounting them in the local folder. From there, Emacs and dired works much better than any TRAMP hack I…

Handle Chromium & Firefox sessions with org-mode

I was big fan of Session Manager, small addon for Chrome and Chromium that will save all open tabs, assign the name to session and, when is needed, restore it.Very useful, especially if you are like me, switching between multiple "mind sessions" during the day - research, development or maybe news reading. Or simply, you'd like to remember workflow (and tabs) you had few days ago.After I decided…

ido-mode with eshell, shell, sql and more...

ido-mode doesn't provide completion for eshell, shell or sql-mode out of the box, and I wasn't been able to find any package with this option that is lightweight enough (Helm, I'm looking at you). So, after few attempts, here is the code for that:After evaluating the code, in eshell simply execute M-x ido-eshell-comint-history and magic will happen - you will get full eshell history managed by…

declutter - read online content without clutter

Last two days I've been hacking on a small Emacs mode called declutter and this will be the first version announcement.What is declutter and why?I often use Emacs to read long, online articles, which gives me plenty of options - I can save text for offline reading, I can read content with my favorite color and terminal setup, I have my shortcuts for fast navigation and so on.

Emacs, git, gpg and 'failed to sign the data'

I'm not sure is this (un)common case, but when I used git with signing commits from Emacs with VC or Magit, I was getting this:Curiously, many had similar problem, but not from Emacs which is my case. On other hand, git signing from terminal worked without any problems for me.

Extending org-mode Easy Templates

I frequently use org-mode Easy Templates and I noticed I often miss shortcut for comment block (BEGIN_COMMENT/END_COMMENT) which is very useful from time to time.Let's add that feature.

Distraction-free EWW surfing

Sometimes when I plan to read a longish html text, I fire up EWW, a small web browser that comes with Emacs.However, reading pages on larger monitor doesn't provide good experience, at least not for me. Here is an example:

Closing all parentheses at once

While watching interesting presentation called Inspiring a future Clojure editor with forgotten Lisp UX, I've noticed author mentioned one really cool feature I was looking for some time - Interlisp's super-paren.In short, Interlisp had this unique super-paren option, bound to ] key, that would close all opened parentheses at once.To my knowledge, Emacs doesn't have something like this out of the…

Displaying org-mode appointments in calendar

One neat feature of org-mode agenda is ability to display appointments in Emacs calendar. Sadly, this isn't obvious nor enabled by default - I discovered it accidentally by browsing through Emacs themes screenshots.In screenshot below, you can see highlighted days with planned meetings and scheduled work in my calendar.

Literate programming with Monroe and org-mode

I'm starting to like literate programming with org-mode more and more, so I decided to try it in a small Clojure project. I'm aware of Marginalia, but since I'm planning to mix Clojure code with shell scripts and draw some charts, Marginalia won't be much of a help here.By default, org-mode does not have support for Monroe as REPL backend, and with some elisp bending, we are going to add it.The…

Collapsing all filter groups in ibuffer

If you have to cope with large number of buffers, ibuffer is the only way to keep things manageable. It has support for filtering, sorting and, my favorite, grouping, which is indispensable when you are switching often between various projects and file groups like I do.However, one thing I always missed is ability to collapse all groups at once - a handy functionality when you have 10-30 groups…

Unique buffer names in Emacs

When I work on large codebase done by more than one developer, I often find this pattern:Of course, this isn't the case with Java or Clojure only; this can be found in almost any larger project no matter what language is used. After all, folders are invented to keep the files under different namespaces, right?

Notmuch and Addressbook handling

I always had a problem with managing my email contacts, not because I'm lazy, but because tooling for that was/is really crude. In most cases (actually, in all cases AFAIK) I'd have to do it manually, by marking target address so the mail client knows what to store or do the hard work, open addressbook editor and fill necessary details.For example, in Mutt (which I used before) I'd have to press…

evil-mode and xml folding

Recently I went back to Maven's pom.xml editing and still can't get that nice warm feeling with Eclipse. Yet.So, I was thinking, why not fire up Emacs (with evil-mode of course) and reuse all that folding goodness we get out of the box.The thing is, Emacs does not support xml folding out of the box, but thanks to this awesome tip from Jordon Biondo, you can easily add it. Here is a little bit…

Emacs as default file manager in EDE

Just stumbled on this really neat post on how to setup Emacs as default file manager in Ubuntu. So, why we don't do the same in EDE?First create a script named dired and save it in known place, e.g. your $HOME folder, with this content (I found it here):