emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [FYI] Outshine can now do Tags and Todo's and more ...
Date: Wed, 12 Mar 2014 17:39:22 +0100	[thread overview]
Message-ID: <87k3bzqslh.fsf@gmail.com> (raw)


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

                 reply	other threads:[~2014-03-12 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87k3bzqslh.fsf@gmail.com \
    --to=tjolitz@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).