From: Richard Riley <rileyrg@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Q : select current org item as region
Date: Wed, 08 Sep 2010 23:06:30 +0200 [thread overview]
Message-ID: <i68tsr$sd5$1@dough.gmane.org> (raw)
In-Reply-To: i68os5$5t9$1@dough.gmane.org
I now have a working function to blog the current org-entry to google
blogs (blogger,blogspot) . See new thread "Blogging org entries using
google command line".
Richard Riley <rileyrg@gmail.com> writes:
> Richard Riley <rileyrg@gmail.com> 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
>>
>> Currently the function I have is (not working but to give you the idea
>> of what I am trying to accomplish):
>>
>> (defun rgr/org-blog-entry ()
>> (interactive)
>> (save-excursion
>> (org-beginning-of-item)
>> (set-mark-command)
>> (org-end-of-item)
>> (let((tmpbuf (make-temp-file)))
>> (org-export-as-html nil nil tmpbuf t))))
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
> OK, minus several million for me for not digging deep enough. "item" is
> not an org item per se but a list item. I need the entry functions. So
> its taking shape (but not working yet ..) as
>
> (defun rgr/org-blog-entry ()
> (interactive)
> (save-excursion
> (goto-char (org-entry-beginning-position))
> (set-mark (org-entry-end-position))
> (let((tmpfile (make-temp-file "org-blog-html-")))
> (org-export-as-html nil nil (find-file-noselect tmpfile) t))))
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
☘ http://www.shamrockirishbar.com, http://www.richardriley.net
"Learning French is trivial: the word for horse is 'cheval' and
everything follows thusly."
next prev parent reply other threads:[~2010-09-08 21:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 18:51 Q : select current org item as region Richard Riley
2010-09-08 19:40 ` Richard Riley
2010-09-08 21:06 ` Richard Riley [this message]
2010-09-08 19:51 ` Nicolas Goaziou
2010-09-09 7:52 ` Bastien
2010-09-09 12:48 ` Łukasz Stelmach
2010-09-09 13:03 ` Richard Riley
2010-09-09 13:29 ` Nicolas Goaziou
2010-09-09 13:40 ` Richard Riley
2010-09-10 13:51 ` Łukasz Stelmach
2010-09-10 14:45 ` Richard Riley
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='i68tsr$sd5$1@dough.gmane.org' \
--to=rileyrg@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).