-
-
Save steinarb/258106dbce7052ec8cd6c831aedc17a1 to your computer and use it in GitHub Desktop.
Changes to .emacs to switch from netrc to auth-source in org2blog wordpress blog credentials setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.emacs b/.emacs | |
index d0f7c71..e79c7f5 100644 | |
--- a/.emacs | |
+++ b/.emacs | |
@@ -162,16 +162,16 @@ nil if this isn't windows") | |
(locate-library "org2blog") | |
(locate-library "metaweblog")) | |
(require 'org2blog) | |
- (require 'netrc) | |
+ (require 'auth-source) | |
(if (locate-library "ox-wp") | |
(load-library "ox-wp")) | |
- (setq blog (netrc-machine (netrc-parse netrc-file) "blog.mydomain.com" t)) | |
+ (setq blog (car (auth-source-search :host "blog.mydomain.com"))) | |
(setq org2blog/wp-blog-alist | |
(list | |
(list "my-blog" | |
:url "http://blog.mydomain.com/xmlrpc.php" | |
- :username (netrc-get blog "login") | |
- :password (netrc-get blog "password"))))) | |
+ :username (plist-get blog :user) | |
+ :password (auth-info-password blog))))) | |
; Set some default variables | |
;; Stop making "~" files when saving (making boots 'happy...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment