Hot answers tagged

5

I don't think anything is broken, it seems that Emacs isn't designed to deal with the -l grep flag the way you're trying to use it. Without the -l flag, Emacs (via eshell or M-x grep) will take the output from grep and insert it in a buffer. It uses the formatted output to create links to the matches in each file. When you add the -l flag, the output from ...


3

Yes: ls >(get-buffer "*scratch*") Or even ls > #<buffer *scratch*> See this question for more details.


3

Start with Eshell: (setq initial-buffer-choice #'eshell) Start with running Bash in Term: (setq initial-buffer-choice (lambda () (term "bash"))) C-h v initial-buffer-choice If the value is a function, call it with no arguments and switch to the buffer that it returns.


3

For exa in eshell you can just use the following alias. It is preserved over a restart of Emacs. alias exa *exa --color=always The general problem to teach other programs about the color capabilities of the comint of Emacs is described on Rededit. This approach helps for an example colorizing git output under Eshell. Lax Citation: Create a file ~/....


2

The command to change from one window to another as you describe is other-window which is bound to C-x o by default.


2

The Elisp code below makes ls output of eshell clickable. It is basing on a method proposed on emacswiki. If you click the mouse-button-2 (e.g., the middle mouse button/scroll-wheel) you get a pop up menu offering you to find the file in Emacs, to copy the file path, or to copy the path of the containing directory. (require 'em-ls) (require 'easymenu) (...


2

This isn't so much an answer, as a clue for someone else... When I run emacs -Q followed by M-x eshell and do: Welcome to the Emacs shell ~ $ python3 Python 3.7.2 (default, Jan 13 2019, 12:50:15) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pdb >>> pdb....


1

You can copy the following Elisp code to your init files. It contains a modified version of function eshell-source-file. Essentially I changed (insert-file-contents file) to (insert string). Furthermore I needed a minor modification of 'eshell-command-name. It also contains the function define-eshell-script defining an Eshell command with a doc string and ...


1

I cycle using comint-previous-input and comint-next-input. So, if I had entered previously x = 1 and x = 2; when I enter x = [cursor] the above two comint commands cycle the previous entries backward and forward. But it won't go back to x = as it is not in the history. You can just kill to the end of line at any point to get x = again.


1

I then tried various sorts of C-h and websearch, without success. Please check the manual first! (or second, after docstrings) (eshell) Dollars Expansion: Eshell has different ‘$’ expansion syntax from other shells. There are some similarities, but don’t let these lull you into a false sense of familiarity. [...] ‘${command}’ Returns the output of ‘...


1

As pointed out by @npostavs in a comment underneath the original question, the following solution proposed by the original poster should work -- at least in a current version of Emacs that is -- tested with Emacs 26.1: (defun eshell/ff (&rest args) (apply #'find-file args)) Alternative Solution: (defun eshell-add-aliases () "Doc-string." (...


1

Eshell is an Elisp based shell. Most details of that shell are described in the Emacs User Manual. Also the page Mastering Eshell gives good advice about the Eshell. Eshell supports globbing and pipes. So your command ls * | entr elixir bob_test.exs works with slight modifications. Eshell does not use pipes for process communication by default but pty. It ...


1

Simply use the environment variable PWD, e.g., ~/.emacs.d $ export CREDIT="$PWD/credentials.json" ~/.emacs.d $ echo $CREDIT /Users/xcy/.emacs.d/credentials.json When you type pwd in Eshell ~/.emacs.d $ pwd Eshell tries to execute one of the following (the order matters) The lisp function eshell/pwd The executable file pwd in your PATH The lisp function ...


1

Here I post a solution to my issue using with-temp-buffer macro: (save-excursion (delete-other-windows) (split-window-below) (goto-char (point-min)) (while (search-forward-regexp "\\\\\\(?:href\\|url\\){\\([^}]+\\)}" nil t) (save-excursion (let ((URL (match-string 1)) (kill-buffer-query-functions nil)) (with-temp-buffer ...


Only top voted, non community-wiki answers of a minimum length are eligible