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

Error handling and documentation suggestions #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bjornbm
Copy link
Contributor

@bjornbm bjornbm commented May 8, 2023

These commits are related to error handling and documentation. Refer to the commits messages and diffs for details.

bjornbm added 6 commits May 8, 2023 14:01
I would find it annoying if I was using *OUT* as a clipboard or something and
the contents disappeared. Especially since undo doesn't work after `settext`.
Also doesn't set `editor.error_handler` by default. Which I think is
sensible but *maybe* makes the API less discoverable (user will have
to rely on documentation or reading the code rather than inspecting
what fields `editor` come prepopulated with).
@bjornbm
Copy link
Contributor Author

bjornbm commented May 8, 2023

You may not want all of these. I think the git commands to selectively apply patches should be:

First add my fork to the sources (“remotes”) you can pull commits from. I think you will only have to do this once. The name of the “remote” will be “bjornbm”:

git remote add --fetch bjornbm https://github.com/bjornbm/ple.git

Then you should be able to apply individual commits, for example:

git cherry-pick 57a679f

If you want to merge the entire errors branch to your master at the command line (instead of on Github), just do (while on your master branch):

git merge bjornbm/errors

@philanc
Copy link
Owner

philanc commented May 8, 2023

Thanks for your commits.

And thanks for your patience and the details about cherry-pick! I managed to get the commits I wanted, but it was not straightforward, probably because I did not apply all the commit, and in order, or because I didn't apply the first one, and didn't know what to do in case of merge errors / failure of cherry-pick

I am close to clueless regarding git, except the most basic use case: commit my own change at the end of the (only) current branch!

Each time I have departed from that, I have fallen "into a maze of twisty little passages, all alike" :-)

Regarding your commit "Don't toggle away from OUT on error (clobbers previous buffer), I don't understand the issue. Using ^O from the OUT buffer works ok here. What happens on your side?

@bjornbm
Copy link
Contributor Author

bjornbm commented May 8, 2023

The git user experience is a UX disaster. I barely scrape along, too.

Try triggering an error (^Xt) in *OUT* and you will see what happens: it swaps to the previous buffer and does a settext there instead of in *OUT*, clobbering the other buffer. The commit fixes that.

@philanc
Copy link
Owner

philanc commented May 8, 2023

Try triggering an error (^Xt) in *OUT* and you will see what happens: it swaps to the previous buffer and does a settext there instead of in *OUT*, clobbering the other buffer.

Commit f8e0b82 should fix this.

@bjornbm
Copy link
Contributor Author

bjornbm commented May 9, 2023

That is indeed a less intrusive fix.

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

Successfully merging this pull request may close these issues.

2 participants