Question

I would like to run a shell command and get its output in clickable buffer in emacs. The command is a shell script that eventually runs glimpse on bunch of source files. Its output looks like grep's output. It includes file name and line number. I would like to be able to click on a file or enter while standing on it and for emacs to take me to that line in the file. I suppose I need some custom function to do that, but I am new to emacs so I don't yet know how to program it.

Was it helpful?

Solution

M-x grep type in your command instead of the default.

M-x apropos "grep.*null" finds grep-use-null-device if you need to not send "/dev/null"

OTHER TIPS

An alternative approach is to run the command using shell-command M-!, and changing the output buffer's mode to compilation-mode using M-x compilation-mode.

Yet another alternative is to run the command using M-x compile. The downside of this is that, Emacs allows only one active compilation buffer by default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top