emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [FYI] Outshine can now do Tags and Todo's and more ...
@ 2014-03-12 16:39 Thorsten Jolitz
  0 siblings, 0 replies; only message in thread
From: Thorsten Jolitz @ 2014-03-12 16:39 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

by adding a soft-dependency to outorg.el and a generic function
`outshine-use-outorg', it is now possible to call all kinds of Org-mode
functionality from an outshine buffer (i.e. a source-code buffer with
outline-minor-mode and outshine extensions enabled).

Its a first version, so not everything works, but here is an example of
what can be done:

Assume point is on headline *** Point in a (PicoLisp) outshine buffer:

#+begin_src picolisp
## *** Point
##     :LOGBOOK:
##     CLOCK: [2014-03-12 Mi 17:02]--[2014-03-12 Mi 17:09] =>  0:07
##     CLOCK: [2014-03-12 Mi 16:02]--[2014-03-12 Mi 16:06] =>  0:04
##     :END:

## A Point is a 0-dimensional geometry and represents a single location
## in coordinate space. A Point has a x- coordinate value and a
## y-coordinate value.

(dm x> ()
   () ) # return Double (x-coordinate)
#+end_src

Then outshine-speed-commands 

,--------
| , A RET
`--------

will produce

#+begin_src org
## *** [#A] Point
##     :LOGBOOK:
#+end_src

and outshine-speed-command

,--
| 2
`--

will change it to 

#+begin_src org
## *** [#B] Point
##     :LOGBOOK:
#+end_src

because of this code in outshine.el:

#+begin_src emacs-lisp
(defconst outshine-speed-commands-default
  '(
    ("Outline Navigation")
    ("n" . (outshine-speed-move-safe
	    'outline-next-visible-heading))
    ("p" . (outshine-speed-move-safe
	    'outline-previous-visible-heading))
    ;; [...]
    ("Meta Data Editing")
    ("t" . (outshine-use-outorg 'org-todo))
    ("," . (outshine-use-outorg 'org-priority))
    ("0" . (outshine-use-outorg (lambda () (org-priority ?\ ))))
    ("1" . (outshine-use-outorg (lambda () (org-priority ?A))))
    ("2" . (outshine-use-outorg (lambda () (org-priority ?B))))
    ("3" . (outshine-use-outorg (lambda () (org-priority ?C))))
    ;; [...] ))
#+end_src

that will look very familar to Org-mode users, since it is copied and
adapted from there.

I think there is great potential for this, one should be able to clock
in and out, set todos and priorities etc etc directly in all kinds of
(outshine-structured) source-code buffers - using the existing Org-mode
functionality, without rewriting anything. So I wanted to let you know.

PS 

No doubt there will be many cases where things don't work out of the box
right now, since I just started to code this today, but with time there
will be hacks and fixes that will enable more and more Org-functionality
in outshine buffers.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-12 16:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 16:39 [FYI] Outshine can now do Tags and Todo's and more Thorsten Jolitz

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).