Subject: Re: bug#19887: 24.4; Cannot kill buffer; Wrong type argument: overlayp, nil

From: Nicolas Goaziou <[email-masked]>
Date: Wed, 18 Feb 2015 02:12:31 +0100

Hello,

Alexis <[email-masked]> writes:

> On 2015-02-18T06:25:57+1100, Glenn Morris said:
>
> GM> Damian Nadales wrote:
>
>>> - Run emacs -Q
>>> - Create an org-mode file (i.e. ``myorgfile.org``)
>>> - Insert the following text:
>>> o #+BEGIN_SRC C++
>>> #+END_SRC
>>> - Edit the source block by placing the cursor inside the SRC block.
>>> - Start C++ mode (c++-mode)
>>> - Try to kill the buffer.
>
> GM> Please do
>
> GM> M-x toggle-debug-on-error
>
> GM> repeat the problem, and post the resulting backtrace.  (I can't
> GM> reproduce it.)
>
> Running a manually compiled Emacs 24.4.1 on Debian Wheezy(+updates)
> x86_64, and following the above steps, i can't reproduce this either.
>
> From the above description, i assume by the "Start C++ mode" line,
> you're not moving the cursor inside the source block and then doing:
>
>    C-c '
>
> (i.e. `org-edit-special`) in order to open a c++-mode buffer for
> editing the block contents?

This should be fixed. Thank you.

However, it is not a good idea to change major mode in an edit buffer,
as it removes local variables used to synchronize with the source block.
Proper major mode, when non-trivial, should be defined with
``org-src-lang-modes' instead.

Regards,

-- 
Nicolas Goaziou