* Screencast of lispy.el with org-mode code base
@ 2014-02-17 14:11 Oleh
2014-03-04 9:32 ` Bastien
0 siblings, 1 reply; 9+ messages in thread
From: Oleh @ 2014-02-17 14:11 UTC (permalink / raw)
To: org mode
Hi all,
I'm developing an Emacs minor mode called lispy (available at
https://github.com/abo-abo/lispy and as "lispy" in MELPA).
It combines vi-style Paredit and IDE-like features for Elisp,
Clojure, Scheme and Common Lisp (leveraging CEDET, CIDER, Geiser, and SLIME
respectively).
To show-off the package a bit, here's a screencast where I navigate
org-mode code: https://vimeo.com/86894158 .
Some cool features (I'll list a shortcut and what it does, starting
position should be anywhere in org source tree with point at "(" or
behind ")" or at "^;"):
1. With "g" I know that there are currently 7276 tags in org-mode's code base.
2. With "G" I know that there are 1761 tags in org.el.
3. With "g" "obs" I know that there are 24 tags declared obsolete in
org-mode's code base.
4. With "g" "cloj" I know that there are 18 tags related to Clojure,
all of them in ob-clojure.el.
5. With "g" "heading ext" here are the candidates that match:
declare-function outline-next-heading
org-list.el
declare-function outline-next-heading
org-footnote.el
org-extract-archive-heading
org-archive.el
org-mouse-next-heading
org-mouse.el
6. With "g" "defk" I know that org-defkey is called 306 times.
7. With "g" "shifttab" here's the info I get (last one is the definition):
org-defkey org-mode-map [(shift tab)] 'org-shifttab org.el
define-key org-mode-map [backtab] 'org-shifttab org.el
org-shifttab org.el
8. And of course RET will jump to any candidate selected, e.g. "g"
"python exe" "RET"
will jump to file ob-python.el to the definition of `org-babel-execute:python'.
I'm using CEDET to parse the files, so the first time you call `lispy-goto`
there will be a few second parse. The parse happens only once, it saves tags
to the database and no parsing is done further unless some files have changed.
I also demonstrate near the end of the video how to customize the info you get
for the top-level tags. So initially `eval-after-load` tags were plain
and didn't show
what they were doing. But then I added `(eval-after-load . 1)` to
`lispy-tag-arity`
and after a call to `lispy-build-semanticdb` the `eval-after-load` tags include
one more sexp, which is the file argument of the form.
I hope you like the package and feedback is welcome.
regards,
Oleh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-02-17 14:11 Screencast of lispy.el with org-mode code base Oleh
@ 2014-03-04 9:32 ` Bastien
2014-03-04 11:46 ` Oleh
0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2014-03-04 9:32 UTC (permalink / raw)
To: Oleh; +Cc: org mode
Hi Oleh,
Oleh <ohwoeowho@gmail.com> writes:
> I'm developing an Emacs minor mode called lispy (available at
> https://github.com/abo-abo/lispy and as "lispy" in MELPA).
It looks interesting -- the screencasts are nice.
One early neatpick: the name "lispy" does not help understanding
what the package is really about. But maybe the package does a
lot and it's difficult to capture all what it does in a name.
Looking forwarding testing it,
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-04 9:32 ` Bastien
@ 2014-03-04 11:46 ` Oleh
2014-03-04 14:02 ` Sebastien Vauban
2014-03-14 11:16 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Oleh @ 2014-03-04 11:46 UTC (permalink / raw)
To: Bastien; +Cc: org mode
Hi Bastien,
> One early neatpick: the name "lispy" does not help understanding
> what the package is really about. But maybe the package does a
> lot and it's difficult to capture all what it does in a name.
The package provides a key binding method that can work effectively
only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
all fit here.
The gist is that e.g. "j" will not self-insert when positioned at open
paren or after closing paren, but will instead move downwards list.
On top of that I've tacked on:
- my own type of Paredit: most functions are called from either
side of the list and the result depends on the side.
- region manipulation based on sexps,
e.g. "j" will extend/shrink region by a sexp forwards and "k" backwards.
- outline-minor-mode bindings
`lispy-shifttab` ("I") actually uses `org-overview` and `org-cycle`.
- IDE-like features (eval, eval-and-insert, inline doc, arglist,
jump-to-tag and follow-to-definition)
- some refactoring support (defun-to-lambda, lambda-to-defun, inline-function,
cond-to-ifs, ifs-to-cond, sexp-to-oneline, sexp-to-multiline,
string-to-oneline)
I'm especially proud of the cond-to-ifs / ifs-to-cond stuff, because they
(in theory and once properly debugged) preserve whitespace and comments
and are invertible.
- misc stuff (bindings for edebug, multiple cursors, ediff-sexps)
I'm quite fond of `lispy-ediff-regions` as well. Try it if you like
`ediff-regions-linewise`.
So it's a bunch of stuff, all of it Lisp-related, hence "lispy".
Btw, here's the new documentation: http://abo-abo.github.io/lispy/.
It's generated with org-mode export of this file:
https://raw.github.com/abo-abo/lispy/gh-pages/index.org.
Actually, I have a few questions on the org to HTML export of this document:
How do I make HTML links that refer to heading, e.g.
not http://abo-abo.github.io/lispy/#sec-3-1,
but http://abo-abo.github.io/lispy/#lispy-forward?
And is there a good method to put babel source blocks into a HTML table?
I'm just using #+HTML: at the moment and it's pretty ugly.
regards,
Oleh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-04 11:46 ` Oleh
@ 2014-03-04 14:02 ` Sebastien Vauban
2014-03-04 14:20 ` Oleh
2014-03-14 11:16 ` Bastien
1 sibling, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2014-03-04 14:02 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Oleh wrote:
> Actually, I have a few questions on the org to HTML export of this document:
>
> How do I make HTML links that refer to heading, e.g.
> not http://abo-abo.github.io/lispy/#sec-3-1,
> but http://abo-abo.github.io/lispy/#lispy-forward?
Isn't this a use case for CUSTOM_ID (instead of ID)? In this case,
you'd name it `lispy-forward'...
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-04 14:02 ` Sebastien Vauban
@ 2014-03-04 14:20 ` Oleh
0 siblings, 0 replies; 9+ messages in thread
From: Oleh @ 2014-03-04 14:20 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-orgmode
>> How do I make HTML links that refer to heading, e.g.
>> not http://abo-abo.github.io/lispy/#sec-3-1,
>> but http://abo-abo.github.io/lispy/#lispy-forward?
>
> Isn't this a use case for CUSTOM_ID (instead of ID)? In this case,
> you'd name it `lispy-forward'...
>
Thanks again, Sebastien,
I'm off to make an epic macro to replace all those ID with CUSTOM_ID.
regards,
Oleh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-04 11:46 ` Oleh
2014-03-04 14:02 ` Sebastien Vauban
@ 2014-03-14 11:16 ` Bastien
2014-03-14 14:38 ` Oleh
1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2014-03-14 11:16 UTC (permalink / raw)
To: Oleh; +Cc: org mode
Hi Oleh,
Oleh <ohwoeowho@gmail.com> writes:
> The package provides a key binding method that can work effectively
> only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
> all fit here.
I better understand the name then.
Looks like quite a big project already.
Each time I tried paredit, I could not stand it for more than
a few minutes, I've not been patient so far, especially since
`electric-pair-mode' is now on by default and does 90% of what
I need.
But I may look at other solutions than paredit (being conscious
your librarie goes far beyond that.)
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-14 11:16 ` Bastien
@ 2014-03-14 14:38 ` Oleh
2014-03-14 14:56 ` Bastien
2014-03-15 10:17 ` Marcin Borkowski
0 siblings, 2 replies; 9+ messages in thread
From: Oleh @ 2014-03-14 14:38 UTC (permalink / raw)
To: Bastien; +Cc: org mode
>> The package provides a key binding method that can work effectively
>> only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
>> all fit here.
>
> I better understand the name then.
>
> Looks like quite a big project already.
Yes, it's my biggest yet.
> Each time I tried paredit, I could not stand it for more than
> a few minutes, I've not been patient so far, especially since
> `electric-pair-mode' is now on by default and does 90% of what
> I need.
That's how I've started to write lispy: with 3 functions for inserting
pairs and a re-bind of `forward-list`/`backward-list` to "]"/"[".
> But I may look at other solutions than paredit (being conscious
> your librarie goes far beyond that.)
Sure. Not everyone likes paredit (at first:). That's why each locally
bound function in lispy is constructed from a regular interactive
function: so you can use them without turning on the minor mode.
But somehow paredit together with other powerful tools becomes more
than the sum of its parts: paredit + multiple-cursors allows easy
refactors of repeated information, lispy store region + ediff makes
for easier and faster diffs, and lispy narrowing + ace-jump-mode
symbol selection + iedit allows to rename variables faster.
And of course it's nice to keep some specialty tools handy:
`lispy-multiline` ("M") may not seem like much, but it's great after a
`macroexpand-all`.
And look at `lispy-flatten` ("xf"):
|(org-defkey org-mode-map [(meta up)] 'org-metaup)
->
|(define-key org-mode-map (org-key [(meta up)]) 'org-metaup)
Nifty, right?
regards,
Oleh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-14 14:38 ` Oleh
@ 2014-03-14 14:56 ` Bastien
2014-03-15 10:17 ` Marcin Borkowski
1 sibling, 0 replies; 9+ messages in thread
From: Bastien @ 2014-03-14 14:56 UTC (permalink / raw)
To: Oleh; +Cc: org mode
Oleh <ohwoeowho@gmail.com> writes:
> And look at `lispy-flatten` ("xf"):
>
> |(org-defkey org-mode-map [(meta up)] 'org-metaup)
>
> ->
>
> |(define-key org-mode-map (org-key [(meta up)]) 'org-metaup)
>
> Nifty, right?
Indeed -- great, now I feel like I'm just a caveman, used
to simply insert character after character the old school
way... :)
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Screencast of lispy.el with org-mode code base
2014-03-14 14:38 ` Oleh
2014-03-14 14:56 ` Bastien
@ 2014-03-15 10:17 ` Marcin Borkowski
1 sibling, 0 replies; 9+ messages in thread
From: Marcin Borkowski @ 2014-03-15 10:17 UTC (permalink / raw)
To: emacs-orgmode
Dnia 2014-03-14, o godz. 15:38:57
Oleh <ohwoeowho@gmail.com> napisał(a):
> Sure. Not everyone likes paredit (at first:). That's why each locally
^^
https://xkcd.com/541/
(Sorry, could not resist.;))
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-15 10:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 14:11 Screencast of lispy.el with org-mode code base Oleh
2014-03-04 9:32 ` Bastien
2014-03-04 11:46 ` Oleh
2014-03-04 14:02 ` Sebastien Vauban
2014-03-04 14:20 ` Oleh
2014-03-14 11:16 ` Bastien
2014-03-14 14:38 ` Oleh
2014-03-14 14:56 ` Bastien
2014-03-15 10:17 ` Marcin Borkowski
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).