emacs reply fills X clipboard with reply message body

2014-05-09 Thread David Bremner
Jameson Graef Rollins  writes:

> On Thu, May 08 2014, David Edmondson  wrote:
>> [ I'm cycling around back through some old mail. ]
>>
>> On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
>>> I've just started noticing that when I reply to messages from the emacs
>>> UI, my X clipboard is filled with the body of the reply message,
>>> displacing whatever was in there previously.
>>
>> This doesn't happen to me today. Is it still a problem for other people?
>
> This was fixed a while back, although I don't remember which series it
> was that fixed it.

The amazing Mark Walters and commit 4eb151e26ce0 ?

d


emacs reply fills X clipboard with reply message body

2014-05-08 Thread David Edmondson
[ I'm cycling around back through some old mail. ]

On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
> I've just started noticing that when I reply to messages from the emacs
> UI, my X clipboard is filled with the body of the reply message,
> displacing whatever was in there previously.

This doesn't happen to me today. Is it still a problem for other people?
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 310 bytes
Desc: not available
URL: 



emacs reply fills X clipboard with reply message body

2014-05-08 Thread Jameson Graef Rollins
On Thu, May 08 2014, David Edmondson  wrote:
> [ I'm cycling around back through some old mail. ]
>
> On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
>> I've just started noticing that when I reply to messages from the emacs
>> UI, my X clipboard is filled with the body of the reply message,
>> displacing whatever was in there previously.
>
> This doesn't happen to me today. Is it still a problem for other people?

This was fixed a while back, although I don't remember which series it
was that fixed it.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: 



Re: emacs reply fills X clipboard with reply message body

2014-05-08 Thread David Edmondson
[ I'm cycling around back through some old mail. ]

On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.

This doesn't happen to me today. Is it still a problem for other people?


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: emacs reply fills X clipboard with reply message body

2014-05-08 Thread Jameson Graef Rollins
On Thu, May 08 2014, David Edmondson d...@dme.org wrote:
 [ I'm cycling around back through some old mail. ]

 On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.

 This doesn't happen to me today. Is it still a problem for other people?

This was fixed a while back, although I don't remember which series it
was that fixed it.

jamie.


pgpvRnUZkWCol.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: emacs reply fills X clipboard with reply message body

2014-05-08 Thread David Bremner
Jameson Graef Rollins jroll...@finestructure.net writes:

 On Thu, May 08 2014, David Edmondson d...@dme.org wrote:
 [ I'm cycling around back through some old mail. ]

 On Tue, Sep 17 2013, Jameson Graef Rollins wrote:
 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.

 This doesn't happen to me today. Is it still a problem for other people?

 This was fixed a while back, although I don't remember which series it
 was that fixed it.

The amazing Mark Walters and commit 4eb151e26ce0 ?

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


emacs reply fills X clipboard with reply message body

2013-09-19 Thread Tomi Ollila
On Thu, Sep 19 2013, Mark Walters  wrote:

> I have looked at this but haven't fully worked out what is going on.
>
> Tomi found (on irc) that putting a (select-active-regions nil) to line
> 212 of notmuch-mua.el solves the problem.

You found that it was select-active-regions what to try ...

> My testing shows that putting a (let ((select-active-regions nil))
> around the lines 224-227 in notmuch-mua.el also solves the problem.
>
> However, when trying to narrow the problem I see some odd behaviour: if
> you put the let just around the message-cite-original line then the
> following happens:
>
> if the primary selection is in some non-emacs window (eg an xterm) then
> the bug does not show up but if the primary selection is in the emacs
> window and then you initiate the reply then the bug does show up. 
>
> We could just try one of the above two fixes but it could be papering
> over something.

Yes, such duct-taping something is probably not the best approach;
we could use that as a "temporary" solution but you know what happens
with these "temporary" solutions.

Also, doing these ad-hoc testing switching between emacs 23 & 24 and
something doing "mouse-draggin" or "shift-selection" (*) and other 
times C-SPC and then moving cursor (and forgetting which approach is
tried get things confusing).

(*) mouse-dragging & shift-selection taken from the documentation string
of variable select-active-regions. It seems that 'only is the value 
I personally want to use there

... have to try the 'only option -- and also disabling transient-mark-mode
-- how to do that is a question (the docstring is a bit confusing and it
seems although I have (transient-mark-mode t) it is enabled -- how to
know transient-mark-mode is enabled is also a bit of mystery to me :/


Forget my mml-quote-reqion -comment in my previous mail. although the
diagnose was wrong the cure was working ;/


> Best wishes
>
> Mark

Tomi

>
>
>
>
> On Wed, 18 Sep 2013, Tomi Ollila  wrote:
>> On Wed, Sep 18 2013, Jameson Graef Rollins  
>> wrote:
>>
>>> I've just started noticing that when I reply to messages from the emacs
>>> UI, my X clipboard is filled with the body of the reply message,
>>> displacing whatever was in there previously.  I'm not sure if this is
>>> related to my personal emacs configuration, or some non-ideal way we're
>>> inserting body parts in replies.  However, even if it is a configuration
>>> issue in my emacs, I suspect that there should be a better way to insert
>>> the reply body such that there's not even a possibility that it would
>>> leak into the users X clipboard, regardless of emacs settings.  Any
>>> thoughts?
>>
>> env -u DISPLAY emacs -f notmuch ;)
>>
>>
>> .. OK, I'm marking this as a bug -- I witness the same behaviour.
>>
>> Originally I thought this relates directly to the fact that mark
>> is set at the end of quoted text and (point) is at the beginning of
>> buffer -- so that simple c-w can be used to remove the contents in
>> case desired... but the X paste provides the original text, not the
>> quoted one.
>>
>> Someone? has to dig (deeper) into the code for this...
>>
>>> jamie.
>>
>> Tomi
>>
>> ___
>> notmuch mailing list
>> notmuch at notmuchmail.org
>> http://notmuchmail.org/mailman/listinfo/notmuch
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


emacs reply fills X clipboard with reply message body

2013-09-19 Thread Mark Walters

I have looked at this but haven't fully worked out what is going on.

Tomi found (on irc) that putting a (select-active-regions nil) to line
212 of notmuch-mua.el solves the problem.

My testing shows that putting a (let ((select-active-regions nil))
around the lines 224-227 in notmuch-mua.el also solves the problem.

However, when trying to narrow the problem I see some odd behaviour: if
you put the let just around the message-cite-original line then the
following happens:

if the primary selection is in some non-emacs window (eg an xterm) then
the bug does not show up but if the primary selection is in the emacs
window and then you initiate the reply then the bug does show up. 

We could just try one of the above two fixes but it could be papering
over something.

Best wishes

Mark




On Wed, 18 Sep 2013, Tomi Ollila  wrote:
> On Wed, Sep 18 2013, Jameson Graef Rollins  
> wrote:
>
>> I've just started noticing that when I reply to messages from the emacs
>> UI, my X clipboard is filled with the body of the reply message,
>> displacing whatever was in there previously.  I'm not sure if this is
>> related to my personal emacs configuration, or some non-ideal way we're
>> inserting body parts in replies.  However, even if it is a configuration
>> issue in my emacs, I suspect that there should be a better way to insert
>> the reply body such that there's not even a possibility that it would
>> leak into the users X clipboard, regardless of emacs settings.  Any
>> thoughts?
>
> env -u DISPLAY emacs -f notmuch ;)
>
>
> .. OK, I'm marking this as a bug -- I witness the same behaviour.
>
> Originally I thought this relates directly to the fact that mark
> is set at the end of quoted text and (point) is at the beginning of
> buffer -- so that simple c-w can be used to remove the contents in
> case desired... but the X paste provides the original text, not the
> quoted one.
>
> Someone? has to dig (deeper) into the code for this...
>
>> jamie.
>
> Tomi
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: emacs reply fills X clipboard with reply message body

2013-09-19 Thread Tomi Ollila
On Thu, Sep 19 2013, Mark Walters markwalters1...@gmail.com wrote:

 I have looked at this but haven't fully worked out what is going on.

 Tomi found (on irc) that putting a (select-active-regions nil) to line
 212 of notmuch-mua.el solves the problem.

You found that it was select-active-regions what to try ...

 My testing shows that putting a (let ((select-active-regions nil))
 around the lines 224-227 in notmuch-mua.el also solves the problem.

 However, when trying to narrow the problem I see some odd behaviour: if
 you put the let just around the message-cite-original line then the
 following happens:

 if the primary selection is in some non-emacs window (eg an xterm) then
 the bug does not show up but if the primary selection is in the emacs
 window and then you initiate the reply then the bug does show up. 

 We could just try one of the above two fixes but it could be papering
 over something.

Yes, such duct-taping something is probably not the best approach;
we could use that as a temporary solution but you know what happens
with these temporary solutions.

Also, doing these ad-hoc testing switching between emacs 23  24 and
something doing mouse-draggin or shift-selection (*) and other 
times C-SPC and then moving cursor (and forgetting which approach is
tried get things confusing).

(*) mouse-dragging  shift-selection taken from the documentation string
of variable select-active-regions. It seems that 'only is the value 
I personally want to use there

... have to try the 'only option -- and also disabling transient-mark-mode
-- how to do that is a question (the docstring is a bit confusing and it
seems although I have (transient-mark-mode t) it is enabled -- how to
know transient-mark-mode is enabled is also a bit of mystery to me :/


Forget my mml-quote-reqion -comment in my previous mail. although the
diagnose was wrong the cure was working ;/


 Best wishes

 Mark

Tomi





 On Wed, 18 Sep 2013, Tomi Ollila tomi.oll...@iki.fi wrote:
 On Wed, Sep 18 2013, Jameson Graef Rollins jroll...@finestructure.net 
 wrote:

 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.  I'm not sure if this is
 related to my personal emacs configuration, or some non-ideal way we're
 inserting body parts in replies.  However, even if it is a configuration
 issue in my emacs, I suspect that there should be a better way to insert
 the reply body such that there's not even a possibility that it would
 leak into the users X clipboard, regardless of emacs settings.  Any
 thoughts?

 env -u DISPLAY emacs -f notmuch ;)


 .. OK, I'm marking this as a bug -- I witness the same behaviour.

 Originally I thought this relates directly to the fact that mark
 is set at the end of quoted text and (point) is at the beginning of
 buffer -- so that simple c-w can be used to remove the contents in
 case desired... but the X paste provides the original text, not the
 quoted one.

 Someone™ has to dig (deeper) into the code for this...

 jamie.

 Tomi

 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


emacs reply fills X clipboard with reply message body

2013-09-18 Thread Tomi Ollila
On Wed, Sep 18 2013, Tomi Ollila  wrote:

> On Wed, Sep 18 2013, Jameson Graef Rollins  
> wrote:
>
>> I've just started noticing that when I reply to messages from the emacs
>> UI, my X clipboard is filled with the body of the reply message,
>> displacing whatever was in there previously.  I'm not sure if this is
>> related to my personal emacs configuration, or some non-ideal way we're
>> inserting body parts in replies.  However, even if it is a configuration
>> issue in my emacs, I suspect that there should be a better way to insert
>> the reply body such that there's not even a possibility that it would
>> leak into the users X clipboard, regardless of emacs settings.  Any
>> thoughts?

I tracked this to notmuch-mua-reply -> message-cite-original -> mml-quote-region


In emacs "24.3.50.1" when I set mark, move point and do M-x
mml-quote-region -- and then press middle mouse button, the text between
point & mark are pasted.

In emacs "23.4.1" this does not happen...

mml-quote-region looks like:

(defun mml-quote-region (beg end)
  "Quote the MML tags in the region."
  (interactive "r")
  (save-excursion
(save-restriction
  ;; Temporarily narrow the region to defend from changes
  ;; invalidating END.
  (narrow-to-region beg end)
  (goto-char (point-min))
  ;; Quote parts.
  (while (re-search-forward
  "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" nil t)
;; Insert ! after the #.
(goto-char (+ (match-beginning 0) 2))
(insert "!")


So, some magic emacs feature ?

Attempted to shadow this by setting x-select-enable-* values
to nil but no effect...


Does others experience the same behaviour. Am I missing something here ?

>
> env -u DISPLAY emacs -f notmuch ;)
>
>
> .. OK, I'm marking this as a bug -- I witness the same behaviour.
>
> Originally I thought this relates directly to the fact that mark
> is set at the end of quoted text and (point) is at the beginning of
> buffer -- so that simple c-w can be used to remove the contents in
> case desired... but the X paste provides the original text, not the
> quoted one.
>
> Someone? has to dig (deeper) into the code for this...
>
>> jamie.
>
> Tomi

Tomi


emacs reply fills X clipboard with reply message body

2013-09-18 Thread Tomi Ollila
On Wed, Sep 18 2013, Jameson Graef Rollins  
wrote:

> I've just started noticing that when I reply to messages from the emacs
> UI, my X clipboard is filled with the body of the reply message,
> displacing whatever was in there previously.  I'm not sure if this is
> related to my personal emacs configuration, or some non-ideal way we're
> inserting body parts in replies.  However, even if it is a configuration
> issue in my emacs, I suspect that there should be a better way to insert
> the reply body such that there's not even a possibility that it would
> leak into the users X clipboard, regardless of emacs settings.  Any
> thoughts?

env -u DISPLAY emacs -f notmuch ;)


.. OK, I'm marking this as a bug -- I witness the same behaviour.

Originally I thought this relates directly to the fact that mark
is set at the end of quoted text and (point) is at the beginning of
buffer -- so that simple c-w can be used to remove the contents in
case desired... but the X paste provides the original text, not the
quoted one.

Someone? has to dig (deeper) into the code for this...

> jamie.

Tomi



Re: emacs reply fills X clipboard with reply message body

2013-09-18 Thread Tomi Ollila
On Wed, Sep 18 2013, Jameson Graef Rollins jroll...@finestructure.net wrote:

 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.  I'm not sure if this is
 related to my personal emacs configuration, or some non-ideal way we're
 inserting body parts in replies.  However, even if it is a configuration
 issue in my emacs, I suspect that there should be a better way to insert
 the reply body such that there's not even a possibility that it would
 leak into the users X clipboard, regardless of emacs settings.  Any
 thoughts?

env -u DISPLAY emacs -f notmuch ;)


.. OK, I'm marking this as a bug -- I witness the same behaviour.

Originally I thought this relates directly to the fact that mark
is set at the end of quoted text and (point) is at the beginning of
buffer -- so that simple c-w can be used to remove the contents in
case desired... but the X paste provides the original text, not the
quoted one.

Someone™ has to dig (deeper) into the code for this...

 jamie.

Tomi

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: emacs reply fills X clipboard with reply message body

2013-09-18 Thread Tomi Ollila
On Wed, Sep 18 2013, Tomi Ollila tomi.oll...@iki.fi wrote:

 On Wed, Sep 18 2013, Jameson Graef Rollins jroll...@finestructure.net wrote:

 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.  I'm not sure if this is
 related to my personal emacs configuration, or some non-ideal way we're
 inserting body parts in replies.  However, even if it is a configuration
 issue in my emacs, I suspect that there should be a better way to insert
 the reply body such that there's not even a possibility that it would
 leak into the users X clipboard, regardless of emacs settings.  Any
 thoughts?

I tracked this to notmuch-mua-reply - message-cite-original - mml-quote-region


In emacs 24.3.50.1 when I set mark, move point and do M-x
mml-quote-region -- and then press middle mouse button, the text between
point  mark are pasted.

In emacs 23.4.1 this does not happen...

mml-quote-region looks like:

(defun mml-quote-region (beg end)
  Quote the MML tags in the region.
  (interactive r)
  (save-excursion
(save-restriction
  ;; Temporarily narrow the region to defend from changes
  ;; invalidating END.
  (narrow-to-region beg end)
  (goto-char (point-min))
  ;; Quote parts.
  (while (re-search-forward
  #!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\) nil t)
;; Insert ! after the #.
(goto-char (+ (match-beginning 0) 2))
(insert !)


So, some magic emacs feature ?

Attempted to shadow this by setting x-select-enable-* values
to nil but no effect...


Does others experience the same behaviour. Am I missing something here ?


 env -u DISPLAY emacs -f notmuch ;)


 .. OK, I'm marking this as a bug -- I witness the same behaviour.

 Originally I thought this relates directly to the fact that mark
 is set at the end of quoted text and (point) is at the beginning of
 buffer -- so that simple c-w can be used to remove the contents in
 case desired... but the X paste provides the original text, not the
 quoted one.

 Someone™ has to dig (deeper) into the code for this...

 jamie.

 Tomi

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: emacs reply fills X clipboard with reply message body

2013-09-18 Thread Mark Walters

I have looked at this but haven't fully worked out what is going on.

Tomi found (on irc) that putting a (select-active-regions nil) to line
212 of notmuch-mua.el solves the problem.

My testing shows that putting a (let ((select-active-regions nil))
around the lines 224-227 in notmuch-mua.el also solves the problem.

However, when trying to narrow the problem I see some odd behaviour: if
you put the let just around the message-cite-original line then the
following happens:

if the primary selection is in some non-emacs window (eg an xterm) then
the bug does not show up but if the primary selection is in the emacs
window and then you initiate the reply then the bug does show up. 

We could just try one of the above two fixes but it could be papering
over something.

Best wishes

Mark




On Wed, 18 Sep 2013, Tomi Ollila tomi.oll...@iki.fi wrote:
 On Wed, Sep 18 2013, Jameson Graef Rollins jroll...@finestructure.net wrote:

 I've just started noticing that when I reply to messages from the emacs
 UI, my X clipboard is filled with the body of the reply message,
 displacing whatever was in there previously.  I'm not sure if this is
 related to my personal emacs configuration, or some non-ideal way we're
 inserting body parts in replies.  However, even if it is a configuration
 issue in my emacs, I suspect that there should be a better way to insert
 the reply body such that there's not even a possibility that it would
 leak into the users X clipboard, regardless of emacs settings.  Any
 thoughts?

 env -u DISPLAY emacs -f notmuch ;)


 .. OK, I'm marking this as a bug -- I witness the same behaviour.

 Originally I thought this relates directly to the fact that mark
 is set at the end of quoted text and (point) is at the beginning of
 buffer -- so that simple c-w can be used to remove the contents in
 case desired... but the X paste provides the original text, not the
 quoted one.

 Someone™ has to dig (deeper) into the code for this...

 jamie.

 Tomi

 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


emacs reply fills X clipboard with reply message body

2013-09-17 Thread Jameson Graef Rollins
I've just started noticing that when I reply to messages from the emacs
UI, my X clipboard is filled with the body of the reply message,
displacing whatever was in there previously.  I'm not sure if this is
related to my personal emacs configuration, or some non-ideal way we're
inserting body parts in replies.  However, even if it is a configuration
issue in my emacs, I suspect that there should be a better way to insert
the reply body such that there's not even a possibility that it would
leak into the users X clipboard, regardless of emacs settings.  Any
thoughts?

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



emacs reply fills X clipboard with reply message body

2013-09-17 Thread Jameson Graef Rollins
I've just started noticing that when I reply to messages from the emacs
UI, my X clipboard is filled with the body of the reply message,
displacing whatever was in there previously.  I'm not sure if this is
related to my personal emacs configuration, or some non-ideal way we're
inserting body parts in replies.  However, even if it is a configuration
issue in my emacs, I suspect that there should be a better way to insert
the reply body such that there's not even a possibility that it would
leak into the users X clipboard, regardless of emacs settings.  Any
thoughts?

jamie.


pgpwr8HoHt1K2.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch