org-msg icon indicating copy to clipboard operation
org-msg copied to clipboard

Consider allowing replies with no citation and/or no signature

Open guibor opened this issue 4 years ago • 7 comments

This would involve setting reply-to to nil in org-msg-post-setup if the the no citation option is on (and even if org-msg-posting-style is 'top-posting).

Very specific use-case - when replying to Google Docs comments or other online threads that are also sent by email and can be replied to, it is often necessary to respond in plain text (covered in #90) and not include the citation.

A similar option for inserting the signature in these (or other cases) would be helpful as well.

guibor avatar Apr 30 '21 10:04 guibor

There is fine line I am very careful not crossing between what a mail user agent should provide and OrgMsg goals. In my opinion, the no citation feature falls under the mail user agent duty. When I reply to email with gnus I can either call gnus-summary-followup or gnus-summary-followup-with-original only the later will include the citation (I am sure there is an equivalent in mu4e). Note that I always use the later and I realized that the former makes OrgMsg crash. I fixed it in the experimental branch.

Your second request clearly fall under OrgMsg scope and I have implemented something in the experimental branch which I believe should allow you to implement this behavior.

jeremy-compostella avatar Apr 30 '21 18:04 jeremy-compostella

Hi Jeremy,

I tried it out:

(defun mdfz/org-msg-remove-signature (composition-parameters)
  (if (mdfz/org-msg-should-force-plaintext)
      (add-to-list 'composition-parameters '(signature . nil))
    composition-parameters))

(advice-add 'org-msg-composition-parameters :filter-return #'mdfz/org-msg-remove-signature)

and it works great.

guibor avatar May 02 '21 17:05 guibor

As a side note - it's not trivial to customize citation behavior through message-mode or mu4e-compose. But you are probably right.

Thanks for the feature!

guibor avatar May 02 '21 19:05 guibor

Indeed, I looked at the mu4e souce code and I could not find any way to do this through available configuration. I see that you have opened a ticket with mu and I subscribed to it. If they can't provide a solution, it is really easy to implement one in OrgMsg in just a few lines of code. However I believe that this feature should be implemented in the user mail agent as it would benefit more people than if implemented in OrgMsg.

jeremy-compostella avatar May 03 '21 16:05 jeremy-compostella

In case it helps, here is what I did for mu4e.

(defun tx-delete-citation ()
  (delete-region (point) (point-max)))

(defun tx-mu4e-reply (prefix)
  (interactive "P")
  (setq mu4e-compose-cite-function (if prefix
                                       #'tx-delete-citation
                                     #'message-cite-original-without-signature))
  (mu4e-compose-reply))

(define-key mu4e-view-mode-map "R" #'tx-mu4e-reply)
(define-key mu4e-headers-mode-map "R" #'tx-mu4e-reply)

This is using mu4e dev version (head of mu4e repository). Basically, if I use the universal argument when replying e.g. C-u R, cited message text is removed. If I just do R to reply, the full message, without signature, is cited.

theophilusx avatar Jul 19 '21 00:07 theophilusx

I think it's not enough. When you do org-msg-preview you do see the original message being replied.

You actually need to remove the :reply-to: property from the message.

danielfleischer avatar Aug 30 '21 12:08 danielfleischer

A simple solution

(defun df/org-msg-edit-advice (&rest args)
  (if current-prefix-arg (org-msg-set-prop "reply-to" nil)))
(advice-add 'org-msg-edit-mode :after #'df/org-msg-edit-advice)

Need to remember this discussion is only relevant for HTML emails and the citation text you see in the draft buffer is only an indication; this is only a hack to prevent adding the original message, in HTML format to the new email.

danielfleischer avatar Aug 30 '21 14:08 danielfleischer