From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: [Orgmode] Weird behaviour with org-yank and org-startup-indented Date: Wed, 20 Oct 2010 17:37:08 +0200 Message-ID: References: <87bp6vpks7.fsf@keller.adm.naquadah.org> <3B1391C6-72E9-4BAA-9197-7B27B26249BC@gmail.com> <87wrpcdgl0.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1287589133 11413 80.91.229.12 (20 Oct 2010 15:38:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2010 15:38:53 +0000 (UTC) Cc: emacs-devel@gnu.org, emacs-orgmode@gnu.org, Carsten Dominik To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 17:38:51 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8akd-0005Nu-0n for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 17:38:51 +0200 Original-Received: from localhost ([127.0.0.1]:55045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8akc-0004x6-Gz for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2010 11:38:50 -0400 Original-Received: from [140.186.70.92] (port=40889 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8ajM-0004LB-6p for emacs-devel@gnu.org; Wed, 20 Oct 2010 11:37:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8ajL-0005Tg-05 for emacs-devel@gnu.org; Wed, 20 Oct 2010 11:37:32 -0400 Original-Received: from mail-qy0-f169.google.com ([209.85.216.169]:38615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8ajK-0005TM-U0; Wed, 20 Oct 2010 11:37:30 -0400 Original-Received: by qyk34 with SMTP id 34so1577177qyk.0 for ; Wed, 20 Oct 2010 08:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=BOVmk3ZNWs8tAAM3PSR3jLC4Qps87Ztq4Z1f/rhPEKE=; b=INd0V0ouVx3QfGvBI09X3iH8ic0c32kWfHxnN2AHght2tWdQCF1sgq7Q6Mvpo1Ex6d 5SJ0Xrkg+0CJnvKkj/WR2mIIZ9nOBC3jLX788v668Rf/ngH+wUSdMHX1Ah3m/JyGjpDp rbvPXetdh+OXs9bWRDerunhLkU/Ogl9BK5lmU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=KWnqFO7G7L5buZF7g5GA5l+C9iW6yCgAJv729RcZz4tXgWhh8IY0DABImjRP52wrYq LfiJy36bGkJe2OP1EpqnP5cz/kLCA3GiAJz3T/sBwG13jQ1Tr/m/bxSGpgsOsfkK+sn9 C8qJCTNRcWPsyNJW5cwtYP0vd2KQCakS9o+1Y= Original-Received: by 10.224.125.149 with SMTP id y21mr4290741qar.187.1287589049140; Wed, 20 Oct 2010 08:37:29 -0700 (PDT) Original-Received: by 10.229.224.199 with HTTP; Wed, 20 Oct 2010 08:37:08 -0700 (PDT) In-Reply-To: <87wrpcdgl0.fsf@stupidchicken.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131893 gmane.emacs.orgmode:32162 Archived-At: On Wed, Oct 20, 2010 at 5:33 PM, Chong Yidong wrote= : > Julien Danjou 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. =C2=A0Since the mark is active, the > selection code saves the region to saved-region-selection, from which it > is later saved to the primary selection. > > 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. =C2=A0Anot= her > is for save-excursion to inhibit writing to saved-region-selection; a > third is not to treat remove-text-properties as a trigger for saving the > primary selection. Another possibility is to protect remove-text-properties from marking the buffer as changed (just as font-lock does).