|
From: | Carsten Dominik |
Subject: | Re: [Orgmode] Weird behaviour with org-yank and org-startup-indented |
Date: | Thu, 21 Oct 2010 19:38:23 +0200 |
On Oct 20, 2010, at 5:33 PM, Chong Yidong wrote:
Julien Danjou <address@hidden> writes:In a Org buffer with org-startup-indented set to t, type: ** TODO abcdefgh Go on `c', activate mark press C-e, press M-w (kill-ring-save). [Wrong primary selection appears]The problem is in org-indent-refresh-section, which is run from a timer.This function first moves point and then calls remove-text-properties, which is considered a buffer change. Since the mark is active, theselection code saves the region to saved-region-selection, from which itis later saved to the primary selection.
Ah, this is interesting, thank you very much!
There are a few possible fixes, but I am yet not sure which is best.One is to avoid setting saved-region-selection inside a timer. Anotheris for save-excursion to inhibit writing to saved-region-selection; athird is not to treat remove-text-properties as a trigger for saving theprimary selection.
I'll go with Stefan's solution, using with-silent-modifications. I had already code that would restore buffer-modified-flag, but apparently this was not enough.
Thanks! - Carsten
[Prev in Thread] | Current Thread | [Next in Thread] |