summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-10-22 21:16:49 -0400
committerKyle Meyer <kyle@kyleam.com>2014-10-22 21:16:49 -0400
commitce4e8aaa32da1f38a00c3c1fed911112f8b48f23 (patch)
treeb00822671a9c9214ba4aa9cc799b2c9f5658de50
parent41eefb50482b30ec49f5b67df139296db1b7f2d6 (diff)
parentc61c59b28a98573075a968666b897255ac56e67e (diff)
downloademacs.d-ce4e8aaa32da1f38a00c3c1fed911112f8b48f23.tar.gz
Merge branch 'emacs24.4'
-rw-r--r--lisp/init-bib.el16
-rw-r--r--lisp/init-editing.el2
-rw-r--r--lisp/init-grep.el3
-rw-r--r--lisp/init-org.el9
4 files changed, 15 insertions, 15 deletions
diff --git a/lisp/init-bib.el b/lisp/init-bib.el
index ae15305..f254b0a 100644
--- a/lisp/init-bib.el
+++ b/lisp/init-bib.el
@@ -63,16 +63,12 @@ point."
(browse-url (org-link-escape-browser (concat org-doi-server-url doi))))
(defun km/doi-at-point ()
- "Return DOI at point.
-This is a hack that uses `(thing-at-point 'url)' and then removes
-the leading 'http://'. The DOI format is not verified in any
-way."
+ "Return DOI at point."
(save-excursion
- (when (equal (thing-at-point 'word) "doi")
- (backward-word)
- (re-search-forward "doi:[ \t\n]*"))
- (--if-let (thing-at-point 'url)
- (replace-regexp-in-string "http://" "" it)
- (user-error "No DOI found at point"))))
+ (let ((doi (cadr (get-text-property (point) 'htmlize-link))))
+ (when (or (not doi)
+ (not (string-prefix-p "doi:" doi)))
+ (user-error "No DOI found at point"))
+ (replace-regexp-in-string "doi:" "" doi))))
(provide 'init-bib)
diff --git a/lisp/init-editing.el b/lisp/init-editing.el
index acd01c8..c24c32a 100644
--- a/lisp/init-editing.el
+++ b/lisp/init-editing.el
@@ -150,6 +150,8 @@ and '<<<' mark the bounds of the narrowed region.
(define-key km/editing-map "i" 'indent-relative)
+(electric-indent-mode -1)
+
;; From http://whattheemacsd.com/key-bindings.el-01.html
(defun km/goto-line-with-feedback ()
"Show line numbers temporarily, while prompting for the line number input"
diff --git a/lisp/init-grep.el b/lisp/init-grep.el
index 530e712..ca1b8df 100644
--- a/lisp/init-grep.el
+++ b/lisp/init-grep.el
@@ -16,7 +16,8 @@ entering `ch' is equivalent to `*.[ch]'.")
(defadvice rgrep (after hide-grep-header activate) (hide-grep-header))
(defadvice lgrep (after hide-grep-hxoeader activate) (hide-grep-header))
(defadvice grep-find (after hide-grep-header activate) (hide-grep-header))
-(defadvice vc-git-grep (after hide-grep-header activate) (hide-grep-header))
+(after 'vc-git
+ (defadvice vc-git-grep (after hide-grep-header activate) (hide-grep-header)))
(key-chord-define-global ",z" 'rgrep)
diff --git a/lisp/init-org.el b/lisp/init-org.el
index ab25cf2..f856fee 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -248,16 +248,17 @@ context will be shown for above heading."
;;; Agenda
-(defadvice org-agenda-list (around org-agenda-fullscreen activate)
- "Start agenda in fullscreen.
+(after 'org-agenda
+ (defadvice org-agenda-list (around org-agenda-fullscreen activate)
+ "Start agenda in fullscreen.
After agenda loads, delete other windows.
`org-agenda-restore-windows-after-quit' should non-nil to restore
the previous window configuration. If `org-agenda-sticky' is
non-nil, configurations with more than one window do not seem to
be restored properly."
- ad-do-it
- (delete-other-windows))
+ ad-do-it
+ (delete-other-windows)))
(setq org-agenda-restore-windows-after-quit t
org-agenda-sticky nil)