-
Notifications
You must be signed in to change notification settings - Fork 10
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
Do not insert ebut data section when looking for it #316
Do not insert ebut data section when looking for it #316
Conversation
3562f5d
to
079f159
Compare
079f159
to
03e8d21
Compare
I believe I fixed this with changes that I pushed last week. So if this works on master, just remove this branch without deploying. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this pull request; fixed elsewhere.
03e8d21
to
6c60b13
Compare
@rswgnu The test case |
The ebut separator is supposed to be added to buffers without files such as email and lisp interaction buffers, so it seems to me the test case is not correct. Adding the 'create' flag usage looks correct. |
Why should anything be added when checking if there is a button or trying to use what looks like a button? Should not that be a read only operation? That the ebut separator is missing should not that be taken as an indication that there is no valid button rather than inserting it just to realize that there actually is no button data? |
6c60b13
to
069a459
Compare
@rswgnu I have some vague memory that you wanted something more to be added to this PR but coming back to this now for the weekend I can't remember what it was. |
Just approved. Thanks.On Apr 21, 2023, at 7:14 PM, Mats Lidell ***@***.***> wrote:
@rswgnu I have some vague memory that you wanted something more to be added to this PR but coming back to this now for the weekend I can't remember what it was.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
What
Do not insert ebut data section when looking for it.
Why
A data section is inserted when executing buttons in non file buffers such as scratch, news summary or temp buffers. Test case for temp buffer with non existing ebut added. (Not an ideal test case since verifying that something does not happen is not the best test. The test can be applied locally before trying the fix to demonstrate that it happens.)
The fix is more of a hack. It locally check if the create flag is set, using the fact it should not be set when only looking for if button data exists!?, and if it is not set avoids the insertion.
But maybe we should refactor this part of the code? It feels odd to me that
ebut:at-p
would even come close to code that does insertion. Also the explicit checks in there on the email and news interface looks like a code smell to me.