[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help with eshell hack

From: Mathias Dahl
Subject: Need help with eshell hack
Date: Thu, 20 Dec 2007 22:43:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Inspired by `eev' I wanted to write a command that executes the current
line as a command in eshell. This is what I have:

(defun my-eshell-execute-current-line ()
  "Insert text of current line in eshell and execute."
  (let ((command (buffer-substring
      (unless (get-buffer eshell-buffer-name)
      (display-buffer eshell-buffer-name t)
      (set-buffer eshell-buffer-name)
      (insert command)

It almost works. The problem is that when output from the command
reaches the bottom of the visible part of the eshell window, the window
isn't scrolled down to show the output.

Any idea on how to achieve this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]