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 <rile...@gmail.com> writes: > Richard Riley <rile...@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." _______________________________________________ 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