From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Stansell Subject: Re: Bug: org-catch-invisible-edits [8.2.5h (8.2.5h-30-gdd810b-elpa @ ~/.emacs.d/elpa/org/)] Date: Thu, 13 Mar 2014 16:24:26 +0000 Message-ID: References: <8738imw509.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c30ef00e8c7a04f47f63ca Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO8Qn-0006IL-6s for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 12:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO8Qm-0004SJ-4X for emacs-orgmode@gnu.org; Thu, 13 Mar 2014 12:24:29 -0400 In-Reply-To: <8738imw509.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org --001a11c30ef00e8c7a04f47f63ca Content-Type: text/plain; charset=ISO-8859-1 Hi Bastien, Thanks for that info on org-catch-invisible-edits. It wasn't clear to me as the documentation implies that it helps when you "inadvertently edit an invisible part of the buffer", but it seems that the edits have to be results of key presses (not yanks or replaces, etc). I'm not sure how useful I would find the function. I'd like a way to stop any edits (including yanks etc.) on invisible parts of a buffer. I experimented with org-catch-invisible-edits by typing and deleting characters in folded sections of a simple org file. It seem to work well if the insertions or deletions occur at one hidden level down. In this case it opens the folded section and shows the edit after a short delay. But if I edit or delete two hidden sections down it doesn't seem to work properly as it only open the first hidden section and so the edit, which is another level down, is not shown. For example, for the org file below, editing the line "level 2" when both "Section 1" and "Section 2" are folded (hidden) causes only "Section 1" to be unfolded with "Section 2" still folded inside it. Thus, the edits are not visible. * section 1 level 1 ** section 2 level 2 Kind regards, Paul On 13 March 2014 14:24, Bastien wrote: > Hi Paul, > > Paul Stansell writes: > > > Today I came across org-catch-invisible-edits, but I'm struggling to > > get it to work. Since I've never had it working it's possible that > > I'm misunderstanding it or doing something wrong, or maybe it's > > broken. > > > > In my .emacs file I put > > > > (setq org-catch-invisible-edits 'show) > > > > but both 'M-x query-replace' and 'M-x replace-string' still replace > > hidden strings in folded sections of an org file. > > The name of the option is a bit misleading: your setup will catch > *insertions* not editions. To put it simply, it's only active when > inserting a character, not when using general-purpose editing commands > like replace-string. > > I'm not sure it's worth using another name, though. > > -- > Bastien > --001a11c30ef00e8c7a04f47f63ca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Bastien,

Thanks for that info on= org-catch-invisible-edits.=A0 It wasn't clear to me as the documentati= on implies that it helps when you "inadvertently edit an invisible par= t of the buffer", but it seems that the edits have to be results of ke= y presses (not yanks or replaces, etc).

I'm not sure how useful I would find the function.=A0 I&= #39;d like a way to stop any edits (including yanks etc.) on invisible part= s of a buffer.

I experimented with org-catch-invisible-ed= its by typing and deleting characters in folded sections of a simple org fi= le.=A0 It seem to work well if the insertions or deletions occur at one hid= den level down.=A0 In this case it opens the folded section and shows the e= dit after a short delay.=A0 But if I edit or delete two hidden sections dow= n it doesn't seem to work properly as it only open the first hidden sec= tion and so the edit, which is another level down, is not shown.

For example, for the org file below, editing the line "level= 2" when both "Section 1" and "Section 2" are fold= ed (hidden) causes only "Section 1" to be unfolded with "Se= ction 2" still folded inside it.=A0 Thus, the edits are not visible.
* section 1
=A0 level 1
** section 2
=A0=A0 level 2

Kind regards,

Paul



On 13 March 2014 14:24, Bastie= n <bz= g@gnu.org> wrote:
Hi Paul,

Paul Stansell <paulstansell@gm= ail.com> writes:

> Today I came across org-catch-invisible-edits, but I'm struggling = to
> get it to work. =A0Since I've never had it working it's possib= le that
> I'm misunderstanding it or doing something wrong, or maybe it'= s
> broken.
>
> In my .emacs file I put
>
> =A0 (setq org-catch-invisible-edits 'show)
>
> but both 'M-x query-replace' and 'M-x replace-string' = still replace
> hidden strings in folded sections of an org file.

The name of the option is a bit misleading: your setup will catch
*insertions* not editions. =A0To put it simply, it's only active when inserting a character, not when using general-purpose editing commands
like replace-string.

I'm not sure it's worth using another name, though.

--
=A0Bastien

--001a11c30ef00e8c7a04f47f63ca--