[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Lentic.0.6 and org mode
From: |
Alan Schmitt |
Subject: |
Re: [O] Lentic.0.6 and org mode |
Date: |
Sat, 10 Jan 2015 13:35:51 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (darwin) |
On 2015-01-09 19:18, address@hidden (Phillip Lord) writes:
>> I've used a similar configuration
>>
>> #+begin_src emacs-lisp
>> (add-hook 'emacs-lisp-mode-hook (lambda () (setq lentic-init
>> 'lentic-orgel-org-init)))
>> #+end_src
>
> Personally, I wouldn't do that! At the moment, my transformation doesn't
> work nicely for all el files. At a minimum, you need code markers at the
> before the first line of lisp and the after the last.
>
> Otherwise, all the code gets treated by org as text; if you run, say,
> "fill-paragraph" in the org-mode lentic view then it will do bad things
> when all the code gets refilled.
What are those markers? The "#+begin_src" one?
Would you recommend using file-local variables for lentic files?
I gave it a try with this file:
lentic_test.el
Description: application/emacs-lisp
and it work well, with the exception of the file local variables that
remain as text.
>> but it's not as nice as in the demo. For instance, the following:
>>
>> #+begin_src emacs-lisp
>> ;;; Code:
>>
>> ;; ** Startup
>>
>> ;; #+begin_src emacs-lisp
>>
>> ;; Turn off mouse interface early in startup to avoid momentary display
>>
>> (if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
>> (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
>> #+end_src
>>
>> becomes
>>
>> #+begin_src org
>> * Code
>>
>> ;; ** Startup
>>
>> ;; #+begin_src emacs-lisp
>>
>> ;; Turn off mouse interface early in startup to avoid momentary display
>>
>> (if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
>> (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
>> #+end_src
>>
>> Why the "Startup" is not promoted at the org level?
>
> If your example is complete, I think it's because your code markers are
> unbalanced. Look in the *lentic-log* buffer and you should see lots of
> "delimiters do not match". Put a ";; #+end_src" in place and it should
> fix itself.
This was not a full example, so there was the end marker. But as there
is a lot of code below it as well (without markers), this may be the
issue. The small example above works well.
> This should probably be smoothed over in the user interface. I could
> tell the user when the lentic buffer is created. You've also uncovered a
> bug -- when the delimiters do not match, it's should be doing the safest
> transformation of all which is a direct copy; so the "* Code" line
> should have been left alone also.
By the way, what is the correct way of exiting lentic mode? For the
moment I kill the buffer and the window, but it would be nice to have
a function that exits lentic.
Thanks,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
signature.asc
Description: PGP signature
- Re: [O] Lentic.0.6 and org mode, (continued)
- Re: [O] Lentic.0.6 and org mode, joakim, 2015/01/11
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Thierry Banel, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Thierry Banel, 2015/01/16
- Re: [O] Lentic.0.6 and org mode, Thomas S. Dye, 2015/01/16
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/16
Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/09
Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/09
- Re: [O] Lentic.0.6 and org mode,
Alan Schmitt <=
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Alan Schmitt, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/15
- Re: [O] Lentic.0.6 and org mode, Alan Schmitt, 2015/01/16
- Re: [O] Lentic.0.6 and org mode, Phillip Lord, 2015/01/16