From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: evil-mode and org Date: Mon, 10 Apr 2017 08:22:32 -0400 Message-ID: References: <1a0d15aafd944fa3864394d8e212046f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3vom81v.fsf@ucl.ac.uk> <2addcb35f67b455ba02295550e5b2ec7@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87k276kbpk.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1146d9c69a8b73054ccf07b5 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxYL7-0001lL-Ng for emacs-orgmode@gnu.org; Mon, 10 Apr 2017 08:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxYL5-0000z2-PN for emacs-orgmode@gnu.org; Mon, 10 Apr 2017 08:22:37 -0400 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:33115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxYL5-0000yG-KB for emacs-orgmode@gnu.org; Mon, 10 Apr 2017 08:22:35 -0400 Received: by mail-qk0-x231.google.com with SMTP id h67so108490270qke.0 for ; Mon, 10 Apr 2017 05:22:34 -0700 (PDT) In-Reply-To: <87k276kbpk.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eric S Fraga , Org Mode --001a1146d9c69a8b73054ccf07b5 Content-Type: text/plain; charset=UTF-8 I kind of let this thread drop, but I just wanted to say thanks to everyone for sharing. I am interested in exploring modal editing, maybe in June which, it turns out, is when I *actually* will have free time... thanks everyone! On Thu, Mar 30, 2017 at 11:48 AM, Eric S Fraga wrote: > On Thursday, 30 Mar 2017 at 10:14, Guido Van Hoecke wrote: > > Eric, > > > > Care to share your org-evil mappings? > > sure: > > #+begin_src emacs-lisp > (defun esf/evil-key-bindings-for-org () > ;;(message "Defining evil key bindings for org") > (when (fboundp 'evil-declare-key) > ;; normal, motion and visual commands > (mapcar (lambda (state) > (evil-declare-key state org-mode-map > " " 'evil-scroll-down > " e" 'org-edit-special > " g" 'org-babel-goto-named-src-block > " j" 'org-babel-next-src-block > " k" 'org-babel-previous-src-block > " l" 'org-next-link > " n" 'org-babel-next-src-block > " p" 'org-babel-previous-src-block > " u" 'outline-up-heading > "gh" 'outline-up-heading > "gj" 'org-forward-heading-same-level > "gk" 'org-backward-heading-same-level > "gl" 'outline-next-visible-heading > "t" 'org-todo ; mark a TODO item as DONE > ",e" 'org-export-dispatch > ",i" 'org-inlinetask-insert-task > ",l" 'org-insert-link > ",L" 'org-store-link > ",n" 'outline-next-visible-heading > ",oa" #'org-annotate-add-note > ",od" #'org-annotate-display-notes > ",p" 'outline-previous-visible-heading > ",r" 'org-ref-insert-cite-link > ;; ",t" 'org-set-tags-command > ",u" 'outline-up-heading > "$" 'org-end-of-line ; smarter behaviour on headlines > etc. > "^" 'org-beginning-of-line ; ditto > "-" 'org-ctrl-c-minus ; change bullet style > "<" 'org-metaleft ; out-dent > ">" 'org-metaright ; indent > (kbd "M-l") 'org-metaright > (kbd "M-h") 'org-metaleft > (kbd "M-k") 'org-metaup > (kbd "M-j") 'org-metadown > (kbd "M-L") 'org-shiftmetaright > (kbd "M-H") 'org-shiftmetaleft > (kbd "M-K") 'org-shiftmetaup > (kbd "M-J") 'org-shiftmetadown)) > '(normal motion visual)) > ;; and these are only for motion and visual so that . does not > repeat them > (mapcar (lambda (state) > (evil-declare-key state org-mode-map > "H" 'org-beginning-of-line ; smarter behaviour on > headlines etc. > ;; "L" 'end-of-line ; do not want "smarter" behaviour on > headlines etc. > "L" 'org-end-of-line ; do not want "smarter" behaviour > on headlines etc. > )) > '(motion visual)) > (evil-declare-key 'insert org-mode-map > (kbd "") 'hungry-delete-backward > (kbd "M-l") 'org-metaright > (kbd "M-h") 'org-metaleft > (kbd "M-k") 'org-metaup > (kbd "M-j") 'org-metadown > (kbd "M-L") 'org-shiftmetaright > (kbd "M-H") 'org-shiftmetaleft > (kbd "M-K") 'org-shiftmetaup > (kbd "M-J") 'org-shiftmetadown) > (when (not esf/pandora-p) > (evil-declare-key 'insert org-mode-map > (kbd "") 'hungry-delete-backward)))) > #+end_src > > > One 'conflict' which bites me every time is this: > > I cannot help with this unfortunately other than to maybe trying to > advise the search function... > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_9.0.5-391-g36c7cf > --001a1146d9c69a8b73054ccf07b5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I kind of let this thread drop, but I just wanted to = say thanks to everyone for sharing. I am interested in exploring modal edit= ing, maybe in June which, it turns out, is when I *actually* will have free= time...

thanks everyone!
=
On Thu, Mar 30, 2017 at 11:48 AM, Eric S Fra= ga <e.fraga@ucl.ac.uk> wrote:
On Thursday, 30 Mar 2017 at 10:14, Guido Van Hoecke wr= ote:
> Eric,
>
> Care to share your org-evil mappings?

sure:

#+begin_src emacs-lisp
=C2=A0 (defun esf/evil-key-bindings-for-org ()
=C2=A0 =C2=A0 ;;(message "Defining evil key bindings for org") =C2=A0 =C2=A0 (when (fboundp 'evil-declare-key)
=C2=A0 =C2=A0 =C2=A0 ;; normal, motion and visual commands
=C2=A0 =C2=A0 =C2=A0 (mapcar (lambda (state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (evil-declare-key s= tate org-mode-map
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "=C2=A0= " 'evil-scroll-down
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " e&quo= t; 'org-edit-special
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " g&quo= t; 'org-babel-goto-named-src-block
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " j&quo= t; 'org-babel-next-src-block
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " k&quo= t; 'org-babel-previous-src-block
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " l&quo= t; 'org-next-link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " n&quo= t; 'org-babel-next-src-block
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " p&quo= t; 'org-babel-previous-src-block
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 " u&quo= t; 'outline-up-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "gh&quo= t; 'outline-up-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "gj&quo= t; 'org-forward-heading-same-level
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "gk&quo= t; 'org-backward-heading-same-level
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "gl&quo= t; 'outline-next-visible-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "t"= ; 'org-todo ; mark a TODO item as DONE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",e&quo= t; 'org-export-dispatch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",i&quo= t; 'org-inlinetask-insert-task
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",l&quo= t; 'org-insert-link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",L&quo= t; 'org-store-link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",n&quo= t; 'outline-next-visible-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",oa&qu= ot; #'org-annotate-add-note
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",od&qu= ot; #'org-annotate-display-notes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",p&quo= t; 'outline-previous-visible-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",r&quo= t; 'org-ref-insert-cite-link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; ",t&= quot; 'org-set-tags-command
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ",u&quo= t; 'outline-up-heading
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "$"= ; 'org-end-of-line ; smarter behaviour on headlines etc.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "^"= ; 'org-beginning-of-line ; ditto
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "-"= ; 'org-ctrl-c-minus ; change bullet style
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "<&q= uot; 'org-metaleft ; out-dent
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ">&q= uot; 'org-metaright ; indent
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -l") 'org-metaright
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -h") 'org-metaleft
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -k") 'org-metaup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -j") 'org-metadown
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -L") 'org-shiftmetaright
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -H") 'org-shiftmetaleft
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -K") 'org-shiftmetaup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M= -J") 'org-shiftmetadown))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(normal motion visual= ))
=C2=A0 =C2=A0 =C2=A0 ;; and these are only for motion and visual so that . = does not repeat them
=C2=A0 =C2=A0 =C2=A0 (mapcar (lambda (state)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (evil-declare-key s= tate org-mode-map
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "H"= ; 'org-beginning-of-line ; smarter behaviour on headlines etc.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; "L&q= uot; 'end-of-line ; do not want "smarter" behaviour on headli= nes etc.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "L"= ; 'org-end-of-line ; do not want "smarter" behaviour on headl= ines etc.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(motion visual))
=C2=A0 =C2=A0 =C2=A0 (evil-declare-key 'insert org-mode-map
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "<backspace>") 'hungry= -delete-backward
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-l") 'org-metaright
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-h") 'org-metaleft
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-k") 'org-metaup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-j") 'org-metadown
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-L") 'org-shiftmetaright =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-H") 'org-shiftmetaleft =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-K") 'org-shiftmetaup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "M-J") 'org-shiftmetadown) =C2=A0 =C2=A0 =C2=A0 (when (not esf/pandora-p)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (evil-declare-key 'insert org-mode-map
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (kbd "<backspace>") '= ;hungry-delete-backward))))
#+end_src

> One 'conflict' which bites me every time is this:

I cannot help with this unfortunately other than to maybe trying to<= br> advise the search function...

--
: Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_9.0.5-391-g36c7cf

--001a1146d9c69a8b73054ccf07b5--