asok / projectile-rails

Emacs Rails mode based on projectile
258 stars 59 forks source link

Exception stack trace backs in server buffer are made into buttons #162

Closed pedz closed 1 year ago

pedz commented 1 year ago

I execute projectile-rails-server then use the app via the browser. If the app throws an exception it puts me on an error page in the browser and the buffer for the server shows me some of the lines of the exception. These lines are now made into buttons such that clicking them will take you to the file:line specified.

I am using Docker containers and in my particular case, I set projectile-rails-custom-server-command to start the web server in the container. The side effect of this is the log displayed in the server buffer has a left margin which is colored showing which container emitted the output. This is why the regexp has the goofy "\(?:\033\[0m\)?" at the front. It matches the end of the coloring if it is present. Otherwise, the "0m" is improperly included at the front of the path.

Another trivial change I made was add the description of projectile-rails-mode-map to the help text of projectile-rails-mode.