Re: [O] Getting beginning postiion of a description list

2015-01-16 Thread Nicolas Goaziou
Hello, Calvin Young writes: > If my cursor is in a description list item, what's the recommended way of > getting the point at the beginning of the description list text (i.e., > after the bullet character)? To illustrate, given the following description > list item, I'd like to get the point re

Re: [O] Getting beginning postiion of a description list

2015-01-16 Thread Eric Abrahamsen
Nicolas Richard writes: > Calvin Young writes: >> How do I need to massage this to give me the beginning of the whole >> list item? Is there a recommended solution that'd work for both >> description lists *and* plain lists? > > This seems to work for me: > > (defun yf/org-beginning-of-item () >

Re: [O] Getting beginning postiion of a description list

2015-01-15 Thread Nicolas Richard
Calvin Young writes: > How do I need to massage this to give me the beginning of the whole > list item? Is there a recommended solution that'd work for both > description lists *and* plain lists? This seems to work for me: (defun yf/org-beginning-of-item () (let ((element (org-element-at-point

Re: [O] Getting beginning postiion of a description list

2015-01-15 Thread Calvin Young
Ah, this makes sense. Unfortunately, an additional constraint I failed to mention in the first email is that it'd be nice if the solution worked for numbered lists as well. That solution unfortunately breaks on numbered lists :( Is there perhaps another way to accomplish this? P.S. I just noticed

Re: [O] Getting beginning postiion of a description list

2015-01-15 Thread John Kitchin
This is very un-orgish but it seems to do it. (forward-word) goes to the end the next recognized word, (backward-word) to the beginning of the word you are now at the end of, and (backward-char) to get to a space. You just need org to get you on the list ;) It seems to work on these. - foo :: bar

[O] Getting beginning postiion of a description list

2015-01-14 Thread Calvin Young
Hi all, If my cursor is in a description list item, what's the recommended way of getting the point at the beginning of the description list text (i.e., after the bullet character)? To illustrate, given the following description list item, I'd like to get the point represented by the pipe characte