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

Editing a message in a compose buffer and manually calling M-x ement-room-compose-org results in a new message #229

Open
phil-s opened this issue Oct 5, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@phil-s
Copy link

phil-s commented Oct 5, 2023

If ement-room-compose-org is called automatically via ement-room-compose-hook then everything is fine, but it turns out there's a bug if M-x ement-room-compose-org is called interactively.

Recipe:

  • (setq ement-room-compose-hook nil)
  • Write a new message
  • Edit the message in the minibuffer
  • Type C-c ' to call ement-room-compose-from-minibuffer
  • Call M-x ement-room-compose-org
  • Type C-x C-s and submit the edit
  • Observe the the edit has actually become a new message

If I don't use M-x ement-room-compose-org, or if that is being called via ement-room-compose-hook, then the editing works as expected.

I haven't debugged this, but your comment in chat was:

Probably it's just a matter of the buffer-local variables that contain the metadata about the message being replied to getting killed when the major mode changes. If so, it's basically the same as #130.

There are also dynamic let bindings in ement-room-edit-message and/or ement-room-compose-from-minibuffer which are in scope when ement-room-compose-hook runs, but not subsequently when invoking M-x ement-room-compose-org.

@alphapapa alphapapa self-assigned this Oct 7, 2023
@alphapapa alphapapa added the bug Something isn't working label Oct 7, 2023
@alphapapa alphapapa added this to the 0.14 milestone Oct 7, 2023
@alphapapa
Copy link
Owner

Thanks. Not sure of the best way to solve this yet. Might end up deferring it for a few versions, because there are other things that seem more important right now.

@alphapapa alphapapa modified the milestones: 0.14, Future Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants