Re: [O] Screencast of lispy.el with org-mode code base
Dnia 2014-03-14, o godz. 15:38:57 Oleh ohwoeo...@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
Re: [O] Screencast of lispy.el with org-mode code base
Hi Oleh, Oleh ohwoeo...@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
Re: [O] Screencast of lispy.el with org-mode code base
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
Re: [O] Screencast of lispy.el with org-mode code base
Oleh ohwoeo...@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
Re: [O] Screencast of lispy.el with org-mode code base
Hi Oleh, Oleh ohwoeo...@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
Re: [O] Screencast of lispy.el with org-mode code base
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
Re: [O] Screencast of lispy.el with org-mode code base
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
Re: [O] Screencast of lispy.el with org-mode code base
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