From: Guido Van Hoecke <guivho@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Re: evil-mode and org
Date: Thu, 30 Mar 2017 19:03:40 +0200 [thread overview]
Message-ID: <CAEySM9HFZ56BD8seV_bNDDh3mqhL0n0Qrj-dwF1v4XTxucfqYQ@mail.gmail.com> (raw)
In-Reply-To: <CAEySM9FosTqteehkTQFPNyzRbUZaA2K5J9gvE-yLORs=TpH1ug@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3182 bytes --]
Eric,
You already mentioned your mappings in
http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00153.html
Thanks!
Finally got myself to write a little lisp to solve my problem and mapped it
to go
For what it's worth, here it is (but it solves a very specific problem):
(defun guivho-insert-topic-under-heading()
"Expand heading and insert hyphen and inactive timestamp.
Cursor is expected to be in an org header line"
(interactive)
(let ((sp " ")
(hyphen "-"))
(org-end-of-line)
(evil-append 1)
(org-return)
(insert hyphen sp)
(org-time-stamp nil t)
(insert sp)
(evil-force-normal-state)
(evil-append 0)))
This now always inserts a 'dash space timestamp space' line immediately
under the current org header, whether it was collapsed or not.
Hey, it's not beautiful, but it solves my problem :)
And, to whom it may concern, org and evil make a nice combo :)
Guido
On 30 March 2017 at 12:14, Guido Van Hoecke <guivho@gmail.com> wrote:
>
>
> Eric,
>
> Care to share your org-evil mappings?
>
> One 'conflict' which bites me every time is this:
>
> I hit /blabla to locate a heading directly under which I want to insert a
> text line.
>
> I then hit enter to acknowledge the find.
>
> The display shows the heading line followed by its body lines (which all
> start with a hyphen)
>
> I then hit o to insert a line directly under the heading and before the
> first existing detail line.
>
> The result is however that the heading body closes, and that a line is
> added before the next header line, so under all existing detail lines of
> this header line.
>
> This undesired behavior only happens if the heading was closed at the time
> of the find. If the find locates an open heading, hitting enter and than o
> behaves as expected.
>
> Any suggestions on how this can be fixed would be most welcome :)
>
> TIA,
>
> Guido
>
> On 29 March 2017 at 17:11, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
>> On Tuesday, 28 Mar 2017 at 12:57, Matt Price wrote:
>> > I've never used Vim but I see a lot of people online raving about evil
>> > mode and how much they love it. I'm considering giving it a whirl
>> > after the semester ends & I get some free time. I just wondered
>> > whether any heavy org users here on the list use evil, and if so,
>> > whether you see pain points within org-mode -- my setup is pretty
>> > heavily customized, for instance, and I wonder whether that means it
>> > will be quite painful to use evil.
>>
>> I use evil and org all day long. Basically, there is very little clash
>> between them so they co-exist very nicely. One of the best things about
>> evil is that it is almost orthogonal to emacs and you can continue using
>> most C-x and C-c keymap bindings.
>>
>> In my case, I did add a number of bindings to evil's normal and motion
>> keymaps to avoid typing C-c etc. as my motivation in using evil is to
>> avoid exacerbating my RSI. Almost all my commands are non-chorded key
>> sequences. I barely use the control, shift and meta keys in normal
>> use.
>>
>> --
>> : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_9.0.5-391-g36c7cf
>>
>
>
[-- Attachment #2: Type: text/html, Size: 4639 bytes --]
next prev parent reply other threads:[~2017-03-30 17:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1a0d15aafd944fa3864394d8e212046f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-29 15:11 ` evil-mode and org Eric S Fraga
2017-03-30 10:14 ` Guido Van Hoecke
2017-03-30 17:03 ` Guido Van Hoecke [this message]
[not found] ` <2addcb35f67b455ba02295550e5b2ec7@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-30 15:48 ` Eric S Fraga
2017-04-10 12:22 ` Matt Price
[not found] ` <013bacb6be3a49b1b8633fb7d2ad1ddc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-04-10 14:49 ` Eric S Fraga
2017-03-28 12:57 Matt Price
2017-03-28 13:23 ` Peter Neilson
2017-03-29 15:12 ` John Kitchin
2017-03-29 17:36 ` Peter Neilson
2017-03-30 1:33 ` John Hendy
2017-03-30 1:37 ` John Hendy
[not found] ` <e73a5e1e52db498f95cf60c7a983be27@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-29 15:21 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEySM9HFZ56BD8seV_bNDDh3mqhL0n0Qrj-dwF1v4XTxucfqYQ@mail.gmail.com \
--to=guivho@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).