Zamansky 34: ibuffer and emmet

Mike Zamansky is back with the 34th video in his excellent Using Emacs series. This time he considers ibuffer and emmet. Most of you probably already know about ibuffer. I’ve used it since I started with Emacs and really prefer it to the default list-buffers. It turns out that it has some nice filtering and organizational capabilities that you might not be aware of. Zamansky covers these and points to a post by Martin Owen in case you want to see it written down.

The other package that Zamansky covers is emmet-mode, a fork of zencoding-mode. It’s a sort of super snippet package for HTML and CSS. It’s hard to describe so I’ll let you watch Zamansky’s video to see it in action. Arjen Wiersma has a slightly longer video that covers the same material. If you work with HTML or CSS you really want this package. There’s probably a bit of a learning curve (the cheat sheet is huge) but once you learn the basic patterns it has a certain tractive logic that makes it easier than it appears at first.

Zamansky’s video is just short of 11 and a half minutes so it should be easy to schedule some time for it while the coffee is brewing. Zamansky recommends that you take a look at Wiersma’s video too. That video is 12 and three quarter minutes so, again, it shouldn’t be hard to fit it in.

Posted in General | Tagged | 1 Comment

Using EWW as Your Default Browser (Sometimes)

As much as I like to stay in Emacs, most of my browsing is done in Safari. It provides a much better and richer experience than is (currently) possible in Emacs. Still, there are a lot of browsing tasks that are a natural fit for EWW. It’s just that I usually don’t remember to invoke it rather than a “normal” browser.

Over on the Emacs subreddit, emacsclient has nice suggestion that may work for some of you. He gives a small bit of Elisp that intercepts calls to the browse-url function and asks if you want to use EWW or your default browser. Depending on how often you call a browser from within Emacs, this may be a little distracting. Or maybe it’s just a nice way of conditioning yourself to think about using EWW more. Of course, many functions just call browse-url so perhaps emacsclient’s code is the best general solution.

Posted in General | Tagged | Leave a comment

How to Read Papers Efficiently

If you’re a researcher, or a grad student, or even just a diligent developer, you probably spend a great deal of time reading technical papers. Some of those will be of little or no use, some will be beyond your current understanding, and some will be very valuable and extend your knowledge. Piotr Limanowski has a very nice post that discusses strategies for reading those papers as efficiently as possible. Part of that, of course, is identifying which ones are worth further effort and which can be abandoned or saved for later.

Limanowski recommends a 3-pass approach in which the first two passes essentially winnow those papers worth spending time on and the final pass is where you read carefully and take notes. What I particularly like about his strategy is that he leverages Emacs and Org mode during the third stage. He uses pdf-tools to annotate the PDFs and Org mode to take notes that are linked to the PDF.

I’ve been intending to install pdf-tools for some time but the documentation says it’s not really supported under macOS so I’ve been reluctant to try. After reading Limanowski’s post, I followed the directions at the pdf-tools githup site and installed pdf-tools without a problem. It really is much better than the default Emacs PDF functionality.

Even if you’re not reading technical papers, you should take a look at Limanowski’s post. If you do anything with PDFs, it will give you some useful hints for improving your workflow. If you do read technical papers, the strategy he recommends is worth considering.

Posted in General | Tagged , | Leave a comment

More on Google’s Ad Blocking

When I first wrote about the changes coming to Chrome and Safari in the Adtech arena, I noted that some observers were worried that Google’s changes gave them too much power and could be abused. It turns out that they were right to worry.

The Intercept_ article linked above reveals what’s really going on. You really should read the whole thing but the TL;DR is that this is a Google strategy to first crush their competition by blocking their ads and second to do away with third party ad blockers, at least in Chrome. As I say, you should read the whole thing.

I’ve never been a big fan of Chrome—preferring to stick with Safari—so this doesn’t affect me one way or the other but Chrome is arguably the most popular browser so it does affect a lot of people. The Intercept_ article speculates that the DOJ could get involved if Google tries to push this too far. And, of course, the EU tends to be more aggressive about policing this sort of thing. It will be interesting to see what happens.

Posted in General | Tagged | 1 Comment

More on Mu4e

I know I’ve written a lot about Emacs and email lately but I can’t help myself—Stop me before I post again!—because there’s so much interesting material. Recently, I saw a pointer to a post from Martin Albrecht on his setup for using mu4e for email. More than most posts on the subject that I’ve seen, Albrecht has a carefully thought out, complete environment for email.

That includes such things as arranging to have email retrieved from his IMAP server on demand rather than constantly polling to see if there’s mail available, providing for footnotes in emails, using YASnippet to help generate boilerplate emails, arranging for special characters such as round quotation marks and math symbols to be used in the message body, and automatically using the correct dictionary depending on whether he is writing in English or German.

His solution for retrieving mail is particularly interesting. Rather than set a timer to have mbsync (or whatever) check for mail, he uses imapnotify to fire off mbsync when the server tells him there is mail ready. After mbsync finishes, imapnotify runs mu to index the new mail. This is how the native Mail app on macOS operates and it’s the one thing I’ve missed since moving to mu4e. As far as I can tell, imapnotify doesn’t run on macOS but it’s written in node.js (I think) so there’s probably no reason it couldn’t. Sadly, I don’t know anything about JavaScript, let alone node.js, but I’ve thought about adding a Mail app rule to fire off some Apple Script when mail arrives to do this, or perhaps using Automator somehow.

If you’re running on Linux and using mu4e and mbsync you should definitely take a look at Albrecht’s solution if your IMAP server supports IMAP IDLE. Actually, every Emacs user should take a look at his setup. It may give you a better email environment than you have now.

Posted in General | Tagged | 2 Comments

Apple Does it Again

In yet another privacy enhancing move, Apple announced that iOS 11 will no longer allow app developers to force always-on location services. If you’re like me, you became aware of this issue when Uber removed the “when App is running” option from their App’s location services so that users were forced to grant them permission to access their location at any time, whether or not the Uber App was running.

Uber claimed this was so they could figure out exactly where users were going after they were dropped off and use the data to provide better pick up services. Nevertheless, many users were uneasy with the move and some even resorted to manually disabling location services for the App except when they were actually using it.

That was an inconvenient and clunky solution that, happily, will no longer be needed. As of iOS 11, apps will be unable to disable the “only when running” option. Apple is also providing a mechanism to allow Apps to later request “always-on location services” after they have established some trust with the user. The post at the link has more details on this.

Apple deserves praise for this move and for building antitracking functionality into the new Safari. I wish other companies would be as diligent at protecting their users’ privacy.

Posted in General | Tagged | Leave a comment

Adtech Followup

As a followup to my post the other day on Adtech Progress, here’s some commentary from the EFF on the Google and Apple announcements. The TL;DR is that although the EFF welcomes both initiatives, they regret that Google, unlike Apple, has chosen not to do anything about tracking.

As I mentioned in my original post, the next version of Safari will have built-in antitracking technology. Chrome, on the other hand, will block the most annoying types of ads but will do nothing about tracking. That’s understandable, I guess, considering that Google’s business is based on Internet advertising but it should give one pause. If you live in the Apple ecosystem, this is a good reason to prefer Safari even if you otherwise like Chrome’s features. If you don’t want to do that, you should at least look into a plugin like Ghostery unless you don’t care about tracking.

Posted in General | Tagged | Leave a comment

Replacing Scrivener with Emacs

If you’re a writer who’s been using Scrivener, here’s a video on replacing Scrivener with Emacs and Org mode. The author is really a Vim guy so he’s using Evil but that’s really just a detail. His configuration as well as a link to the video is available so you can see how he set things up.

Again, it’s from the perspective of a Vim user but there’s a lot of good information. If you’re already an Emacs user and are using Scrivener or want to start a creative writing project, you should take a look at this video. It’s about 17 and a half minutes so plan accordingly.

Posted in General | Tagged | Leave a comment

Karl Voit’s Emacs Configuration

Karl Voit is an expert on organizing and storing information. One of his basic building blocks is Emacs and Org mode. It’s interesting, therefore, to see the history of how he’s organized his Emacs configuration. If you follow the link you can see how he’s progressed from an unorganized linear list of miscellaneous setq’s and defun’s to an Org-based configuration.

The impetus for moving to Org for his configuration was the growing importance of comments in his init.el. You can, of course, add all the comments you want to init.el but they’re hard to maintain because they’re hard to reformat. With Org, you just add text as usual and Emacs takes care of the formatting. The actual Elisp is in code blocks, which aren’t affected by changes in the surrounding documentation.

His current Emacs configuration is a long Org document that you can peruse for ideas. As Voit says, you don’t want to just blindly grab his configuration because some of it depends on his particular machines and environment but it is useful to see how he’s solved certain problems and what tools he’s using.

Posted in General | Tagged , | 1 Comment

Some Progress on Adtech

Regular readers know that Adtech is the general term for the technology that advertisers use to spy on us and collect information about our buying and surfing habits. It’s widespread, mostly fraudulent from an advertisers’ point of view, is a major malware vector, and is generally an unsavory enterprise. Now, finally, browser manufacturers are stepping up to do something about it.

Starting in early 2018, the Chromium browser will block ads that do not meet the Better Ads Standards. The standard does not address tracking ads but does call out some of the more annoying practices such as autoplay videos. There’s no mention of what, if anything, Chromium is planning on doing about tracking.

Meanwhile, Apple has announced that they will be rolling out changes to Safari that specifically addresses the tracking problem. It seems like a pretty sophisticated framework aimed at preventing advertisers from tracking users. You can read some of the technical details at the WebKit Blog. The new Safari will also block autoplay.

I welcome both these initiatives. Some have suggested that it gives Google (in particular) too much power but it’s still much better than the situation we find ourselves in today. As I’ve said before, I recognize that ads are the price we pay for the content we enjoy and I’m fine with the ads as long as they aren’t overly intrusive—like autoplay videos—and don’t track my browsing habits. Until the advertisers knock it off, I’m going to continue to use Ghostery and similar utilities but I welcome whatever help I can get from the browser manufacturers.

Posted in General | Tagged | Leave a comment