GNOME Bugzilla – Bug 712912
Reply quoting text
Last modified: 2014-12-17 13:41:23 UTC
---- Reported by geary-maint@gnome.bugs 2012-06-20 08:40:00 -0700 ---- Original Redmine bug id: 5425 Original URL: http://redmine.yorba.org/issues/5425 Searchable id: yorba-bug-5425 Original author: Gianmarco Brocchi Original description: I use (like a Gmail extension does) to reply quoting text in this way: I select some sentences on a mail and click on the Reply button I have the mail with the selected text quoting. Related issues: duplicated by geary - Feature #6886: quote selected text when replying (Duplicate) ---- Additional Comments From geary-maint@gnome.bugs 2013-05-01 10:31:00 -0700 ---- ### History #### #1 Updated by Eric Gregory over 1 year ago This is a common feature in newer web forum software, and it's really handy. I'd like to see this in Geary as well. #### #2 Updated by Adam Dingle over 1 year ago * **Priority** changed from _Normal_ to _High_ Agreed - that would be sweet. #### #3 Updated by Eric Gregory about 1 year ago I just noticed (by accident) that Apple Mail has this feature. #### #4 Updated by Robert Schroll 7 months ago This would also help with the issue of "Which email does the user mean to reply to?" It's the one he's selected, in this case. Of course, we will need to decided what to do when the selection includes multiple emails. --- Bug imported by chaz@yorba.org 2013-11-21 20:18 UTC --- This bug was previously known as _bug_ 5425 at http://redmine.yorba.org/show_bug.cgi?id=5425 Unknown version " in product geary. Setting version to "!unspecified". Unknown milestone "unknown in product geary. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution
Thanks for a fun and promising MUA, team. Just a +1 to say this feature is desirable and would be very useful for me.
Now that we have the inline composers, hitting reply multiple times will just refocus the open composer. When there's selected text, we could insert that into the open composer. This would help when you want to reply to several messages on a mailing list, for example.
I agree. That would make this feature kinda rockin'. What about the detached composer? Anything we need to worry about with that? I'm thinking that detaching the composer essentially breaks the connection with the main window, so this feature would be unavailable.
Yeah, I think once you've detached the composer, all this clever stuff stops working, if for no other reason than there needs to be a way to stop all this clever stuff. The more difficult question is, what happens when you hit reply to a different message without selecting any text. Right now, it'll open up a second composer. Should that still happen if it doesn't when text is selected?
Off the top of my head, I feel that this enhanced behavior we're discussing is based off which buttons are pressed. The toolbar buttons mean "reply to the conversation" which is, in effect, the same as replying to the most recent message. The message menu dropdown reply is to reply to that specific message. This behavior we're discussing is then applied to the appropriate message.
Created attachment 284363 [details] [review] Choose the message to reply to based on selection Here's the beginning of a solution. I did it in pieces, and I've left it in separate commits for now. Each touches several files, so I think it'll be easier to understand what's going on this way. We may want to squash them in the end. This one just selects the message being replied to based on the selection. This only affects to "global" reply; hitting reply on a drop-dowm menu for a specific email still replies to that.
Created attachment 284364 [details] [review] Use selected text in quotes when available
Created attachment 284365 [details] [review] Use bottom-posting when replying with selection I assume if you're selecting just a bit of text, you're going to be bottom-posting, like a civilized person. Of course, my bias here is obvious, but this seems like an interesting way to solve the top/bottom-posting conundrum. What's unclear to me is what to do in the case of forwards. Our current formatting is unsuited to bottom-posting, so it stays with top-posting. But I wonder: 1) Should forwarding allow only selections? I tend to think of forwards as being the whole text, but I'm comfortable with replies being edited. So is there a desire for edited forwards? 2) Should we use reply formatting of exerpts even when forwarding? That's the style I'd expect if I'm going to be interspersing my comments, no matter who it's going to. On another subject, I don't think this is going to work so well with signatures.
Created attachment 284366 [details] [review] Add selected text as quote in existing reply Because of the aforementioned problems, we always use the reply formatting for the excerpts. The new quote is only added if the compose type is not changing. I wanted to avoid the problem of doubly-inserting a quote when you change the reply type without deselecting the text. Another way around this problem would be to save the previously quoted text, and only insert the current quote if it's different. Each quote is given it's own "On" line. Right now, that may not be desired, since all of them will be the same. But I want to add the ability to quote different emails in the same message, and that'll be useful there. Since it's easier to delete it when it's not needed than add it when it is, I've left it in for now. Speaking of which, I want to make this mutliple message quote thing work. This will take some re-thinking of the reply model. Should we do that here, or make another bug?
This fails rather comically if your selection includes a quote -- you get the expander button as well. We can probably snip such things out as we're putting them in the composer.
Thanks for your patience with me, Robert. Some answers to your questions: * Signatures need to work with this. Signatures were, by far, the most requested feature in this release. * How much time do you estimate for multiple-message-quoting? It does seem powerful, but time is drawing to a close and I worry about introducing new modes and such to the inline composer. * You mentioned a problem when the selection includes a quote. Are you working on a fix to that, or are you read for me to review your last patch?
There's no need for an in-depth review, but I wanted to make sure this was on the right track before I continue. For instance, if we don't want bottom-posting with this mode, we won't have any problems with signatures. I don't think there's any real technical problem with the multiple-message-quoting, but we'd need to specify how it's going to work in all sorts of different states. I didn't know if we wanted to go into that now or not.
This works fine for me, although this patch doesn't compile. Still, I see where you're going with this and think it's quite clean (I assumed this feature would take more work than this). I think we should worry about multiple message quoting later, unless it's something that you think is relatively minor to add to this patch (and, as above, doesn't hurt current features).
Created attachment 286570 [details] [review] Choose the message to reply to based on selection I've rebased my branch onto master; hopefully this will fix the compile issues. These first few patches will just replace the old ones. If you'd prefer, I can set up a branch on git.gnome with this work.
Created attachment 286571 [details] [review] Use selected text in quotes when available
Created attachment 286572 [details] [review] Use bottom-posting when replying with selection
Created attachment 286573 [details] [review] Add selected text as quote in existing reply
Created attachment 286574 [details] [review] Place cursor appropriately in new composer This should make it work with signatures.
Created attachment 286575 [details] [review] Preserve newlines when quoting selected plain text I noticed an additional problem: newlines weren't preserved why part of a plain-text message was quoted. When we construct a full quote of a plain text message, we wrap the whole thing in a styled div. So if we notice that we've selected text inside a plain text message, we add that div to the quote.
Created attachment 286576 [details] [review] Strip quote chrome from selection when replying Mainly the quote shower and hider.
Yeah, let's create a branch on git.gnome.org for this work. Are you ready for me to review or are you looking for comments? I'm getting ready to cut 0.8 and I don't think we can merge this in time. Certainly this is something we can look at adding after the release.
I've pushed the branch to wip/712912-select-quote. It should be ready to go -- I've been using it for the past few weeks.
Wonderful, just compiled that branch and it seems to work great. Since I started using Geary more than a year ago, this is the last of my 3 most wanted features being added (after save to draft and search). Thanks Robert!
Great work. Commit!
Two procedural questions: 1) Would you prefer the commits separate or squashed down to one? I have no strong feelings either way; the small commits were to help with development. 2) Should we leave this bug open to handle multiple message quoting, or should I make a new bug for that?
Quoting text works only if I reply using shortcuts. If I use the menu it doesn't. Not a showstopper IMO, I just want to be sure that you are aware of this. $ git branch master * wip/712912-select-quote Commit 7f2034f0876b63658fd1acbf02055dd561e98fe7
(In reply to comment #26) > Quoting text works only if I reply using shortcuts. If I use the menu it > doesn't. > Not a showstopper IMO, I just want to be sure that you are aware of this. Quoting should work via shortcuts and the header bar buttons. It does not work from the menu in each message. This was a conscious decision on my part, though that doesn't mean it was the right one. I was thinking about what should happen if you select text in one message and then choose "reply" from the menu in the second. I decided that, in this case, we should ignore the selection and do the standard reply to the second message. With this behavior, I though it would be odd to have selections work with this menu when the selection is in the same message -- sometimes that menu would work with selections; sometimes it wouldn't. Therefore, I opted for consistent behavior: The message menu reply would never pay attention to selections. (It was also easier to implement this way.) I'm not wedded to this behavior, so feel free to argue if you think it should behave another way.
I don't care much as I always use shortcuts. Maybe an user would think that it's a bug and not a way to prevent an error. It may be worth a warning in the user guide. BTW, reply quoting text via header bar buttons is not working here (again, I personally don't care as I never use the header bar buttons). See above the commit I'm on
After thinking about it some more, I think it might make sense to allow quote-replies from the message menu of the message with a selection. There's not that much chance for confusion. But I'd prefer to get the existing code in first. Jim, do you want this as a series of commits, or one squashed commit? Also, please let me know if I should close this bug and open new ones for refinements, or just continue here.
Re: squashing vs. series, the only requirements I have are that every commit compile and execute so that we can git bisect without issue. Also, there should be no merge bubbles in master (i.e. in gitg you see a single line of commits). I'll let you verify if each commit compiles properly. Let's close this bug and open new tickets for fine-tuning (i.e. message menu). Re: Federico's issue with the header bar buttons, have you seen that at all? I can't reproduce it, the header bar buttons work fine for me. If not, Federico: when Robert commits his changes, please test again. If the buttons still don't work, please file a ticket letting us know and tell us exactly what steps you're going through to reproduce it. Thanks!
Here it goes as a series of patches, since that's slightly easier for me. I'll open some new issues for further enhancement. Attachment 286570 [details] pushed as 4d38f66 - Choose the message to reply to based on selection Attachment 286571 [details] pushed as fac79c7 - Use selected text in quotes when available Attachment 286572 [details] pushed as 099caa4 - Use bottom-posting when replying with selection Attachment 286573 [details] pushed as db6b48e - Add selected text as quote in existing reply Attachment 286574 [details] pushed as fc41d2a - Place cursor appropriately in new composer Attachment 286575 [details] pushed as 387e710 - Preserve newlines when quoting selected plain text Attachment 286576 [details] pushed as 3b173a0 - Strip quote chrome from selection when replying
Replies through the message menu is bug #738187. Replying to multiple messages is bug #738188. Fedrico, if you can't get this to work with the header bar buttons, please open another issue.
It's working fine here, thanks
With Geary 0.8.2, to select some text does not automatically quote it. Is the patchs included in 0.8.2? If yes, there are not working (for me and other).
As mentioned on the mailing list, this feature is in master and scheduled for 0.10.0. (The "Target Milestone" at the bottom of our tickets hold that information.)
Indeed! I just installed Geary from source and this quoting feature works. However, it doesn't work when forwarding emails. In comment #8 Robert Schroll wonders if the feature should be implemented to the forward action. In my opinion, it should! To forward a part of a big email is a common practice. Usually we add under the quote something like "Hi X, What do you think of what Y said ("quote below")". Do you consider implemented this also for forwarded mail?
It's supposed to work for forwards. It does for me, at least, and if it doesn't for you, please open a new bug about that. However, forwards (1) get a different introduction, including more header information, (2) are not put into a blockquote, and (3) are formatted for top-posting, not bottom-posting. Any and all of these are up for reconsideration. This is a feature I don't use at all, so I didn't know what would be best. If you want the behavior changed, open a new bug and subscribe me to it.
Indeed, it works for forward (my mistake). I think the way it works now is perfect (top-posting for forwarding, not blockquote).