1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-09-27 21:51:43 +00:00

Open new terminal in current folder from emacs

This commit is contained in:
J. Fernando Sánchez 2017-01-14 00:14:05 +01:00
parent 91a33cdeb5
commit 5cd9fdc6a9
3 changed files with 12 additions and 1 deletions

View File

@ -2,3 +2,4 @@
setxkbmap us altgr-intl -option ctrl:nocaps setxkbmap us altgr-intl -option ctrl:nocaps
#xmodmap ~/.Xmodmap #xmodmap ~/.Xmodmap
#source ~/.xinitrc #source ~/.xinitrc
export XTERMINAL='termite'

View File

@ -687,6 +687,7 @@
) )
) )
(setq PREVSHELL (getenv "SHELL")) ;; Workaround for tramp
(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
(setq tramp-default-method "ssh") (setq tramp-default-method "ssh")
@ -709,5 +710,14 @@
(setenv "PATH" (concat (getenv "PATH") ":" (getenv "HOME") "/.bin" ":" (getenv "HOME") "/.local/bin")) (setenv "PATH" (concat (getenv "PATH") ":" (getenv "HOME") "/.bin" ":" (getenv "HOME") "/.local/bin"))
(setq exec-path (append exec-path (list (concat (getenv "HOME") "/.bin") (concat (getenv "HOME") ".local/bin") "/usr/bin"))) (setq exec-path (append exec-path (list (concat (getenv "HOME") "/.bin") (concat (getenv "HOME") ".local/bin") "/usr/bin")))
;; Launch terminal
(defun open-terminal ()
(interactive)
(call-process (or (getenv "XTERMINAL") "xterm") nil 0 nil "-e" PREVSHELL))
;; This does not work: (concat "echo -c 'cd " default-directory "'"))
(global-set-key (kbd "C-c t") 'open-terminal)
(provide '.init) (provide '.init)
;;; init.el ends here ;;; init.el ends here

View File

@ -18,7 +18,7 @@ fi
# #
export EDITOR='vi' export EDITOR='vi'
export VISUAL="myemacs -t" export VISUAL="myemacs -c"
export ALTERNATE_EDITOR="" export ALTERNATE_EDITOR=""
export PAGER='less' export PAGER='less'