Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tty output for next-error support on emacs #5

Open
richcarl opened this issue Jul 28, 2011 · 1 comment
Open

tty output for next-error support on emacs #5

richcarl opened this issue Jul 28, 2011 · 1 comment

Comments

@richcarl
Copy link
Owner

Reported by M.W.Park.

When i got some errors in emacs erlang buffer, next-error (C-x `) always prompts for the exact file name because of the missing '.erl' in the tty message.

a patch for adding ".erl" at the end of module name (in eunit_tty.erl).
i don't know this is the right way for doing things like this.
but, it worked for me.
i can use 'next-error' command (C-x `) in my emacs erlang buffer without prompt

Index: eunit_tty.erl

--- eunit_tty.erl (revision 274)
+++ eunit_tty.erl (working copy)
@@ -223,7 +223,7 @@
D = if Desc =:= "" -> "";
true -> io_lib:fwrite(" (~s)", [Desc])
end,

  • io_lib:fwrite("s:sss...", [Module, L, Name, D]).
  • io_lib:fwrite("s.erl:sss...", [Module, L, Name, D]).

print_test_begin(I, Text) ->
indent(I),

@richcarl
Copy link
Owner Author

Thanks. It's not quite the right thing to do, however. There are cases where the module name does not match the file name (package namespaces), in which case tacking on ".erl" is simply a lie. I'm thinking about changing the event protocol anyway, so perhaps it should include the file name as a separate item. Also, complete file names could make the output very verbose (but clickable messages are quite useful). I'll have to experiment a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant