14

When an error occur in compiling a program in Ghostscript, the error message gives a "Current file position is ..." with a number. I use emacs to edit the program file, so I would like to be able easily to find that position in the file (if that is indeed what it is). Please how do I do that?

Sorry I can't find a more appropriate tag.

Drew
  • 75,699
  • 9
  • 109
  • 225
Harry Weston
  • 271
  • 2
  • 5
  • 4
    Depending on what is that number, e.g., 47 (line, character-position, etc) you can do `M-x goto-line 47` or `M-x-goto-char 47`. – Name Dec 31 '16 at 16:07
  • @Name: Please consider posting that as an answer. You might want to also mention `next-error`, though it is only available for some error-reporting contexts. – Drew Dec 31 '16 at 17:43

1 Answers1

18

Depending on what is that number, e.g., 47 (line, character-position, etc) you can do M-x goto-line 47 or M-x-goto-char 47.

Name
  • 7,689
  • 4
  • 38
  • 84
  • 6
    It might be useful to know that `goto-char` is bound to `M-g c`, and `goto-line` is `M-g M-g`. – JoL Dec 31 '16 at 20:48
  • Thank you Name and jimg, that's what I wanted. I would like to mark one of these as the answer but I don't have enough credit on this site. – Harry Weston Jan 01 '17 at 16:53
  • @HarryWeston : you should be able to accept the answer. – Dan Jan 02 '17 at 02:44