Fix for Error Code 0x80070006 on Windows 10

Filed in Windows 10Tags: , , ,

Trying to upgrade or install applications from the Windows 10 Store failed with 0x80070006 error code. I couldn’t find a solution.

Previously, the same apps lost my account credentials.

“Hmmmm,” I said to myself. Poking and proding, I figured out the problem was caused by instability with my SD card because of Windows 10’s sleep problems.

I moved my apps back to the c: drive. That fixed the problem – so far, anyway.

UPDATE:

Here’s what I emailed the Tweetium folks about this issue:

I think it’s a cascade problem with SP4 W10 sleep issues & installing apps to the non-system drive.

I had to hard cycle my SP4 a few times. It caused my D: drive to appear “unclean” to the OS. That’s where I installed my Windows Store apps.

I changed my power settings to hibernate on “lid close”.

Scanning the D: drive, both in Windows 10 and on the next reboot, made it so that apps worked – even Tweetium with my lost accounts. I moved said apps to the C: system drive. All is good.

BTW, another indicator of the problem is error 0x80070006 in Windows Store when upgrading or installing apps.

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:

buffer.com#@##sharer
buffer.com#@#.ss-social

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.

Thoughts?

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:
(setq
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
:config
(sml/apply-theme 'dark)
(sml/setup)
)
(use-package fancy-battery
:ensure t
:init
(fancy-battery-mode 1)
)
(use-package solarized-theme
:ensure t
:config
(setq
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
:config
(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"
           (erc-current-nick)
           (user-login-name)
           (or erc-system-name (system-name))
           erc-session-server
           erc-session-user-full-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)))
  (erc-server-send
   (format "USER %s %s %s :%s"
       ;; hacked - S.B.
       (if erc-anonymous-login erc-email-userid (user-login-name))
       "0" "*"
       erc-session-user-full-name))
  (erc-update-mode-line))

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 ".*")

or

(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.

Windows

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

 

; org-capture
~F9::
If WinExist("ahk_class Emacs")
{
WinActivate
Send ^{c}
Send {c}
}
else
{
Run "runemacs.exe"
WinWaitActive, emacs
Send ^{c}
Send {c}
}
return
;

 

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)

else:
    subprocess.Popen("emacs")
    window.wait_for_exist("emacs")
    time.sleep(10)

keyboard.send_keys("<ctrl>+c")
keyboard.send_keys("c")

 

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

OS X

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"
activate
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.


Warning: sprintf(): Too few arguments in /home/pjorgensen/thinknix.net/public/wp-includes/widgets.php on line 1042
Oenology Post Formats
Click to view/hide

Warning: sprintf(): Too few arguments in /home/pjorgensen/thinknix.net/public/wp-includes/widgets.php on line 1042
Posts Calendar
Click to view/hide
February 2016
M T W T F S S
« Dec    
1234567
891011121314
15161718192021
22232425262728
29  

Warning: sprintf(): Too few arguments in /home/pjorgensen/thinknix.net/public/wp-includes/widgets.php on line 1042
Archives
Click to view/hide

Warning: sprintf(): Too few arguments in /home/pjorgensen/thinknix.net/public/wp-includes/widgets.php on line 1042
Recent Posts
Click to view/hide
%d bloggers like this: