Re: [O] org to static site?

2017-05-31 Thread Jeffrey Brent McBeth
Nikola supports org-mode last I checked though?

I use Nikola, and find the documentation frustratingly incomplete, but not so 
frustrating as to change :)

Jeff

-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- not Mark Twain, maybe a southen librarian in 1910




Re: [O] org-table relative reference questions

2015-04-21 Thread Jeffrey Brent McBeth
On Tue, Apr 21, 2015 at 10:13:53AM +0200, Michael Brand wrote:
 Hi Jeffrey
 
 On Mon, Apr 20, 2015 at 3:35 PM, Jeffrey Brent McBeth mcb...@broggs.org 
 wrote:
  I'm looking for a way to reference a row or column on both the left
  side and right side of a table formula that is easily manipulable.
 
 As you noticed the left side is very limited compared to the right
 side. The solution below keeps the left side simple. x is used as a
 movable marker to indicate the beginning of the range:
 
 | F | A | B |  C |
 |---+---+---+|
 | x | 1 | 3 |  4 |
 |   | 2 | 4 | 69 |
 |---+---+---+|
 |   | 3 |   ||
 #+TBLFM: @$2 = vsum(subvec(@I$2..@II$2, find(@I$1..@II$1, x), 0)); E
 :: @$4..@$4 = if($1 == (x), $-2 + $-1, $0)

That is awesome.  subvec and if seem to be two very powerful tools that I've 
missed as I've trawled the documentation.  Thank you so much.

Jeff

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



[O] org-table relative reference questions

2015-04-20 Thread Jeffrey Brent McBeth
I'm looking for a way to reference a row or column on both the left side and 
right side of a table formula that is easily manipulable.  

At first, I thought the hline references would work for me @I..@II, except they 
cannot be used on the left side of an equation.  I hoped that maybe named 
fields would work (^,_), but those are apparently value aliases and not 
location references.

Essentially, I want to keep a single table in which I can enter and calculate 
data, and limit the computation to start at a given row that I change as I go 
along.  Maybe I'm simply using the wrong tool for this, excel is certainly not 
capable; so if org-table isn't either, it certainly doesn't lessen it.

#+BEGIN_EXAMPLE

| F |  A |  B |  C |
|---+++|
| _ | tA | tB | tC |
|   |  1 |  3 | 42 |
|   |  2 |  4 | 69 |
|---+++|
| # ||||
#+TBLFM=@$2=vsum(@tA..@II)::$tC=$-2+$-1

| F |  A |  B |  C |
|---+++|
|   |  1 |  3 | 42 |
| _ | tA | tB | tC |
|   |  2 |  4 | 69 |
|---+++|
| # ||||
#+TBLFM=@$2=vsum(@tA..@II)::$tC=$-2+$-1

#+END_EXAMPLE




-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] org-table relative reference questions

2015-04-20 Thread Jeffrey Brent McBeth
On Mon, Apr 20, 2015 at 09:35:28AM -0400, Jeffrey Brent McBeth wrote:
 I'm looking for a way to reference a row or column on both the left side and 
 right side of a table formula that is easily manipulable.  
 
 At first, I thought the hline references would work for me @I..@II, except 
 they cannot be used on the left side of an equation.  I hoped that maybe 
 named fields would work (^,_), but those are apparently value aliases and not 
 location references.

snip

To be clear, for my use case, I think functional hline references on the left 
side would be sufficient.  I started going down the ^_ route because I thought 
it might give me an out, the notation is tons messier.

Jeffrey McBeth

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] relative deadlines

2014-12-09 Thread Jeffrey Brent McBeth
On Tue, Dec 09, 2014 at 10:36:52AM +0100, Nicolas Goaziou wrote:
 Hello,
 
 Jeffrey Brent McBeth mcb...@broggs.org writes:
 
  I have a python function that can take a stripped down org file and
  places an active date after each #block# (or inactive after
  #[block]#), that I hacked up today to see if it would really be as
  useful as I thought, but I keep thinking that someone somewhere must
  have scratched this itch elsewhere, and having to partially parse org
  in python and modify the text rather than having my agenda smart
  enough to figure it out gives me pause...
 
 It sounds like over-engineering to me.

I very well may be.  A common fault of engineers :)


 I think it would be better to have a function shifting all timestamps in
 a subtree. It may even exist already. I cannot remember.

This is where I fall down.  I don't see how that meets my basic need case.

I know that certain sub tasks need to start 90 days before the final deadline 
(for example), I can hand count back 90 days and then do the shifting of 
timestamps, but then the core relevant information is lost of -90d.

I have a strong feeling that since my searches don't turn things up, that this 
is a weird way in which I work rather than the rest of the subcommunity here; 
so I do appreciate the kind feedback above, I am not yet convinced that I'm 
insane :)

  If nobody have better ideas, are the block delimiters I'm using going
  to conflict with some other feature in org that I'm just not using
  yet?
 
 I don't think so.

That is helpful.  I read through your wonderful syntax file looking for decent 
delimeters that wouldn't be a pain to type, and I'm glad that there are no 
obvious howlers for me.

Jeff

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



[O] relative deadlines

2014-12-08 Thread Jeffrey Brent McBeth
From time to time (each time I delve into using org-mode for deadlines before 
my habits fall apart), I find the desire to have some form of relative 
deadlines.  By this I mean, that there are often sequences of tasks that I 
know the time required to complete and when things are due.  These tasks may 
repeat (usually do).

It would be awful helpful to me, but I would guess few others, as a search 
didn't find much, for there to be some annotation like this
(example is farcical, notation is notional)

* Go on date
 DEADLINE: 2014-12-25
 ** Ask Girl #-3w#
 ** Wash Hair #-2w#
 ** Make Money #-1w2d#
 ** Get in Car #-0d#
 ** Call her back #+1w#

that in the agenda view would show as a sequence of tasks with the following 
dates
Go on date 2014-12-25
Ask Girl 2014-12-04
Wash Hair 2014-12-11
Make Money 2014-12-16
Get in Car 2014-12-25
Call her back 2015-01-01

I have a python function that can take a stripped down org file and places an 
active date after each #block# (or inactive after #[block]#), that I hacked 
up today to see if it would really be as useful as I thought, but I keep 
thinking that someone somewhere must have scratched this itch elsewhere, and 
having to partially parse org in python and modify the text rather than having 
my agenda smart enough to figure it out gives me pause...

If nobody have better ideas, are the block delimiters I'm using going to 
conflict with some other feature in org that I'm just not using yet?

The main functuionality I'm stumbling toward is having an easily moveable end 
date (so replacing the block with absolute dates is a nono).

Thanks for your attention,
 Jeffrey McBeth

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



[O] cached tangling

2013-06-03 Thread Jeffrey Brent McBeth
I have not been able to find a way to cache the results of a tangle.
I typically have a date+tree with lots of code snippets for ledger.  I'm 
giving an example code snippet below

* 2013 :noexport:
** 2013-05 May
*** 2013-05-23 Thursday
#+name: foo
#+begin_src ledger
2013-05-23 * Silly Stuff
 Expenses:Time Waster  $42
 Assets:Bank
#+end_src
*** 2013-05-24 Friday
#+name: foo
#+begin_src ledger
2013-05-24 * More Dumb Spending
 Expenses:Time Waster  $69
 Assets:Cash
#+end_src
#+name: bar
#+begin_src ledger
2013-05-24 * Business Stuff
 Expenses:BB Stacking  $11.38
 Assets:Business:Checking
#+end_src

* Results
** Nothing :noexport:
#+name: everything
#+begin_src ledger
foo
bar
#+end_src
** Balance
#+name: exampleBalance
#+begin_src ledger :cmdline balance :noweb yes :exports results
everything
#+end_src 
** Register
#+name: exampleRegister
#+begin_src ledger :cmdline reg :noweb yes :exports results
everything
#+end_src
** Just Bank
#+name: exampleBalanceBank
#+begin_src ledger :cmdline balance Bank :noweb yes :exports results
everything
#+end_src

What I'm wondering is if there is a way to get babel to tangle the named block 
everything once, and then run all the ledger commands on that one file.  
Maybe it already does it, and I'm a fool, but it from a visceral timing 
perspective it feels like it is in serial tangling, running ledger, inserting 
the text, deleting the results of the tangle, then rinsing and repeating.

If the secret is to rearrange how I do things, I'm happy to do that a little 
bit.
-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] Tips for using orgmode + ledger to record events?

2013-03-01 Thread Jeffrey Brent McBeth
On Fri, Mar 01, 2013 at 01:11:59PM +, Eric S Fraga wrote:
 Harum Budi harumb...@gmail.com writes:
 
  I was not being clear at all, sorry. Let me rephrase, but bear with me as
  English is my secondary language.
 
 That's fine!
 
 I think I understand what you want.  My view would be to avoid having
 two files, an org one and a ledger one, and instead combine them into an
 org file.  You could create log capture templates for different kinds of
 activities and one of these could be financial.  This latter one could
 create a ledger src block that is automatically tangled to the full
 ledger file consisting of all such entries.  This is why I showed the
 ledger src blocks in my previous email.
 
 A financial entry could be
 
 ,
 | * [2013-03-01 Fri] Bought a sandwich  :food:
 |   #+begin_src ledger :tangle finances.ledger
 |   2013/03/01 Bought a sandwich
 | expenses  £3.50
 | cash
 |   #+end_src
 `
 
 or something similar...  You could still grep on headings but actually
 tag searching would be better of course.

I'm doing something rather similar with Ledger, and it all works really well 
unless I want to export to HTML, in which case I've had to increase the max 
lisp eval depth about once a week lately
(setq max-lisp-eval-depth 2400)

I'm assuming I'm doing something wrong there.  The datetree is not exported, 
but reports are (I have an example of a report below):

#+name: savingscheckingsummary
#+begin_src ledger :cmdline balance esl:check savings -p until tomorrow :nowe$
budget
checking
savings
anotheraccount
creditcard
#+end_src

I find the noweb tangling to work really well for my purposes, and in 
particular subsetting which bits I want exported to Ledger.

I've also included an example capture template

(setq org-capture-templates
  (append '((l Ledger entries)
(lc Bank:Checking plain
 (file+datetree+prompt ~/Documents/Ledger.org)

#+name: checking
#+begin_src ledger
%(org-read-date) * %^{Payee}
Expenses:%^{Account}  %^{Amount}
Assets:Bank:Checking
#+end_src




-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] [PATCH] datetree: Recognize year headline with tags as a match

2013-02-25 Thread Jeffrey Brent McBeth
On Mon, Feb 25, 2013 at 10:48:16AM +0100, Bastien wrote:
 Hi Tim,
 
 Tim Burt tcb...@rochester.rr.com writes:
 
  * lisp/org-datetree.el (org-datetree-find-year-create):
Include regexp for tags.  Syntax was taken directly
from org-todo-line-tags-regexp in org.el.
 
 Applied, thanks a lot for the patch and the detailed change log!
 
 Best,

I can confirm that latest git fixes my use case.  Thank you both so much.

Jeff

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] org-capture, datetree, and tags

2013-02-20 Thread Jeffrey Brent McBeth
On Tue, Feb 19, 2013 at 07:25:29AM -0500, Jeffrey Brent McBeth wrote:
 I'm trying to capture into a datetree using org-capture, but if my tree has a 
 tag on it (in particular noexport), then it creates a new datetree instead of 
 using the one I have.

I have verified that this still occurs under latest (7.9.3e-920-gce79e pulled 
5:50am EST) with emacs 24.1.1 (Ubuntu packaged).  Are my expectations wrong 
that it should be inserting into the original tree, and there is perhaps 
another way to tag a heirarchy to not be exported that I should be using?  If 
this is a bug, is there additional information I need to supply to assist in 
the debugging?  Am I asking in the right place?

Thanks for your attention,
 Jeffrey McBeth

Example .emacs:
(global-set-key \C-cc 'org-capture)
(setq org-capture-templates
'((t Test plain (file+datetree ~/Test.org)
   %^{Greeting} World
   I'm going to work this time)))

Example Test.org:
* 2013 :noexport:
** 2013-02 February
*** 2013-02-19 Tuesday
Hello World
I'm going to work this time

So, based on the above, if I type C-cct Silly C-cc, I'll get this:

* 2013 :noexport:
** 2013-02 February
*** 2013-02-19 Tuesday
Hello World
I'm going to work this time
* 2013
** 2013-02 February
*** 2013-02-19 Tuesday
Silly World
I'm going to work this time



[O] org-capture, datetree, and tags

2013-02-19 Thread Jeffrey Brent McBeth
I'm trying to capture into a datetree using org-capture, but if my tree has a 
tag on it (in particular noexport), then it creates a new datetree instead of 
using the one I have.
Example .emacs:
(global-set-key \C-cc 'org-capture)
(setq org-capture-templates
'((t Test plain (file+datetree ~/Test.org)
%^{Greeting} World
I'm going to work this time)))

Example Test.org:

* 2013 :noexport:
** 2013-02 February
*** 2013-02-19 Tuesday
Hello World
I'm going to work this time

So, based on the above, if I type C-cct Silly C-cc, I'll get this:

* 2013 :noexport:
** 2013-02 February
*** 2013-02-19 Tuesday
Hello World
I'm going to work this time
* 2013
** 2013-02 February
*** 2013-02-19 Tuesday
Silly World
I'm going to work this time

Thanks for your attention,
 Jeffrey McBeth
-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain