From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: Bug: Editing src blocks: user-error: Cannot modify an area being edited in a dedicated buffer [9.1.4 (9.1.4-2-g118753-elpaplus @ /home/paul/.emacs.d/elpa/org-plus-contrib-20171211/)] Date: Fri, 22 Dec 2017 18:24:38 +0800 Message-ID: <655b5ab4-2df9-9570-f4b9-8fcb7ac3fbda@gmail.com> References: <87o9mwkvtq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------1A799A7A53C21D0E9530621D" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSKVU-0001U1-5d for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 05:24:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSKVR-0002IO-0y for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 05:24:48 -0500 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:34998) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSKVQ-0002Fy-P1 for emacs-orgmode@gnu.org; Fri, 22 Dec 2017 05:24:44 -0500 Received: by mail-it0-x22a.google.com with SMTP id f143so14154918itb.0 for ; Fri, 22 Dec 2017 02:24:44 -0800 (PST) Received: from [0.0.0.0] ([119.28.89.243]) by smtp.gmail.com with ESMTPSA id j20sm12208169ioo.37.2017.12.22.02.24.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 02:24:42 -0800 (PST) In-Reply-To: Content-Language: en-US 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" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------1A799A7A53C21D0E9530621D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit @Paul Do you have similar config? I use it to enable flycheck in editing temp src buffer. (defadvice org-edit-src-code (around set-buffer-file-name activate compile)   (let ((file-name (buffer-file-name)))     ad-do-it     (setq buffer-file-name file-name))) On 12/22/2017 06:39 AM, Paul Davis wrote: > > Turns out that the issue was caused by trying to disable a flycheck > checker using the org edit src hook > > > On Mon, Dec 18, 2017, 6:30 AM Nicolas Goaziou > wrote: > > Hello, > > Paul Davis > writes: > > > Using ~C-c '~ to edit a src block works as expected, but if I make > > changes and use ~C-c '~ again, I get the error ~Cannot modify an > area > > being edited in a dedicated buffer~ > > I need more information. Where do you make changes? In the newly > created > buffer? Where do you call ~C-c '~? > > For example, I created the following buffer > >     #+begin_src emacs-lisp >       (+ 1 2) >     #+end_src > > moved on the source block, used C-c '. Then, in the new buffer, > I replaced 2 with 3 and pressed C-c ' again, without any error? > > IOW, could you provide a precise recipe demonstrating the issue? > > Thank you. > > Regards, > > -- > Nicolas Goaziou > --------------1A799A7A53C21D0E9530621D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

@Paul Do you have similar config? I use it to enable flycheck in editing temp src buffer.


(defadvice org-edit-src-code (around set-buffer-file-name activate compile)
  (let ((file-name (buffer-file-name)))
    ad-do-it
    (setq buffer-file-name file-name)))


On 12/22/2017 06:39 AM, Paul Davis wrote:

Turns out that the issue was caused by trying to disable a flycheck checker using the org edit src hook


On Mon, Dec 18, 2017, 6:30 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Paul Davis <paul.dangersalad@gmail.com> writes:

> Using ~C-c '~ to edit a src block works as expected, but if I make
> changes and use ~C-c '~ again, I get the error ~Cannot modify an area
> being edited in a dedicated buffer~

I need more information. Where do you make changes? In the newly created
buffer? Where do you call ~C-c '~?

For example, I created the following buffer

    #+begin_src emacs-lisp
      (+ 1 2)
    #+end_src

moved on the source block, used C-c '. Then, in the new buffer,
I replaced 2 with 3 and pressed C-c ' again, without any error?

IOW, could you provide a precise recipe demonstrating the issue?

Thank you.

Regards,

--
Nicolas Goaziou

--------------1A799A7A53C21D0E9530621D--