-
Notifications
You must be signed in to change notification settings - Fork 82
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
Better handling for non-file buffers #52
Comments
That seems reasonable. I think what we could do is, check if |
I end up wanting this frequently enough to try and implement it now 😄.
Is there a reason we prefer the variable
I think a reasonable compromise would be to use the |
Thinking about this more it would be great if there was some way to hook apheleia-mode into indirect buffers like |
No reason, I think they do exactly the same thing. I didn't know there was a function until just now!
That could work, as long as we do a reasonable job at translating the buffer name (which could be something bizarre like, say,
Sure, we could maybe introduce a buffer-local user option that could be customized with a different way of performing the "save" operation instead of |
We're only using the buffer-file-names extension when creating a temp file, so I don't think there's an issue there. On the other hand I suppose there's a chance someone could have a buffer like
Looked into it, might be a little too ambitious for this issue. The indirect-buffer might not exist by the time the formatter is done, instead will want to format a region in the original buffer but formatting regions is a separate issue to work on. |
Fair point on both, sounds good! |
Atm apheleia has
filepath
andfile
command specifiers that're replaced with the value of the current buffers file. Quite a lot of the time I'm working with virtual files (such as by creating an org src-block for some c code) and apheliea will refuse to format that buffer (when called interactively throughapheleia-format-buffer
) because its been modified and it doesn't have a file-name. There should be a way to format buffers as well as files.The text was updated successfully, but these errors were encountered: