[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Q : select current org item as region
From: |
Nicolas Goaziou |
Subject: |
Re: [Orgmode] Q : select current org item as region |
Date: |
Wed, 08 Sep 2010 21:51:51 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO) |
Hello,
>>>>> Richard Riley writes:
> What would be the best elisp way to select the current org entry? I
> want a hot key to select the current item as current region (not
> into the clipboard).
> The problem I am having is that org-in-item-p is returning nil even
> though the point is in an org-item. Is the docstring where it
> mentions "hand-formatted item" more significant that I understand?
> As a result org-beginning-of-item is failing
Could you elaborate on that? Could you give a minimal example? If
`org-in-item-p' is returning nil whereas you are in an item, there is
definitely a bug to fix.
Here is a suggestion to mark current item:
(defun mark-current-item ()
(interactive)
(when (org-in-item-p)
(goto-char (org-get-item-beginning))
(push-mark nil t t)
(goto-char (org-get-end-of-item (org-list-bottom-point)))))
Regards,
-- Nicolas