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 <gui...@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.fr...@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
>>
>
>

Reply via email to