[Top][All Lists]

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

Re: something to jump to file:line

From: Ehud Karni
Subject: Re: something to jump to file:line
Date: Sun, 23 Sep 2001 00:10:56 +0300

On Sun, 23 Sep 2001 00:34:19 +0400 (MSD), Roman Suzi <> wrote:
> I am looking for some way to automate visiting specific
> lines in files, like grep display does, but from file.
> For example, if I have this kind of file:
> --- mytags -------------------
> file1.txt:12  trararar
> file1.txt:190  gfhgggg
> file2.txt:345  dfasdf
> ------------------------------
> I'd like to step on the line and press some key (Enter, for example)
> to visit specified file on specified line.
> I can control the format of mytags and put anything on lines.

The easiest way to accomplish your wish is to do:
1. Add another : after the line number
i.e. your example will become:
file1.txt:12:  trararar
file1.txt:190:  gfhgggg
file.txt:345:  dfasdf
2. In this buffer do M-x compilation-mode <Enter>

Thats it ! when you now type <Enter> in a line, Emacs will open the
desired file in the requested line.

To learn more about it read the help for the `next-error' command.


 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \

reply via email to

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