emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Lentic.0.6 and org mode
@ 2015-01-08 13:55 Phillip Lord
  2015-01-08 22:24 ` Thierry Banel
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-08 13:55 UTC (permalink / raw)
  To: emacs-orgmode



I thought some of you might be interested in the new release of my
package, lentic. One of the things that it now does is allow
multi-modal of editing of Emacs source, using org mode for the
documentation. I realise that it's already possible to use ELPA
org-babel to write literate el files, or to use outorg.el, but lentic
provides a different form of interaction. You can edit the org form or
the emacs-lisp form as you choose. The source code of lentic is, itself,
written in this way. There is a screen cast linked below which shows
what the interaction looks like.

Available on MELPA-stable, MELPA and Marmalade
https://github.com/phillord/lentic
http://www.russet.org.uk/blog/3035
https://vimeo.com/116078853

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-08 13:55 Lentic.0.6 and org mode Phillip Lord
@ 2015-01-08 22:24 ` Thierry Banel
  2015-01-11 12:33   ` joakim
  0 siblings, 1 reply; 18+ messages in thread
From: Thierry Banel @ 2015-01-08 22:24 UTC (permalink / raw)
  To: emacs-orgmode

Nice!

I spent some time figuring out how to use it.

This is what I did eventually:
  M-xlentic-mode
  M-xlentic-mode   ;; twice
  M-x lentic-mode-split-window-below
Then change the new buffer to the desired mode (Java mode, C++ mode,
whatever).
(I was created in fundamental mode).

Is this the standard way to use it?

Thierry


Le 08/01/2015 14:55, Phillip Lord a écrit :
> I thought some of you might be interested in the new release of my
> package, lentic. One of the things that it now does is allow
> multi-modal of editing of Emacs source, using org mode for the
> documentation. I realise that it's already possible to use ELPA
> org-babel to write literate el files, or to use outorg.el, but lentic
> provides a different form of interaction. You can edit the org form or
> the emacs-lisp form as you choose. The source code of lentic is, itself,
> written in this way. There is a screen cast linked below which shows
> what the interaction looks like.
>
> Available on MELPA-stable, MELPA and Marmalade
> https://github.com/phillord/lentic
> http://www.russet.org.uk/blog/3035
> https://vimeo.com/116078853
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
@ 2015-01-09 17:12 Phillip Lord
  2015-01-09 17:57 ` Alan Schmitt
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-09 17:12 UTC (permalink / raw)
  To: emacs-orgmode



I normally do

(global-lentic-start-mode)

which just adds some keybindings for you.

Then, do one of

lentic-mode-create-in-selected-window, (C-c,h)
lentic-mode-split-window-below, (C-c,b)
lentic-mode-split-window-right (C-c,r)

Or there are menu items which does the same.

All of these create the "lentic" view, and put in a window as you might
guess. By default, it does indeed come up in fundamental mode (probably
that's not sensible, and I should set it to the same mode as the
starting buffer.

It's configurable, though. By default, the two windows share the same
text (which is nearly the same behaviour as indirect buffers). But they
can also be different (but related). I use a file or dir-local variable
for this. So, the lentic source code uses:

((emacs-lisp-mode
  .
  ((lentic-init . lentic-orgel-org-init)
   (eval . (require 'm-buffer-macro)))))

This gives the behaviour shown in this screen cast.

https://vimeo.com/116078853

The eval thing is just to make sure some macros are loaded, so that that
they indent properly, which is an orthogonal issue.

None of this is org or Emacs-lisp specific. I just added that because I
could, and it wasn't that much effort (okay, so it was more effort than
I expected, but there you go). I wrote it in the first place for Clojure
and asciidoc, but am actually using it with clojure and latex.

Phil


> Nice!
> 
> I spent some time figuring out how to use it.
> 
> This is what I did eventually:
>   M-xlentic-mode
>   M-xlentic-mode   ;; twice
>   M-x lentic-mode-split-window-below
> Then change the new buffer to the desired mode (Java mode, C++ mode,
> whatever).
> (I was created in fundamental mode).
> 
> Is this the standard way to use it?
> 
> Thierry

> Le 08/01/2015 14:55, Phillip Lord a écrit :
> > I thought some of you might be interested in the new release of my
> > package, lentic. One of the things that it now does is allow
> > multi-modal of editing of Emacs source, using org mode for the
> > documentation. I realise that it's already possible to use ELPA
> > org-babel to write literate el files, or to use outorg.el, but lentic
> > provides a different form of interaction. You can edit the org form or
> > the emacs-lisp form as you choose. The source code of lentic is, itself,
> > written in this way. There is a screen cast linked below which shows
> > what the interaction looks like.
> >
> > Available on MELPA-stable, MELPA and Marmalade
> > https://github.com/phillord/lentic
> > http://www.russet.org.uk/blog/3035
> > https://vimeo.com/116078853
> >
> >

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-09 17:12 Phillip Lord
@ 2015-01-09 17:57 ` Alan Schmitt
  0 siblings, 0 replies; 18+ messages in thread
From: Alan Schmitt @ 2015-01-09 17:57 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

On 2015-01-09 17:12, phillip.lord@newcastle.ac.uk (Phillip Lord) writes:

> It's configurable, though. By default, the two windows share the same
> text (which is nearly the same behaviour as indirect buffers). But they
> can also be different (but related). I use a file or dir-local variable
> for this. So, the lentic source code uses:
>
> ((emacs-lisp-mode
>   .
>   ((lentic-init . lentic-orgel-org-init)
>    (eval . (require 'm-buffer-macro)))))

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

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?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
@ 2015-01-09 19:18 Phillip Lord
  2015-01-10 12:35 ` Alan Schmitt
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-09 19:18 UTC (permalink / raw)
  To: emacs-orgmode

> On 2015-01-09 17:12, address@hidden (Phillip Lord) writes:
> 
> > It's configurable, though. By default, the two windows share the same
> > text (which is nearly the same behaviour as indirect buffers). But they
> > can also be different (but related). I use a file or dir-local variable
> > for this. So, the lentic source code uses:
> >
> > ((emacs-lisp-mode
> >   .
> >   ((lentic-init . lentic-orgel-org-init)
> >    (eval . (require 'm-buffer-macro)))))
> 
> 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.


> 
> 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 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.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-09 19:18 Phillip Lord
@ 2015-01-10 12:35 ` Alan Schmitt
  2015-01-15 15:54   ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Schmitt @ 2015-01-10 12:35 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 811 bytes --]

On 2015-01-09 19:18, phillip.lord@newcastle.ac.uk (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:


[-- Attachment #1.2: lentic_test.el --]
[-- Type: application/emacs-lisp, Size: 201 bytes --]

[-- Attachment #1.3: Type: text/plain, Size: 1854 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-08 22:24 ` Thierry Banel
@ 2015-01-11 12:33   ` joakim
  2015-01-15 16:11     ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: joakim @ 2015-01-11 12:33 UTC (permalink / raw)
  To: emacs-orgmode

Thierry Banel <tbanelwebmin@free.fr> writes:

> Nice!

I also tried it and found it really interesting!

>
> I spent some time figuring out how to use it.
>
> This is what I did eventually:
>   M-xlentic-mode
>   M-xlentic-mode   ;; twice
>   M-x lentic-mode-split-window-below
> Then change the new buffer to the desired mode (Java mode, C++ mode,
> whatever).
> (I was created in fundamental mode).
>
> Is this the standard way to use it?

I also scratched my head before figuring anything out.

I installed from Melpa, and the Melpa Lentic comes with 0 docs, which is sad.

Then I cloned the github repo, and tried the examples, and got a bit
more enlightened.

To summarize, it would be nice if Lentic came with some form of docs in
the Melpa repo. Or, why not install it en Elpa?

BTW my interest in Lentic comes from that I recently started using
Litterate programming for my emacs init file (which works very well)
and also for some clojure/overtone code, where the literate paradigm is
pretty useful (because overtone is a music live coding environment)



>
> Thierry
>
>
> Le 08/01/2015 14:55, Phillip Lord a écrit :
>> I thought some of you might be interested in the new release of my
>> package, lentic. One of the things that it now does is allow
>> multi-modal of editing of Emacs source, using org mode for the
>> documentation. I realise that it's already possible to use ELPA
>> org-babel to write literate el files, or to use outorg.el, but lentic
>> provides a different form of interaction. You can edit the org form or
>> the emacs-lisp form as you choose. The source code of lentic is, itself,
>> written in this way. There is a screen cast linked below which shows
>> what the interaction looks like.
>>
>> Available on MELPA-stable, MELPA and Marmalade
>> https://github.com/phillord/lentic> http://www.russet.org.uk/blog/3035> https://vimeo.com/116078853>
>>
>
>
>

-- 
Joakim Verona

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-10 12:35 ` Alan Schmitt
@ 2015-01-15 15:54   ` Phillip Lord
  2015-01-15 17:24     ` Alan Schmitt
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-15 15:54 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> On 2015-01-09 19:18, phillip.lord@newcastle.ac.uk (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?

Sorry for the delay in replying.

Yep -- lentic is using the org-mode delimiters.


> Would you recommend using file-local variables for lentic files?

This works well. There is a function `lentic-mode-insert-file-local'
which helps with this. I am generally moving toward dir-locals though,
as this is less typing and generally easier.


> I gave it a try with this file:
>
>
>
> and it work well, with the exception of the file local variables that
> remain as text.

You have to double comment the file-local like so:

;; # Local Variables:
;; # lentic-init: lentic-orgel-org-init
;; # End:

Then it is commented in both forms.


>>
>> 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.

Good. If you find any examples which fail, I'd be happy to look.



>> 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.

At the moment, killing one or the other lentic buffers does the job.
Lentic checks for the killed buffer and all should be good. An "exit
lentic" command might be nice, indeed. It could close all lentic buffers
except the first (currently lentic only supports one buffer, but
eventually it should support many). But killing the buffer works fine
also.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-11 12:33   ` joakim
@ 2015-01-15 16:11     ` Phillip Lord
  2015-01-15 20:53       ` Thierry Banel
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-15 16:11 UTC (permalink / raw)
  To: joakim; +Cc: emacs-orgmode


<joakim@verona.se> writes:

> Thierry Banel <tbanelwebmin@free.fr> writes:
>
>> Nice!
>
> I also tried it and found it really interesting!

Thank you.

>
>>
>> I spent some time figuring out how to use it.
>>
>> This is what I did eventually:
>>   M-xlentic-mode
>>   M-xlentic-mode   ;; twice
>>   M-x lentic-mode-split-window-below
>> Then change the new buffer to the desired mode (Java mode, C++ mode,
>> whatever).
>> (I was created in fundamental mode).
>>
>> Is this the standard way to use it?
>
> I also scratched my head before figuring anything out.
>
> I installed from Melpa, and the Melpa Lentic comes with 0 docs, which is sad.

What sort of docs are you looking for? Info?

> Then I cloned the github repo, and tried the examples, and got a bit
> more enlightened.
>
> To summarize, it would be nice if Lentic came with some form of docs in
> the Melpa repo. 

Of course, even when installed from Melpa it is self-documenting in the
sense that the source files are full of documentation. The lentic-org.el
file contains a description of how to convert an existing file from
being an normal el file to an "orgel" file (which is the name I have
given to an el file that converts cleanly to an org file with lentic).

I could translate these to info (via org-mode and texinfo). But melpa
presents a challenge here, since it works on the source only, and I need
to generate the texinfo from the source, at least as far as I know. So,
unless, I can get MELPA to run arbitrary lisp during build, I do not
know how this would work. Or I could denormalise my git repo and
put the generated files in there; not ideal.


> Or, why not install it en Elpa?

It depends on dash.el which is not on ELPA. It's not that dependent on
dash, though, so I could write dash.el out if I really needed to, but I
am hoping that dash gets into ELPA before I reach 1.0.


> BTW my interest in Lentic comes from that I recently started using
> Litterate programming for my emacs init file (which works very well)
> and also for some clojure/overtone code, where the literate paradigm is
> pretty useful (because overtone is a music live coding environment)

This was fairly similar to my driving use case, to be honest, where I am
combining a Clojure based ontology development environment with
documentation. I mentioned it to Sam Aaron last time I saw him, as I
think he uses org-mode performance notes. I can't remember whether I had
org-mode integration at that point, and it was slower then. I should
ping him again.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 15:54   ` Phillip Lord
@ 2015-01-15 17:24     ` Alan Schmitt
  2015-01-15 22:28       ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Schmitt @ 2015-01-15 17:24 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]

On 2015-01-15 15:54, phillip.lord@newcastle.ac.uk (Phillip Lord) writes:

> Good. If you find any examples which fail, I'd be happy to look.

It's not really failing, but I don't know how to put the end of file
markers so that lentic likes it. For instance:

--8<---------------cut here---------------start------------->8---
;;; lentic_test --- testing it

;;; Commentary:

;; this is a test

;;; Code:

;; a comment

;; ** a subsection

;; #+begin_src emacs-lisp
(message "foo")
;; #+end_src

;; #+begin_src emacs-lisp
(provide 'lentic_test)
;; #+end_src

;; # Local Variables:
;; # lentic-init: lentic-orgel-org-init
;; # End:

;;; lentic_test.el ends here
--8<---------------cut here---------------end--------------->8---

The last line is not nicely typeset.

>> 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.
>
> At the moment, killing one or the other lentic buffers does the job.
> Lentic checks for the killed buffer and all should be good. An "exit
> lentic" command might be nice, indeed. It could close all lentic buffers
> except the first (currently lentic only supports one buffer, but
> eventually it should support many). But killing the buffer works fine
> also.

Right now it's a three steps process:
- kill the buffer
- confirm the kill as it's modified (the "org" buffer)
- close the window

This is why I think a lentic-exit command would be great.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 16:11     ` Phillip Lord
@ 2015-01-15 20:53       ` Thierry Banel
  2015-01-15 22:41         ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: Thierry Banel @ 2015-01-15 20:53 UTC (permalink / raw)
  To: emacs-orgmode

Le 15/01/2015 17:11, Phillip Lord a écrit :
>>> I spent some time figuring out how to use it.
>>>
>>> This is what I did eventually:
>>>   M-xlentic-mode
>>>   M-xlentic-mode   ;; twice
>>>   M-x lentic-mode-split-window-below
>>> Then change the new buffer to the desired mode (Java mode, C++ mode,
>>> whatever).
>>> (I was created in fundamental mode).
>>>
>>> Is this the standard way to use it?
>> I also scratched my head before figuring anything out.
>>
>> I installed from Melpa, and the Melpa Lentic comes with 0 docs, which is sad.
> What sort of docs are you looking for? Info?
>
>
> Of course, even when installed from Melpa it is self-documenting in the
> sense that the source files are full of documentation. The lentic-org.el
> file contains a description of how to convert an existing file from
> being an normal el file to an "orgel" file (which is the name I have
> given to an el file that converts cleanly to an org file with lentic).
>
> I could translate these to info (via org-mode and texinfo). But melpa
> presents a challenge here, since it works on the source only, and I need
> to generate the texinfo from the source, at least as far as I know. So,
> unless, I can get MELPA to run arbitrary lisp during build, I do not
> know how this would work. Or I could denormalise my git repo and
> put the generated files in there; not ideal.
>
>

One possibility, not as good as info, but quite easy, is given by
GitHub. Replace your current README.md with a README.org, in org-mode
syntax. Then tell Melpa that the Lentic home page is
https://github.com/phillord/lentic. And begin this documentation with a
"quick start" chapter.

Thierry

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 17:24     ` Alan Schmitt
@ 2015-01-15 22:28       ` Phillip Lord
  2015-01-16 10:15         ` Alan Schmitt
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-15 22:28 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> On 2015-01-15 15:54, phillip.lord@newcastle.ac.uk (Phillip Lord) writes:
>
>> Good. If you find any examples which fail, I'd be happy to look.
>
> It's not really failing, but I don't know how to put the end of file
> markers so that lentic likes it. For instance:
>
> ;; #+begin_src emacs-lisp
> (message "foo")
> ;; #+end_src
>
> ;; #+begin_src emacs-lisp
> (provide 'lentic_test)
> ;; #+end_src
>
> ;; # Local Variables:
> ;; # lentic-init: lentic-orgel-org-init
> ;; # End:
>
> ;;; lentic_test.el ends here
>
>
> The last line is not nicely typeset.

So, local variables comes *after* the ends here line. Currently, the
"ends here" line needs to be *inside* a source block, so you would have...



;; #+begin_src emacs-lisp
(message "foo")
;; #+end_src

;; #+begin_src emacs-lisp
(provide 'lentic_test)
;;; lentic_test.el ends here
;; #+end_src


;; # Local Variables:
;; # lentic-init: lentic-orgel-org-init
;; # End:



I am debating the last bit. I could treat the last line specially, as I
do the first, so it would end up as

# # lentic_test.el ends here

in the org-mode version. But then it would not appear in the any
org-mode output when perhaps it should.

>> At the moment, killing one or the other lentic buffers does the job.
>> Lentic checks for the killed buffer and all should be good. An "exit
>> lentic" command might be nice, indeed. It could close all lentic buffers
>> except the first (currently lentic only supports one buffer, but
>> eventually it should support many). But killing the buffer works fine
>> also.
>
> Right now it's a three steps process:
> - kill the buffer
> - confirm the kill as it's modified (the "org" buffer)
> - close the window
>
> This is why I think a lentic-exit command would be great.

Ah, okay. Currently, the save-buffer command in the org lentic view
should also save the .el version (I have the two hooked together). I was
thinking of adding two new features -- an auto-delete capability, so
that the file associated with the org-mode version is deleted when the
buffer is closed (or Emacs exists). This is to stop leaving lots of org
files around the place.

The process would then be

- save-buffer
- kill-buffer

I could also modify kill-buffer so that iff auto-delete is set, the
modification will not trigger save requests.

Can I ask, why do you want to kill the buffer? Why not just bury it?

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 20:53       ` Thierry Banel
@ 2015-01-15 22:41         ` Phillip Lord
  2015-01-16 18:43           ` Thierry Banel
  0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2015-01-15 22:41 UTC (permalink / raw)
  To: Thierry Banel; +Cc: emacs-orgmode

Thierry Banel <tbanelwebmin@free.fr> writes:

> Le 15/01/2015 17:11, Phillip Lord a écrit :
>>>> I spent some time figuring out how to use it.
>> Of course, even when installed from Melpa it is self-documenting in the
>> sense that the source files are full of documentation. The lentic-org.el
>> file contains a description of how to convert an existing file from
>> being an normal el file to an "orgel" file (which is the name I have
>> given to an el file that converts cleanly to an org file with lentic).
>>
>> I could translate these to info (via org-mode and texinfo). But melpa
>> presents a challenge here, since it works on the source only, and I need
>> to generate the texinfo from the source, at least as far as I know. So,
>> unless, I can get MELPA to run arbitrary lisp during build, I do not
>> know how this would work. Or I could denormalise my git repo and
>> put the generated files in there; not ideal.
>>
>>
>
> One possibility, not as good as info, but quite easy, is given by
> GitHub. Replace your current README.md with a README.org, in org-mode
> syntax.

Why this replacement? md or org should both work right? Or am I missing
something?

> Then tell Melpa that the Lentic home page is
> https://github.com/phillord/lentic.

I think it already has this.

> And begin this documentation with a "quick start" chapter.

I'm trying to avoid putting too much in README because it is already
documented in lentic and the other sources -- although, its clearly not
easy for people to find these.

For the next version, I will write some local tools to generate HTML
from source. Then I can expand the README to just point to those. And,
yes, an easy to find "quick-start" chapter would be good.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 22:28       ` Phillip Lord
@ 2015-01-16 10:15         ` Alan Schmitt
  2015-01-16 11:01           ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Schmitt @ 2015-01-16 10:15 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

On 2015-01-15 22:28, phillip.lord@newcastle.ac.uk (Phillip Lord) writes:

> So, local variables comes *after* the ends here line. Currently, the
> "ends here" line needs to be *inside* a source block, so you would have...
>
> ;; #+begin_src emacs-lisp
> (message "foo")
> ;; #+end_src
>
> ;; #+begin_src emacs-lisp
> (provide 'lentic_test)
> ;;; lentic_test.el ends here
> ;; #+end_src
>
>
> ;; # Local Variables:
> ;; # lentic-init: lentic-orgel-org-init
> ;; # End:

I gave this a try and it works well.

> Can I ask, why do you want to kill the buffer? Why not just bury it?

Because otherwise I get this the next time I start lentic for the same
file:

A buffer is visiting /Users/schmitta/tmp/lentic_test.org; proceed? (y or n) y

and I get yet another buffer.

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-16 10:15         ` Alan Schmitt
@ 2015-01-16 11:01           ` Phillip Lord
  0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2015-01-16 11:01 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I gave this a try and it works well.
>
>> Can I ask, why do you want to kill the buffer? Why not just bury it?
>
> Because otherwise I get this the next time I start lentic for the same
> file:
>
> A buffer is visiting /Users/schmitta/tmp/lentic_test.org; proceed? (y or n) y
>
> and I get yet another buffer.


Oh, yeah, that. This needs fixing. In general you don't need to create a
new buffer, just do `lentic-mode-move-lentic-window' (C-c,h or "here" in
the menu item) or `lentic-mode-swap-lentic-windows' (C-c,s and supposed
to be in the menu, but I've just found it's bugged!). Personally, I do
   
(define-key lentic-mode-map [f1]
                        'lentic-mode-move-lentic-window)

which lets me switch backward and forward in the same window very quickly.

I will probably remove "create" at some point -- "here" and "swap"
should just create if necessary.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-15 22:41         ` Phillip Lord
@ 2015-01-16 18:43           ` Thierry Banel
  2015-01-16 20:18             ` Thomas S. Dye
  0 siblings, 1 reply; 18+ messages in thread
From: Thierry Banel @ 2015-01-16 18:43 UTC (permalink / raw)
  To: emacs-orgmode

Le 15/01/2015 23:41, Phillip Lord a écrit :
> Thierry Banel <tbanelwebmin@free.fr> writes:
>
>> Le 15/01/2015 17:11, Phillip Lord a écrit :
>> One possibility, not as good as info, but quite easy, is given by
>> GitHub. Replace your current README.md with a README.org, in org-mode
>> syntax.
> Why this replacement? md or org should both work right? Or am I missing
> something?

You are not missing anything. MD or ORG do the job. It is just that your
public is made of Emacs users, and Org-mode users. So ORG sounds
familiar. GitHub renders pretty well ORG documents. And maybe someday
there will be converters from ORG to INFO.

>> Then tell Melpa that the Lentic home page is
>> https://github.com/phillord/lentic.
> I think it already has this.

Yes, you are right, there is a "homepage" button in
http://melpa.org/#/lentic

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-16 18:43           ` Thierry Banel
@ 2015-01-16 20:18             ` Thomas S. Dye
  2015-01-16 23:46               ` Phillip Lord
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas S. Dye @ 2015-01-16 20:18 UTC (permalink / raw)
  To: Thierry Banel; +Cc: emacs-orgmode

Thierry Banel <tbanelwebmin@free.fr> writes:

> You are not missing anything. MD or ORG do the job. It is just that your
> public is made of Emacs users, and Org-mode users. So ORG sounds
> familiar. GitHub renders pretty well ORG documents. And maybe someday
> there will be converters from ORG to INFO.

Does INFO refer to the output of texinfo? If so, then there is already a
path from ORG to INFO.  Jonathan Leech-Pepin has contributed a really
nice texinfo exporter to the Org mode core, ox-texinfo.el.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Lentic.0.6 and org mode
  2015-01-16 20:18             ` Thomas S. Dye
@ 2015-01-16 23:46               ` Phillip Lord
  0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2015-01-16 23:46 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Thierry Banel, emacs-orgmode

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Thierry Banel <tbanelwebmin@free.fr> writes:
>
>> You are not missing anything. MD or ORG do the job. It is just that your
>> public is made of Emacs users, and Org-mode users. So ORG sounds
>> familiar. GitHub renders pretty well ORG documents. And maybe someday
>> there will be converters from ORG to INFO.
>
> Does INFO refer to the output of texinfo? If so, then there is already a
> path from ORG to INFO.  Jonathan Leech-Pepin has contributed a really
> nice texinfo exporter to the Org mode core, ox-texinfo.el.


Yeah. And indeed, lentic.el produces a reasonable .info via my own
lentic conversion, to org, to texinfo to info!.

The problem with MELPA specifically is that there is no way to run the
first two of these steps. They might be willing to add an org->texinfo
conversion.

https://github.com/milkypostman/melpa/issues/2251

It doubt that they are going to add support for lentic to convert
itself, though, at least not till all Emacs packages use it (I have
delusions of grandeur).

I'll talk with the melpa folks to see if anything can be done. Failing
that, I'll generate out the documentation, and stick it on a URL
somewhere.

Phil

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-01-16 23:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08 13:55 Lentic.0.6 and org mode Phillip Lord
2015-01-08 22:24 ` Thierry Banel
2015-01-11 12:33   ` joakim
2015-01-15 16:11     ` Phillip Lord
2015-01-15 20:53       ` Thierry Banel
2015-01-15 22:41         ` Phillip Lord
2015-01-16 18:43           ` Thierry Banel
2015-01-16 20:18             ` Thomas S. Dye
2015-01-16 23:46               ` Phillip Lord
  -- strict thread matches above, loose matches on Subject: below --
2015-01-09 17:12 Phillip Lord
2015-01-09 17:57 ` Alan Schmitt
2015-01-09 19:18 Phillip Lord
2015-01-10 12:35 ` Alan Schmitt
2015-01-15 15:54   ` Phillip Lord
2015-01-15 17:24     ` Alan Schmitt
2015-01-15 22:28       ` Phillip Lord
2015-01-16 10:15         ` Alan Schmitt
2015-01-16 11:01           ` Phillip Lord

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).