From: Carsten Dominik <carsten.dominik@gmail.com> To: Chong Yidong <cyd@stupidchicken.com> Cc: Julien Danjou <julien@danjou.info>, Org Mode <emacs-orgmode@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA>, Emacs developers <emacs-devel@gnu.org> Subject: Re: Weird behaviour with org-yank and org-startup-indented Date: Thu, 21 Oct 2010 19:38:23 +0200 [thread overview] Message-ID: <9948E9DE-A91D-41D8-A480-0C292B1199A3@gmail.com> (raw) In-Reply-To: <87wrpcdgl0.fsf@stupidchicken.com> On Oct 20, 2010, at 5:33 PM, Chong Yidong wrote: > Julien Danjou <julien@danjou.info> 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, the > selection code saves the region to saved-region-selection, from > which it > is 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. > Another > 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. 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 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
WARNING: multiple messages have this Message-ID (diff)
From: Carsten Dominik <carsten.dominik@gmail.com> To: Chong Yidong <cyd@stupidchicken.com> Cc: Julien Danjou <julien@danjou.info>, Org Mode <emacs-orgmode@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA>, Emacs developers <emacs-devel@gnu.org> Subject: Re: Weird behaviour with org-yank and org-startup-indented Date: Thu, 21 Oct 2010 19:38:23 +0200 [thread overview] Message-ID: <9948E9DE-A91D-41D8-A480-0C292B1199A3@gmail.com> (raw) In-Reply-To: <87wrpcdgl0.fsf@stupidchicken.com> On Oct 20, 2010, at 5:33 PM, Chong Yidong wrote: > Julien Danjou <julien@danjou.info> 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, the > selection code saves the region to saved-region-selection, from > which it > is 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. > Another > 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. 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
next prev parent reply other threads:[~2010-10-21 17:38 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-15 14:56 Weird behaviour with org-yank and org-startup-indented Julien Danjou 2010-10-17 6:08 ` Carsten Dominik 2010-10-18 14:37 ` Julien Danjou 2010-10-18 14:37 ` Julien Danjou 2010-10-20 12:31 ` [Orgmode] " Julien Danjou 2010-10-20 15:09 ` Chong Yidong 2010-10-20 15:24 ` Julien Danjou 2010-10-20 15:38 ` Andreas Röhler 2010-10-20 15:58 ` [Orgmode] " Chong Yidong 2010-10-20 15:33 ` Chong Yidong 2010-10-20 15:37 ` Lennart Borgman 2010-10-20 17:38 ` Stefan Monnier 2010-10-21 17:40 ` Chong Yidong 2010-10-21 17:38 ` Carsten Dominik [this message] 2010-10-21 17:38 ` Carsten Dominik
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9948E9DE-A91D-41D8-A480-0C292B1199A3@gmail.com \ --to=carsten.dominik@gmail.com \ --cc=cyd@stupidchicken.com \ --cc=emacs-devel@gnu.org \ --cc=emacs-orgmode@gnu.org \ --cc=julien@danjou.info \ --cc=monnier@IRO.UMontreal.CA \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.