From 87b94fec0edafa65273191095cc9850748076011 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 25 Oct 2013 17:38:09 +0900 Subject: [PATCH] bashrc: add f __ssh_with_cd --- bashrc | 14 ++++++++++++++ emacs.el | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/bashrc b/bashrc index ff0df9c..564853e 100755 --- a/bashrc +++ b/bashrc @@ -413,6 +413,20 @@ ssh(){ command ssh "$@" } +__ssh_with_cd(){ + # __ssh_with_cd [ ...] + if test -z "$2" + then + echo "usage: __ssh_with_cd [ ...]" + return 1 + fi + host="$1" + shift + dir="$1" + shift + ssh "$host" "$@" -t "cd \"$dir\"; \$SHELL -l" +} + memo(){ if test -z "$1" then diff --git a/emacs.el b/emacs.el index e9b82f0..7097fe8 100644 --- a/emacs.el +++ b/emacs.el @@ -2049,6 +2049,19 @@ this is test, does not rename files" (message file)) (message "not visiting file.")))) +(defvar kill-ring-buffer-name "*kill-ring*" + "Buffer name for `kill-ring-buffer'.") +(defun open-kill-ring-buffer () + "Open kill- ring buffer." + (interactive) + (pop-to-buffer + (with-current-buffer (get-buffer-create kill-ring-buffer-name) + (erase-buffer) + (yank) + (text-mode) + (current-local-map) + (goto-char (point-min))))) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; savage emacs ;; ;; when enabled emacs fails to complete