Moved from programming...

On Tue, Mar 11, 2014 at 5:55 PM, Devon McCormick <[email protected]> wrote:
> Good to know.  I've been using the emacs shell a little bit lately but it
> looks like I have to re-do some of my common utilities to get them to work
> with it.  For instance, I have this defined
> (define-key global-map "\C-c\C-y" 'comint-previous-input)
> to re-do my most recent input but I guess it fails under the emacs shell
> because it's not "comint"?

(define-key global-map "\C-c\C-y" 'comint-previous-input) works for me
in a *shell* buffer. I can hit C-c C-y to get the previous input


I tinkered with this earlier on -- just creating a bare comint buffer.
Instead of invoking cmd, it could invoke jconsole directly to skip the
step of starting jconsole manually.

(defun cmd()
  (interactive)
  (make-comint-in-buffer "cmd" nil "cmd" nil)
  (switch-to-buffer "*cmd*"))

(defun cmd-send-region (start end)
  (interactive "r")
  (comint-send-region (get-buffer-process "*cmd*") start end))


;;send the current paragraph to the cmd buffer
(define-key ctl-l-map "p"  '(lambda () (interactive) (save-excursion
(mark-paragraph) (cmd-send-region (region-beginning) (region-end)))))

;;send the current marked region to the cmd buffer
(define-key ctl-l-map "r"  '(lambda () (interactive) (save-excursion
(cmd-send-region (region-beginning) (region-end)))))
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to