emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Overlays and elisp code


From: Dan Davison
Subject: [Orgmode] Re: Overlays and elisp code
Date: Tue, 01 Feb 2011 10:51:23 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin)

Jeff Horn <address@hidden> writes:

> I can reproduce this. emacs 23.1 and org 7.4
>
> On Mon, Jan 31, 2011 at 5:04 AM, Andrea Crotti
> <address@hidden> wrote:
>> I found a strange behaviour which might be a bug, but maybe of my
>> configuration.
>>
>> This is org mode version:
>> Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
>> and emacs:
>> "GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29)
>>  of 2010-05-09 on linc"
>>
>> To reproduce the bug I do
>> - go over an elisp code block
>> - C-c ' to edit in the overlay
>> - C-c ' to go back when done
>>
>> And it works perfectly, BUT if for example I remove a parenthesis before
>> pressing C-c ', I can't go back.
>>
>> C-c ' becomes undefined and I have to kill both the overlay and the
>> original buffer.
>>
>> While I was writing I also found the cause of the problem, Paredit!
>> Removing the hook from emacs-lisp-mode-hook fixes this, but paredit is
>> really useful with elisp, maybe someone has an idea of why this happens?

Hi Andrea,

So it looks like paredit-mode refuses to start up (throws an error) if
the parentheses are unbalanced. So how about we use

#+begin_src emacs-lisp
(add-hook 'emacs-lisp-mode-hook
          (lambda ()
            (condition-case nil
                (paredit-mode)
              (error (message "Failed to activate paredit mode")))))
#+end_src

At the moment this message gets stamped on by a message which
org-edit-src always issues in the echo-area. I'm going to submit a patch
to control that in a subsequent email.

Oh no. You got me editing elisp with paredit mode turned on. Maybe it
will last more than 5 minutes this time :)

Dan

>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]