Elfeed Tweaks

On Thursday, Mike Zamansky published a video on some tweaks he made to Elfeed. As soon as I wrote and published a post about it, I found two more posts on hacking Elfeed to make it better fit the tweaker’s workflow. The first, by Álvaro Ramírez, was directly inspired by Zamansky’s post and shows a way of opening an Elfeed entry in a browser without losing focus. That’s convenient if you like to skim through the entries and open the ones you find interesting in a browser tab for later reading.

As Zamansky demonstrates in his video, Elfeed does allow you to open multiple entries but you lose focus to the browser. Ramírez’s method keeps you in Elfeed until you’re ready to change to the browser and read all the interesting articles.

The second post, by Karthins, considers several hacks to adjust Elfeed to his liking. These include:

  • Split pane for index and current entry
  • Navigating the Elfeed database with the space bar
  • Easier tagging
  • Using EWW on a per entry basis to display posts

If you use Elfeed—and if you’re an Emacs user, you should be—be sure to take a look at these two posts. You may or may not like the changes they implement but even if you don’t, they show nice examples of how easy it is to adjust Elfeed to your needs.

Posted in General | Tagged , | Leave a comment

Zamansky 72: Customizing Elfeed

Mike Zamansky has a new video up in his Using Emacs Series and an update on his last video (Zamansky 71: Openwith). Let’s deal with the update first.

As you’ll recall, the problem Zamansky was trying to solve was being able to open a file in Dired with an external application. He found a solution but then discovered that it interfered with his mail client, mu4e. It turns out that Dired already has a built-in solution although you can be forgiven for not knowing about it. It’s not on the Dired reference card for Emacs 26 and even knowing what it was and the name of the function implementing it, it was still hard to find.

The answer is to press W on a Dired entry to open the file in your default browser. Despite the name of the function, browse-url-of-dired-file, it will open any file that the browser can display. That’s exactly the behavior that Zamansky was looking for: problem solved.

The current video documents a change Zamansky made to the behavior of Elfeed and the process he went through to accomplish it. When I’m reading my Elfeed entries, I usually start at the top and go down the list by pressing n after I finish an entry. If the original post/article looks interesting or offers more information, I may press b to bring it up in my browser. That’s the default behavior of Elfeed.

Zamansky’s workflow is different. He likes to stay in the index and rather than reading the RSS entry, he presses b to open the entry in his browser. When you do that, Elfeed marks the entry as read but many times Zamansky just glances at the entry in the browser with the intention of reading it later. That means he has to mark it as unread so it doesn’t disappear from the index. He wanted to find a way of displaying the entry in the browser but not mark it read.

Most of the video shows the process he went through to discover how to do that. His point is that Emacs makes such discovery fairly easy. He did have a problem with an anaphoric it but solved that too with a little experimentation. The takeaway is that you don’t need to be an Emacs internals expert or even an Elisp expert to make Emacs suit your work flow.

Take a look at the video for all the details. It’s about 12 and a quarter minutes so plan accordingly. Also be sure to read his post if you want the details on the update.

Posted in General | Tagged | Leave a comment

The NYT and Customer Surveillance

Irreal has been railing against adtech and the malware that advertisers download onto our computers to facilitate their tracking for a long time. Despite pretty compelling evidence that it doesn’t work, its use continues unabated. There is, however, a modicum of good news. Sort of.

The New York Times has announced that beginning next year they will no longer use 3rd-party data to target their advertisements. That means that they will no longer buy customer data from third parties to use in targeting their advertisements. That’s not great; they’re still collecting our information but at least it’s information we’ve revealed to them directly rather than data vacuumed up by tracking cookies and other sketchy methods.

Part of their decision is apparently because of the growing backlash against spying on our Internet activities and a desire to be seen as on the right side of the privacy debate. That and the fact that most of the major browsers make collecting meaningful data and associating it with a given person much harder than it has been.

Some other publishers are following suit but the strategy of using your own data doesn’t scale very well. The NYT has 6 million subscribers and millions of registered users who have signed up for occasional access and newsletters. Small publishers don’t have the wherewithal to rely on their own data.

As I say, this isn’t unmitigated good news but it may be a leading indicator of a trend to move away from surveillance capitalism. Best of all, it’s bad news for Facebook, Google, and others who make their money spying on us and tracking us across the Internet. Their demise can’t come too soon to suit Irreal.

Posted in General | Tagged | Leave a comment

Advanced Usage of the Org Agenda

A great deal of my Emacs tube time is spent displaying the Org agenda. My use of the agenda is probably not standard: I use it mainly as a portal into my log type entries. There are some TODO entries but it’s mostly just the headlines from log/journal entries. Most people, I think, use the agenda as an agenda: as a list of appointments and things they need to do. If you’re one of those people, there are several things you can do to make the agenda more useful.

Vedang Manerikar is one of those people who uses his agenda to plan and run his day and he has spent some time making it as useful as possible. His video, Using Org-Agenda to run your life!, shows what his agenda looks like—spoiler: it’s not at all like the vanilla agenda—and some of the built-in shortcuts that he uses to interact with it.

The entire video is useful but what I found particularly useful (perhaps because of my abnormal use of the agenda) is the information he gives on entering dates and filtering agenda entries. I learned a few things that will definitely make my daily workflow easier. Even if you don’t use the agenda at all, the information on entering dates is worthwhile.

As for filtering agenda entries, it’s a much richer capability than I thought. You can filter on many different parameters, can combine multiple filters, and can refine filters by adding additional items. Take a look at the video to see how rich the capability is.

The video is 36 minutes 40 seconds long so you’ll need to schedule some time. It’s from a remote conference so there’s occasional distortion but it’s still worth watching.

Posted in General | Tagged , | Leave a comment

Setting the Initial Visibility of Magit Sections

Like most Emacsers, I very seldom restart Emacs. When I do it’s usually because I just finished my weekly ELPA update. Despite my extensive configuration, Emacs starts up reasonably quickly for me but I still hate restarting it. The major reason is Magit. I love Magit but the first time I open the status page, the “Untracked Files” and “Unmerged Info” sections are expanded. For various reasons, these sections are fairly large in some of my repositories so I always have to close them. If I don’t do that, disaster is only a keystroke away when I accidental stage a large collection of untracked files and freeze Emacs for a minute or two and then another long wait when I undo the erroneous staging.

Obviously, this is a situation crying out for a remedy. The obvious approach is to look for some variables controlling which sections are displayed initially. It’s not hard to find it. The magit-section-initial-visibility-alist variable is an alist that controls whether a section is shown or hidden. That seems straightforward but the problem is discovering the names of the sections. They’re not the labels shown on the status page. I checked the source code but couldn’t find a list of the names. Finally, I dropped back to basics and RTFM. The manual has a section on matching section names. There I found the magit-describe-section-briefly function that displays information about the section under the point. The information is meant to help maintainers with debugging so it’s not very end-user friendly. However, part of the output is [XXX status] and the XXX is the name we’re after.

With that information at hand, I solved my problem by adding

(setq magit-section-initial-visibility-alist
        '((stashes . hide) (untracked . hide) (unpushed . hide)))

to my init.el. If you have other sections you’d like to control, you can use magit-describe-section-briefly to discover their names and add them to the alist. The available options are show and hide.

Posted in General | Tagged , | Leave a comment

Work From Home Surveillance

Speaking of the downsides of working from home, NPR and CNBC have horrifying stories about the anal micromanagers requiring workers to install spyware on their computer and even their phones so they can track their every movement, keystroke, and mouse click. Employees are not amused. At all. The NPR story says that one employee went on unpaid leave rather than load the malware on her computer and is now spending her time looking for another job.

The sociopaths doing this doubtlessly consider themselves effective managers but all they’re doing is destroying moral and engendering cynicism. The end result is perfectly predictable: the good people will leave as soon as they can and the losers will stay but, hey, at least we know they’re not on Facebook or taking overly long bathroom breaks. Apparently these managers have never heard of ROWE and the concept of trusting your employees to get those results.

Austen Allred has a tweet the succinctly captures the madness of this approach to management:

As for the people building this software, they should be ashamed.

Posted in General | Tagged | Leave a comment

Roam Research

Those of you who have been paying attention know that I’m embarking on a project to implement a Zettelkasten to organize my notes and ideas. My current plan is to base this on Jethro Kuan’s org-roam. Org-roam is an Emacs package that attempts to replicate the capabilities of the Roam Research note taking application.

Given that the package I plan to use for the project is based on Roam, it’s worthwhile taking a look at Roam to get an idea of what it can do. Happily, Thomas Frank has a video that take a detailed look at the application. As you can see, Roam does an excellent job of implementing the Zettelkasten idea. It can even draw a graph of how your notes are linked. The program has already earned itself a cult following. All in all, it’s a great app.

Sadly, as with Notion, I can’t recommend Roam for the same reason I can’t recommend Notion: Your data lives on Roam Research’s servers and, as they say, they can terminate your account at any time for any reason. That doesn’t mean they will, of course, but the point of a Zettelkasten is to gather a lifetime’s collection of data and ideas and the last thing you need is to lose that data or even have your workflow destroyed. At least for the paranoid like me, an open source package that stores your data locally, as org-roam does, is a much safer bet.

Frank’s video is 14 and a half minutes long so you can probably watch it on a coffee break or at least easily find time to schedule it.

Posted in General | Tagged , , | Leave a comment

Emacs By Macros 6

Sahas Subramanian is back with another excellent episode of learning Emacs through keyboard macros. This video covers editing macros to correct or change a macro without starting over. If you have a long and complicated macro, that can be a real win.

He begins by showing how you can add some instructions to the last macro by simply calling kmacro-start-macro (usually bound to Ctrl+x ( or F3) with the universal argument. That can be useful but the real power comes from calling edit-last-kbd-macro. That brings up a buffer of the keystroke in the last macro and lets you edit them to correct errors or add or delete keystrokes. The nice thing about edit-last-kbd-macro is that there’s nothing to remember other than the name of the command so you can easily use it even though you probably won’t have the opportunity very often.

The video starts with Subramanian using occur to locate the function definitions in a C++ file. That’s tricky, of course, so the video provides an amusing real life example of building and correcting complex regular expressions. As I said last time, almost everyone watching Subramanian’s videos is going to bring experience with another editor with them so the idea regular expressions will be familiar and the video serves as a partial explanation of Emacs’ regular expression peculiarities.

Posted in General | Tagged | Leave a comment

Manhattan and Working From Home

Irreal readers know that I’ve been fascinated with remote work for a long time and consider it a good thing for most people and the companies they work for. COVID-19 has accelerated the trend as many companies—and their employees—discover that working from home is not only possible but actually works pretty well. This realization has led many companies to extend or consider extending their work from home programs post COVID-19. Indeed, Twitter has announced that most employees can work from home as long as they like.

Of course, as with every change of this magnitude there are unintended consequences. Manhattan in New York City is especially likely to suffer from those consequences. The big advantage for companies is, of course, that they save on expensive office rental fees. In Manhattan, Barclays, JP Morgan Chase, and Morgan Stanley alone rent office space amounting roughly to all that available in downtown Nashville. The consequences for the Real Estate industry are pretty clear but that’s only the beginning. Restaurants, corner bodegas, bars and many other small businesses depend on all those workers for their livelihoods. And then there’s the tax base. Real estate taxes account for about a third of the City’s revenue. Add in the loss of taxes from all those restaurants, bars, and so on, and it’s easy to predict that the city could take a huge hit.

Of course, New York City is famously resilient and has bounced back from such disasters as 9-11 but even many usually sanguine New Yorkers worry that this time might be different. As liberating as the remote work movement is for most people, it’s not without its dark side and that dark side could be devastating to many people and businesses large and small.

Posted in General | Tagged | Leave a comment

Zamansky 71: Openwith

Mike Zamansky, freshly back from a bout with COVID-19, has a new video in his Using Emacs Series that considers the openwith package. The backstory is a long standing annoyance in Zamansky’s workflow: although he can open non-text files such as PDFs, PNGs, docx, and others, he can’t edit them and Emacs will choke if the file is too large.

What he wanted was an easy way to choose a file from Dired and open it with an external app—LibreOffice for docx, for example. That would save him from cluttering his desktop with a bevy of unneeded windows. The openwith package lets you associate an application with a list of file extensions and Emacs will use that application to open any files with that extension. In particular, if you type Return on a file in Dired, it will be opened in the external application instead of Emacs.

There is, I think, a problem with this solution: it’s all or nothing. Either the file is opened normally in Emacs or it is always opened by the external app. You can’t choose. Even if you open the file normally with find-file, the external application will be invoked. In some cases, it’s convenient to use the external app, and it others it’s more convenient to open the file in Emacs but with openwith you can’t choose. Zamansky also sees this as a problem but feels he can live with it and, of course, he can always turn off openwith. To be sure, that’s a pain but the need to use both Emacs and an external application on the same file type is apparently rare in Zamansky’s workflow.

In the comments, Zamansky offers an update saying that he’s discovered that openwith interferes with his mail client, mu4e. That’s a deal breaker and Zamansky will probably hunt for another solution. If you aren’t a mu4e user, you may find openwith a useful addition to your workflow.

The video is 14 minutes long so schedule some time. As usual with Zamansky’s videos, you won’t want to miss watching it.

Posted in General | Tagged | Leave a comment