From 0e52a119c32eeba1181d0ad6fb2105f926b5ac2f Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Sat, 14 Jul 2018 20:11:10 -0400 Subject: [PATCH] add buffer switch --- conf.el | 7 ++++++- conf.org | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/conf.el b/conf.el index 1e54c78..b3c18e4 100644 --- a/conf.el +++ b/conf.el @@ -294,6 +294,12 @@ event of an error or nonlocal exit." (insert region) (setq end (point)))))) +(defun nd/switch-to-previous-buffer () + (interactive) + (switch-to-buffer (other-buffer (current-buffer) 1))) + +(global-set-key (kbd "M-b") 'nd/switch-to-previous-buffer) + (setq inferior-R-args "--quiet --no-save") (load "ess-site") (setq ess-history-file "session.Rhistory") @@ -524,7 +530,6 @@ event of an error or nonlocal exit." (setq org-refile-use-outline-path t) (setq org-outline-path-complete-in-steps nil) -;; (setq org-completion-use-ido t) (setq org-refile-allow-creating-parent-nodes 'confirm) diff --git a/conf.org b/conf.org index 8156b6b..cb8d57e 100644 --- a/conf.org +++ b/conf.org @@ -397,6 +397,14 @@ event of an error or nonlocal exit." (setq end (point)))))) #+END_SRC (goto-char (+ origin (* (length region) arg) arg))))) +** previous buffer +#+BEGIN_SRC emacs-lisp +(defun nd/switch-to-previous-buffer () + (interactive) + (switch-to-buffer (other-buffer (current-buffer) 1))) + +(global-set-key (kbd "M-b") 'nd/switch-to-previous-buffer) +#+END_SRC * ess #+begin_src emacs-lisp (setq inferior-R-args "--quiet --no-save")