uBlock Origin, where have you been all my (web browsing) life?

Filed in UncategorizedTags: , , , , ,

Fiddling with my Firefox add-ons, I noticed AdBlock Edge is no longer under development. Get uBlock Origin, the notice advocated. (uBlock Origin :: Add-ons for Firefox)

So I did.

Wow. Wauw.

If you’re using an AdBlock, ABP or ABE, I recommend the move to uBlock Origin. I’m yet to try the other uBlock.

I’m writing an ad blocking post, the ethics and effectiveness. Stay tuned!

uBlock Origin & Buffer playing nice

Filed in UncategorizedTags: , , , ,

I fixed a problem I’ve long experienced with ad blocking add-ons in Firefox and the Buffer add-on with Fanboy’s lists.

In your ad blocker of choice, mine is uBlock Origin, add the following filters:


If you use another sharing add-on, a similar set of filters may fix issues with ad blockers.

Share & Enjoy!

Emacs OrgMode: Changing File Name Extension to .txt

Filed in Emacs, Org-Mode

Trying to view my org-mode files with .org extensions where Emacs isn’t installed is a Pain In The Ass (PITA).

I renamed all of my .org files to .txt. Where I haven’t made the first line of the file:

#-*- mode:org; coding:utf-8 -*-

… I manually execute:

M-x org-mode

I know I can associate org-mode with .txt file extensions. I’m not sure I want to do so just yet.


Calendar location, solar.el, and theme-changer

Filed in EmacsTags: , ,

Trying to address my dbus issue I started a fresh rebuild of my Emacs environment on Windows 8.1 x64. I pulled 24.5 from the mentioned sources plus the other bits. I built a configuration slowly, deliberately, and with intent.

I only configured twelve packages when I started to bring over my theme settings. Solarized light and dark are my jam. I love the clean informative simplicity of smart-mode-line. I rely on theme-changer to reconfigure my settings based on the sun rise and set.

The problem? My simple configuration failed with the error “Wrong type argument: number-or-marker-p” when using theme-changer. You can find the solution including how I discovered it here. In summary, the PC’s time zone had to match the calendar location configured, otherwise solar.el, a built-in package theme-changer relies on, throws that unhelpful error.

If you change your machine’s time zone to match your emacs config or alter your emacs config to match your time zone, the error is resolved.

Here are the relevant sections of my configuration in case you want to copy:
calendar-location-name "Amsterdam, NL"
calendar-latitude 52.36
calendar-longitude 4.90
;;  calendar-location-name "Detroit, MI"
;;  calendar-latitude       42.46
;;  calendar-longitude     -83.13
(use-package smart-mode-line
:ensure t
(sml/apply-theme 'dark)
(use-package fancy-battery
:ensure t
(fancy-battery-mode 1)
(use-package solarized-theme
:ensure t
solarized-distinct-fringe-background t
x-underline-at-descent-line          t
solarized-high-contrast-mode-line    t
solarized-scale-org-headlines        nil
(use-package theme-changer
:ensure   t
(change-theme 'solarized-light 'solarized-dark)
(change-theme 'smart-mode-line-light 'smart-mode-line-dark)

Yes, I know I don’t follow proper elisp formatting.

Emacs 24.4+ on Windows & dbus

Filed in UncategorizedTags: , , , , , , , , ,

I made the cardinal mistake of feeling “good” about my Emacs configuration. I built it on GNU/Linux (LinuxMint Rebecca, to be more precise). The same configuration worked well on OS X and Windows 7 64-bit.

Or so I thought! <insert dramatic theme music here>

Two tasks I only attempted on Linux, org2blog posting to WordPress and joining various IRC channels with ERC, fail on those two platforms. I receive the message

dbus-call-method: peculiar error: “Emacs not compiled with dbus support”

Dbus support on Windows is improving, but is not ready for prime time as best as I can tell. On OS X it’s better. It does leave me scratching my head why such an OS-specific library is a requirement of ERC, an Emacs built-in function.

I’m about to hop on another flight. I’ll let you know if I solve this in transit.

Fix for Emacs in Gnu/Linux under VirtualBox

Filed in Emacs, GNU/Linux, WindowsTags:

I use Oracle’s VirtualBox on my employer issued laptop. I’ve vented on Twitter about my frustrations with the product.

One such frustration, one which nagged me slightly below my “drop everything and fix it” threshold, was the inability to make use of the right Control key on the laptop and external keyboards. When I issued any key chord relying on the control key, nothing happened.

This morning my frustration boiled over to the point where I banged on the malfunctioning Control key repeatedly. VirtualBox popped up a dialog box reminding me of its role as the “Host” key. The metaphorical light bulb over my head suddenly illuminated.

I switched back to the host OS, Windows 7. In the Oracle VirtualBox window I selected FilePreferences from the menu. Select Input, and then the Virtual Machine tab. At the Host Key Combination line, erase Right Ctrl and input a new one. For reasons yet investigated, only modifier keys are available. I chose a key combination unlikely in my Emacs config – Right-Shift + Right-Ctrl + Alt.

The setting takes effect immediately without having to restart the guest virtual machine.

Why I don’t use Cygwin

Filed in Emacs, GNU/Linux, Non-Free, WindowsTags: , , , ,

My work PC unsurprisingly runs Windows, specifically Windows 7 Enterprise. When customer engaged the PCs they provide unsurprisingly run Windows, typically Windows 7 Professional or Enterprise.

If I can use Gnu/Linux, be it on the “bare metal” or virtualized, that’s my preference. I want that clear at the outset.

Usually I can’t run a proper Gnu/Linux environment at a customer’s site. There are many reasons that I won’t go in to. That they deny my first choice is OK. While not optimal it is more than workable. I see it as a challenge.

When I’ve mentioned this to others, often they ask “Why don’t you use Cygwin?” Cygwin, for those who don’t know, is basically a *nux abstraction layer for Windows similar to what WINE provides as a Windows abstraction layer for *nix environments.You can DuckDuckGo for more information and a better explanation.

My biggest problem with Cygwin is that often I am prevented from running it in a corporate environment. Anti-virus, anti-malware, endpoint protection, content filters, proxies, next generation firewalls, and other mechanisms prevent the download or install or execution of Cygwin.

That alone means I cannot rely on Cygwin in many contexts.

Next, many Gnu utilities like Emacs compile natively on Windows and/or are available as native binaries, rendering Cygwin unnecessary. Non-Gnu *nix utilities are also available in similar forms. Most make it through the security mechanisms described, and if so rarely does an organization’s security or compliance team balk at them with a decent use case.

Third, many Windows environment scripting challenges are better met through Powershell than *nix shell scripts. For example, anything remotely Active Directory related can, in my opinion, be done better in Powershell. Plus often I have to provide knowledge transfer to the local IT resources, often Windows administrators.

What I Use:

There may be some bits and bobs from other sites, but these make up the main part of my portable workable environment.

I have a bigger write-up coming describing how I set up my Emacs environment in Windows.

What are your thoughts?

Emacs 24.4, ERC & SASL

Filed in EmacsTags: , , , ,

UPDATE 30June2015: Fixed formatting and some missing lines.

Occasionally I connect to ERC over my personal VPN. I run into a problem with freenode.net. It flags my VPN as such and requires me to use SASL to connect.

I found the erc-sasl project on githib at [https://github.com/joseph-gay/erc-sasl]. According to the author’s comment at [http://www.emacswiki.org/emacs/ErcSASL] the erc-login function in elc.el must be modified in addition to copying the erc-sasl.el file into the load-path.

Here’s what I did:

  1. Get the erc-sasl.el file from the repository above. Place it in your load-path.
  2. In your emacs init file, add the following:
;; authentication

(defun erc-login ()
  "Perform user authentication at the IRC server."
  (erc-log (format "login: nick: %s, user: %s %s %s :%s"
           (or erc-system-name (system-name))
  (if erc-session-password
      (erc-server-send (format "PASS %s" erc-session-password))
    (message "Logging in without password"))
  (when (and (featurep 'erc-sasl) (erc-sasl-use-sasl-p))
    (erc-server-send "CAP REQ :sasl"))
  (erc-server-send (format "NICK %s" (erc-current-nick)))
   (format "USER %s %s %s :%s"
       ;; hacked - S.B.
       (if erc-anonymous-login erc-email-userid (user-login-name))
       "0" "*"

You can also edit the system’s erc.el, replacing erc-login with this one. You may need to recompile the *.elc files if you get errors.

  1. Add the following to your Emacs initialization file
(require 'erc-sasl)
(add-to-list 'erc-sasl-server-regexp-list ".*")


(use-package erc-sasl
    :config(add-to-list 'erc-sasl-server-regexp-list ".*")

Let me know how it works for you. If there’s interest I will post code and patches and whatnot.

Cross Platform System-wide Org-Capture

Filed in BSD, Emacs, F/OSS, GNU/Linux, Org-Mode, OS X, Unix, WindowsTags: , , , , , ,

Here’s how I leverage Emacs org-capture from wherever I am in Windows, OS X, and other Unix and Unix-like operating systems.

I use F9 as my global capture key. It will either switch to or launch Emacs and then send [Ctrl]-c c to trigger org-capture. This way, no matter what I’m working on I’m one keystroke away.


Install AutoHotKey and add the following to your autohotkey.ahk script:


; org-capture
If WinExist("ahk_class Emacs")
Send ^{c}
Send {c}
Run "runemacs.exe"
WinWaitActive, emacs
Send ^{c}
Send {c}


Save the file. Reload the script (right click on the notification icon and select “Reload This Script”). You can find the original version of this on my personal blog from 2011.

Gnu/Linux & BSD & Unix

Install autokey-gtk or autokey-qt depending on your desktop environment. In the main window create a new script and paste the following in:


import subprocess
command = 'wmctrl -l'
output = system.exec_command(command, getOutput=True)

if "emacs" in output:
    window.activate("emacs", switchDesktop=True)




Assign F9 to the hotkey. Click Save. Thanks to the autokey-users group for their help troubleshooting my typos!


There are two ways I’ve accomplished this. The first is to use Keyboard Maestro if you already have it. Create a new macro called Org-Capture that triggers on F9. Have it Activate Emacs, simulate keystroke Control-C, and simulate keystroke C.

If you don’t have Keyboard Maestro, you can use the following Applescript in Automator:


on run {input, parameters}

tell application "Emacs"
tell application "System Events"
keystroke "c" using {control down}
keystroke "c"
end tell
end tell

return input
end run


Save it as a service, and then in the Keyboard Shortcuts panel assign the service to F9.

Let me know how this works for you. Comments, suggestions, and recommendations are welcome as always.

How do I use feedly.com as an RSS feed source in Emacs?

Filed in Emacs, Org-ModeTags: ,

I posed the following question on Stack Exchange’s Emacs Beta site:

How do I use feedly.com as an RSS feed source in Emacs?

I’ve searched on and off for months. I haven’t found anything to even point me in the right direction to get started. I’ve opened a ticket with Feedly as well.


feedly.com feeds my RSS reading across platforms and devices since Google Reader’s demise. I don’t relish moving off of feedly.com as it works well and I bought the lifetime subscription.

I want Emacs as one of the clients, eventually becoming my primary (or only) desktop client. Today I use the Feedly web app and the OS X ReadKit app on my various desktops with iOS’ Newsify and Android’s Press on mobile. They all tie into secondary services like Evernote and Buffer with varying degrees of success.

I aspire to bring my RSS desktop workflow into Emacs:

  • storing full text articles to read later (today in Evernote, eventually in org-mode);
  • sharing interesting articles (today in Buffer, eventually in twittering-mode & perhaps others);
  • emailing full text-articles (in gnus or any Emacs email client);
  • using the article as a basis for a blog post (via org-mode’s org2blog perhaps);
  • defining todos and reminders and appointments (again in org-mode);
  • browsing the original article (today in the OS’ default browser, eventually in eww or any Emacs web client [or launching the OS’ default browser]).

NOTE: I’m not asking for the whole kit + caboodle. I’m just looking for help to get started.

NOTE2: If you have solved or want to solve the whole thing, I will not object.

%d bloggers like this: