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

Make error messages less intrusive #14

Open
bdarnell opened this issue Apr 14, 2018 · 2 comments
Open

Make error messages less intrusive #14

bdarnell opened this issue Apr 14, 2018 · 2 comments
Assignees

Comments

@bdarnell
Copy link

pop-to-buffer steals keyboard focus, which is very disruptive (especially as a nix novice who needs many iterations on my .nix files to get anything working). Can error messages be displayed with display-buffer instead? Or if they're short, just use message? (all the error messages I've been getting have been one-liners, although I'd prefer to have nix-buffer pass --show-trace to nix-build to get more details. I don't understand why this isn't the default).

I'm also getting uninterpreted ansi escape codes in the error buffer. I'm not sure whether this is the fault of nix-buffer or nix-build (I'm using nix 2.0, FWIW), but it would be good to either run this through the comint ansi filter or convince nix-build that it's running in a dumb terminal without color support. (This is especially annoying because the escape codes are confusing ffap)

@shlevy
Copy link
Owner

shlevy commented Apr 15, 2018

Re: pop-to-buffer, I'm not especially familiar with emacs's error reporting facilities, I'd be happy to consider a PR switching us to a more appropriate one

Re --show-trace: It's not the default because IIUC nix evaluation slows down and uses more memory. Maybe some nix-buffer option to turn it on, or to re-run with show-trace if evaluation fails, would be a good idea here

Re ansi codes: If there's a way to convince emacs to ignore them (or better yet, render them appropriately) that'd be great!

@bdarnell
Copy link
Author

Yeah, I'm not familiar with the right way to do this kind of thing in emacs either. I just suggested display-buffer because it looks like the first reasonable option I stumbled across. This is worth some research to compare with other similar modes.

As for the ansi codes, there's a function ansi-color-apply that claims to do this. (This is what comint-mode uses)

@shlevy shlevy self-assigned this Sep 23, 2022
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

2 participants