Hi Metasearch.el

One of the less obvious super powers of Emacs is its ability to start any shell command. In the past few days I put together a small package that uses this to start web searches from within Emacs:

Metasearch.el allows to simultaneously use the same search string in multiple search engines. Search engines can be organised and called in sets. Active regions are respected (as the search query).

For more info see https://github.com/rtrppl/metasearch.

A fun alternative to LLMs 🙂

Add a website from Emacs to Things’ inbox

This code snippet will quickly add a website from any Emacs buffer to Things‘ inbox. The name of the new task is the name of the website, the URL is added as a note. It requires org-web-tools, uses the URL-scheme of Things and in Emacs the cursor must be on the URL you want to add. Everything happens in the background, the focus continues to be on Emacs.

 (cl-defun lt/add-url-to-things (&optional (url (org-web-tools--read-url)))
    "Add a website to Things' inbox."
    (interactive)
      (let* ((html (org-web-tools--get-url url))
         (title (org-web-tools--html-title html)))
         (setq things-url (concat "things:///add?title=" title "&notes=" url))
         (shell-command (concat "open " "-g " "\"" things-url "\""))
         (message "%s" (concat "\"" title "\"" " has been added to Things."))))

Backstory: I’m checking Mastodon with via mastodon.el in Emacs and often encounter interesting websites that I want to come back to later. In the past I’ve used pocket-reader.el to add these sites to Pocket. But this feels like wasting them – I don’t check Pocket just for fun and often just forget that I’ve added something there. Things is (currently) my task manager (despite using org-mode for a lot) and I like to process my findings here.

Reading Chinese

One reason I enjoy working with Emacs is the relative ease to process text in specific ways. One example: reading Chinese official documents can be quite exhausting, so I let them read to me. For a long time I used read-aloud.el for that. Unfortunately, macOS Ventura broke this package from 2016 – but I was able to replace it with this tiny function:

(defun lt/read-chinese (start end)
"Read region in Chinese."
(interactive "r")
(shell-command-on-region start end "say -v Ting-Ting"))