[O] convert outline to .csv

2016-01-17 Thread Andrew
Example:

* Micro topic 1
** Microbes are small
** You can't see them!
*** Isn't that something?
* Micro topic 2
** I hope I like the teacher
*** She will be great!
** Micro is cool!

I'd like to convert them into a .csv file like so:

"* Micro topic 1"," "** Microbes are small", "** You can't see them!", "*** 
Isn't that something?",
"* Micro topic 2", "** I hope I like the teacher", "*** She will be great!", 
"** Micro is cool!"

Where the first column contains only top level headings (lines beginning with 
one star), and the following columns are subheadings belonging to the top 
level heading.  So for each top level heading, there is one row containing 
the top level heading and its children.  I've been messing around with a 
solution in python with regular expressions as well as macros but haven't 
gotten very far.  Any suggestions?





Re: [Orgmode] Re: Tagging a region of text without creating a branch

2009-10-09 Thread Andrew Stribblehill
So, about inline tasks... what are they for? I've read the code and know
what they do, how to use them etc. But I don't know in what context people
use them.

Why were they created and where are they used?

On Oct 8, 2009 9:28 PM, "Bernt Hansen"  wrote:

Matt Lundin  writes: > bar tomas 
writes: > >> Is it possible...
Tags go with headlines.  The only way to do what you want is with inline
tasks like this:

,[ .emacs ]
| (require 'org-inlinetask)
`

,[ test.org ]

| | * item1 | this is about item 1
| *** subitem1
:urgent:
| bla bla
| *** not urgent
| more about item1
`

HTH

-Bernt

___ Emacs-orgmode mailing list
Remember: use `Reply Al...
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] "clearing" the state of an org-mode subtree

2009-10-09 Thread Andrew Stribblehill
org-mode files are plain text. M-% to do a replacement: once you've
entered your search term and its replacement, hit ! to replace all
without question.

2009/10/9 Robert Goldman :
> I'm at about my one year anniversary using Org-mode, and I have a bit of
> an odd question.  Last year, I made a subtree that was a project for
> getting ready for winter (I live in Minnesota, which has harsh winters).
>
> I worked my way through that list, and now I'd like to do the whole
> thing over again.
>
> So I'd like to copy the subtree (this I believe I can easily do), and
> then clear it.  That is, I'd like to reset all the TODOs from DONE to
> TODO, and clear all the check boxes.
>
> This seems like a really odd thing to do, so there probably isn't
> automation for it, but before I go groveling over it by hand, I thought
> I'd ask.
>
> thanks!
> R
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug in org-icalendar.el

2009-11-04 Thread Andrew Lawson
Hi all
Just noticed an issue with a recent commit d51a8307 which defines
org-icalendar-verify-function as nil but tests it using 'boundp. I'm
using revision a7543733... The fix is:

@@ -280,7 +280,7 @@ When COMBINE is non nil, add the category to each
line."
   (while (re-search-forward re1 nil t)
(catch :skip
  (org-agenda-skip)
- (when (boundp 'org-icalendar-verify-function)
+ (when org-icalendar-verify-function
(unless (funcall org-icalendar-verify-function)
  (outline-next-heading)
  (backward-char 1)
@@ -403,7 +403,7 @@ END:VEVENT\n"
(while (re-search-forward org-todo-line-regexp nil t)
  (catch :skip
(org-agenda-skip)
-   (when (boundp 'org-icalendar-verify-function)
+   (when org-icalendar-verify-function
  (unless (save-match-data
(funcall org-icalendar-verify-function))
(outline-next-heading)

After that I have further problems with a nil org-todo-line regexp in:

 re-search-forward(nil nil t)   
 
  org-print-icalendar-entries(t) 

but I'm off to a meeting. I'll have a look later

Andrew

-- 

 Andrew Lawson 
adl at absentis dot com

A notebook, a fountain pen, a good book for inspiration, a spot of tea
and an expansive view, could one ask for anything more?


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] More on GTD, browse todos by priority or creation date

2009-11-16 Thread Andrew Hyatt
org-mode's priority doesn't actually work well with GTD.  In org-mode,
priority is not inherited, so you can't prioritize projects, only
tasks.  Usually when this has come up on the list before, the answer
is to use tags for priority when you want to prioritize tasks.

On Mon, Nov 16, 2009 at 5:41 AM, David Maus  wrote:
> Hi T o n g,
>
> At Mon, 16 Nov 2009 02:47:39 + (UTC),
> T o n g wrote:
>>
>> Ok, enough off-track babbling, what I want to know is that weather org-
>> mode can somewhat allows me to assign arbitrary levels of priority to my
>> todo list, and let me browse them in their priority order (so that high
>> priority items get done first). The creation date is another way for me
>> to browse my todo items to see what have been on the list for too long.
>>
>
> Orgmode does indeed have a priority feature that seems to fit your
> needs. You may check the Orgmode manual [1], Chapter 5.4 "Priorities" and
> maybe Chapter 10.4.3 "Sorting of agenda items".
>
> Regards,
>
>  --David
>
> [1] http://orgmode.org/manual/
>
> --
> OpenPGP... 0x316F4BE4670716FD
> Jabber dmj...@jabber.org
> Email. maus.da...@gmail.com
> ICQ... 241051416
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode as QDA-Software?

2009-12-18 Thread Andrew Stribblehill
2009/12/18 Sven Bretfeld :
> Hi all, especially you org developers out there
>
> Org mode would be a nice base for bringing a good QDA-Software to the
> world of free software, isn't it? QDAS is a special type of software for
> qualitative data analysis[¹], mostly used in Sociology and related
> fields of Science. Existing programs like Atlas.ti[²] and MaxQDA[³] are
> what I deem the essence of proprietary stuff: very expensive, elitist
> and utterly unfree (but widely used by research groups who have enough
> money at their disposal).
>
> AFAIK, there is only one piece of QDA software available for Linux,
> gTAMS Analyzer, which is quite awkward in my opinion.
>
> I often advocate QDAS to students and PhD students for managing
> Discourse Analysis projects, and its always embarrassing to push them to
> expensive programs. But I think org-mode is just one step away from
> being a powerful QDAS, especially with org-babel, I think. This lack in
> the world of free software might be only a small addon-package away. It
> would be the first cross-platform solution, and group functionalities
> could be implemented via git, CVS or SVN. To my regret, I'm just a
> devoted user, in no way a developer.
>
> Is any developer out there who deems this a worthwhile project? Students
> all over the world would be grateful (if we manage to make it known via
> Google and Wikipedia).
>
> Greetings
>
> Sven
>
> [¹]  http://en.wikipedia.org/wiki/Qualitative_research.
> [²]  http://www.atlasti.com/en/.
> [³]  http://www.maxqda.com/.

Without a clearer understanding of what features you want, I don't
think anyone's going to be able to answer you to your or their
satisfaction.

>From skimming the first section of
http://www.maxqda.com/products/functionstab (Data management) it looks
like orgmode already supports most of these requirements. The latter
two, related to weighting paragraphs of text (presumably to mark up
relevance?) are not trivially supported unless you wanted to make them
subsections and assign them Properties.

I've never used this software but the list of features seems very much
a grab-bag of stuff all glommed together into one big product with
little attention paid to the core requirements: maybe some clear
thinking about what the fundamentals of qualitative data analysis
tools are will prove useful.


___
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


RE: [Orgmode] How to "snooze" a repeating item

2010-01-17 Thread Nuxoll, Andrew
Thanks, Luke but I don't think that works.  I want a command that will move the 
event forward a day but still keep the repeat at a set interval from the 
original day.  It's still something I find I need to do frequently but have no 
way to do other than manually. =(

:AMN:


-Original Message-
From: Luke Amdor [mailto:luke.am...@gmail.com]
Sent: Sun 1/17/2010 7:26 AM
To: Nuxoll, Andrew
Cc: emacs-orgmode@gnu.org
Subject: Re: [Orgmode] How to "snooze" a repeating item
 
i've been using the org-agenda-date-later function to schedule things later.
I think it's what you're looking for. It's not bound to anything, but I bind
it to ")" via

(org-defkey org-agenda-mode-map ")" 'org-agenda-date-later)

Luke


On Tue, Dec 1, 2009 at 4:34 PM, Andrew M. Nuxoll  wrote:

> I've been using org-mode for four months now and I just love it.  So I
> think I'm post-newb but still very amateur.
>
> Anyway, my to-do list has several repeating scheduled items like this
> contrived example:
>
> * TODO [#B] Lunch date with Sarah at 12pm
> SCHEDULED: <2009-12-08 Tue +1w>
>
> Or, in English, I meet with Sarah for lunch once a week on Tuesdays.
>
> Now, let's say that Sarah calls on Monday afternoon and says, "Can we do
> lunch on Wednesday this week?" and I say "Sure thing."
>
> Now I have a problem.  I could shift the date to Wednesday like this:
>
> * TODO [#B] Lunch date with Sarah at 12pm
> SCHEDULED: <2009-12-09 Wed +1w>
>
> But that will mean that the following week it will *still* be scheduled for
> Wednesdays (specifically Dec 16 instead of Dec 15).  I miss my regular lunch
> date with Sarah and catch ire for standing her up.
>
> How do I handle situations like this?
> It seems like I either need a time stamp "stack" or I need a temporary flag
> that "self destructs" after a prescribed time.
>
> :AMN:
>
>
>
> ___
> 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
>

___
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


[Orgmode] Bug in org-babel-load-file

2010-02-06 Thread Andrew Hyatt
Hi guys,

There appears to be a bug in org-babel-load-file, where it calls
org-babel-tangle-file with file and base-name.  Instead of using
base-name, it should probably use the exported-file.   This causes an
issue where the elisp I am extracting is put in "foo.bar" instead of
"foo.bar.el".  Strangely, this doesn't appear to always happen, but
only when there is a file with lots of dot-separated sections.  Any
thoughts?

This is in org 6.34trans.


___
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


[Orgmode] [PATCH] Make org-agenda-todo-ignore-* more flexible

2010-02-13 Thread Andrew Lutomirski
Hi all-

I'm pretty close to switching to org-mode to keep a todo list, but the
current set of options doesn't do it for me.  I want my todo list to
show:

 - todos without a date (that means "do at earliest convenience")
 - todos scheduled for today or earlier (that means "do at earliest
convenience, but don't bother until scheduled date")
 - todos with near deadlines (that means "do by deadline but not
before warning")

This patch adds more options to
org-agenda-todo-ignore-{scheduled,deadlines} to allow this usecase.
It shouldn't break compatibility with existing uses -- both variables
do exactly what they used to when set to t.

commit: 
http://github.com/amluto/org-mode/commit/afa59fc91630bcffe388228566aa0137d1b2e7fd
topic: http://github.com/amluto/org-mode/tree/agenda-todo-improvements
git URL: g...@github.com:amluto/org-mode.git agenda-todo-improvements

Do you like this patch?  And do I need to submit a copyright assignment?

Thanks,
Andy


___
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


Re: [Orgmode] [PATCH] Make org-agenda-todo-ignore-* more flexible

2010-02-14 Thread Andrew Lutomirski
On Sun, Feb 14, 2010 at 4:37 PM, Carsten Dominik
 wrote:
> Hi Andrew,
>
> On Feb 13, 2010, at 12:17 AM, Andrew Lutomirski wrote:
>
>> Hi all-
>>
>> I'm pretty close to switching to org-mode to keep a todo list, but the
>> current set of options doesn't do it for me.  I want my todo list to
>> show:
>>
>> - todos without a date (that means "do at earliest convenience")
>> - todos scheduled for today or earlier (that means "do at earliest
>> convenience, but don't bother until scheduled date")
>> - todos with near deadlines (that means "do by deadline but not
>> before warning")
>>
>> This patch adds more options to
>> org-agenda-todo-ignore-{scheduled,deadlines} to allow this usecase.
>> It shouldn't break compatibility with existing uses -- both variables
>> do exactly what they used to when set to t.
>>
>> commit:
>> http://github.com/amluto/org-mode/commit/afa59fc91630bcffe388228566aa0137d1b2e7fd
>> topic: http://github.com/amluto/org-mode/tree/agenda-todo-improvements
>> git URL: g...@github.com:amluto/org-mode.git agenda-todo-improvements
>>
>> Do you like this patch?  And do I need to submit a copyright assignment?
>
> I like the patch.  I have changed it a bit, and therefore I
> guess I can accept it for now without.  Still - if you don't mind, please
> get an assignment just in case you are going to submit more patches.

Great!  For the record, Łukasz Stelmach
(lukasz.stelm...@iem.pw.edu.pl) inspired this patch -- he had an
earlier patch that did something similar, although I didn't use any of
his code.

A couple thoughts, though:

s/applie/applies

org-agenda-todo-ignore-scheduled = all isn't documented.  Maybe the
test could be:

"all or tDon't show any scheduled entries in the global todo
list." (with the appropriate number of spaces)

--Andy


___
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


Re: [Orgmode] [PATCH] Make org-agenda-todo-ignore-* more flexible

2010-02-15 Thread Andrew Lutomirski
On Mon, Feb 15, 2010 at 1:56 AM, Carsten Dominik
 wrote:
>
> On Feb 14, 2010, at 11:37 PM, Andrew Lutomirski wrote:

>>
>> org-agenda-todo-ignore-scheduled = all isn't documented.
>
> Yes it is.

Whoops, I read your first commit but not your second.

--Andy


___
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


Re: [Orgmode] Creating ditaa diagrams

2010-02-27 Thread Andrew Stribblehill
I do most of the work in artist mode, with the line-drawing feature: I
love that it's C-c C-c to switch back to the native org-mode. To add
arrows and make lines dashed, I switch to picture-mode or just use
overwrite.

On Sat, Feb 27, 2010 at 8:20 AM, Nathan Neff  wrote:
> While researching org-babel (wow, wish I'd looked @ it earlier)
> I found the cool ditaa functionality.
>
> I experimented for a couple of hours with Emacs' picture mode and
> artist mode, and wanted to get advice/feedback from everyone
> on how they draw their ascii diagrams.
>
> Any advice?
>
> Thanks,
> --Nate
>
> ___
> 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
>
>


___
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


Re: [Orgmode] [ANN] org-mime -- using orgmode to send html mail?

2010-04-12 Thread Andrew Hyatt
This looks great.  However, I get an error on my test mail:

This is should be HTML mode.

~foo~
=bar=
_baz_

| Table | A |
| 1 | 2 |

On calling org-mime-htmlize

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(nil #("This is should be HTML mode." 0 28 (fontified t)))
  byte-code("\304\211\305\n\"\203A
  org-html-handle-time-stamps(#("This is should be HTML mode." 0 28
(fontified t)))
  byte-code("\203
  org-export-as-html(nil nil nil string t)
  (let nil (org-export-as-html nil nil nil (quote string) t))
  eval((let nil (org-export-as-html nil nil nil (quote string) t)))
  (progn (insert org-mime-default-header) (insert body) (write-file
tmp-file) (eval (list ... org-local-vars ...)))
  (unwind-protect (progn (insert org-mime-default-header) (insert body)
(write-file tmp-file) (eval ...)) (and (buffer-name temp-buffer)
(kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...
... ... ...) (and ... ...)))
  (with-current-buffer temp-buffer (unwind-protect (progn ... ... ... ...)
(and ... ...)))
  (let ((temp-buffer ...)) (with-current-buffer temp-buffer (unwind-protect
... ...)))
  (with-temp-buffer (insert org-mime-default-header) (insert body)
(write-file tmp-file) (eval (list ... org-local-vars ...)))
  (save-excursion (with-temp-buffer (insert org-mime-default-header) (insert
body) (write-file tmp-file) (eval ...)))
  org-mime-org-export("html" #("\nThis is should be HTML
mode.\n\n~foo~\n=bar=\n_baz_\n\n| Table | A |\n| 1 | 2 | \n\n-- \n" 0 1
(fontified t) 1 42 (fontified t) 42 43 (fontified t) 43 44 (article-type
emphasis fontified t) 44 47 (fontified t) 47 48 (article-type emphasis
fontified t) 48 50 (fontified t) 50 63 (fontified t face (gnus-cite-1
message-cited-text)) 63 64 (fontified t) 64 78 (fontified t face
(gnus-cite-1 message-cited-text)) 78 79 (fontified t rear-nonsticky t) 79 80
(fontified t) 80 84 (fontified t)) "/tmp/mail2522NRw")
  (org-mime-replace-images (org-mime-org-export "html" raw-body tmp-file)
tmp-file)
  (let* ((region-p ...) (html-start ...) (html-end ...) (raw-body ...)
(tmp-file ...) (body ...) (org-export-skip-text-before-1st-heading nil)
(org-export-htmlize-output-type ...) (org-export-preserve-breaks
org-mime-preserve-breaks) (html-and-images ...) (html-images ...) (html
...)) (delete-region html-start html-end) (save-excursion (goto-char
html-start) (insert ... ...)))
  org-mime-htmlize(nil)


On Fri, Apr 9, 2010 at 12:41 PM, Eric Schulte wrote:

> Announcing the addition of org-mime to the contrib directory of Org-mode
>
> this allows sending HTML email using org-mode including...
>
>
>- *tables*   colname onecolname two  11 24 39
>- *inline images* including latex equations [image: $f(n) = n +
>\frac{1}{n} \int_{0}^{n}{d_x f(x) + f(n - x)}$] and the results of
>ditaa blocks, etc…
>
> [image: blue.png]
>
>- *blockquotes*
>
>HTML e-mail is the use of a subset of HTML (often ill-defined) to
>provide formatting and semantic markup capabilities in e-mail that are not
>available with plain text. – wikipedia
>
> - fontified *code blocks* (shown below)
>- and *HTML character* conversion, like ∀ character c s.t. ∃ h ∈ *HTML
>characters* and c ≡ h, org-html-export of c results in h
>
>
>
> The original org-mode formatted plain text is included as a text/plain
> mime alternative to the generated html.
>
> Below find the org-mime export of the org-mime worg page which will be
> available at http://orgmode.org/worg/org-contrib/org-mime.php.
>
> Best -- Eric
>
> General
>
> org-mime can be used to send HTML email using Org-mode HTML export.
>
> This approximates a WYSiWYG HTML mail editor from within Emacs, and can be
> useful for sending tables, notified source code, and inline images in email.
>
>   How to use it
>  Setup
>
> org-mime exposes two functions
>  `org-mime-htmlize' can be called from within a mail composition buffer to
> export either the entire buffer or just the active region to html, and embed
> the results into the buffer as a text/html mime section.
>
> org-mime-htmlize is an interactive Lisp function in `org-mime.el'.
>
> (org-mime-htmlize ARG)
>
> Export a portion of an email body composed using `mml-mode' to
> html using `org-mode'.  If called with an active region only
> export that region, otherwise export the entire body.
>
>  `org-mime-org-buffer-htmlize' can be called from within an Org-mode
> buffer to export either the whole buffer or the narrowed subtree or active
> region to HTML, and open a new email buffer including the resulting HTML
> content as an embedded mime section.
>
> org-mime-org-buffer-htmlize is an interactive Lisp function in
> `org-mime.el'.
>
> (org-mime-org-buffer-htmlize)
>
> Export the current org-mode buffer to HTML using
> `org-export-as-html' and package the results into an email
> handling with appropriate MIME encoding.
>
>  The following key bindings are suggested, which bind the C-c M-o key
>

Re: [Orgmode] [ANN] org-mime -- using orgmode to send html mail?

2010-04-12 Thread Andrew Hyatt
Thanks for the response.  I upgraded, now I get a

Debugger entered--Lisp error: (wrong-type-argument arrayp t)
 substring(t 33)
 (progn (insert org-mime-default-header) (insert body) (write-file tmp-file)
(org-load-modules-maybe) (unless org-local-vars (setq org-local-vars ...))
(substring (eval ...) (if ... ... 0)))
 (unwind-protect (progn (insert org-mime-default-header) (insert body)
(write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars ...)
(substring ... ...)) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer)))
 (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...
... ... ... ... ...) (and ... ...)))
 (with-current-buffer temp-buffer (unwind-protect (progn ... ... ... ... ...
...) (and ... ...)))
 (let ((temp-buffer ...)) (with-current-buffer temp-buffer (unwind-protect
... ...)))
 (with-temp-buffer (insert org-mime-default-header) (insert body)
(write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars (setq
org-local-vars ...)) (substring (eval ...) (if ... ... 0)))
 (save-excursion (with-temp-buffer (insert org-mime-default-header) (insert
body) (write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars
...) (substring ... ...)))
 org-mime-org-export("org" #("\nHTML test\n\n~foo~\n=bar=\n_baz_\n\n| 1 | 2
|\n| a | b |\n" 0 1 (fontified t) 1 11 (fontified t) 11 12 (fontified t) 12
18 (fontified t) 18 24 (fontified t) 24 30 (fontified t) 30 31 (fontified t)
31 40 (fontified t face (gnus-cite-1 message-cited-text)) 40 41 (fontified
t) 41 50 (fontified t face (gnus-cite-1 message-cited-text)) 50 51
(fontified t)) "/tmp/mail2522ZvL")
 (let* ((region-p ...) (html-start ...) (html-end ...) (raw-body ...)
(tmp-file ...) (body ...) (org-export-skip-text-before-1st-heading nil)
(org-export-htmlize-output-type ...) (org-export-preserve-breaks
org-mime-preserve-breaks) (html-and-images ...) (html-images ...) (html
...)) (delete-region html-start html-end) (save-excursion (goto-char
html-start) (insert ... ...)))
 org-mime-htmlize(nil)
 call-interactively(org-mime-htmlize record nil)

I tried this with orgstruct-mode off and on, but it was the same error
either way.  Earlier, before I got the latest version, I tried with
orgstruct-mode on, and it successfull htmlized my mail. But, when I received
it, the mail only contained the word "nil".

On Mon, Apr 12, 2010 at 1:22 PM, Eric Schulte wrote:

> Hi Andrew,
>
> Thanks for the report.  My guess is that somehow the call to
> org-export-as-html is erroring out because some org-mode variables
> aren't being set, maybe you don't have orgstruct-mode as a minor-mode in
> your email composition -- not that it's required, but that could be the
> difference between our setups which is causing you to see the bug and
> not me.
>
> I've changed the `org-mime-org-export' so it more closely mimics the
> `org-run-like-in-org-mode' wrapping function, which should hopefully fix
> this problem.  Please let me know either way, and if the problem
> persists we can try to figure out exactly which variable isn't being
> initialized.
>
> Thanks for the report! -- Eric
>
> Andrew Hyatt  writes:
>
> > This looks great.  However, I get an error on my test mail:
> >
> > This is should be HTML mode.
> >
> > ~foo~
> > =bar=
> > _baz_
> >
> > | Table | A |
> > | 1 | 2 |
> >
> > On calling org-mime-htmlize
> >
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> >   string-match(nil #("This is should be HTML mode." 0 28 (fontified t)))
> >   byte-code("\304\211. \305\n \"\203A
> >   org-html-handle-time-stamps(#("This is should be HTML mode." 0 28
> > (fontified t)))
> >   byte-code(" \203.
> >   org-export-as-html(nil nil nil string t)
> >   (let nil (org-export-as-html nil nil nil (quote string) t))
> >   eval((let nil (org-export-as-html nil nil nil (quote string) t)))
> >   (progn (insert org-mime-default-header) (insert body) (write-file
> > tmp-file) (eval (list ... org-local-vars ...)))
> >   (unwind-protect (progn (insert org-mime-default-header) (insert body)
> > (write-file tmp-file) (eval ...)) (and (buffer-name temp-buffer)
> > (kill-buffer temp-buffer)))
> >   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
> ...
> > ... ... ...) (and ... ...)))
> >   (with-current-buffer temp-buffer (unwind-protect (progn ... ... ...
> ...)
> > (and ... ...)))
> >   (let ((temp-buffer ...)) (with-current-buffer temp-buffer
> (unwind-protect
> > ... ...)))
> >   (with-temp-buffer (insert org-mime-default-header) (insert body)
> > (write-file tmp-file) (eval (list ... org-local-vars ...)))
> >   (save-excu

Re: [Orgmode] [ANN] org-mime -- using orgmode to send html mail?

2010-04-13 Thread Andrew Hyatt
I do get the same result you do.  Hopefully, I'll have some time tomorrow to
look into the issue.  RIght now, though, my problem is not the nil, but the
error I reported in my previous email.

On Tue, Apr 13, 2010 at 8:57 PM, Eric Schulte wrote:

> So, for some reason the `org-mime-org-export' helper function is
> returning nil on your (and Eric's) machines.  Could you try evaluating
> (C-M-x) the following in your *scratch* buffer?
>
> (insert (org-mime-org-export "html" "- first
> - second
> - third" (make-temp-file "quick-test")))
>
> When I execute the above it inserts the following into the scratch
> buffer
>
> 
> 
> first
> 
> 
> second
> 
> 
> third
> 
> 
>
> If instead you get an error, or it inserts nil, then it means that our
> systems are somehow different with respect to that function, which is a
> slight alteration of `org-run-like-in-org-mode'.
>
> At that point you could try using something like
>
> (org-run-like-in-org-mode 'org-export-as-html)
>
> to export a non-html buffer to html, or you could also try starting up
> Emacs with the -Q option, then loading org-mime.el, opening an org-mode
> file, and calling org-mime-org-buffer-htmlize, and sending an email to
> yourself.
>
> Sorry I can't be of more help, I'm really mystified as to how this
> function could be returning nil.
>
> Best -- Eric
>
> Andrew Hyatt  writes:
>
> > Thanks for the response.  I upgraded, now I get a
> >
> > Debugger entered--Lisp error: (wrong-type-argument arrayp t)
> >  substring(t 33)
> >  (progn (insert org-mime-default-header) (insert body) (write-file
> tmp-file)
> > (org-load-modules-maybe) (unless org-local-vars (setq org-local-vars
> ...))
> > (substring (eval ...) (if ... ... 0)))
> >  (unwind-protect (progn (insert org-mime-default-header) (insert body)
> > (write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars
> ...)
> > (substring ... ...)) (and (buffer-name temp-buffer) (kill-buffer
> > temp-buffer)))
> >  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...
> > ... ... ... ... ...) (and ... ...)))
> >  (with-current-buffer temp-buffer (unwind-protect (progn ... ... ... ...
> ...
> > ...) (and ... ...)))
> >  (let ((temp-buffer ...)) (with-current-buffer temp-buffer
> (unwind-protect
> > ... ...)))
> >  (with-temp-buffer (insert org-mime-default-header) (insert body)
> > (write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars
> (setq
> > org-local-vars ...)) (substring (eval ...) (if ... ... 0)))
> >  (save-excursion (with-temp-buffer (insert org-mime-default-header)
> (insert
> > body) (write-file tmp-file) (org-load-modules-maybe) (unless
> org-local-vars
> > ...) (substring ... ...)))
> >  org-mime-org-export("org" #("\nHTML test\n\n~foo~\n=bar=\n_baz_\n\n| 1 |
> 2
> > |\n| a | b |\n" 0 1 (fontified t) 1 11 (fontified t) 11 12 (fontified t)
> 12
> > 18 (fontified t) 18 24 (fontified t) 24 30 (fontified t) 30 31 (fontified
> t)
> > 31 40 (fontified t face (gnus-cite-1 message-cited-text)) 40 41
> (fontified
> > t) 41 50 (fontified t face (gnus-cite-1 message-cited-text)) 50 51
> > (fontified t)) "/tmp/mail2522ZvL")
> >  (let* ((region-p ...) (html-start ...) (html-end ...) (raw-body ...)
> > (tmp-file ...) (body ...) (org-export-skip-text-before-1st-heading nil)
> > (org-export-htmlize-output-type ...) (org-export-preserve-breaks
> > org-mime-preserve-breaks) (html-and-images ...) (html-images ...) (html
> > ...)) (delete-region html-start html-end) (save-excursion (goto-char
> > html-start) (insert ... ...)))
> >  org-mime-htmlize(nil)
> >  call-interactively(org-mime-htmlize record nil)
> >
> > I tried this with orgstruct-mode off and on, but it was the same error
> > either way.  Earlier, before I got the latest version, I tried with
> > orgstruct-mode on, and it successfull htmlized my mail. But, when I
> received
> > it, the mail only contained the word "nil".
> >
> > On Mon, Apr 12, 2010 at 1:22 PM, Eric Schulte  >wrote:
> >
> >> Hi Andrew,
> >>
> >> Thanks for the report.  My guess is that somehow the call to
> >> org-export-as-html is erroring out because some org-mode variables
> >> aren't being set, maybe you don't have orgstruct-mode as a minor-mode in
> >> your email composition -- not that it's required, but that could be the
> >> difference between our setups which is causing you to see the bug and
> >> not me.
&g

Re: [Orgmode] [ANN] org-mime -- using orgmode to send html mail?

2010-04-14 Thread Andrew Hyatt
Thanks! I  finally got it to work. I actually did have the latest code, but
my issue was that when I upgraded to the new org, I forgot to byte-compile
before I did M-x org-reload.

After I got your latest code, it all works now.  I'm looking forward to
using it!

On Wed, Apr 14, 2010 at 10:59 AM, Eric Schulte wrote:

> Hi Andrew,
>
> I started my emacs with the -Q option, and to my surprise I got the same
> error that you have described.  I've been able to hunt down the source
> of this problem, and it is an old version of org-export-as-org, which
> means that you are not loading the latest version of the core org-mode,
> but rather the version distributed with Emacs.
>
> This is what happened to me when I started with the -Q option and simple
> required org-install without first adding the path to the newer version
> of org-mode to my load path.
>
> An easy way to verify that this is the case is to call describe-function
> with C-h f org-export-as-org, then jump to the source-code of the
> function by pressing enter on the linked function name, and jumping down
> to the last 5 lines of the function definition.  If they don't look like
>
>
> (if (equal to-buffer 'string)
>   (progn (setq str-ret (buffer-string))
>  (kill-buffer (current-buffer))
>  str-ret)
> (kill-buffer (current-buffer)))
>
>
>
> then you are still using an old version of Org-mode.  Hopefully once you
> are sync'd to the head of the org-mode repository this error will be
> fixed.
>
> Hope this helps, Best -- Eric
>
> Andrew Hyatt  writes:
>
> > I do get the same result you do.  Hopefully, I'll have some time tomorrow
> to
> > look into the issue.  RIght now, though, my problem is not the nil, but
> the
> > error I reported in my previous email.
> >
> > On Tue, Apr 13, 2010 at 8:57 PM, Eric Schulte  >wrote:
> >
> >> So, for some reason the `org-mime-org-export' helper function is
> >> returning nil on your (and Eric's) machines.  Could you try evaluating
> >> (C-M-x) the following in your *scratch* buffer?
> >>
> >> (insert (org-mime-org-export "html" "- first
> >> - second
> >> - third" (make-temp-file "quick-test")))
> >>
> >> When I execute the above it inserts the following into the scratch
> >> buffer
> >>
> >> 
> >> 
> >> first
> >> 
> >> 
> >> second
> >> 
> >> 
> >> third
> >> 
> >> 
> >>
> >> If instead you get an error, or it inserts nil, then it means that our
> >> systems are somehow different with respect to that function, which is a
> >> slight alteration of `org-run-like-in-org-mode'.
> >>
> >> At that point you could try using something like
> >>
> >> (org-run-like-in-org-mode 'org-export-as-html)
> >>
> >> to export a non-html buffer to html, or you could also try starting up
> >> Emacs with the -Q option, then loading org-mime.el, opening an org-mode
> >> file, and calling org-mime-org-buffer-htmlize, and sending an email to
> >> yourself.
> >>
> >> Sorry I can't be of more help, I'm really mystified as to how this
> >> function could be returning nil.
> >>
> >> Best -- Eric
> >>
> >> Andrew Hyatt  writes:
> >>
> >> > Thanks for the response.  I upgraded, now I get a
> >> >
> >> > Debugger entered--Lisp error: (wrong-type-argument arrayp t)
> >> >  substring(t 33)
> >> >  (progn (insert org-mime-default-header) (insert body) (write-file
> >> tmp-file)
> >> > (org-load-modules-maybe) (unless org-local-vars (setq org-local-vars
> >> ...))
> >> > (substring (eval ...) (if ... ... 0)))
> >> >  (unwind-protect (progn (insert org-mime-default-header) (insert body)
> >> > (write-file tmp-file) (org-load-modules-maybe) (unless org-local-vars
> >> ...)
> >> > (substring ... ...)) (and (buffer-name temp-buffer) (kill-buffer
> >> > temp-buffer)))
> >> >  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
> ...
> >> > ... ... ... ... ...) (and ... ...)))
> >> >  (with-current-buffer temp-buffer (unwind-protect (progn ... ... ...
> ...
> >> ...
> >> > ...) (and ... ...)))
> >> >  (let ((temp-buffer ...)) (with-current-buffer temp-buffer
> >> (unwind-protect
> >> > ... ...)))
> >> >  (with-temp

[Orgmode] Easter without using org-agenda-holidays?

2010-04-28 Thread andrew mcintosh
I'm Canadian and have made an .org file including all the major Canadian 
holidays in it except for the Easter holidays.  Is there a way to include it 
without using org-agenda-holidays?  I'm not interested in knowing when it's 
Columbus Day, and more importantly, the American Thanksgiving is conflicts with 
the Canadian Thanksgiving (they're not even in the same month!)


  


___
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


Re: [Orgmode] Poll: Who is using these commands

2010-05-11 Thread Andrew Burrow
On Mon, May 10, 2010 at 4:33 PM, Carsten Dominik
wrote:

>
> On May 9, 2010, at 12:03 AM, Scott Randby wrote:
>
>  On 05/08/2010 04:22 PM, Friedrich Delgado Friedrichs wrote:
>>
>>> Hi!
>>> Carsten Dominik schrieb:
>>>
>>>> I am wondering:
>>>>
>>>> How many of your are using these keys
>>>>
>>>> C-c C-f
>>>> C-c C-b
>>>> C-c C-n
>>>> C-c C-p
>>>>
>>>
>>> Never. I always use the speed commands since they became available.
>>>
>>
>> The problem I have with speed commands is that, according to the manual,
>> they only work "when the cursor is at the beginning of a headline." I need
>> commands that work when the cursor is anywhere on the headline.
>>
>
> How about if C-M-a went back to the beginning of the heading and then you
> use speed commands?  Would that be an alternative, or is that one command to
> much?
>
> - Carsten


This makes a great deal of sense to me.

I am frequently frustrated when locating the start or end of a tree: how to
reliably place point so that M- creates a new tree of the desired
level?  I suggest the following postconditions: C-M-a guarantees that speed
keys are applicable, and C-M-e guarantees that M- is applicable.

Andrew
___
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


Re: [Orgmode] Poll: Who is using these commands

2010-05-11 Thread Andrew Burrow
On Sat, May 8, 2010 at 7:14 PM, Carsten Dominik
wrote:

> I am wondering:
>
> How many of your are using these keys
>
> C-c C-f
> C-c C-b
> C-c C-n
> C-c C-p
>
> for navigation through the outline?  These are first class keys,
> and I would have good uses for these keys if most people don't actually use
> them.
>

I found their action difficult to follow.  Compare C-left.  In most
environments, if the cursor is within a word, it first moves to the start of
the word, and subsequently moves to the preceding word.

C-c C-b breaks this idiom.  I found this so jarring that I gave up using
these keys.

regards

Andrew
___
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


Re: [Orgmode] why not auto-renumbering list ?

2010-08-10 Thread Andrew Swann
On 9/8/10 14:35 , "Nicolas Goaziou"  wrote:

[...]
> Thinking about it, we could even lighten [...@start:xx] syntax by making
> it [...@num]. It would also make more sense since it can be used
> repeatedly in a list. Thus:
> 
> 6. [...@6] I like
> 28. [...@28] perfect numbered
> 496. [...@496] lists

This is the nicest syntax so far.

I have a related but slightly off topic question that arose when setting up
org versions of Danish course homepages.  How do I get something like

2. kvartal

(meaning 2nd quarter) on a line on its own that is *not* treated as a list
(and thus renumbered on publication) ?

Thanks for any help

Andrew

-- 
Andrew Swann sw...@imada.sdu.dk http://www.imada.sdu.dk/~swann
Department of Mathematics and Computer Science,  Tel +45 6550 2354
and CP3-Origins, University of Southern Denmark,Dept +45 6550 2387
Campusvej 55, DK-5230 Odense M, Denmark  Fax +45 6550 2325


___
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


Re: [Orgmode] why not auto-renumbering list ?

2010-08-10 Thread Andrew Swann

On 10/8/10 11:46 , "Nicolas Goaziou"  wrote:

> Hello,
> 
>>>>>> Andrew Swann writes:
> 
>> I have a related but slightly off topic question that arose when setting up
>> org versions of Danish course homepages.  How do I get something like
> 
>> 2. kvartal
> 
>> (meaning 2nd quarter) on a line on its own that is *not* treated as a list
>> (and thus renumbered on publication) ?
> 
> You can set `org-plain-list-ordered-item-terminator' to ?). Thus, only
> ordered lists with a parenthesis are allowed, and your line will not
> be treated as a list item anymore.

Many thanks for this suggestion.  It is certainly useful.  Is there a local
solution that could be used just around this line?  It would be nice if one
could escape the period.

Andrew

-- 
Andrew Swann sw...@imada.sdu.dk http://www.imada.sdu.dk/~swann
Department of Mathematics and Computer Science,  Tel +45 6550 2354
and CP3-Origins, University of Southern Denmark,Dept +45 6550 2387
Campusvej 55, DK-5230 Odense M, Denmark  Fax +45 6550 2325


___
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


Re: [Orgmode] why not auto-renumbering list ?

2010-08-11 Thread Andrew Swann
On 10/8/10 14:32 , "Nicolas Goaziou"  wrote:

>>>>>> Andrew Swann writes:
> 
>> Many thanks for this suggestion.  It is certainly useful.  Is there a local
>> solution that could be used just around this line?  It would be nice if one
>> could escape the period.
> 
> Enforce numbering to 2 with [...@start:2]. It will still be treated as a
> list, but it won't be renumbered.
> 
> Otherwise, if this isn't at column 0, you can insert a non-breaking
> space (C-q 240) somewhere in front of your item. Org will not
> recognize a list, and it will be invisible when exporting.

Aha! The C-q 240 non-breaking space is the key.  With the 2. at column 0, I
can put this immediately after the period and the text is treated as text
rather than list item.  Excellent.

Many thanks

Andrew

-- 
Andrew Swann sw...@imada.sdu.dk http://www.imada.sdu.dk/~swann
Department of Mathematics and Computer Science,  Tel +45 6550 2354
and CP3-Origins, University of Southern Denmark,Dept +45 6550 2387
Campusvej 55, DK-5230 Odense M, Denmark  Fax +45 6550 2325


___
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


Re: [O] do it today, or well, tomorrow

2011-10-12 Thread Andrew Hyatt
While we're talking about scheduling... one thing I'd love to see, but
never figured out how to do, is to schedule a parent task, and have
the subtasks all inherit that schedule.  I think I've tried most
obvious things, but schedules seem just not to be inherited.

On Wed, Oct 12, 2011 at 1:12 PM, Carsten Dominik
 wrote:
>
> On 12.10.2011, at 18:08, Andrea Crotti wrote:
>
>> On 10/12/2011 04:55 PM, Carsten Dominik wrote:
>>>
>>> An alternative is to use the scheduling mechanism.
>>>
>>> * TODO My Task
>>>   SCHEDULED:<2011-10-12 Wed>
>>>
>>> This task will automatically be forwarded to the following day, until it is 
>>> done.
>>>
>>> - Carsten
>>>
>>>
>> Fantastic!
>> I only see the habit page on the manual now, but it has to be enabled,
>> and the "SCHEDULED" setting has to be done by hand right?
>
> Use C-c C-s for this.  All described in detail in the manual - take the time 
> to read it!
>
>> Maybe I should use a capture template for that?
>
> That is also a possibility, of course!
>
>>
>> And it's not very clear how do I set an habit on a task, when I run
>> org-habit-toggle-habits it opens me the agenda buffer, instead of doing 
>> something in
>> the current task as I (wrongly) expected.
>
> Again, the manual does cover this.  the toggle-habit function is for turning 
> them on and off in the agenda display.
>
> - Carsten
>
>
>
>



[O] [PATCH] Bug: org-ageda-bulk-mark-regexp bugs [7.7]

2011-10-17 Thread Andrew Stribblehill
Emacs  : GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-03-04 on allspice, modified by Debian
Package: Org-mode version 7.7

I found a couple of bugs with org-agenda-bulk-mark-regexp:
 - it didn't work at all :)
 - once I fixed that, it didn't work for the empty regex (or, I guess,
for other expressions that match the emptiness at the end of the
buffer).

The first problem was solved by initializing entries-marked as 0. The
latter, by making sure there is text to match on before proceeding
down the while loop.

This patch is relative to HEAD as of 2011-10-17T13:46:48+

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 60e561c..bf03b68 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8144,16 +8144,15 @@ This is a command that has to be installed in
`calendar-mode-map'."
 (defun org-agenda-bulk-mark-regexp (regexp)
   "Mark entries match REGEXP."
   (interactive "sMark entries matching regexp: ")
-  (let ((entries-marked 0))
+  (let (entries-marked)
 (save-excursion
   (goto-char (point-min))
   (goto-char (next-single-property-change (point) 'txt))
-  (while (and (re-search-forward regexp nil t)
- (get-text-property (point) 'txt))
+  (while (re-search-forward regexp nil t)
(when (string-match regexp (get-text-property (point) 'txt))
  (setq entries-marked (+ entries-marked 1))
  (call-interactively 'org-agenda-bulk-mark
-(if (zerop entries-marked)
+(if (not entries-marked)
(message "No entry matching this regexp."

 (defun org-agenda-bulk-unmark ()



[O] Archive to date-tree

2011-11-02 Thread Andrew Hyatt
Would anyone be interested in the ability to archive to the current
date in date-tree instead of an archive file?  I'm toying with the
idea of implementing this, and I could send it in as a patch when it
is done, or just leave it as a personal module if no one is
particularly interested.



[O] [PATCH] Add the ability to archive to the datetree.

2011-11-08 Thread Andrew Hyatt
* org.el (org-archive-location): Add documentation on new datetree
option.
* org-archive.el (org-archive-subtree): Add special handling
of datetree options to archive to datetree.

---
 lisp/org-archive.el |   21 +
 lisp/org.el |7 +++
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 16c35cf..4df6f1e 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -213,13 +213,14 @@ this heading."
 (current-time)))
  category todo priority ltags itags atags
  ;; end of variables that will be used for saving context
- location afile heading buffer level newfile-p infile-p visiting)
+ location afile heading buffer level newfile-p infile-p visiting
+ datetree-date)

   ;; Find the local archive location
   (setq location (org-get-local-archive-location)
afile (org-extract-archive-file location)
heading (org-extract-archive-heading location)
-   infile-p (equal file (abbreviate-file-name afile)))
+   infile-p (equal file (abbreviate-file-name (or afile ""
   (unless afile
(error "Invalid `org-archive-location'"))

@@ -230,6 +231,12 @@ this heading."
(setq buffer (current-buffer)))
   (unless buffer
(error "Cannot access file \"%s\"" afile))
+  (when (string-match "\\`datetree/" heading)
+   ;; Replace with ***, to represent the 3 levels of headings the
+   ;; datetree has.
+   (setq heading (string-replace-match "\\`datetree/" heading "***"))
+   (setq datetree-date (org-date-to-gregorian
+(or (org-entry-get nil "CLOSED" t) time
   (if (and (> (length heading) 0)
   (string-match "^\\*+" heading))
  (setq level (match-end 0))
@@ -262,6 +269,9 @@ this heading."
  (goto-char (point-max))
  (insert (format "\nArchived entries from file %s\n\n"
  (buffer-file-name this-buffer
+   (when datetree-date
+ (org-datetree-find-date-create datetree-date)
+ (org-narrow-to-subtree))
;; Force the TODO keywords of the original buffer
(let ((org-todo-line-regexp tr-org-todo-line-regexp)
  (org-todo-keywords-1 tr-org-todo-keywords-1)
@@ -285,7 +295,8 @@ this heading."
  ;; Heading not found, just insert it at the end
  (goto-char (point-max))
  (or (bolp) (insert "\n"))
- (insert "\n" heading "\n")
+ ;; datetrees don't need to much spacing
+ (if datetree-date (insert heading) (insert "\n" heading "\n"))
  (end-of-line 0))
;; Make the subtree visible
(show-subtree)
@@ -296,7 +307,8 @@ this heading."
  (org-end-of-subtree t))
(skip-chars-backward " \t\r\n")
(and (looking-at "[ \t\r\n]*")
-(replace-match "\n\n")))
+;; datetree archives don't need so much spacing.
+(replace-match (if datetree-date "\n" "\n\n"
;; No specific heading, just go to end of file.
(goto-char (point-max)) (insert "\n"))
  ;; Paste
@@ -326,6 +338,7 @@ this heading."
  (setq n (concat "ARCHIVE_" (upcase (symbol-name e
  (org-entry-put (point) n v)

+ (widen)
  ;; Save and kill the buffer, if it is not the same buffer.
  (when (not (eq this-buffer buffer))
(save-buffer
diff --git a/lisp/org.el b/lisp/org.el
index 6ee3b4e..9c80c9c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4046,6 +4046,13 @@ Here are a few examples:
Archive in file ./basement (relative path), as level 3 trees
below the level 2 heading \"** Finished Tasks\".

+\"~/org/datetree.org::datetree/* Finished Tasks\"
+The \"datetree/\" string is special, signifiying to
+archive items to the datetree.  Items are placed in
+either the CLOSED date of the item, or the current date
+if there is no CLOSED date.  The heading will be a
+subentry to the current date.
+
 You may set this option on a per-file basis by adding to the buffer a
 line like

-- 
1.7.3.1



Re: [O] [PATCH] Add the ability to archive to the datetree.

2011-11-09 Thread Andrew Hyatt
The documentation didn't go into any details about how to specify the
org-archive-location, or what you could do with it,  instead it just
referred to the documentation of that variable.  Still, now that you
mention it, it seemed worthwhile to add  something to the docs, so I
did that.  I'll send another version of the patch now.

On Wed, Nov 9, 2011 at 6:22 AM, Bernt Hansen  wrote:
> Hi Andrew,
>
> I'm just eyeballing your patch and there's a typo in your last hunk -
> see comment inline.
>
> Don't you also need to update the texinfo documentation for this
> enhancement?
>
> -Bernt
>
> Andrew Hyatt  writes:
>
>> * org.el (org-archive-location): Add documentation on new datetree
>> option.
>> * org-archive.el (org-archive-subtree): Add special handling
>> of datetree options to archive to datetree.
>>
>> ---
>>  lisp/org-archive.el |   21 +
>>  lisp/org.el         |    7 +++
>>  2 files changed, 24 insertions(+), 4 deletions(-)
>>
>> diff --git a/lisp/org-archive.el b/lisp/org-archive.el
>> index 16c35cf..4df6f1e 100644
>> --- a/lisp/org-archive.el
>> +++ b/lisp/org-archive.el
>> @@ -213,13 +213,14 @@ this heading."
>>                (current-time)))
>>         category todo priority ltags itags atags
>>         ;; end of variables that will be used for saving context
>> -       location afile heading buffer level newfile-p infile-p visiting)
>> +       location afile heading buffer level newfile-p infile-p visiting
>> +       datetree-date)
>>
>>        ;; Find the local archive location
>>        (setq location (org-get-local-archive-location)
>>           afile (org-extract-archive-file location)
>>           heading (org-extract-archive-heading location)
>> -         infile-p (equal file (abbreviate-file-name afile)))
>> +         infile-p (equal file (abbreviate-file-name (or afile ""
>>        (unless afile
>>       (error "Invalid `org-archive-location'"))
>>
>> @@ -230,6 +231,12 @@ this heading."
>>       (setq buffer (current-buffer)))
>>        (unless buffer
>>       (error "Cannot access file \"%s\"" afile))
>> +      (when (string-match "\\`datetree/" heading)
>> +     ;; Replace with ***, to represent the 3 levels of headings the
>> +     ;; datetree has.
>> +     (setq heading (string-replace-match "\\`datetree/" heading "***"))
>> +     (setq datetree-date (org-date-to-gregorian
>> +                          (or (org-entry-get nil "CLOSED" t) time
>>        (if (and (> (length heading) 0)
>>              (string-match "^\\*+" heading))
>>         (setq level (match-end 0))
>> @@ -262,6 +269,9 @@ this heading."
>>         (goto-char (point-max))
>>         (insert (format "\nArchived entries from file %s\n\n"
>>                         (buffer-file-name this-buffer
>> +     (when datetree-date
>> +       (org-datetree-find-date-create datetree-date)
>> +       (org-narrow-to-subtree))
>>       ;; Force the TODO keywords of the original buffer
>>       (let ((org-todo-line-regexp tr-org-todo-line-regexp)
>>             (org-todo-keywords-1 tr-org-todo-keywords-1)
>> @@ -285,7 +295,8 @@ this heading."
>>                 ;; Heading not found, just insert it at the end
>>                 (goto-char (point-max))
>>                 (or (bolp) (insert "\n"))
>> -               (insert "\n" heading "\n")
>> +               ;; datetrees don't need to much spacing
>> +               (if datetree-date (insert heading) (insert "\n" heading 
>> "\n"))
>>                 (end-of-line 0))
>>               ;; Make the subtree visible
>>               (show-subtree)
>> @@ -296,7 +307,8 @@ this heading."
>>                 (org-end-of-subtree t))
>>               (skip-chars-backward " \t\r\n")
>>               (and (looking-at "[ \t\r\n]*")
>> -                  (replace-match "\n\n")))
>> +                  ;; datetree archives don't need so much spacing.
>> +                  (replace-match (if datetree-date "\n" "\n\n"
>>           ;; No specific heading, just go to end of file.
>>           (goto-char (point-max)) (insert "\n"))
>>         ;; Paste
>> @@ -326,6 +338,7 @@ this heading."
>>                 (setq n (concat "ARCHIVE_" (upcase (symbol-name e
>>                 (org-

[O] [PATCH] Add the ability to archive to the datetree.

2011-11-09 Thread Andrew Hyatt
* org.el (org-archive-location): Add documentation on new datetree
option.
* org-archive.el (org-archive-subtree): Add special handling
of datetree options to archive to datetree.

---
 doc/org.texi|   22 +-
 lisp/org-archive.el |   21 +
 lisp/org.el |7 +++
 3 files changed, 37 insertions(+), 13 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 143b184..128f966 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6854,16 +6854,20 @@ is invoked, the level 1 trees will be checked.
 @cindex archive locations
 The default archive location is a file in the same directory as the
 current file, with the name derived by appending @file{_archive} to the
-current file name.  For information and examples on how to change this,
+current file name.  You can also choose what heading to file archived
+items under, with the possibility to add them to a datetree in a file.
+For information and examples on how to specify the file and the heading,
 see the documentation string of the variable
-@code{org-archive-location}.  There is also an in-buffer option for
-setting this variable, for example@footnote{For backward compatibility,
-the following also works: If there are several such lines in a file,
-each specifies the archive location for the text below it.  The first
-such line also applies to any text before its definition.  However,
-using this method is @emph{strongly} deprecated as it is incompatible
-with the outline structure of the document.  The correct method for
-setting multiple archive locations in a buffer is using properties.}:
+@code{org-archive-location}.
+
+There is also an in-buffer option for setting this variable, for
+example@footnote{For backward compatibility, the following also works:
+If there are several such lines in a file, each specifies the archive
+location for the text below it.  The first such line also applies to any
+text before its definition.  However, using this method is
+@emph{strongly} deprecated as it is incompatible with the outline
+structure of the document.  The correct method for setting multiple
+archive locations in a buffer is using properties.}:

 @cindex #+ARCHIVE
 @example
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 16c35cf..35ef290 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -213,13 +213,14 @@ this heading."
 (current-time)))
  category todo priority ltags itags atags
  ;; end of variables that will be used for saving context
- location afile heading buffer level newfile-p infile-p visiting)
+ location afile heading buffer level newfile-p infile-p visiting
+ datetree-date)

   ;; Find the local archive location
   (setq location (org-get-local-archive-location)
afile (org-extract-archive-file location)
heading (org-extract-archive-heading location)
-   infile-p (equal file (abbreviate-file-name afile)))
+   infile-p (equal file (abbreviate-file-name (or afile ""
   (unless afile
(error "Invalid `org-archive-location'"))

@@ -230,6 +231,12 @@ this heading."
(setq buffer (current-buffer)))
   (unless buffer
(error "Cannot access file \"%s\"" afile))
+  (when (string-match "\\`datetree/" heading)
+   ;; Replace with ***, to represent the 3 levels of headings the
+   ;; datetree has.
+   (setq heading (string-replace-match "\\`datetree/" heading "***"))
+   (setq datetree-date (org-date-to-gregorian
+(or (org-entry-get nil "CLOSED" t) time
   (if (and (> (length heading) 0)
   (string-match "^\\*+" heading))
  (setq level (match-end 0))
@@ -262,6 +269,9 @@ this heading."
  (goto-char (point-max))
  (insert (format "\nArchived entries from file %s\n\n"
  (buffer-file-name this-buffer
+   (when datetree-date
+ (org-datetree-find-date-create datetree-date)
+ (org-narrow-to-subtree))
;; Force the TODO keywords of the original buffer
(let ((org-todo-line-regexp tr-org-todo-line-regexp)
  (org-todo-keywords-1 tr-org-todo-keywords-1)
@@ -285,7 +295,8 @@ this heading."
  ;; Heading not found, just insert it at the end
  (goto-char (point-max))
  (or (bolp) (insert "\n"))
- (insert "\n" heading "\n")
+ ;; datetrees don't need too much spacing
+ (if datetree-date (insert heading) (insert "\n" heading "\n"))
  (end-of-line 0))
;; Make the subtree visible
(show-subtree)
@@ -296,7 +307,8 @@ this heading."
  (org-end-of-subtree t))
(skip-chars-backward " \t\r\n")
(and (looking-at "[ \t\r\n]*")
-(replace-match "\n\n")))
+;; datetree archives don't need s

Re: [O] [OT]: Search for missing :END:

2011-11-21 Thread Andrew Stribblehill
My guess is that it's the 18720th byte of the file. To get there, go
to the start of your buffer and type M-x goto-char 18720


On Mon, Nov 21, 2011 at 11:27 PM, Markus Heller  wrote:
> Nick Dokos  writes:
>
>> Markus Heller  wrote:
>>
>>> Hello all,
>>>
>>> I have an OT request that can hopefully be answered by emacs gurus in
>>> less than a minute:
>>>
>>> I'm looking for an emacs search expression that finds :PROPERTIES:
>>> *without* a matching :END: ...
>>>
>>
>> If you mean a regexp, you are wasting your time[fn:1]. Regexps are
>> powerful, but their range of applicability is limited to regular
>> languages and even then, you have to worry about their efficiency. The
>> above *is* a regular language: if P stands for :PROPERTIES: and E stands
>> for :END:, then the regexp is
>>
>>     ([^EP]*P[^EP]*E)*
>>
>> In words, the stuff inside the parens says: 0 or more "other" things
>> (non-P and non-E), followed by a P, followed by 0 or more "other"
>> things, followed by an E. You can then have 0 or more of the
>> parenthesized things. This will succeed on well formed "sentences" and
>> fail on others.  But it might have to backtrack over the inner [^EP]*
>> matches and then the outer matches, and rescan arbitrarily long
>> stretches, which in the worst case, can turn your search into an
>> exponentially slow descent into the abyss. You might be able to write
>> non-greedy regexps that might behave better in this case. In most cases,
>> you'd end up with a horrendous-looking regexp: good luck trying to
>> understand it next week. That's my biggest problem with complicated regexps.
>>
>> However, a change of tool will simplify the problem enormously. E.g. here's
>> a simple algorithm that can be used for this kind of problem:  start a
>> nesting depth at 0 - when you see a P, increment the nesting depth by 1;
>> when you see an E, decrement it by 1. If the nesting depth ever becomes
>> something other than 0 or 1, you got a problem - also, if at EOF, the
>> nesting depth is not 0, you got a problem. Easy variations of this will
>> check well-formedness even when nesting *is* allowed.
>>
>> You can easily write such a program in any language you are familiar
>> with (it does not have to be elisp, although you *can* write it in
>> elisp - personally, I'd use awk).
>>
>> But assuming that you are getting some error from org, you don't know
>> where the problem is and you are trying to find it, it will be simpler
>> to just use egrep:
>>
>>     grep -E -n ':PROPERTIES:|:END:' foo.org
>>
>> will filter out the relevant lines, so all you have to do is scan the
>> output by eye and spot any irregularity (consecutive :PROPERTIES: or
>> consecutive :END: lines). Even if you have hundreds of them, that's
>> *easy* for humans to do.[fn:2]
>>
>> Or, if you prefer, you can write trivial validation programs to operate
>> on the output, e.g.:
>>
>>         grep -E -n ':PROPERTIES:|:END:' foo.org | tee foo.out | grep PROP | 
>> wc -l
>>       grep END foo.out | wc -l
>>
>> (the counts 'd better be the same).
>>
>> or
>>
>>       grep -E -n ':PROPERTIES:|:END:' foo.org | foo.awk
>>
>> where foo.awk implements the nesting depth algorithm above - something
>> like this:
>>
>> #! /bin/bash
>>
>> awk '
>> BEGIN          { d = 0;}
>> /:PROPERTIES:/ { d++; if (d > 1) { print $1, $d; exit; }}
>> /:END:/        { d--; if (d < 0) { print $1, $d; exit; }}
>> END            { if (d != 0) { print $1, $d; }}'
>>
>>
>> Even on Windoze, you can probably do all this stuff with cygwin.
>
> Hi Nick,
>
> thanks for this informative reply.
>
> Unfortunately, I cannot install cygwin on my work computer.  I'll have
> to figure something else out ...
>
> AS for an example, I'm in one of my org files and I do C-TAB and get the
> following error:
>
> OVERVIEW
> CONTENTS...done
> SHOW ALL
> if: :END: line missing at position 18720
> Quit
> Mark set
>
> Where is position 18720?  I apologize if this is a stupid question, but
> I can't seem to figure this out ...
>
> Thanks again
> Markus
>
>
>



Re: [Orgmode] OrgCamp in NYC?

2011-01-24 Thread Andrew Hyatt
I'd love to attend a NYC one, and can probably arrange for hosting in
a nice space in Manhattan as well.

On Sat, Jan 22, 2011 at 6:23 PM, Bradley M. Kuhn  wrote:
> Bastien wrote on Thursday the 6th:
>>   "OrgCamps are informal events where people gather IRL to contribute
>>    to Org by discussing how they use it and by doing contributions to
>>    the code, the manuals and the online tutorials."
>
> This is an excellent idea.  I hope today's OrgCamp in Paris went well --
> I wish I could have been there. :)
>
> Meanwhile, I can offer space in NYC (just a conference room) in NYC that
> can host up to 10 people.  It's in Brooklyn, not too far from Manhattan,
> near transit lines.
>
> Would anyone in NYC have an interest in an OrgCamp?  I don't have time
> to organize it, but I can coordinate logistics for the venue if someone
> else would be willing to do the rest.
>
> It looks like Paris got 17 people by the end.  We'd have to be about
> half that for the space I have available, but I'm willing if others are.
> --
>   -- bkuhn
>
> ___
> 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
>

___
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


[O] [GSoC] Merge Driver progress and conflict markers

2012-07-13 Thread Andrew Young
Hello list,
Another small progress update on the org-merge-driver:

The merge driver at this point has the ability to detect the insertion
and deletion of headings, and should correctly cause updates to the tree
structure to conflict.

Here is a short example of the merge driver at work:

Ancestor File:

* Gardening
** Spring Planting
* Rocket Cars
** Speed Concerns
*** How to go faster
* Origami
- How do you fold a crane?

Local Revision:

* Gardening
- Buy a sprinkler.
* Rocket Cars
- rocket cars are cool.
** Speed Concerns
- I'm not going fast enough.
*** How to go faster
*** Bigger engines

Remote Revision:

* Gardening
** Spring Planting
* Rocket Cars
- rocket cars are dangerous.
** Safety Concerns
- Look into wearing a helmet.
* Origami
- Cranes are easy.

Output File:

* Gardening
- Buy a sprinkler.
* Rocket Cars
>>>
- rocket cars are cool.
===
- rocket cars are dangerous.
<<<
** Safety Concerns
- Look into wearing a helmet.
>>>
** Speed Concerns
- I'm not going fast enough.
*** Bigger engines
===
<<<
>>>
===
* Origami
- Cranes are easy.
<<<

Currently, I am working on global matching, which is my name for
detecting element's movement across the document.

I need some input on the display of conflicts: Right now I am trying
to devise the output to be as informative and useful as possible.

There are a number of issues to consider:

1. Providing the most amount of information possible.  This means
including descriptive information in the conflict markers, and never
combining the conflict markers of side-by-side conflicts.  There is
also a risk of printing too much, and cluttering the output.

2. Nested conflict markers. With global matching implemented in the
near future, the merge driver may be printing nested conflicts. This
is because it is possible for conflicts to be inside other conflict
boundaries.  It will be important to consider the desired behavior and
output of the merge driver when merging elements whose parents have
conflicted.

3. Compatibility with org-mode and traditional diff tools. Some merge
tools may simply fail with nested conflicts.

4. Visual queues.  Nested conflict markers could be indented according
to their conflict level to help see where they line up.  This has the
trade off of abandoning the traditional style, and may be initially
confusing.

Following is a simplified example of nested conflict markers. In the
example, each heading is unique and we assume their movement may be
tracked.  In the actual merge driver, IDs would be used to implement
tracking of this nature.

EXAMPLE 2

Ancestor:

* Heading 1
* Heading 2
* Heading 3
** Heading A
** heading B

Local Revision:

* Heading 1
** DONE Heading A
** Heading B
* Heading 2
* Heading 3

Remote Revision:

* Heading 2
** TODO Heading A
* Heading 3

Output File:

>>> local: updated children
* Heading 1
  >>> local: content update
** DONE Heading A
  ===
** TODO Heading A
  <<< remote: content update
** Heading B
===
<<< remote: deleted
* Heading 2
>>> local: moved
===
  >>> local: content update
** DONE Heading A
  ===
** TODO Heading A
  <<< remote: content update
<<< remote: moved
* Heading 3

## output, non-nested conflicts
>>> local
* Heading 1
** DONE Heading A
** Heading B
===
<<< remote
* Heading 2
>>> local: moved
===
** TODO Heading A
<<<
* Heading 3

For the moment, I am partial to using nested conflict markers. Nested
markers display as much information as possible, and allow the merger
to do as much work as possible towards merging the final document.
The drawback of nested markers is that they may be a major departure
from diff output.

Any kind of brainstorming, interesting examples, or opinions would be
a huge help to me.

Thanks,

Andrew



Re: [O] Use nomencl package with latex exporter?

2012-08-08 Thread Andrew Young
Hello Johan,

On Wed, Aug 8, 2012 at 2:40 AM, Johan Ekh  wrote:
> Thanks,
> can you give some hints on how to customize it, or point me to some
> information?

To have makeindex run, try evaluating the following elisp:

(setq org-latex-to-pdf-process
'("pdflatex -interaction nonstopmode %b"
  "bibtex %b"
  "makeindex %b.nlo -s nomencl.ist -o %b.nls"
  "pdflatex -interaction nonstopmode %b"
  "pdflatex -interaction nonstopmode %b"))

Alternatively, you can customize the variable org-latex-to-pdf-process
as Nick suggests, to accomplish the same thing. Use the following
command:

M-x customize-variable org-latex-to-pdf-process

More documentation is available through customize, and there is lots
of great information available here:
http://orgmode.org/worg/org-tutorials/org-latex-export.html

Hope this helps,

Andrew


>
> /Johan
>
>
> On Mon, Aug 6, 2012 at 9:35 PM, Nick Dokos  wrote:
>>
>> Johan Ekh  wrote:
>>
>> > Thank you Myles,
>> > I'm not that comfortable with cmake but I will give your solution a try
>> > and report My milage.
>> >
>> > / Johan
>> >
>> > Sent from my iPad
>> >
>> > On 6 aug 2012, at 14:14, Myles English  wrote:
>> >
>> > >
>> > > Johan Ekh writes:
>> > >
>> > >> Hi all,
>> > >> I use the default latex exporter in org-mode v7.8 to write documents
>> > >> using
>> > >> a custom latex class which is built on "article".
>> > >> I would like to use the "nomencl" latex package if possible.
>> > >
>> > >> From the shell I usually run something like
>> > >>
>> > >> makeindex filename.nlo -s nomencl.ist -o filename.nls
>> > >>
>> > >> followed by latex or pdflatex, but how can I get the exporter to do
>> > >> this?
>>
>> Customize the variable org-latex-to-pdf-process appropriately.
>>
>> Nick
>>
>> > > I don't know the answer to your question, but when I came across the
>> > > same problem, I used a makefile-like solution because I felt that the
>> > > building process was becoming sufficiently complicated to warrant
>> > > using
>> > > a specialised tool.  If you are comfortable with CMake already it may
>> > > be
>> > > worth a look.  Have a look for "UseLatex.cmake".
>> > >
>> > > Basically you get emacs to export the .tex file from the .org file:
>> > >
>> > > add_custom_command(
>> > >  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mypaper.tex
>> > >  COMMAND emacs --batch
>> > >--visit=${CMAKE_CURRENT_BINARY_DIR}/mypaper.org
>> > >--load=/home/me/myfuncs.el
>> > >--funcall org-export-as-latex-batch
>> > >  DEPENDS orgfile
>> > >  COMMENT "Exporting orgmode file to LaTeX using emacs"
>> > >  )
>> > >
>> > > And then bibtex and nomenclature are asked to do their stuff, and a
>> > > pdf
>> > > is produced, with something like this directive:
>> > >
>> > > add_latex_document( mypaper.tex
>> > >  INPUTS tex/bibliography.tex
>> > > texlib/mystyle.sty
>> > >  BIBFILES texlib/mylibrary.bib
>> > >  DEFAULT_PDF
>> > >  USE_NOMENCL
>> > > )
>> > >
>> > > I also get it to generate all my R plots.  Other advantages are that
>> > > you
>> > > get an out-of-source build that is isolated (to some extent) in its
>> > > own
>> > > directory.  And I think it is easier to diagnose the problems when
>> > > things go wrong, better than staring at an elisp backtrace.  Now if
>> > > org
>> > > would write my CMakeList.txt for me, that would be a fine thing.
>> > >
>> > > Myles
>> >
>>
>>
>>
>



Re: [O] starting value for ordered lists?

2012-08-08 Thread Andrew Young
Hi Matt,

You have to start the text of the item with [@13].
Try:
13. [@13] this is the 13th item

Sincerely,
Andrew

On Wed, Aug 8, 2012 at 2:24 PM, Matt Price  wrote:
> Hi,
>
> in the org manual (http://orgmode.org/manual/Plain-lists.html) i read that I
> can start an ordered list at a particular number using an [@20] syntax:
>
> If you want a list to start with a different value (e.g. 20), start the text
> of the item with [@20]4. Those constructs can be used in any item of the
> list in order to enforce a particular numbering.
>
> I think I'm not understanding somehting though, as if I try this:
>
> [@13]. thirteenth item
>
> org doesn't seem to recognize the line as a list item.  I'm running a pretty
> recent org 7.8.11 from git.  I'm sure I'm just reading the manual wrong --
> any hints? thanks
> Matt
>
>



Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?

2012-08-11 Thread Andrew Young
Hello All,

Well, despite being relatively new to elisp, I've decided to take a
crack at one of your problems. I'm not too sure what is causing the
strange behaviour of the session property, but I have some thoughts on
getting that one function working.

Bear with me :-)

It seems that for me, the inferior ess process is not being properly
associated with the src edit buffer.  It is being set correctly by
org-babel-R-associate-session, and then being set a second time
incorrectly by org-babel-edit-prep:R.  Commenting out line 5 in
org-babel-edit-prep:R seems to fix this issue, although I'm honestly
not sure if or what it breaks.  Everything seems ok for me, but ymmv.

Heres the change:
#+begin_src emacs-lisp
  (defun org-babel-edit-prep:R (info)
(let ((session (cdr (assoc :session (nth 2 info)
  (when (and session (string-match "^\\*\\(.+?\\)\\*$" session))
(save-match-data (org-babel-R-initiate-session session nil))
;;(setq ess-local-process-name (match-string 1 session)
)))
#+end_src

Is there any one having such issues, or who can weigh in on what
exactly is happening here?

Without making the above change, it is possible to manually attach an
ess process to the current src buffer by using the command:

C-c C-s (ess-switch-process)

You'll have to specify the process name, rather than the buffer name,
and the session must have already been started. From here all ESS
functions should work. For example, calling:

C-c C-z (ess-switch-to-end-of-ESS)

will open the session buffer.

I've implemented a variation of the function you mentioned, which uses
the inferior process discussed above.  It should do something at least
remotely like the function you were asking for, and will work with
babel sessions, as long as the ess process is associated
properly. I've made one change worth mentioning: the function now
prompts for a buffer name to set up on if no ess process is associated,
instead of only and always using *R*.

Try it out, and let me know what you think.  Of course feel free to
tweak & share!  This is my real first dive into lisp, so if anyone has
anything to share please do.

#+begin_src emacs-lisp
  (defun my-ess-eval ()
(interactive)
(update-ess-process-name-list)
(if (not (ess-make-buffer-current))
;; Obtain the target ess session
(let ((session
   (read-string "Use session: "
(let ((proc (get-process ess-current-process-name)))
  (if (processp proc)
  (buffer-name (process-buffer proc)))
  ;; Obtain buffer matching session
  (if (not (get-buffer session))
  ;; If there is no buffer, create a new one
  (save-excursion
(inferior-ess)
(rename-buffer session)))
  (setq ess-local-process-name
(process-name (get-buffer-process session)
(ess-make-buffer-current)
(if (and transient-mark-mode mark-active)
(call-interactively 'ess-eval-region)
  (call-interactively 'ess-eval-line-and-step)))

(add-hook 'ess-mode-hook
  '(lambda ()
 (local-set-key [(shift return)] 'my-ess-eval)))

(add-hook 'inferior-ess-mode-hook
  '(lambda ()
 (local-set-key [C-up] 'comint-previous-input)
 (local-set-key [C-down] 'comint-next-input)))

(add-hook 'Rnw-mode-hook
  '(lambda ()
     (local-set-key [(shift return)] 'my-ess-eval)))

  (require 'ess-site)

#+end_src

Sincerely,
Andrew Young



Re: [O] Emacs shell-script to tangle org-babel at the command line.

2012-08-13 Thread Andrew Young
Hi Matthew,

On Mon, Aug 13, 2012 at 2:15 PM, Matthew Oesting  wrote:
> I recently wrote what I thought to be a very simply she'll script to tangle a 
> file; simply call the script on a file, e.g. 'tangle corgi.org' and a file, 
> 'corgi.rb' (assuming one uses Ruby) appears in the local directory.
>
> Tangling the file from within Emacs works normally.  Tangling from this 
> script does not work; the only interesting response is "tangled 0 code blocks 
> from corgi.org".  The same file tangles two blocks from within Emacs.
>
> It seems that the org-babel-tangle function is using some piece of 
> information present in the normal Emacs loading sequence which is not found 
> during the script load.  I could provide a large number of files, but I 
> imagine that the problem will be obvious to someone here.
>
> What is wrong with this code?
>
> #!/usr/bin/emacs --script
>
> ;; The subdirectory ~/.emacs.d is to be added to the top-level elisp
> ;; file search.
> (progn (cd "~/.emacs.d") (normal-top-level-add-subdirs-to-load-path))
>
> ;; Org-Mode, Org-Babel, and the tangle library are required, if we are
> ;; to proceed further.
> (require 'org-install)
> (require 'org)
> (require 'ob-tangle)
>
> ;; Load the main configuration and setup file.
> (require 'ob-ruby)
> (require 'ob-python)
> (require 'ob-emacs-lisp)
> (require 'ob-lisp)
>
> ;; Tangle all files given.
> (dolist (file command-line-args-left)
>  (princ file)
>  (org-babel-tangle-file file))
>
>

The previous code works for me if the file I'm trying to tangle is in
"~/.emacs.d".

I think what may be happening is you are specifying your input files
as relative paths, and when you cd into .emacs.d, you are no longer
loading from the correct directory.

Are you getting output such as
#+begin_example
  Wrote /home/user/.emacs.d/input-file.org
  tangled 0 code blocks from input-file.org
#+end_example

Try replacing:

#+begin_src emacs-lisp
  (progn (cd "~/.emacs.d")
(normal-top-level-add-subdirs-to-load-path))
#+end_src

with something that doesn't change the current directory of the buffer
permanently. Replace the progn line with following to allow the
assigned value of default-directory to go out of scope:

#+begin_src emacs-lisp
  (let ((default-directory ~/.emacs.d))
(normal-top-level-add-subdirs-to-load-path))
#+end_src

Andrew



[O] [GSoC] Org Merge Driver Update

2012-08-13 Thread Andrew Young
Hello Everyone,

I've been working on a merge driver for org-mode documents over the
summer as a Google Summer of Code project. I just wanted to show
everyone some progress on the merge driver.

There are some new examples you can see at the project page [1][2], and
instructions on how to build and use it.

the source is available here: git clone git://orgmode.org/org-merge-driver.git

I'd really appreciate if anyone could take the merge driver out for a
test spin, and come back with any kind of feedback, such as:

- file output
- customization
- the user interface
- the merging rules
- new features and element specific support
- testing
- neat ideas, etc.

There is only about a week left in GSoC, but I'm planning to continue to
develop the merge driver past the end of GSoC.

Please take a look, and thanks,

Andrew Young

[1] project page:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
[2] examples:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html



Re: [O] [GSoC] Org Merge Driver Update

2012-08-16 Thread Andrew Young
Hi,
On Wed, Aug 15, 2012 at 1:04 PM, Eric Schulte  wrote:
> I'm very excited to start using this merge driver.  I've put together an
> Arch Linux User Repository (aur) package, which can be used by Arch
> Linux users to install the org-merge-driver with pacman.  It is
> available at [1],

Thank you so much for doing this! I'm also an Arch Linux user, and am
now using your package as well!

> if others find it useful and if Andrew doesn't object
> I'd be happy to push it into the official aur database.  It is very
> simple and installs directly from git.
>

Yes, of course I don't mind.  This would be _awesome_.

I just installed OMD through your package. Pretty exciting for
me! It took me a little bit to realize the linked file was not
corrupted ;), but HTML to the new package.

Regarding the gnulib dependency:

I have included the Gnulib sources which my project depends on
directly into the git repository. Because of this, gnulib shouldn't be
nessecary to build. I've done this for two main reasons:

1. I thought that would make the dependencies easier on everyone else
   to build and install.

2. I believe I've uncovered a bug in one of the sources I'm using, and
   so for the time being I'm using a slightly edited version.

I'm really not sure what the standard is for using GnuLib in a
project. I think that distributing Gnulib dependencies directly with a
project may be typical, given that it is used at the source level. (If
anyone has any opinion on this, please share)

For the time being, it may be best to leave Gnulib out as dependency,
until I find out what to do. Re-importing Gnulib modules may
reintroduce the problem I was having.

> I spent some time testing this locally and I've run into what appears to
> be an error.  Namely when merging a tree with multiple new sub-headings
> the merge completes successfully, but the subheadings from the OTHER
> branch are deleted by the merge.  Here [2] is a tarball of the entire
> git directory after the failed merge.  Please let me know if there is
> any other debug information I can provide.
>

Thank you for letting me know, and your detailed example.  This should
be fixed now, along with some other issues.

> Thanks,
>
> Footnotes:
> [1]  http://cs.unm.edu/~eschulte/data/org-merge-driver-20120815-1.src.tar.gz
>
> [2]  http://cs.unm.edu/~eschulte/data/fruit-test.tar.bz2
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte

Thanks again for doing all this, it's really appreciated!

Sincerely,
Andrew Young



Re: [O] [GSoC] Org Merge Driver Update

2012-08-18 Thread Andrew Young
Hello Simon,

On Fri, Aug 17, 2012 at 10:09 PM, Simon Thum  wrote:
> Hi Andrew,
>
> sorry to report less exciting things. I could not compile - the repo
> contains two invalid links into my system:
>
> lrwxrwxrwx 1 simon users38 Aug 18 04:01 tap-driver.sh ->
> /usr/share/automake-1.12/tap-driver.sh
> lrwxrwxrwx 1 simon users36 Aug 18 04:01 test-driver ->
> /usr/share/automake-1.12/test-driver
>
> I'm on gentoo and do not have automake 1.12. Using a link not the right
> thing IMO.
>

I believe I've fixed the issue, I hadn't realized they were links.
They should be updated with the actual files now. Thanks for reporting
it.

> II removed those from being referenced in source files and came farther,
> only for gcc to balk on
>
> doc_ref.h:54:3: error: redefinition of typedef ‘doc_ref’
> doc_ref.h:31:24: note: previous declaration of ‘doc_ref’ was here
> doc_ref.h: In function ‘doc_ref_check_for_circular_conflict’:
>
> and other such occurrences.
>
> I'm not sure about the cause, but maybe typedefs conflict with struct names?
>

It seems that a lot of my typedefs may not be valid c, but are
accepted by newer versions of gcc and some other compilers. I only get
a warning if I enable -pedantic using "gcc version 4.7.1 20120721
(prerelease) (GCC)".

I'm in the process of cleaning up my headers and should have something
for you soon. In the meantime, I believe upgrading gcc should make the
issue disappear. Let me know if I'm completely wrong :-)

> HTH,
>
> Simon

Thanks for trying out the merge driver. it's much appreciated.

Sincerely,
Andrew



Re: [O] Re-align All Tables in a Region.

2012-08-18 Thread Andrew Young
Hi Ian,

On Sat, Aug 18, 2012 at 4:14 AM, Ian Barton  wrote:
> I have a file which contains lots of tables. The document is created by a
> shell script, so when it's opened none of the tables are aligned. Is there a
> command that will let me re-align all tables in a region? There are a lot of
> tables, so I don't want to do them one at a time.
>
> As a workaround I have used #+STARTUP: align in the buffer, which aligns
> them if I C-c on the in buffer setting.
>
> Ian.
>

Not sure if there is a built-in, but this seems to work for me:

#+begin_src emacs-lisp
  (defun my-align-all-tables ()
(interactive)
(org-table-map-tables 'org-table-align 'quietly))
#+end_src

Hope this helps.

Sincerely,
Andrew



Re: [O] [OT] Xiki - could something like that be done with emacs+orgmode?

2012-09-18 Thread Andrew Hyatt
The xiki video is interesting, and I immediately thought of babel.
However, babel sh-mode doesn't have support for execution yet. Even if
it did, it wouldn't be a really good alternative, due to babel's
verbosity.

One idea is to have a babel subtree (or buffer) that is keyed to a
specific language, so that everything under it is assumed to be an
executable statement.  Something like:

* Project A
** Shell
   :PROPERTIES:
   :BABEL-TYPE: sh
   :END:

ls
  - file1
  - file2
  - file3

run_server
  ouput-buffer

** Next thing

Where the files and output-buffer are linked.  The interaction within
the BABEL-TYPE heading would be similar to the *scratch* buffer, just
execute and it gives you the result immediately below.  Except the
result should work be org-output, and linked when appropriate.

Babel would be handling this, but it wouldn't need the boilerplate for
each command, or each output.

The idea to use [[shell:ls]] and things like that is also useful, but
right now the output goes to a different buffer, and is not otherwise
tied in with org-mode.  This is why I think babel might be a better
fit for this type of functionality.


On Tue, Sep 18, 2012 at 2:23 AM, Bastien  wrote:
> Hi Marcelo,
>
> Marcelo de Moraes Serpa  writes:
>
>> http://www.youtube.com/watch?v=bUR_eUVcABg&feature=youtu.be
>>
>> I'm wondering it something like that could be done with emacs (and
>> possibly integrating orgmode to add the outlining features)?
>
> * [[shell:ls -l]]
>
> * shell:pwd
>
> ... etc etc.
>
> I think pretty all the features described here are already available
> with some elisp.
>
> The basic idea is that the command prompt and the results are of the
> same kind: text you can edit, and that can produce an output... that you
> can further reuse as a command.  Which is the core idea of Org.
>
> If there is any specific feature displayed in the video that seems
> useful for Org, let us know.
>
> My 2 cents,
>
> --
>  Bastien
>



Re: [O] [OT] Xiki - could something like that be done with emacs+orgmode?

2012-09-19 Thread Andrew Hyatt
That's odd, I get "No org-babel-execute function for sh!".  I think I
just hadn't require'd ob-sh, and when I did this fixed the problem.
Thanks!

My point about removing the boilerplate still stands, however.  If I
have some free time in the next month, I may try to see if I can get
it removed as I proposed above.

On Wed, Sep 19, 2012 at 2:27 AM, Sean O'Halpin  wrote:
> On Wed, Sep 19, 2012 at 4:37 AM, Andrew Hyatt  wrote:
>
>> The xiki video is interesting, and I immediately thought of babel.
>> However, babel sh-mode doesn't have support for execution yet.
>
> Not sure what you mean by that. Place cursor in source block and hit C-c, e.g.
>
> #+BEGIN_ORG
> * Shell example
>
> #+begin_src sh
> date
> #+end_src
>
> #+RESULTS:
> : Wed Sep 19 07:24:17 BST 2012
>
> #+END_ORG
>
> Regards,
> Sean
>



Re: [O] Org Writer's room

2012-12-05 Thread Andrew Hyatt
This sounds like an interesting project.  My advice is to make a few
screenshots that give people an idea what you are working towards.  Of
course, they could be completely fake, but it would be helpful to
understand for people like me who haven't used Scrivener.


On Wed, Dec 5, 2012 at 11:01 AM, Matt Price  wrote:

> Hi Everyone,
>
> Prompted by a couple of recent threads on help-gnu-emacs
> (http://comments.gmane.org/gmane.emacs.help/87787), I am trying to
> create a minor mode for org that would implement some of the cool
> features of Scrivener
> (http://www.literatureandlatte.com/scrivener.php).
>
> Scrivener is  a closed-source but still very cool authoring tool for
> writers.  After testdriving it, I find that Scrivener's interface
> really makes it easy to concentrate on writing while still being aware
> of the overall structure of a big project.  Lots of my daughter's
> friends use it for National Novel Writing Month, in which they try to
> write a 50,000 word novel in 30 days; and I'm finding that more and
> more of my students have switched to Scrivener from Word or
> Libreoffice, over which it offers a lot of improvements (though it's
> not so good atthings like footnotes).
>
> Emacs is pretty different from Scrivener (!!), but I still think we
> could implement some of its features, and that doing so would make
> emacs/org-mode a *way* better environment for writers.  So I've
> started working on org-writers-room.el.  I'm a terrible coder, and I
> can't think in Lisp at all, so I think the code is pretty bad!  And
> right now it doesn't do much -- just sets up the basic window layout
> and define one or two functions  But the ambitions are described in
> more detail on the github repository:
>
> https://github.com/titaniumbones/org-writers-room
>
> I would be really grateful for feedback from both coders and writers.
> I'd especially love it if anyone had some ideas on how to implement
> the missing features, or better yet, was able to write some code for
> the project!  As I say, I feel a little over my head when it comes to
> elisp.
>
> Thanks very much!
> Matt
>
>


[O] Bug: ob-clojure.el depends on deprecated swank-clojure [7.7]

2012-01-12 Thread Andrew Cheng


Phil Hagelberg has said that the swank-clojure elisp package has been
deprecated and should not be used [1]. My version of ob-clojure.el
requires swank-clojure. If I don't have the swank-clojure package, I
get "org-babel-execute:clojure:Cannot open load file: swank-clojure".
If I follow the instructions at [2] and get the swank-clojure package,
I get past this error. Is org using a deprecated package, and is this
a bug? Thanks in advance.

[1] https://groups.google.com/forum/#!starred/clojure/HT8wixvD3GE
[2] http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00629.html

Emacs  : GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5)
 of 2011-08-14 on rothera, modified by Debian
Package: Org-mode version 7.7

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook
                          org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-tangle-lang-exts '(("clojure" . "clj") ("emacs-lisp" . "el"))
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe
                      org-src-native-tab-command-maybe
                      org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-blank-before-new-entry nil
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-publish-project-alist '(("org-notes" :base-directory "/home/notroot/org/"
                              :base-extension "org" :publishing-directory
                              "/home/notroot/public_html/" :recursive t
                              :publishing-function org-publish-org-to-html
                              :headline-levels 4 :auto-preamble t)
                             ("org-static" :base-directory
                              "/home/notroot/org/" :base-extension

"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "/home/notroot/public_html/" :recursive t
:publishing-function org-publish-attachment)
                             ("org" :components ("org-notes" "org-static")))
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all
                    append local]
                   5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
                    org-babel-show-result-all append local]
                   5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
                          org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
                          (src org-babel-exp-inline-src-blocks))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                               org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil)
                     (comment org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil)
                     (dot org-export-blocks-format-dot nil))
 )



Re: [O] Bug: ob-clojure.el depends on deprecated swank-clojure [7.7]

2012-01-13 Thread Andrew Cheng
I passed the question along to Phil Hagelberg in that Clojure google
group thread. His reply:

"Yes, clojure-test-mode uses both slime-eval and slime-eval-async; he
should pick one of these like so:

(defun clojure-test-eval (string &optional handler)
 (slime-eval-async `(swank:eval-and-grab-output ,string)
   (or handler #'identity)))

(defun clojure-test-eval-sync (string)
 (slime-eval `(swank:eval-and-grab-output ,string)))

Actually swank:interactive-eval-region and friends are not elisp
functions; they are Clojure functions."

(... end of reply) In case it helps, Stuart Sierra says he got
org-babel and clojure working together. His dotfiles are at
https://github.com/stuartsierra/dotfiles

On Fri, Jan 13, 2012 at 1:09 AM, Eric Schulte  wrote:
> I personally no longer use Clojure (having graduated to Common Lisp :))
> so I'm not abreast of the current Clojure environment.
>
> The only function ob-clojure uses from swank-clojure is
> `swank:interactive-eval-region' (used with `slime-eval') in the
> `org-babel-execute:clojure' function.  Which function would now be used
> to evaluate a region of clojure code?  Would `slime-eval-region'
> suffice?
>
> Andrew Cheng  writes:
>
>> 
>>
>> Phil Hagelberg has said that the swank-clojure elisp package has been
>> deprecated and should not be used [1]. My version of ob-clojure.el
>> requires swank-clojure. If I don't have the swank-clojure package, I
>> get "org-babel-execute:clojure:Cannot open load file: swank-clojure".
>> If I follow the instructions at [2] and get the swank-clojure package,
>> I get past this error. Is org using a deprecated package, and is this
>> a bug? Thanks in advance.
>>
>> [1] https://groups.google.com/forum/#!starred/clojure/HT8wixvD3GE
>> [2] http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00629.html



Re: [O] Bug: ob-clojure.el depends on deprecated swank-clojure [7.7]

2012-01-13 Thread Andrew Cheng
I think so. Here's *Messages* after (def ^:dynamic *state* {}) ...

org-babel-execute:clojure
Evaluate this clojure code block (state) on your system? (y or n)
executing Clojure code block (state)...
("" "#'user/*state*")

On Fri, Jan 13, 2012 at 2:48 PM, Eric Schulte  wrote:
> Alright,
>
> if you load ob-clojure.el and then evaluate the following to over-ride
> the existing definition of `org-babel-execute:clojure' does clojure code
> evaluation work?
>
> (defun org-babel-execute:clojure (body params)
>  "Execute a block of Clojure code with Babel."
>  (require 'slime)
>  (with-temp-buffer
>    (insert (org-babel-expand-body:clojure body params))
>    ((lambda (result)
>       (let ((result-params (cdr (assoc :result-params params
>         (if (or (member "scalar" result-params)
>                 (member "verbatim" result-params))
>             result
>           (condition-case nil (org-babel-script-escape result)
>             (error result)
>     (slime-eval
>      `(swank:eval-and-grab-output
>        ,(buffer-substring-no-properties (point-min) (point-max)))
>      (cdr (assoc :package params))
>
> Thanks,
>
> Andrew Cheng  writes:
>
>> I passed the question along to Phil Hagelberg in that Clojure google
>> group thread. His reply:
>>
>> "Yes, clojure-test-mode uses both slime-eval and slime-eval-async; he
>> should pick one of these like so:
>>
>> (defun clojure-test-eval (string &optional handler)
>>  (slime-eval-async `(swank:eval-and-grab-output ,string)
>>                    (or handler #'identity)))
>>
>> (defun clojure-test-eval-sync (string)
>>  (slime-eval `(swank:eval-and-grab-output ,string)))
>>
>> Actually swank:interactive-eval-region and friends are not elisp
>> functions; they are Clojure functions."
>>
>> (... end of reply) In case it helps, Stuart Sierra says he got
>> org-babel and clojure working together. His dotfiles are at
>> https://github.com/stuartsierra/dotfiles
>>
>> On Fri, Jan 13, 2012 at 1:09 AM, Eric Schulte  wrote:
>>> I personally no longer use Clojure (having graduated to Common Lisp :))
>>> so I'm not abreast of the current Clojure environment.
>>>
>>> The only function ob-clojure uses from swank-clojure is
>>> `swank:interactive-eval-region' (used with `slime-eval') in the
>>> `org-babel-execute:clojure' function.  Which function would now be used
>>> to evaluate a region of clojure code?  Would `slime-eval-region'
>>> suffice?
>>>
>>> Andrew Cheng  writes:
>>>
>>>> 
>>>>
>>>> Phil Hagelberg has said that the swank-clojure elisp package has been
>>>> deprecated and should not be used [1]. My version of ob-clojure.el
>>>> requires swank-clojure. If I don't have the swank-clojure package, I
>>>> get "org-babel-execute:clojure:Cannot open load file: swank-clojure".
>>>> If I follow the instructions at [2] and get the swank-clojure package,
>>>> I get past this error. Is org using a deprecated package, and is this
>>>> a bug? Thanks in advance.
>>>>
>>>> [1] https://groups.google.com/forum/#!starred/clojure/HT8wixvD3GE
>>>> [2] http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00629.html
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/



[O] Adding the ability to archive into the datetree (updated)

2012-01-28 Thread Andrew Hyatt
Hi everyone,

I previously sent out a patch to add the ability to archive into the
datetree.  The ability to store finished items by date (along with any
other journal-type entry) seems pretty useful to me, which is why I
wrote this.  Bernt Hansen did a review of my previous patch, and did a
great job in testing it out, catching several issues.  Thanks, Bernt!

I've fixed all the reported issues, and am attaching the modified
patch. I'd love for this to get into the next release.  If anyone has
a desire to try this out, I'd love to hear if it is clear how to use
it, and if you encounter any issues.


0001-Add-the-ability-to-archive-to-the-datetree.patch
Description: Binary data


[O] requesting help debugging tangle on windows

2012-02-14 Thread Andrew Cheng
Tangle works in my linux environment but doesn't quite work in my windows
environment. Here's my org file. It defines a code snippet named "block"
and then has a tangle section that refers to "block". Tangle results in a
file with two blank lines in my windows environment.

#+name: block
#+begin_src clojure :results silent
(+ 2 3)
#+end_src

#+begin_src clojure :tangle ../src/tmp.clj :results silent :exports none
:noweb yes
<>
#+end_src

But --- If my tangle section has regular code in it instead of referring to
other named <> then the resulting file after tangle has the code
you'd expect.

Below is my org setup. The *Messages* buffer doesn't contain any
interesting error messages. What can I do to find out what's going on?

I did evaluate the following snippet to get C-c C-c to properly evaluate a
clojure code block successfully on my machine. It didn't affect the issue
of tangling. Just thought I'd mention it to be thorough. The snippet is
from Eric Schulte. I thought that by deleting my elpa org folder and
starting emacs again I'd get the latest (with his fix) but I discovered
that I still needed to run this snippet to get C-c C-c to work.

Thanks in advance for any help!

(defun org-babel-execute:clojure (body params)
 "Execute a block of Clojure code with Babel."
 (require 'slime)
 (with-temp-buffer
   (insert (org-babel-expand-body:clojure body params))
   ((lambda (result)
  (let ((result-params (cdr (assoc :result-params params
(if (or (member "scalar" result-params)
(member "verbatim" result-params))
result
  (condition-case nil (org-babel-script-escape result)
(error result)
(slime-eval
 `(swank:eval-and-grab-output
   ,(buffer-substring-no-properties (point-min) (point-max)))
 (cdr (assoc :package params))

Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-09-03 on SHAN-PC
Package: Org-mode version 7.7

current state:
==
(setq
 org-export-blocks '((src org-babel-exp-src-block nil) (comment
org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil) (dot
org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src
org-babel-exp-inline-src-blocks))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-from-is-user-regexp nil
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-babel-tangle-lang-exts '(("clojure" . "clj") ("emacs-lisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 )


Re: [O] requesting help debugging tangle on windows

2012-02-15 Thread Andrew Cheng
Reproduced the issue with a clean Emacs 24 on Windows with and without my
.emacs and .emacs.d on the same machine and on a different machine.

Is this message related? Could not read org-id-values from
~\.emacs.d\.org-id-locations. Setting it to nil.


Re: [O] requesting help debugging tangle on windows

2012-02-20 Thread Andrew Cheng
#1 worked. My assumption about how I could get the latest org was wrong.
Thanks very much for the help!

On Sat, Feb 18, 2012 at 10:16 AM, Eric Schulte  wrote:

> Unfortunately I don't have access to a windows machine for testing of
> tangle behavior.  Before we delve deeper, could you confirm two things.
>
> 1. It sounds as though you are not using the latest version of Org-mode
>   from git.  Please upgrade to the latest -- which should also get you
>   the latest ob-clojure.el so you don't have to evaluate the snippet
>   posted below.  There are instructions for keeping current with org
>   development at http://orgmode.org/worg/org-faq.html#Keeping-current.
>
> 2. Try to reproduce the problem using "emacs -Q" which will launch emacs
>   without any personal configuration.  That way we can see if this
>   windows issue is someone related to your config, or is general.
>
> Thanks,
>
> Andrew Cheng  writes:
>
> > Tangle works in my linux environment but doesn't quite work in my windows
> > environment. Here's my org file. It defines a code snippet named "block"
> > and then has a tangle section that refers to "block". Tangle results in a
> > file with two blank lines in my windows environment.
> >
> > #+name: block
> > #+begin_src clojure :results silent
> > (+ 2 3)
> > #+end_src
> >
> > #+begin_src clojure :tangle ../src/tmp.clj :results silent :exports none
> > :noweb yes
> > <>
> > #+end_src
> >
> > But --- If my tangle section has regular code in it instead of referring
> to
> > other named <> then the resulting file after tangle has the code
> > you'd expect.
> >
> > Below is my org setup. The *Messages* buffer doesn't contain any
> > interesting error messages. What can I do to find out what's going on?
> >
> > I did evaluate the following snippet to get C-c C-c to properly evaluate
> a
> > clojure code block successfully on my machine. It didn't affect the issue
> > of tangling. Just thought I'd mention it to be thorough. The snippet is
> > from Eric Schulte. I thought that by deleting my elpa org folder and
> > starting emacs again I'd get the latest (with his fix) but I discovered
> > that I still needed to run this snippet to get C-c C-c to work.
> >
> > Thanks in advance for any help!
> >
> > (defun org-babel-execute:clojure (body params)
> >  "Execute a block of Clojure code with Babel."
> >  (require 'slime)
> >  (with-temp-buffer
> >(insert (org-babel-expand-body:clojure body params))
> >((lambda (result)
> >   (let ((result-params (cdr (assoc :result-params params
> > (if (or (member "scalar" result-params)
> > (member "verbatim" result-params))
> > result
> >   (condition-case nil (org-babel-script-escape result)
> > (error result)
> > (slime-eval
> >  `(swank:eval-and-grab-output
> >,(buffer-substring-no-properties (point-min) (point-max)))
> >  (cdr (assoc :package params))
> >
> > Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
> >  of 2011-09-03 on SHAN-PC
> > Package: Org-mode version 7.7
> >
> > current state:
> > ==
> > (setq
> >  org-export-blocks '((src org-babel-exp-src-block nil) (comment
> > org-export-blocks-format-comment t)
> >  (ditaa org-export-blocks-format-ditaa nil) (dot
> > org-export-blocks-format-dot nil))
> >  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
> > org-babel-execute-safely-maybe)
> >  org-export-preprocess-before-selecting-backend-code-hook
> > '(org-beamer-select-beamer-code)
> >  org-tab-first-hook '(org-hide-block-toggle-maybe
> > org-src-native-tab-command-maybe
> >   org-babel-hide-result-toggle-maybe)
> >  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
> > org-cycle-show-empty-lines
> >   org-optimize-window-after-visibility-change)
> >  org-agenda-before-write-hook '(org-agenda-add-entry-text)
> >  org-speed-command-hook '(org-speed-command-default-hook
> > org-babel-speed-command-hook)
> >  org-babel-pre-tangle-hook '(save-buffer)
> >  org-occur-hook '(org-first-headline-recenter)
> >  org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src
> > org-babel-exp-inline-src-blocks))
> >  org-metaup-hook '(org-babel-load-in-session-maybe)
> >  org-

Re: [O] Bug: org-indent-mode cursor movement [7.8.03]

2012-02-23 Thread Andrew Stine
I've tried "-q" and it works, but only because emacs reverts to default
version of org-mode. The version I am having trouble with is currently
installed through elpa.

As to example file, do you mean example org file? If so, I've had trouble
with every org file I've tried, even blank ones.

Regards,
- Andrew
On Feb 23, 2012 4:00 AM, "Nicolas Goaziou"  wrote:

> Hello,
>
> Andrew Stine  writes:
>
> > When org-indent-mode is active, the cursor repeatedly jumps to the
> > bottom of the buffer. This makes using the buffer impossible while
> > org-indent-mode is active.
>
> I cannot reproduce it. Could you send me an example file where the
> problem happens?
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Bug: org-indent-mode cursor movement [7.8.03]

2012-02-23 Thread Andrew Stine
On Thu, Feb 23, 2012 at 9:44 AM, Nick Dokos  wrote:
> Andrew Stine  wrote:
>
>> I've tried "-q" and it works, but only because emacs reverts to default 
>> version of org-mode. The
>> version I am having trouble with is currently installed through elpa.
>>
>
> Then create a minimal .emacs file that will load the right version of org 
> (but exclude
> all your customizations) and start with
>
>    emacs -q -l /path/to/minimal/.emacs

I've already done so. For reference, the code in that file is:

(when
(load
 (expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))

I've been able to duplicate this bug on two machines, three installs, of emacs:
An Archlinux machine with emacs 23.3
The same Archlinux machines with emacs 24.0
A Solaris 10 machine with emacs 23.3

Another note, I've discovered that the problem goes away if I reload
the file "org-indent.el", specifically if I re-eval the function
"org-indent-add-properties."

I think that this is a problem with the way that elpa is loading the
package, but I'm not certain what.

> Unless other people are having trouble with this, I'd suspect a customization
> of yours.

That would follow, but the elpa package is dated Feb 16th and I
suspect that most folks don't upgrade every week. I may just be the
first person to come across this.

- Andrew



Re: [O] Bug: org-indent-mode cursor movement [7.8.03]

2012-02-23 Thread Andrew Stine
Hello all,

Byte-compiling org-mode a second time after installation seems to
permanently solve the problem for me. I suspect that this is not a bug
with org-mode, but with elpa. Thanks for your assistance.

- Andrew



[O] Google Summer of Code 2012 Student Application

2012-04-04 Thread Andrew Young
Hello Org-Mode mailing list,

My name is Andrew Young, and I would like to participate in an Org-Mode
project for GSoC 2012.  My application for the project 'Git merge tool for
Org files' can be found
here<http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/pwyl/1#>.
 I would appreciate as much feedback and criticism as possible.

I used the generic GNU Project student application template, which can be
found here <http://www.google-melange.com/gsoc/org/google/gsoc2012/gnu>.

I have some specific questions:
1.  There is no implementation details or decisions in my application, just
a basic plan of what needs to be done.  Should I start researching
implementation details for my application?
2.  I would like to post my application on the community site Worg.  If
this is appropriate, what is the proper channel to request GIT access?

If this mailing list is not the appropriate place to discuss my
application, please let me know and then feel free to email me directly.  I
will also be spending as much time as possible on freenode #org-mode as
Pwyl.

Regards,
Andrew Young
younga...@gmail.com


Re: [O] Google Summer of Code 2012 Student Application

2012-04-05 Thread Andrew Young
Hello Bastien,

On Thu, Apr 5, 2012 at 2:48 AM, Bastien  wrote:
> Hi Andrew,
>
> Andrew Young  writes:
>
>> My name is Andrew Young, and I would like to participate in an Org-Mode
>> project for GSoC 2012.  My application for the project 'Git merge tool for
>> Org files' can be found
>> here<http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/pwyl/1#>.
>
> Great!
>
>>  I would appreciate as much feedback and criticism as possible.
>
> First of all, make sure someone can co-mentor this project.  I'm willing
> to mentor this (as the current maintainer it makes sense, especially for
> people judging the project from the outside), but having Carsten as a
> co-mentor would be a great win.  Make sure Carsten (cc'ed) is okay.

I will send him a personal (private) request.

>
> Carsten, being a co-mentor involves mainly three things:
>
> 1. registering on google-melange.com
>
> 2. from there, requesting to be a mentor for the GNU project
>
> 3. during the project, help the student and have IRC/phone meetings,
>   at least when I'm not here (I expect to be off for 2-3 weeks this
>   summer, I will tell when ASAP)
>
>> I used the generic GNU Project student application template, which can be
>> found here <http://www.google-melange.com/gsoc/org/google/gsoc2012/gnu>.
>
> 1. First things thing: you should rewrite the "summary" section to
>   remove the "I believe" and other informal writing from Carsten's
>   prose.  Make it yours, make it a real summary.

I found the GNU Application template confusing, and was not sure if
the summary was supposed to be written by me, or copied from the ideas
page (to clarify what project idea I was referring to).  I followed
your advice and wrote my own project summary, since that seems like
the better idea.

>
> 2. Refer to org-element.el when you mention the Data representation.
>   org-element.el will be key in representing data and diffs between
>   data (at any level.)
>
> 3. Add a documentation section, explaining what doc you will write and
>   how you you will write/host it (worg is fine.)
>

Thanks for the pointers. I've incorporated your advice into the proposal.

>> I have some specific questions:
>> 1.  There is no implementation details or decisions in my application, just
>> a basic plan of what needs to be done.  Should I start researching
>> implementation details for my application?
>
> You can look at org-element.el for the data representation.
>
>> 2.  I would like to post my application on the community site Worg.  If
>> this is appropriate, what is the proper channel to request GIT access?
>
> Send me your public key.
>
>> If this mailing list is not the appropriate place to discuss my
>> application, please let me know and then feel free to email me directly.  I
>> will also be spending as much time as possible on freenode #org-mode as
>> Pwyl.
>
> This mailing list *is* the appropriate place, no worry.
>
> Thanks again for your proposal, this would be a great plus for Org!
>
> Best,
>
> --
>  Bastien

Thanks again for your suggestions and pointers.

My public key is attached.

Regards,
Andrew


youngar17@gmail.com.pub
Description: Binary data


Re: [O] Google Summer of Code 2012 Student Application

2012-04-06 Thread Andrew Young
On Thu, Apr 5, 2012 at 9:36 AM, Thorsten  wrote:
>
> Bastien  writes:
>
> Hi Bastien, hi Andrew,
>
> > You can now push changes to Worg.
>
> I just added a directory 'student-projects' under the gsoc2012 directory
> on worg, accessible through:
> http://orgmode.org/worg/org-contrib/gsoc2012/index.html
> (see links at end of page)
>
> which might be used by Andrew, me and others.
>

Thank you, I'll fill up a project page as soon as I am able.

> Andrew: I'm preparing my application for the Orgmode/Picolisp project,
> which turned into a bugtracker for Org-mode project, right now. If you
> want, we can communicate (here or privately).
>

Of course.  Let me know if you need anything.

> Bastien: thanks for your suggestions (private mail), gave me quite a lot
> of thinks to chew - I'm busy with that right now.
>
> What I really would need to decide upon at the very beginning is the git
> workflow - not too complicated, but somehow scalable for the future is
> the project succeeds. Any suggestion besides having a master and a
> private branch? Should I already consider a workflow similar to the one
> used by you for Org-mode?
> --
> cheers,
> Thorsten
>
>

I think only 8 hours left until the deadline!

Best.
Andrew Young



Re: [O] Google Summer of Code 2012 Student Application

2012-04-06 Thread Andrew Young
Hi,

On Thu, Apr 5, 2012 at 3:46 AM, Torsten Wagner  wrote:
>
> Hi Andrew,
>
>
> Reading this proposal and having a bit background in writing
> proposals, I have the following suggestion:
>
> * I'm not sure everyone (at least the one who review this) know what
> org-mode is. There should be a very small summary about org-mode and
> the key-benefit being plain text (which is why you can start this
> project after all).

This raises the point that I have no idea at all who will be reviewing
my proposal. I originally wrote the proposal targeting Org-Mode devs
as the audience.  This has provided some important insight to my
application. Thank you!

>
> * In the way the proposal is written, you address org-mode users which
> uses git (later you mention other CVS too). This actually makes, or at
> least sound like, the proposal being only useful for a (small)
> intersection of users namely org-mode AND (in the sense of an logic
> AND) git-user.
> I would find it more useful to describe this work as being an
> extension for org-mode users;
> ** They can start to collaborate on a org-mode files, including
> collaboration with users of possible other software tools (e.g.
> mobileorg apps).
> ** Org-mode user can use a CVS system which is not only of interest
> for collaboration but for keeping a chronological order of changes in
> e.g. a project file.
> ** It makes org-mode a possible tool for software developers which can
> now use org-files e.g. for documentation and notes beside there source
> code in the same git repository.
>
> All this points would show that the proposal is going to extend
> org-mode instead of being "limited" useful for only a very particular
> user-base. Finally, I guess it would be good to mention that this
> project (and org-mode in general) is not limited to a OS but attracts
> users of MS Windows, Mac OS and Linux. Simply to demonstrate that the
> user-base can be expected to be rather large.
> (Not sure if the GNU people like this ;) )
>
> Torsten

These are all great suggestions and points.  This triggered a complete
rewrite of the benefits section.  Thank you for your help.

Regards,
Andrew Young



Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-04-24 Thread Andrew Young
Hi,

Thank you Bastien for working so hard to get Org-mode 3 slots, I know
most other Gnu projects only received one slot.  I'm really excited to
be able to work on this project!

Thank you to every one else involved as well!

Best,
Andrew

On Tue, Apr 24, 2012 at 7:29 AM, Richard Riley  wrote:
> Bastien  writes:
>
>> Dear all,
>>
>> we will have 3 students hacking Org thanks to Google and the GSoC
>> program.  The list of all accepted projects can be checked here:
>>
>>   http://www.google-melange.com/gsoc/projects/list/google/gsoc2012
>>
>> Congratulations to Thorsten, Aurélien and Andrew who made it!
>> And special thanks to Thorsten, who really pushed me into this.
>
> Really cool. org-mode just keeps growing while still keeping its core
> simplicity. By far the biggest use I have now is as a simple journal
> logger! If I may, and just for the future, what I'd really like to see
> is a working org mode and google integration with gnus
> integration. Possibly via googlecl which I used yonks ago for a googlecl
> based blogger.com blog facility direct from org-files (still working
> well enough and is in github (org-googlecl). I know there are some
> proofs of concept already there but performance and usability were
> pretty rudimentaty. bbdb's days are pretty much up in this day of
> smartphone and "everyone integrates with google" ;) This integration
> would obviously (!?!) integrate with google calendars which is then
> already well catered for on just about any mobile device.
>
>
>
>



[O] [GSoC] Org merge driver progress update

2012-05-19 Thread Andrew Young
Hello everyone,

Just to remind everyone, my project is the  org merge driver.  The project
webpage is 
here<http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/index.html>,
and the code repository is
here<http://orgmode.org/w/?p=org-merge-driver.git;a=summary>.
 Here is a quick update on the problems I have encountered, and what is
going on:

I was on my way to finishing my prototype, but I felt that the prototype
was not going to really demonstrate any of the concepts and programming
techniques which I was going to use in the final version.  The prototype
was really just going to be bad merge driver.

I spent quite some time trying to implement a fast algorithm for finding
the shortest edit script of a file (this is what
'diff<http://en.wikipedia.org/wiki/Diff>'
does).  It turns out that the exact same
algorithm<http://www.grantjenks.com/wiki/_media/ideas:diffalgorithmlcs.pdf>
was
already implemented in Gnulib, which I am now using instead.

I am also trying to incorporate elements of polymorphism, generic
programming, and object oriented programming in C.  Its very interesting,
although it can get very complicated.  I am planning to use these concepts
to make the merge driver more extendable and reusable.

Right now I'm considering the implementation of the final merge driver, and
doing a lot of scratch work on paper.  The prototype should be finished
soon, and then I can move onto the real implementation.  In the code
repository, you can find a implementation notes in
doc/implementation.organd a log of what I'm working on in doc/
notes.org.

Sincerely,
Andrew Young


[O] [GSoC] org-merge-driver weekly update

2012-05-30 Thread Andrew Young
Hello everyone,

I would just like to let everyone know that a prototype for
org-merge-driver is available.  It is not complete, so of course please do
not use it for your repository! ;)

You can see some example use of it at the the worg project page:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/prototype.html

Sincerely,
Andrew Young


Re: [O] [GSoC] org-merge-driver weekly update

2012-05-31 Thread Andrew Young
Hi Carsten,

On Wed, May 30, 2012 at 1:15 PM, Carsten Dominik
 wrote:
>
> Hi Andrew,
>
> On 30.5.2012, at 16:36, Andrew Young wrote:
>
> > Hello everyone,
> >
> > I would just like to let everyone know that a prototype for 
> > org-merge-driver is available.  It is not complete, so of course please do 
> > not use it for your repository! ;)
> >
> > You can see some example use of it at the the worg project page: 
> > http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/prototype.html
>
>
> A nice start!
>
> In your first example, it seems incorrect to me that "* A new heading in file 
> 2"
> ends up being the first top-level headline in the merged file.  It is added as
> second in file two, so I clearly would expect it to appear as second in the 
> merged file.
>
> Greetings
>
> - Carsten
>
> P.S.  Bastien, should comments and discussions like this one be on the list, 
> or off list?
>
> - Carsten

I agree that the prototype is not correct in this respect.  I
originally planned to separate orgmode elements into two types:
ordered and unordered.  Unordered elements would be things like
plain lists and headings.  Ordered entities would be things like
numbered plain lists.

This decision led to the prototype not tracking the order which
headings appear.  Only hierachical position was tracked and used
in the prototype.  As a result, new headings are always shown at
the start of a level, and reordered headings may or may show up
in the new order.  I have since changed my mind about how to
handle this situation.

The new strategy is to track the same positional data for both
ordered and unordered elements.  The difference between the
element types will be in how reorders from both files will be
merged together.

I can modify the prototype to print headings in the correct
order, but I'm mostly just interested in moving on.

Sincerely,
Andrew



Re: [O] [GSoC] org-merge-driver weekly update

2012-06-06 Thread Andrew Young
Hi Robert Horn,

On Mon, Jun 4, 2012 at 11:30 AM, Robert Horn  wrote:
> Another area that would be nice to address is taking advantage of the
> information in date-trees so assist with merging.  This is similar to
> the logic around keeping headlines in order.  With date trees there is a
> date and sometimes time tag to help.
>
> In addition to the occurrence order, there is also an ordering constraint on 
> date trees that can be used to determine the proper delta.  You can use the 
> date and time information in the headlines to determine the proper sequencing.
>
> For example, the delta/merger for two files of the form:
> File 1:
> * Year
> ** Year-Month
> *** Year-Month-Day
>  Y-M-D-Time1 stuff1 ...
>  Y-M-D-Time2 stuff2 ...
>  Y-M-D-Time4 stuff4 ...
>  Y-M-D-Time5 stuff5 ...
>  Y-M-D-Time9 stuff9 ...
> File 2:
> * Year
> ** Year-Month
> *** Year-Month-Day
>  Y-M-D-Time1 stuff1 ...
>  Y-M-D-Time2 stuff2 ...
>  Y-M-D-Time3 stuff3 ...
>  Y-M-D-Time6 stuff6 ...
>  Y-M-D-Time7 stuff7 ...
>
> Should be:
> * Year
> ** Year-Month
> *** Year-Month-Day
>  Y-M-D-Time1 stuff1 ...
>  Y-M-D-Time2 stuff2 ...
>  Y-M-D-Time3 stuff3 ...
>  Y-M-D-Time4 stuff4 ...
>  Y-M-D-Time5 stuff5 ...
>  Y-M-D-Time6 stuff6 ...
>  Y-M-D-Time7 stuff7 ...
>  Y-M-D-Time9 stuff9 ...
>
> This time aware merge logic will apply similarly to all levels of the date 
> tree.
>
> Date trees are recognizable by the combination of headlines in this
> format.  A date tree can occur anywhere in an org file, but it will
> begin with a level one headline of the form "* ", etc.
>
> R Horn
> rjh...@alum.mit.edu

Thank you for the suggestion!  The program should support date trees.

I wonder if date trees specifically should be aggressively resorted
during the merge (reordering more headings than necessary, without
regards to the in-file ordering).  It is currently my opinion that the
program should try to retain the original ordering as much as
possible, only sorting the minimum number of headings necessary when
merging has made the ordering ambiguous.

Sincerely,
Andrew Young



[O] [GSoC] org-merge-driver weekly update

2012-06-16 Thread Andrew Young
Hi everyone,
small weekly update;

I'm almost finished creating the parser.  Because of the nature
of org mode grammar, the files are being parsed with regexs and
(f)lex.

Because Orgmode files can be written in any character encoding
supported in Emacs, I am looking into using libiconv to support
as many file encodings as possible.

Sincerely,
Andrew Young



[Orgmode] Tables and Latex "Wrong-number-of-arguments" error

2009-03-05 Thread andrew dasys
Trying to org-export-latex-... any table in 6.23trans and 6.23b results both
on WinXP and Ubuntu results in an error. Sending to html works great. Any
guidance would be greatly appreciated.

Table is as simple As I could think of:

* MASH
| id | Actor | Character |
|+---+---|
|  1 | Allan Alda| "Hawkeye" Benjamin Pierce |
|  2 | Gary Burghoff | "Radar" Walter O'Reilly   |
|  3 | Loretta Switt | "Hotlips" Margaret Hoolihan  |


Results in following error:

Exporting to LaTeX...
setq: Wrong number of arguments: #[(string &optional separators)
^E^@^Y^ZESC^\
^L
&^...@^kǔu&^...@^k^mgw&^...@^kt'^...@^k#y...@ǔ^mgwY^@^Rǔ=S
^...@ǔ=k...@ǔ^k=s...@^m^kǔo
B^QǕ^S^...@^k^mg=g...@^m^kOB^Q
," [separators list notfirst start rexp string "[ ^L
^M^K]+" 0 nil string-match ...] 5 1390318], 3
./tmp/table.org (END)



Does not seem to be resolved by Manish's comments from:
http://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00354.html

P.S Continue to be amazed by Org - great work thank you.
P.P.S thread on variable usage was great way to see how others were using
Org.
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Tables and Latex "Wrong-number-of-arguments" error

2009-03-09 Thread andrew dasys
Carsten,
Attached text file with original table.org and associated backtrace. This
was run on 6.24a fresh from git.

Slight delay in that I could not get back to my Linux machine for a few
days.  Also the org-reload does not work as it seems neither my windows or
ubuntu machine recognize find-library-name (definition-is-void) so this may
be the cause of the above problem.

Thank you for looking into this.

Andrew

On Thu, Mar 5, 2009 at 10:28 AM, Carsten Dominik wrote:

> Please make a backtrace with uncompiled code:
>
> Reload Org with
>
>   C-u C-c C-x r
>
> and hit the error again.
>
> Thanks.
>
> - Carsten
>
>
> On Mar 4, 2009, at 7:48 PM, andrew dasys wrote:
>
>  Trying to org-export-latex-... any table in 6.23trans and 6.23b results
>> both on WinXP and Ubuntu results in an error. Sending to html works great.
>> Any guidance would be greatly appreciated.
>>
>> Table is as simple As I could think of:
>>
>> * MASH
>> | id | Actor | Character |
>> |+---+---|
>> |  1 | Allan Alda| "Hawkeye" Benjamin Pierce |
>> |  2 | Gary Burghoff | "Radar" Walter O'Reilly   |
>> |  3 | Loretta Switt | "Hotlips" Margaret Hoolihan  |
>>
>>
>> Results in following error:
>>
>> Exporting to LaTeX...
>> setq: Wrong number of arguments: #[(string &optional separators)
>> ^E^@^Y^ZESC^\
>> ^L
>>
>> &^...@^kǔu&^...@^k^mgw&^...@^kt'^...@^k#y...@ǔ^mgwY^@^Rǔ=S
>> ^...@ǔ=k...@ǔ^k=s...@^m^kǔo
>>  B^QǕ^S^...@^k^mg=g...@^m^kOB^Q
>> ," [separators list notfirst start rexp string "[ ^L
>> ^M^K]+" 0 nil string-match ...] 5 1390318], 3
>> ./tmp/table.org (END)
>>
>>
>>
>> Does not seem to be resolved by Manish's comments from:
>> http://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00354.html
>>
>> P.S Continue to be amazed by Org - great work thank you.
>> P.P.S thread on variable usage was great way to see how others were using
>> Org.
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>
* MASH 
| id | Actor | Character |
|+---+---|
|  1 | Allan Alda| "Hawkeye" Benjamin Pierce |
|  2 | Gary Burghoff | "Radar" Walter O'Reilly   |
|  3 | Loretta Switt | "Hotlips" Margaret Hoolihan  |




Debugger entered--Lisp error: (wrong-number-of-arguments #[(string &optional 
separators) "????
??&U??&
GW??&T??'#??Y
GW??Y????=??S=??K=??S
O  B??
G=??g
??OB  ??,??" [separators list notfirst start rexp string "[  

]+" 0 nil string-match t] 5 1390318] 3)
  split-string(#("| id | Actor | Character 
|\n|+---+---|\n|  1 | Allan Alda
| ``Hawkeye'' Benjamin Pierce   |\n|  2 | Gary Burghoff | ``Radar'' Walter 
O'Reilly |\n|  3 | Loretta Switt | ``Hotlips'' Margaret Hoolihan |\n" 0 2 
nil 2 4 (org-label nil org-attributes nil org-caption nil fontified nil) 4 7 
nil 7 12 (org-label nil org-attributes nil org-caption nil fontified nil) 12 23 
nil 23 32 (org-label nil org-attributes nil org-caption nil fontified nil) 32 
113 nil 113 114 (org-label nil org-attributes nil org-caption nil fontified 
nil) 114 117 nil 117 127 (org-label nil org-attributes nil org-caption nil 
fontified nil) 127 133 nil 133 135 (org-protected t) 135 141 (org-label nil 
org-attributes nil org-caption nil fontified nil) 141 142 (org-protected t 
fontified nil org-caption nil org-attributes nil org-label nil) 142 144 
(org-protected t) 144 160 (org-label nil org-attributes nil org-caption nil 
fontified nil) 160 168 nil 168 169 (org-label nil org-attributes nil 
org-caption nil fontified nil) 169 172 nil 172 185 (org-label nil 
org-attributes nil org-caption nil fontified nil) 185 188 nil 188 190 
(org-protected t) 190 194 (org-label nil org-attributes nil org-caption nil 
fontified nil) 194 195 (org-protected t fontified nil org-caption nil 
org-attributes nil org-label nil) 195 197 (org-protected t) 197 213 (org-label 
nil org-attributes nil org-caption nil fontified nil) 213 223 nil 223 224 
(org-label nil org-attributes nil org-caption nil fontified nil) 224 227 nil 
227 240 (org-label nil org-attributes nil org-caption nil fontified nil) 240 
243 nil 243 245 (org-protected t) 245 251 (org-label nil org-attri

Re: [Orgmode] Tables and Latex "Wrong-number-of-arguments" error

2009-03-09 Thread andrew dasys
Nick,
thank you for looking at this.

I am running Emacs 21.4.1 Nothing bleeding edge here.

The help for split-string looks reasonable  (compiled Lisp comes from "subr"
) (complete output attached)

A bit of debugging gets me to the point where split-string works fine if you
only include the text that is in the table so from
 "|id . Hoolihan |\n"
if you add any of the other text  starting at:
0 2 nil 2 4 (org-label nil org

then I get the error.


On Mon, Mar 9, 2009 at 6:22 PM, Nick Dokos  wrote:

> andrew dasys  wrote:
>
> >
> > * MASH
> > | id | Actor | Character |
> > |+---+---|
> > |  1 | Allan Alda| "Hawkeye" Benjamin Pierce |
> > |  2 | Gary Burghoff | "Radar" Walter O'Reilly   |
> > |  3 | Loretta Switt | "Hotlips" Margaret Hoolihan  |
> >
> > [export to latex gets error]
>
> I cannot reproduce this - the export succeeds (but see below). Version
> info:
>
> GNU Emacs 23.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-03-06
> on alphaville.usa.hp.com
> Org-mode version 6.24
>
> >
> > Debugger entered--Lisp error: (wrong-number-of-arguments #[(string
> &optional separators) " †  ÆÇȉÉ
> > ƒ&  ǔUƒ&
> GWƒ&  T‚'  #ƒY ǔ
> GWƒY Ê Ç”Ç=„S ǔǕ=ƒK ǔ =„S
>  ǔO  B Ǖ ‚
> G=„g
>  ÈOB   Ÿ,‡" [separators list notfirst start rexp string "[
> >
>  ]+" 0 nil string-match t] 5 1390318] 3)
> >   split-string(#("| id | Actor | Character
> |\n|+---+---|\n|  1 | Allan Alda
>| ``Hawkeye'' Benjamin Pierce   |\n|  2 | Gary Burghoff | ``Radar''
> Walter O'Reilly |\n|  3 | Loretta Switt | ``Hotlips'' Margaret Hoolihan
> |\n" 0 2 nil 2 4 (org-label nil org-attributes nil org-caption nil fontified
> nil) 4 7 nil 7 12 (org-label nil org-attributes nil org-caption nil
> fontified nil) 12 23 nil 23 32 (org-label nil org-attributes nil org-caption
> nil fontified nil) 32 113 nil 113 114 (org-label nil org-attributes nil
> org-caption nil fontified nil) 114 117 nil 117 127 (org-label nil
> org-attributes nil org-caption nil fontified nil) 127 133 nil 133 135
> (org-protected t) 135 141 (org-label nil org-attributes nil org-caption nil
> fontified nil) 141 142 (org-protected t fontified nil org-caption nil
> org-attributes nil org-label nil) 142 144 (org-protected t) 144 160
> (org-label nil org-attributes nil org-caption nil fontified nil) 160 168 nil
> 168 169 (org-label nil org-attributes nil org-caption nil fontified nil) 169
> 172 nil 172 185 (org-label nil org-attributes nil org-caption nil fontified
> nil) 185 188 nil 188 190 (org-protected t) 190 194 (org-label nil
> org-attributes nil org-caption nil fontified nil) 194 195 (org-protected t
> fontified nil org-caption nil org-attributes nil org-label nil) 195 197
> (org-protected t) 197 213 (org-label nil org-attributes nil org-caption nil
> fontified nil) 213 223 nil 223 224 (org-label nil org-attributes nil
> org-caption nil fontified nil) 224 227 nil 227 240 (org-label nil
> org-attributes nil org-caption nil fontified nil) 240 243 nil 243 245
> (org-protected t) 245 251 (org-label nil org-attributes nil org-caption nil
> fontified nil) 251 252 (org-protected t fontified nil org-caption nil
> org-attributes nil org-label nil) 252 254 (org-protected t) 254 272
> (org-label nil org-attributes nil org-caption nil fontified nil) 272 275
> nil) "\n" t)
> >   (setq lines (split-string raw-table "\n" t))
>
> ... and this looks very strange to me: split-string is similar to AWK's or
> Python's
> split() function, which is supposed to split a string using the given
> separator,
> and return a list of substrings. The argument to split-string is correct
> (the raw table
> as a string), as is the separator ("\n"). So where does split-string get
> the ungodly
> mess shown above? Is it possible that you have redefined split-string
> somehow? Or perhaps
> some matching function that split-string uses?
> What happens if you evaluate the following (just press C-x C-e after the
> closing paren or cut-and-paste the expression into the *scratch* buffer
> and press C-j)? What happens if you restart your emacs with -Q and
> evaluate the same expression? In my setup, I can evaluate the following
> with no errors:
>
> (split-string #("| id | Actor | Character
> |\n|+---+---|\n|  1 | Allan Alda
>| ``Hawkeye'' Benjamin Pierce   |\n|  2 | Gary Burghoff | ``Radar&#

Re: latex exporting strangeness [was: Re: [Orgmode] Tables and Latex "Wrong-number-of-arguments" error]

2009-03-09 Thread andrew dasys
Blank at start of file does not do it for me.

On Mon, Mar 9, 2009 at 6:42 PM, Nick Dokos  wrote:

> [replying to my own mail]
>
> Nick Dokos  wrote:
>
> >
> > I said above that the export succeeds and it does, in the sense that I
> > get no errors.  However, the exported latex looks strange - the table
> > comes *before* the "MASH" section. Is this a bug or is it a peculiarity
> > of my configuration? Can somebody please try it and let me know?
> >
>
> I seem to recall that this has come up before: basically, an empty line
> at the beginning of the org file restores sanity. So even if it is a bug,
> there is an easy workaround.
>
> Sorry for the noise,
> Nick
>
>
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Tables and Latex "Wrong-number-of-arguments" error

2009-03-10 Thread andrew dasys
Nick,
thank you for figuring this out.
Will upgrade as suggested.

Again thank you both for the great application.

Andrew

On Tue, Mar 10, 2009 at 1:36 AM, Carsten Dominik wrote:

> Fix, thanks, in particular to Nick for sorting this out.
>
> Andrew, I strongly suggest you upgrade to Emacs 22.
>
> - Carsten
>
>
> On Mar 10, 2009, at 3:12 AM, Nick Dokos wrote:
>
>  [I mangled the previous response, so let me try again.]
>>
>> andrew dasys  wrote:
>>
>>  Nick,
>>> thank you for looking at this.
>>>
>>> I am running Emacs 21.4.1 Nothing bleeding edge here.
>>>
>>> The help for split-string looks reasonable  (compiled Lisp comes from
>>> "subr" ) (complete output attached)
>>>
>>>  
>>
>>>
>>> split-string is a compiled Lisp function in `subr'.
>>> (split-string STRING &optional SEPARATORS)
>>>
>>> Splits STRING into substrings where there are matches for SEPARATORS.
>>> Each match for SEPARATORS is a splitting point.
>>> The substrings between the splitting points are made into a list
>>> which is returned.
>>> If SEPARATORS is absent, it defaults to "[ \f\t\n\r\v]+".
>>>
>>> If there is match for SEPARATORS at the beginning of STRING, we do not
>>> include a null substring for that.  Likewise, if there is a match
>>> at the end of STRING, we don't include a null substring for that.
>>>
>>> Modifies the match data; use `save-match-data' if necessary.
>>>
>>
>> I think that explains it: split-string takes one mandatory and two
>> optional arguments (separator regexp and an omit-nulls boolean) in
>> emacs-22/23; but only *one* optional argument in emacs-21 (the separator
>> arg). The org latex-exporting code calls it with two optional arguments
>> and that makes the emacs-21 implementation of split-string blow up.
>>
>> I just did an experiment: in my emacs-23, I called split-string
>> with one mandatory and *three* more arguments:
>>
>> (split-string "foo
>> bar
>> baz" "\n" t t)
>>
>> and I got output which looks very similar to what you are getting.
>>
>> So I think it's an incompatibility with emacs-21. Try the following
>> patch for now and let us know whether it resolves your problem:
>>
>>
>> diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el
>> index 0c0c87f..e8ef6d5 100644
>> --- a/lisp/org-export-latex.el
>> +++ b/lisp/org-export-latex.el
>> @@ -,7 +,10 @@ The conversion is made depending of STRING-BEFORE
>> and STRING-AFTER."
>>   (string-match "\\> attr)
>>   (match-string 1 attr))
>>floatp (or caption label))
>> - (setq lines (split-string raw-table "\n" t))
>> + (setq lines
>> +(if (< emacs-major-version 22)
>> +(split-string raw-table "\n")
>> +  (split-string raw-table "\n" t)))
>>  (apply 'delete-region (list beg end))
>>  (when org-export-table-remove-special-lines
>>(setq lines (org-table-clean-before-export lines
>> 'maybe-quoted)))
>>
>> Nick
>>
>>
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Coloring jabber contacts in org-mode tags according to availability

2009-05-02 Thread Andrew Hyatt
I like to put coworker's usernames as tags to my tasks, if I need to
interact with them to get the task done.  Looking over the agenda for
the day while i decide on my next task, I decided I wanted to see if
my coworkers were available so that I don't have to check around when
deciding on my next task.  So, I wrote the following function to color
my tags based on the jabber availability of the person in question
(green / yellow / red).  It's not super-efficient, but it should work
quickly for most people.  If there is widespread interest in this, I
can develop it into a contrib package.

(defun ash-jabber-colorize-tags ()
  (let ((contact-hash (make-hash-table :test 'equal)))
(dolist (jc jabber-connections)
  (dolist (contact (plist-get (fsm-get-state-data jc) :roster))
(puthash (car (split-string (symbol-name contact) "@"))
contact contact-hash)))
(save-excursion
  (goto-char (point-min))
  (while (re-search-forward ":\\(\\w+\\):" nil t)
(let ((tag (match-string-no-properties 1)))
  (when (and tag (gethash tag contact-hash))
(let* ((js (jabber-jid-symbol (gethash tag contact-hash)))
   (connected (get js 'connected))
   (show (get js 'show)))
  (if connected
  (let ((o (make-overlay (match-beginning 1) (-
(point) 1
(overlay-put o 'face
 (cons 'foreground-color
   (cond ((equal "away" show)
  "yellow")
 ((equal "dnd" show)
  "red")
 (t "green")
(backward-char)


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode Google Wave Integration

2009-05-29 Thread Andrew Hyatt
I agree that this is promising.  I'd like to see a general emacs
integration first, then it would be easier to write an org-mode
customization on top of that.  From a cursory glance at the apis, I
didn't see an obvious way to integrate with it in the low-level way
that would make the emacs closely resemble the Wave UI.  Still
thinking about it...

On Fri, May 29, 2009 at 6:10 AM, Rick Moynihan  wrote:
> Okay, I've just seen the demo of Google Wave here:
>
> http://wave.google.com/
>
> I've not had chance to look at it in depth (I've only viewed 29
> minutes of the video) and skimmed the protocol spec but it seems that
> Google Wave is a collaborative messaging protocol to collaborate on
> tree structures.
>
> It's built ontop of XMPP (and a variety of other things), but the
> first thing that occured to a colleague and me is that it's remarkably
> similar to org-mode, except focused explicitly around communication
> and collaboration blurring the line between I/M, email and
> semi-structured data.
>
> Google Wave is largely vapourware and product demo at the moment, but
> it seems like a great fit for org-mode.  I could imagine an org-mode
> extension that would present waves as org-mode files; restrict editing
> to only your messages (trees), and allow easy pushing/pulling/refiling
> of data between native org-mode files and waves.
>
> It doesn't require a lot of imagination to see how org-mode could
> become not only the most powerful note-taker/productivity app, but
> also the most powerful and extensible wave client and messaging tool
> available!
>
> Has anyone else had any thoughts on this?  In some ways it seems
> similar to what some people on this list are trying to do when
> collaborating on org-mode files.
>
> R.
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org as a minor mode (tables)

2009-07-09 Thread Andrew Lawson
Hello

Today I found myself sending various bits of tabular text via email
(emacs in mutt) and found myself wondering whether it might be possible
to use the org mode table support while composing messages. At the
moment I have mail-mode enabled while writing and I've switched on
orgstruct++-mode too but I note that that doesn't seem to have any table
support. Is there any way of getting such a thing running?

cheers

Andrew

-- 

____ Andrew Lawson 
adl at absentis dot com

A notebook, a fountain pen, a good book for inspiration, a spot of tea
and an expansive view, could one ask for anything more?


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org as a minor mode (tables)

2009-07-09 Thread Andrew Lawson
On Thu, Jul 09, 2009 at 05:57:24AM -0400, Charles Philip Chan wrote:
> Andrew Lawson  writes:
> 
> > Today I found myself sending various bits of tabular text via email
> > (emacs in mutt) and found myself wondering whether it might be
> > possible to use the org mode table support while composing messages.
> 
> Of course you can:
> 
> http://orgmode.org/manual/Orgtbl-mode.html#Orgtbl-mode
> 
> Reading the manual is a good idea. :-)

Yes, well, it was obvious in retrospect, somehow I missed it ...

thanks

-- 

 Andrew Lawson 
adl at absentis dot com

A notebook, a fountain pen, a good book for inspiration, a spot of tea
and an expansive view, could one ask for anything more?


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] suggestion: "native" orgmode XML export (and import?)

2009-08-06 Thread Andrew Stribblehill
I notice the experimental org-export.el contains an internal representation.
It would probably be very easy for your python to parse the lisp
s-expression it uses, if it were exported.

On Aug 6, 2009 3:55 PM, "Ilya Shlyakhter"  wrote:

I'm not an emacs-lisp programmer, but I'd like to write scripts
(ideally in Python) to generate custom reports from my .org files.
What would help a lot, is if there was a command to export an .org
file to a "native" XML format that would mirror the org file's
structure and all its logical elements (tags, properties, drawers,
dates etc).   I know about the DocBook exporter, but it maps orgmode's
concepts onto DocBook concepts such as articles.   I'm a longtime
orgmode user and it would be much simpler to write a program in terms
of the familiar org concepts (hierarchical entries, tags, properties
etc).
It would also be great if there was a way to import such an XML file
back into org.  Then one could e.g. take Toodledo.com tasks and
transform them into an orgmode file.

There is an orgmode Python reader at
http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
and I plan to use that for now.  But it doesn't support all orgmode
features, and more importantly it does its own parsing of orgfiles (so
may not keep up with any future changes).   Using orgmode's own
parser, and then exporting the results as XML, would be much more
reliable.

ilya


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] suggestion: "native" orgmode XML export (and import?)

2009-08-07 Thread Andrew Stribblehill
[re-adding the mailing list]

No, EXPERIMENTAL/org-export.el. Here's what I did after M-x load-file
/path/to/org-export.el:

(defun org-export-sexp (arg)
  (interactive "p")
  (let ((bufstr (org-export-parse arg)))
(save-excursion
  (switch-to-buffer (get-buffer-create "*Org export*"))
  (erase-buffer)
  (insert (format "%s" bufstr)

An org file such as:

Objectives

* Q3 2009
:PROPERTIES:
:SCORE:0.77
:END:
** Operations

*** [#0] Oncall. Keep the site up
*** [#1] Keep the tubes clear.

** Projects


comes out as:
((:level 1
  :heading Q3 2009
  :properties ((SCORE . 0.77) (CATEGORY . proj-sanitised))
  :content :subtree
  ((:level 2
:heading Operations
:properties ((CATEGORY . proj-sanitised))
:content :subtree
((:level 3
  :heading Oncall. Keep the site up
  :properties ((PRIORITY . 0) (CATEGORY . proj-sanitised))
  :content  :subtree nil)
 (:level 3
  :heading Keep the tubes clear.
  :properties ((PRIORITY . 1) (CATEGORY . proj-sanitised))
  :content :subtree nil)))
   (:level 2
:heading Projects
:properties ((CATEGORY . proj-sanitised))
:content :subtree nil

2009/8/7 Ilya Shlyakhter :
> Thanks for the pointer.   Did you mean org-exp.el?   How exactly do I
> get the internal representation?
> thanks,
> ilya
>
> On Thu, Aug 6, 2009 at 11:58 PM, Andrew Stribblehill wrote:
>> I notice the experimental org-export.el contains an internal representation.
>> It would probably be very easy for your python to parse the lisp
>> s-expression it uses, if it were exported.
>>
>> On Aug 6, 2009 3:55 PM, "Ilya Shlyakhter"  wrote:
>>
>> I'm not an emacs-lisp programmer, but I'd like to write scripts
>> (ideally in Python) to generate custom reports from my .org files.
>> What would help a lot, is if there was a command to export an .org
>> file to a "native" XML format that would mirror the org file's
>> structure and all its logical elements (tags, properties, drawers,
>> dates etc).   I know about the DocBook exporter, but it maps orgmode's
>> concepts onto DocBook concepts such as articles.   I'm a longtime
>> orgmode user and it would be much simpler to write a program in terms
>> of the familiar org concepts (hierarchical entries, tags, properties
>> etc).
>> It would also be great if there was a way to import such an XML file
>> back into org.  Then one could e.g. take Toodledo.com tasks and
>> transform them into an orgmode file.
>>
>> There is an orgmode Python reader at
>> http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
>> and I plan to use that for now.  But it doesn't support all orgmode
>> features, and more importantly it does its own parsing of orgfiles (so
>> may not keep up with any future changes).   Using orgmode's own
>> parser, and then exporting the results as XML, would be much more
>> reliable.
>>
>> ilya
>>
>>
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] Remove some blank leading blank lines from ASCII export.

2009-08-09 Thread Andrew Stribblehill
With the following org file:
--
Foo

In which foos are described.
#+OPTIONS: num:nil author:nil creator:nil timestamp:nil d:nil toc:nil skip:t
#+TITLE:
* The construction of a foo
** Armaments
--
I found exporting to ASCII gave five leading blank lines. The
following patch reduces that to one. (I'd love some help in tracking
down that final one.)

---
 lisp/ChangeLog|5 +
 lisp/org-ascii.el |   11 +++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dd00a9a..2c477d7 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-09  Andrew Stribblehill  
+
+   * org-ascii.el (org-export-as-ascii): Remove some leading blank
+   lines from output when skipping preamble.
+
 2009-08-08  Bastien Guerry  

* org.el (org-iswitchb): Fix bug when aborting the `org-iswitchb'
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index ede4ccc..846be8a 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -266,11 +266,13 @@ publishing directory."

 ;; File header
 (unless body-only
-  (if title (org-insert-centered title ?=))
-  (insert "\n")
+  (when (and title (not (string= "" title)))
+   (org-insert-centered title ?=)
+   (insert "\n"))
+
   (if (and (or author email)
   org-export-author-info)
- (insert (concat (nth 1 lang-words) ": " (or author "")
+ (insert(concat (nth 1 lang-words) ": " (or author "")
  (if email (concat " <" email ">") "")
  "\n")))

@@ -283,7 +285,8 @@ publishing directory."
   (if (and date org-export-time-stamp-file)
  (insert (concat (nth 2 lang-words) ": " date"\n")))

-  (insert "\n\n"))
+  (unless (= (point) (point-min))
+   (insert "\n\n")))

 (if (and org-export-with-toc (not body-only))
(progn
-- 
1.6.3.GIT


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] $LR syntax in tables

2009-08-12 Thread Andrew Stribblehill
I'm afraid I can't quite wrap my head around this puzzle. I have a little table:

| Budget   |  640 | 640 |
| Some expense | -165 | 475 |
  #+TBLFM: $3=$LR3+$2

So col C is supposed to add the previous line's col C to the current
line's col B.

However, it seems that $LR3 is referring to the _subsequent_ line not
the previous one. Is there a bug or just my misunderstanding?

Thanks.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Fast way to jump to another specific heading?

2009-08-13 Thread Andrew Stribblehill
Have you tried the org-refile interface? C-u C-c C-w lets you jump to
a heading using the same interface you get when refiling, so you can
customise it easily.

My org-refile config is:

(setq org-refile-targets '((org-agenda-files :maxlevel . 2))
  org-refile-use-outline-path 'file
  org-refile-target-verify-function
  (lambda ()
(not (member "ARCHIVE" (org-get-tags)

This lets me go to whichever file I choose out of the list of agenda
files then up to two deep into the hierarchy, filtering out archived
sections. If you're sticking to one file, perhaps see if (setq
org-refile-use-outline-path t) is to your taste.

2009/8/13 Jan Böcker :
> Hello,
>
> at the moment I use one org-mode file per project and use ido.el's fuzzy
> search to quickly open the appropriate project file. However, this tends to
> clutter up my buffer list when I forget to kill buffers after using them.
>
> I'd like to use only one file to store all my active projects and use ido.el
> to quickly jump to another project node ("project nodes" being defined as,
> say, all direct descendants of a particular top-level node).
> Ideally, after jumping to the node, the outline would automatically be
> narrowed down to the target node.
>
> Are there similar facilities already present in org-mode that I missed?
>
> If not, I'd like to propose a new feature: take the results of a custom
> agenda view (as those allow us to define powerful searches), then feed the
> results to ido-mode or the standard emacs autocompletion for the user to
> select one to jump to.
> Unfortunately, my elisp-fu (and knowledge of org-mode internals) is way too
> insufficient to implement something like that myself.
>
> Jan
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Is this a good feature to have?

2009-08-16 Thread Andrew Stribblehill
I simply file with the default template and remove extraneous stuff when
refiling.

On Aug 17, 2009 12:27 AM, "Leo"  wrote:

Hi all,

Remember is a convenient tool for collecting tasks. However I always
feel it can be more flexible in someway since I started using it quite a
while ago. So I have the following proposal.

1. Add a key C-c i  for each % in the *Remember* buffer. For
  example, `C-c i a' shall toggle the insertion of the annotation.

2. Add a new syntax to % as a placeholder for the corresponding
  C-c i . For example, % can be used in a template to indicate
  the place to insert annotation when pressing `C-c i a'. if no
  placeholder is indicated in the template, then `C-c i a' insert the
  annotation in current place.

This proposal is to eliminate the need to define multiple similar
templates. For example, one with annotation and another without, or one
with clipboard and another without.

What do people think of this?

Best,

Leo

--
Emacs uptime: 6 days, 8 hours, 48 minutes, 55 seconds



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Wishlist: see what I did last week in agenda view

2009-08-17 Thread Andrew Stribblehill
I can almost get there; it's quite frustrating...

I am trying to concoct an agenda view in which every item that has a
clock entry or timestamp for the past week shows up -- and preferably
those for the forthcoming week. This is so I can make a weekly report
of what I've done.

The timeline view seems like it should be perfect for this but it's
only able to show the timeline for one file at a time.

How might I get this? Or if it's not easily possible, does anyone on
the list have a recipe for what they do for their weekly work log?


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Wishlist: see what I did last week in agenda view

2009-08-17 Thread Andrew Stribblehill
2009/8/17 Matt Lundin :
> Andrew Stribblehill  writes:
>
>> I am trying to concoct an agenda view in which every item that has a
>> clock entry or timestamp for the past week shows up -- and preferably
>> those for the forthcoming week. This is so I can make a weekly report
>> of what I've done.
>>
> ...
>> How might I get this? Or if it's not easily possible, does anyone on
>> the list have a recipe for what they do for their weekly work log?
>
> Have you tried the agenda log view yet? Simply type "l" in the agenda.
> To see an entire week of logged items, you can type "w" and then
> navigate through the weeks with the arrow keys.
>
> You can control what types of items are visible in the log with the
> variable org-agenda-log-mode-items.

That's great, thanks. It's especially useful with the clock-report
addition. Now to make a custom agenda view that sets everything up
just so... :)


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


RE: [Orgmode] Feature idea: Automatic clocking

2009-08-22 Thread Nuxoll, Andrew
So, I dig the idea of automatic clocking.  I've been trying to use the manual 
clock feature and I haven't been able to train myself to do it very reliably.  
I think the big problem is that I don't have a big stake in it.  I'm not 
billing different accounts for my time.  The only one who sees the clock data 
is me.  So, the motivation is low.

Here's an alternative implementation of autoclocking:
1.  You specify what hours you're typically working on tasks.  For example, if 
your org list was used it work this might be 9am-5pm except for lunch break: 
12pm-1pm.  Alternatively, if it was your at home org list then it would be 
6pm-10pm and also 7am-8am.  
2.  Whenever you mark a TODO item as DONE, the org-mode assumes that's all 
you've been working on since the last time you marked something DONE.

Obviously this is flawed in a number of ways, but it is easy to implement and I 
think you could get a reasonable measure of what you're spending your time on.  
For those of us, like me, who don't have a strong motivation to clock our time 
that might be plenty sufficient.  The fact that automatic CLOCK: entries would 
appear when I marked an item as DONE would motivate me to go and edit the entry 
to be more accurate if it wasn't.  

I would really value a feature like this.

:AMN:




-Original Message-
Date: Fri, 21 Aug 2009 18:35:27 + (UTC)
From: PT 
Subject: [Orgmode] Feature idea: Automatic clocking
To: emacs-orgmode@gnu.org
Message-ID: 
Content-Type: text/plain; charset=us-ascii

I just started using clocking and it seems really useful. It
occured me it could also be done automatically for certain tasks
which are performed in the org buffer.

For example, I work on some text which I keep in an org subtree,
the branches of the subtree hold the chapters, etc.

If the main subtree which is the root of the document has a CLOCK
property (put there by a previous manual clocking) and also an
AUTOCLOCK or similar property then it could monitor if I modify
the text within the subtree and start the clock automatically. If
I stop modifying the subtree then after a while (say, 30 seconds,
configurable) it would stop the clock automatically.

So for subtrees explicitly marked for automatic clocking the user
wouldn't have to start/stop the clock manually at all, org could
do it itself.

What do you think?

<>___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Preventing (or mitigating) accidental deletion in org-mode

2009-08-23 Thread Andrew Stribblehill
2009/8/23 Leo :
> On 2009-08-23 11:58 +0100, Nick Bell wrote:
>> Org-mode is great and I'd like to commit to it. However, I'm held back
>> by the apparent fragility of data stored in org-files. For example,
>> it's easy to delete entire folded trees of data with just a couple of
>> keystrokes or a mouse click.
>
> This should not be a problem as long as you know how the undo in Emacs
> works. You can even use browse-kill-ring¹ to see what you have deleted in
> Emacs.

...Provided you know that you killed something you didn't intend to.
However, it's easy to kill a tree without noticing it had content.

Maybe we could augment org-kill-line with some optional facility that
checks that it doesn't encompass a collapsed section -- or less
intrusively, emits a message saying it's killed a collapsed section.
I'm having a hard time seeing how to code it though.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Release 6.30

2009-09-01 Thread Andrew Hyatt
Hi Carsten,

Thanks for the release!  The dedicated frame patch does not actually
appear to be in this release, though.

On Tue, Sep 1, 2009 at 12:20 AM, Carsten
Dominik wrote:
> Hi,
>
> I am releasing Org-mode version 6.30.
>
> Enjoy!
>
> - Carsten
>
>             Changes in Version 6.30
>             ===
>
> Inconsistent changes
> ~
>
> Agenda now uses `f' and `b' to move through time
> =
>
> Up to now, the Org-mode agenda used the cursor keys `left' and
> `right' to switch the agenda view forward an backward through
> time.  However, many people found this confusing, and others
> wanted to be able to do cursor motion in the agenda, for example
> to select text.  Therefore, after an extensive discussion on
> `emacs-orgm...@gnu.org', it was decided to use the `b' and
> `f' keys instead, and to let the cursor keys do cursor motion
> again.
>
> Agenda follow mode is now on the `F' key
> =
>
> This was necessary to free up the `f' key, see above.
>
> Details
> 
>
> Maintenance
> 
>
> New command to submit a bug report
> ---
>
> There is now a special command `M-x org-submit-bug-report'.  This
> command will create a mail buffer with lots of useful details.
> In particular, it contains complete version information for Emacs
> and Org-mode.  It will also (if you agree to it) contain all
> non-standard settings of org-mode and outline-mode related
> variables.  Even if you do not sent your emails from within
> Emacs, please still use this command to generate the information
> and then copy it into your mail program.
>
> The command will not generate and include a `*Backtrace*' buffer,
> please do this yourself if you have hit an error.  For more
> information, see the [feedback section] of the manual.
>
> [feedback section]: http://orgmode.org/manual/Feedback.html#Feedback
>
> New contributed package org-track.el
> -
>
> This package allows to keep up-to-date with current Org
> development, using only Emacs on-board means.  So if you don't
> want or cannot use `git', but still want to run the latest and
> hottest Org-mode, this is for you.
>
> Thanks to Sebastian Rose for this contribution.
>
> Agenda
> ===
>
> Agenda now uses `f' and `b' to move through time
> -
>
> Up to now, the Org-mode agenda used the cursor keys `left' and
> `right' to switch the agenda view forward an backward through
> time.  However, many people found this confusing, and others
> wanted to be able to do cursor motion in the agenda, for example
> to select text.  Therefore, after an extensive discussion on
> `emacs-orgm...@gnu.org', it was decided to use the `b' and
> `f' keys instead, and to let the cursor keys do cursor motion
> again.
>
> Agenda follow mode is now on the `F' key
> -
>
> This was necessary to free up the `f' key, see above.
>
> The agenda can be put into a dedicated frame
> -
>
> When the variable `org-agenda-window-setup' has the value
> `separate-frame', then the new frame created to show the agenda
> will now have the window marked as /dedicated/.  As a
> consequence, exiting the agenda while the agenda is the only
> window on the frame will kill that frame.
>
> This was a request by Henry Atting.
>
> New mode to show some entry body text in the agenda
> 
>
> There is now a new agenda sub-mode called
> `org-agenda-entry-text-mode'.  It is toggled with the `E' key.
> When active, all entries in the agenda will be accompanied by a
> few lines from the outline entry.  The amount of text can be
> customized with the variable `org-agenda-entry-text-maxlines'.
>
> This was a request by Anthony Fairchild, Manish, and others.
>
> Improve following links from the agenda
> 
>
> `C-c C-o' in the agenda will now offer all links in the headline
> and text of an entry.  If there is only a single link, it will be
> followed immediately.
>
> Avoid some duplicate entries
> -
>
> There is a new variable that can be used to avoid some duplicate
> agenda entries: `org-agenda-skip-scheduled-if-deadline-is-shown'
> If that is set, it avoids that an entry shows up in the agenda for
> today for both a scheduling and a deadline entry.  See the
> docstring of the variables for more details.
>
> This partially addresses a request by Samuel Wales.
>
> Mark the running clock in the agenda.
> --
>
> If the entry currently being clocked is present in the agenda, it
> will be highlighted with the face `org-agenda-clocking'.
>
> This was a request by Rainer Stengele.
>
>
> Export
> ===
>
> Allow LaTeX export to use the listings package
> ---

[Orgmode] Org-mode version 6.30 (release_6.30); Batch archiving needs to be more clever

2009-09-01 Thread Andrew Hyatt

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know hoe to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Batch archiving mode appears to just try the most obvious thing: take
each tagged member and archive it.  However, it always runs into
problems, because it will archive a parent node, then try and archive
the children.  Not finding the children anymore, it errors out.

Probably an easy solution would be to just gracefully handle this error
by ignoring it and pretending the item was archived.  Alternatively,
updating the list after every operation could also work.

Ideal solution, IMHO: always archive parents first, then clear the
children from the list automatically.


Emacs  : GNU Emacs 23.1.50.2 (x86_64-unknown-linux-gnu, X toolkit)
Package: Org-mode version 6.30 (release_6.30)

current state:
==
(setq
 org-log-done 'time
 org-link-frame-setup '((gnus . gnus) (file . find-file-other-window))
 org-clock-string-limit 50
 org-agenda-custom-commands '(("w" todo #("WAITING" 0 7 (face org-warning)) nil)
  ("n" tags-todo #("-live" 0 5 (face org-warning))
   ((org-show-hierarchy-above nil) 
(org-agenda-todo-ignore-with-date t)
(org-agenda-tags-todo-honor-ignore-options t))
   )
  ("l" "Agenda and live tasks" ((agenda "") 
(tags-todo "+live"
 org-agenda-files '("~/org/work.org")
 org-agenda-include-diary t
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent 
org-depend-block-todo)
 org-completion-use-ido t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-agenda-todo-ignore-scheduled t
 org-agenda-start-with-log-mode t
 org-clock-out-switch-to-state '(lambda (prev-state) (if (member prev-state 
org-done-keywords) "DONE" "STARTED"))
 org-deadline-warning-days 1
 org-agenda-skip-scheduled-if-done t
 org-trigger-hook '(org-depend-trigger-todo)
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w@/!)" "|" 
"DONE(d)" "OBSOLETE(o)"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-dim-blocked-tasks 'invisible
 org-agenda-tags-todo-honor-ignore-options t
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 )
 org-agenda-ndays 1
 org-refile-targets '((nil :maxlevel . 3))
 org-emphasis-regexp-components '(" ('\"{" "-   .,:!?;'\")}" "  
.\n,\"'" "." 1)
 org-confirm-elisp-link-function nil
 org-agenda-mode-hook '((lambda nil (hl-line-mode 1)))
 org-enforce-todo-dependencies t
 org-agenda-skip-deadline-if-done t
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp "\\"
 org-drawers '("PROPERTIES" "CLOCK" "LOGBOOK" "NOTES")
 )


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Release 6.30

2009-09-02 Thread Andrew Hyatt
Yep, that was my confusion.  Thanks!

On Wed, Sep 2, 2009 at 5:30 AM, Carsten
Dominik wrote:
>
> On Sep 2, 2009, at 10:11 AM, Tassilo Horn wrote:
>
>> Carsten Dominik  writes:
>>
>>> it is this commit:
>>>
>>> bbc27c011ab5d44d37dca662d1a393d429dbe4b3
>>
>> That commit is in, but grepping for separate-frame in all *.el files
>> gives no result and the docs don't mention it, too.
>>
>> ,[ C-h v org-agenda-window-setup RET ]
>> | org-agenda-window-setup is a variable defined in `org-agenda.el'.
>> | Its value is reorganize-frame
>> |
>> | Documentation:
>> | How the agenda buffer should be displayed.
>> | Possible values for this option are:
>> |
>> | current-window    Show agenda in the current window, keeping all other
>> windows.
>> | other-frame       Use `switch-to-buffer-other-frame' to display agenda.
>> | other-window      Use `switch-to-buffer-other-window' to display agenda.
>> | reorganize-frame  Show only two windows on the current frame, the
>> current
>> |                   window and the agenda.
>> | See also the variable `org-agenda-restore-windows-after-quit'.
>> `
>>
>> Looking at "git show bbc27c011ab5d44d37dca662d1a393d429dbe4b3" it seems
>> to me, that there's no new value, but that other-frame now uses a
>> dedicated window.
>
> Yes, this seems to have been a typo in the release notes.  You need to use
> the value `other-frame'.
>
> - Carsten
>
>>
>> Bye,
>> Tassilo
>>
>>
>>
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Footnote references don't belong in the table of contents

2009-09-02 Thread Andrew Stribblehill
Emacs  : GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-05-02 on king, modified by Ubuntu
Package: Org-mode version 6.30

current state:
==
(setq
 org-clock-in-switch-to-state "DOING"
 org-todo-keyword-faces '(("BLOCKING" . org-agenda-dimmed-todo-face)
  ("DOING" . stribb/org-agenda-doing))
 org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2 :effort t)
 org-agenda-custom-commands '(("S" "snippet view" agenda ""
   ((org-agenda-show-log t)
(org-agenda-log-mode-items (quote (state)))
(org-agenda-archives-mode t)
(org-agenda-include-inactive-timestamps t)
(org-agenda-clockreport-mode t))
   )
  )
 org-agenda-files '("~/org/feedback-template.org"
"~/org/kill-all-gateways.org" "~/org/notes.org"
"~/org/objectives.org" "~/org/perms.org"
"~/org/proj-sanitised.org" "~/org/tax.org"
"~/org/todo.org" "~/org/whisky.org")
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-clock-history-length 35
 org-clock-in-prepare-hook '(stribb/org-mode-ask-effort)
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-todo-keywords '((sequence "TODO(t)" "DOING(w!)" "|" "DONE(d!)"
  "CANCELLED(c@)")
 (sequence "BLOCKING(b@/!)"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-agenda-start-with-follow-mode t
 org-default-notes-file "~/org/refile.org"
 org-directory "~/org/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-publish-project-alist '(("org" :base-directory "~/org/" :base-extension
  "org" :publishing-directory
  "~/public_html/org/" :style-include-default nil
  :style
  "")
 )
 org-refile-target-verify-function '(lambda nil
 (not (member "ARCHIVE" (org-get-tags
 org-mode-hook '((lambda nil (auto-fill-mode 1))
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 )
 org-clock-out-remove-zero-time-clocks t
 org-refile-targets '((org-agenda-files :maxlevel . 2))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-refile-use-outline-path 'file
 org-log-into-drawer t
 org-occur-hook '(org-first-headline-recenter)
 org-remember-templates '(("refile" 114
   "* %?\n  :PROPERTIES:\n  :Filed: %U\n  :END:\n  %i\n 
 %a")
  )
 org-link-abbrev-alist '(("b" . "http://b/";) ("tick" . "http://tick/";)
 ("cl" . "http://cl/";) ("googler" . "http://who/";)
 ("p4" . "http://s/file=";)
 ("wiki" . "http://wiki/Main/";)
 ("google3" . "file:///Depot/google3/"))
 )



I have a file:
8<-
* Foo
* Bar [fn:1]

[fn:1] this explains bar
8<-

When I export it to HTML, I see Bar[1] in the ToC. The number there
isn't clickable but I don't think it should be there at all.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode version 6.30 (release_6.30); Batch archiving needs to be more clever

2009-09-02 Thread Andrew Hyatt

Has the behavior changed in this release?  My report was on 6.30, but
actually I forgot to mention I have not reproduced it with 6.30, but
with previous versions (since the feature was introduced).  The issue
was an error deep in the code (a stringp error, if I remember
correctly).  When that happened, there were items in the org agenda
(generated by maching on TODO items of type DONE) that could not be
navigated to.  Hitting enter on those items gave an error because the
item was not actually there anymore.

I've confirmed your observation, that it does work right on 6.30 for at
least simple cases.  I'll keep an eye on this and see if it pops up on
the current release.

Carsten Dominik  writes:

> Hi Andrew,
>
> Org does take care of this possibility.  All I get in my simple
> test case is the following message:
>
>Acted on 1 entries, skipped 2 (disappeared before their turn)
>
> That is not an error, it is just feedback.
>
> Or are you really getting an error?
>
> - Carsten
>
> On Sep 1, 2009, at 9:06 PM, Andrew Hyatt wrote:
>
>>
>> Remember to cover the basics, that is, what you expected to happen and
>> what in fact did happen.  You don't know hoe to make a good report?
>> See
>>
>> http://orgmode.org/manual/Feedback.html#Feedback
>>
>> Your bug report will be posted to the Org-mode mailing list.
>> 
>>
>> Batch archiving mode appears to just try the most obvious thing: take
>> each tagged member and archive it.  However, it always runs into
>> problems, because it will archive a parent node, then try and archive
>> the children.  Not finding the children anymore, it errors out.
>>
>> Probably an easy solution would be to just gracefully handle this
>> error
>> by ignoring it and pretending the item was archived.  Alternatively,
>> updating the list after every operation could also work.
>>
>> Ideal solution, IMHO: always archive parents first, then clear the
>> children from the list automatically.
>>
>>
>> Emacs  : GNU Emacs 23.1.50.2 (x86_64-unknown-linux-gnu, X toolkit)
>> Package: Org-mode version 6.30 (release_6.30)
>>
>> current state:
>> ==
>> (setq
>> org-log-done 'time
>> org-link-frame-setup '((gnus . gnus) (file . find-file-other-window))
>> org-clock-string-limit 50
>> org-agenda-custom-commands '(("w" todo #("WAITING" 0 7 (face org-
>> warning)) nil)
>>  ("n" tags-todo #("-live" 0 5 (face org-
>> warning))
>>   ((org-show-hierarchy-above nil) (org-
>> agenda-todo-ignore-with-date t)
>>(org-agenda-tags-todo-honor-ignore-
>> options t))
>>   )
>>  ("l" "Agenda and live tasks" ((agenda
>> "") (tags-todo "+live"
>> org-agenda-files '("~/org/work.org")
>> org-agenda-include-diary t
>> org-blocker-hook '(org-block-todo-from-children-or-siblings-or-
>> parent org-depend-block-todo)
>> org-completion-use-ido t
>> org-after-todo-state-change-hook '(org-clock-out-if-current)
>> org-agenda-todo-ignore-scheduled t
>> org-agenda-start-with-log-mode t
>> org-clock-out-switch-to-state '(lambda (prev-state) (if (member
>> prev-
>> state org-done-keywords) "DONE" "STARTED"))
>> org-deadline-warning-days 1
>> org-agenda-skip-scheduled-if-done t
>> org-trigger-hook '(org-depend-trigger-todo)
>> org-export-preprocess-hook '(org-export-blocks-preprocess)
>> org-tab-first-hook '(org-hide-block-toggle-maybe)
>> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
>> org-confirm-shell-link-function 'yes-or-no-p
>> org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "WAITING(w@/!)"
>> "|" "DONE(d)" "OBSOLETE(o)"))
>> org-agenda-before-write-hook '(org-agenda-add-entry-text)
>> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-
>> drawers org-cycle-show-empty-lines
>>  org-optimize-window-after-visibility-change)
>> org-agenda-dim-blocked-tasks 'invisible
>> org-agenda-tags-todo-honor-ignore-options t
>> org-mode-hook '(#[nil "\300\301\302\303\304$\207"
>>   [org-add-hook change-major-mode-hook org-show-
>> block-all append local] 5]
>> )
>> org-a

Re: [Orgmode] Footnote references don't belong in the table of contents

2009-09-03 Thread Andrew Stribblehill
Verified, thanks.

2009/9/3 Carsten Dominik :
> Hi Andrew,
>
> I think this is fixed now, please verify.
>
> Thanks!
>
> - Carsten
>
> On Sep 2, 2009, at 3:01 PM, Andrew Stribblehill wrote:
>
>> Emacs  : GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll
>> bars)
>> of 2008-05-02 on king, modified by Ubuntu
>> Package: Org-mode version 6.30
>>
>> current state:
>> ==
>> (setq
>> org-clock-in-switch-to-state "DOING"
>> org-todo-keyword-faces '(("BLOCKING" . org-agenda-dimmed-todo-face)
>>                          ("DOING" . stribb/org-agenda-doing))
>> org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2 :effort t)
>> org-agenda-custom-commands '(("S" "snippet view" agenda ""
>>                               ((org-agenda-show-log t)
>>                                (org-agenda-log-mode-items (quote (state)))
>>                                (org-agenda-archives-mode t)
>>                                (org-agenda-include-inactive-timestamps t)
>>                                (org-agenda-clockreport-mode t))
>>                               )
>>                              )
>> org-agenda-files '("~/org/feedback-template.org"
>>                    "~/org/kill-all-gateways.org" "~/org/notes.org"
>>                    "~/org/objectives.org" "~/org/perms.org"
>>                    "~/org/proj-sanitised.org" "~/org/tax.org"
>>                    "~/org/todo.org" "~/org/whisky.org")
>> org-after-todo-state-change-hook '(org-clock-out-if-current)
>> org-clock-history-length 35
>> org-clock-in-prepare-hook '(stribb/org-mode-ask-effort)
>> org-export-preprocess-hook '(org-export-blocks-preprocess)
>> org-tab-first-hook '(org-hide-block-toggle-maybe)
>> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
>> org-confirm-shell-link-function 'yes-or-no-p
>> org-todo-keywords '((sequence "TODO(t)" "DOING(w!)" "|" "DONE(d!)"
>>                      "CANCELLED(c@)")
>>                     (sequence "BLOCKING(b@/!)"))
>> org-agenda-before-write-hook '(org-agenda-add-entry-text)
>> org-agenda-start-with-follow-mode t
>> org-default-notes-file "~/org/refile.org"
>> org-directory "~/org/"
>> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
>>                  org-cycle-show-empty-lines
>>                  org-optimize-window-after-visibility-change)
>> org-publish-project-alist '(("org" :base-directory "~/org/"
>> :base-extension
>>                              "org" :publishing-directory
>>                              "~/public_html/org/" :style-include-default
>> nil
>>                              :style
>>                              "> type=\"text/css\">")
>>                             )
>> org-refile-target-verify-function '(lambda nil
>>                                     (not (member "ARCHIVE"
>> (org-get-tags
>> org-mode-hook '((lambda nil (auto-fill-mode 1))
>>                 #[nil "\300\301\302\303\304$\207"
>>                   [org-add-hook change-major-mode-hook org-show-block-all
>>                    append local]
>>                   5]
>>                 )
>> org-clock-out-remove-zero-time-clocks t
>> org-refile-targets '((org-agenda-files :maxlevel . 2))
>> org-confirm-elisp-link-function 'yes-or-no-p
>> org-refile-use-outline-path 'file
>> org-log-into-drawer t
>> org-occur-hook '(org-first-headline-recenter)
>> org-remember-templates '(("refile" 114
>>                           "* %?\n  :PROPERTIES:\n  :Filed: %U\n  :END:\n
>>  %i\n  %a")
>>                          )
>> org-link-abbrev-alist '(("b" . "http://b/";) ("tick" . "http://tick/";)
>>                         ("cl" . "http://cl/";) ("googler" . "http://who/";)
>>                         ("p4" . "http://s/file=";)
>>                         ("wiki" . "http://wiki/Main/";)
>>                         ("google3" . "file:///Depot/google3/"))
>> )
>>
>>
>>
>> I have a file:
>> 8<-
>> * Foo
>> * Bar [fn:1]
>>
>> [fn:1] this explains bar
>> 8<-
>>
>> When I export it to HTML, I see Bar[1] in the ToC. The number there
>> isn't clickable but I don't think it should be there at all.
>>
>>
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] patch for git: org-ascii.el

2009-09-08 Thread Andrew Stribblehill
Are you sure you need this? Try make clean; make, without it?

2009/9/8 Wes Hardaker :
>
> org-ascii uses org-float-time which is in org-compat:
>
> diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
> index 4fd5675..e6ad8d1 100644
> --- a/lisp/org-ascii.el
> +++ b/lisp/org-ascii.el
> @@ -27,6 +27,7 @@
>  ;;; Commentary:
>
>  (require 'org-exp)
> +(require 'org-compat)
>
>  (defgroup org-export-ascii nil
>   "Options specific for ASCII export of Org-mode files."
>
>
> --
> \ Wes Hardaker                           http://pontifications.hardakers.net /
>  \_ "In the bathtub of history the truth is harder to hold than /
>       \___ the soap, and much more difficult to find." ___/
>               \_ -- Terry Pratchett __/
>                         \__/
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Emacs 21.4.1 support

2009-09-14 Thread Andrew Stribblehill
2009/9/14 Tassilo Horn :
> "Jing Su @ Gmail"  writes:
>
> Hi Jing,
>
>> I fully understand that Emacs 21 is way out of date. However, since
>> RHEL is one of the mainstream commercial distros, and is common on
>> servers, it would be great if org-mode can be consistent with such
>> ``industrial standard'' (which is always way out of date :S ).
>
> Emacs 21.4 is nearly 4 years old!  Org-mode uses quite a bunch of more
> or less recent emacs features, so getting it fully working would be
> quite a hassle with a lot of compatibility code.
>
> Maybe an older org-mode version supports emacs 21.4 and has all features
> you need.  But I cannot find a downloads page for old versions...
>
> Or get the git version and use the revision before the commit
> 31858e5c39404cf2bc745fe05f59c7ce6816db74.
>
> ,
> | commit 31858e5c39404cf2bc745fe05f59c7ce6816db74
> | Author: Carsten Dominik 
> | Date:   Tue Apr 21 14:00:24 2009 +0200
> |
> |     End of Emacs 21 support.
> `
>
>> System administrators will take risk to install unofficial org-mode,
>> but most of them won't risk the whole server, i.e., risk their necks,
>> for a newer but unofficial (according to RH) Emacs version.
>
> You could compile and install emacs in your $HOME.  The INSTALL file
> coming with it tells how to do that.

I agree. In fact, when I was a real sysadmin, I used to maintain a
local build of Emacs  for my users.

However, I tried compiling the latest org-mode with Emacs 21.4 and
basic functionality works: tab, shift-tab, TODO, the day/week view of
the agenda -- and these are the only things I've tried.

See for yourself how well an org-mode build works and it may turn out
not to be an issue.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org-mode version 6.30trans; HTML exporting problem

2009-09-21 Thread Andrew Stribblehill
Emacs  : GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-03-19 on yellow, modified by Debian
Package: Org-mode version 6.30trans (git pulled this afternoon)

I have the following file:

==
#+BEGIN_SRC conf
CONF=/etc/passwd
EXTRAFLAGS="--snark"
#+END_SRC
==

When I try to export it to HTML, I get an error, "Invalid face".
Here's the backtrace:


Debugger entered--Lisp error: (error "Invalid face")
  internal-get-lisp-face-attribute(nil :height nil)
  face-attribute(nil :height)
  htmlize-face-size(default)
  htmlize-face-to-fstruct(default)
  htmlize-make-face-map((default font-lock-string-face
font-lock-variable-name-face))
  htmlize-buffer-1()
  htmlize-region(1 22)
  org-export-htmlize-region-for-paste(1 22)
  org-export-format-source-code-or-example(html #("conf" 0 4
(fontified t font-lock-fontified t)) #("EXTRAFLAGS=\"--snark\"\n" 0 14
(fontified t font-lock-fontified t) 14 15 (fontified t
font-lock-fontified t) 15 16 (fontified t font-lock-fontified t) 16 17
(fontified t font-lock-fontified t) 17 18 (fontified t
font-lock-fontified t) 18 19 (fontified t font-lock-fontified t) 19 20
(fontified t font-lock-fontified t) 20 21 (fontified t
font-lock-fontified t)) "" 0)
  org-export-replace-src-segments-and-examples(html)
  org-export-preprocess-string(#("#+BEGIN_SRC
conf\nCONF=/etc/passwd\nEXTRAFLAGS=\"--snark\"\n#+END_SRC\n" 0 16
(fontified t font-lock-fontified t auto-composed t face org-meta-line
font-lock-multiline t) 16 17 (fontified t font-lock-fontified t
auto-composed t font-lock-multiline t face org-meta-line) 17 23
(fontified t font-lock-fontified t auto-composed t font-lock-multiline
t face org-block :org-license-to-kill t) 23 24 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 24 25 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 25 26 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 26 27 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 27 28 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 28 29 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 29 30 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 30 31 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 31 32 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 32 33 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 33 34 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block :org-license-to-kill t) 34 48 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block) 48 49 (fontified t font-lock-fontified t auto-composed t
font-lock-multiline t face org-block) 49 50 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block) 50 51 (fontified t font-lock-fontified t auto-composed t
font-lock-multiline t face org-block) 51 52 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block) 52 53 (fontified t font-lock-fontified t auto-composed t
font-lock-multiline t face org-block) 53 54 (fontified t
font-lock-fontified t auto-composed t font-lock-multiline t face
org-block) 54 55 (fontified t font-lock-fontified t auto-composed t
font-lock-multiline t face org-meta-line) 55 64 (fontified t
font-lock-fontified t auto-composed t face org-meta-line
font-lock-multiline t) 64 65 (fontified t auto-composed t))
:emph-multiline t :for-html t :skip-before-1st-heading nil :drawers
nil :todo-keywords t :tags not-in-toc :priority nil :footnotes t
:timestamps t :archived-trees headline :select-tags ("export")
:exclude-tags ("noexport") :add-text nil :LaTeX-fragments nil)
  org-export-as-html(nil nil (:buffer-will-be-killed t :base-directory
"~/org/" :base-extension "org" :publishing-directory
"~/public_html/org/" :style-include-default nil :style "") nil nil
"/home/stribb/www/org/")
  org-publish-org-to("html" (:base-directory "~/org/" :base-extension
"org" :publishing-directory "~/public_html/org/"
:style-include-default nil :style "") "/home/stribb/org/bug.org"
"/home/stribb/www/org/")
  org-publish-org-to-html((:base-directory "~/org/" :base-extension
"org" :publishing-directory "~/public_html/org/"
:style-include-default nil :style "") "/home/stribb/org/bug.org"
"/home/stribb/www/org/")
  org-publish-file("/home/stribb/org/bug.org")
  byte-code(... [force org-publish-use-timestamps-flag
org-publish-file buffer-file-name] 2)
  org-publ

Re: [Orgmode] Re: Org-mode version 6.30trans; HTML exporting problem

2009-09-21 Thread Andrew Stribblehill
Good call. Works now, thanks.

(Well, there's the oddity that the  is CONF=/etc/passwd, but I
think we can forgive that.)

2009/9/21 Benjamin Andresen :
> Andrew Stribblehill  writes:
>
>> [snip]
>
> do you have org-mode/contrib/lisp at the beginning of your load-path?
>
> The error you're seeing seems to be from using an old version of htmlize
> (Maybe from a different source?). The one in contrib should work.
>
> HTH,
> benny
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Export to ascii simpler

2009-09-29 Thread Andrew Stribblehill
I export to ascii with C-c C-e a, then can Apple-v the exported text
into whatever I choose.

2009/9/29 andrea Crotti :
> Is there a very quick way to copy some text from an emacs buffer
> taking away the indentation?  org-export-as-ascii creates a new file,
> I only need in the ring (and in osx buffer) the text copied.  I can
> copy to another buffer than do a *kill-rectangle* on it but it's quite
> a long procedure..
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Appearance of agenda items generated from dates in properties

2009-10-01 Thread Andrew Lawson
Hello

Sorry if this is in the manual but I couldn't find it refenrenced.

As I find myself using properties more and more often I've often found
that more than one property for an item will have a date associated with
it. These dates will of course appear as expected in the agenda view but
unfortunately with only the title of the item and not the property
name. That makes it difficult to know exactly why the item is in the
agenda without checking further. I'm sure there must be a way of adding
the property name to that title.

Example, id I were storing data about people:

*** James Smith
:PROPERIES:
:BIRTHDAY: <2009-04-04 Fri +1y>
:WEDDINGANIV: <2008-03-24 Fri +1y>
:END:

Will appear in the agenda on 2009-04-04 as simply 'James Smith'. Ideally
I'd like to see 'James Smith (:BIRTHDAY:)'.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] using org-mode and screen

2008-01-27 Thread Andrew Hyatt
Hi everyone,
I use org-mode religiously these days.  I blogged about my use here (
http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please excuse
the fact that when I wrote this I didn't know about the existing org-mode
functionality to jump to the current clock).

I generally have a problem of integrating the work I do in the shell with
the tasks in org-mode.   Plus, I often need access to the shells at home I
started from work.  I thought I'd combine these problems into a little
org-mode extension that ties screen and org-mode together, via ansi-term.

For these to work, you have to load ansi-term, which my hack is based on.

If there's enough interest, I'll make a real .el file out of this.

The general idea is that you start a task in which all the work will take
place in a shell.  This usually is not a leaf-task for me, but usually the
parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
will prompt for the name of a session.  Give it a name, and it will insert a
link.  Open the link at any time to go the screen session containing your
work!

It works pretty well for me.  The only problem is that I often run emacs in
a screen session itself, and I can never get scrolling to work right in
screen-in-screen.

(defun ash-org-screen-buffer-name (name)

  "Returns the buffer name corresponding to the screen name given."

  (concat "*screen " name "*"))



(defun ash-org-screen-helper (name arg)

  ;; Pick the name of the new buffer.

  (let ((term-ansi-buffer-name (generate-new-buffer-name
(ash-org-screen-buffer-name name
(setq term-ansi-buffer-name

  (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen" nil

   arg name))



(set-buffer term-ansi-buffer-name)

(term-mode)

(term-char-mode)



(term-set-escape-char ?\C-x)

term-ansi-buffer-name))



(defun ash-org-screen (name)

  "Start a screen session with name"

  (interactive "MScreen name: ")



  (save-excursion

(ash-org-screen-helper name "-S"))

  (insert-string (concat "[[screen:" name "]]")))

And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s\")") to
org-link-abbrev-alist.
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] using org-mode and screen

2008-02-03 Thread Andrew Hyatt
Cool.  I'll send something along to you when I package it up...
On Feb 3, 2008 3:22 AM, Carsten Dominik <[EMAIL PROTECTED]> wrote:

> Well, Andrew,
> if you write an extension, I will put it into the CONTRIB directory of the
> distribution.
>
> - Carsten
>
> On Jan 28, 2008, at 12:41 AM, Andrew Hyatt wrote:
>
> Hi everyone,
> I use org-mode religiously these days.  I blogged about my use here (
> http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please
> excuse the fact that when I wrote this I didn't know about the existing
> org-mode functionality to jump to the current clock).
>
> I generally have a problem of integrating the work I do in the shell with
> the tasks in org-mode.   Plus, I often need access to the shells at home I
> started from work.  I thought I'd combine these problems into a little
> org-mode extension that ties screen and org-mode together, via ansi-term.
>
> For these to work, you have to load ansi-term, which my hack is based on.
>
>
> If there's enough interest, I'll make a real .el file out of this.
>
> The general idea is that you start a task in which all the work will take
> place in a shell.  This usually is not a leaf-task for me, but usually the
> parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
> will prompt for the name of a session.  Give it a name, and it will insert a
> link.  Open the link at any time to go the screen session containing your
> work!
>
> It works pretty well for me.  The only problem is that I often run emacs
> in a screen session itself, and I can never get scrolling to work right in
> screen-in-screen.
>
> (defun ash-org-screen-buffer-name (name)
>
>   "Returns the buffer name corresponding to the screen name given."
>
>   (concat "*screen " name "*"))
>
>
>
> (defun ash-org-screen-helper (name arg)
>
>   ;; Pick the name of the new buffer.
>
>   (let ((term-ansi-buffer-name (generate-new-buffer-name
> (ash-org-screen-buffer-name name
> (setq term-ansi-buffer-name
>
>   (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen" nil
>
>arg name))
>
>
>
> (set-buffer term-ansi-buffer-name)
>
> (term-mode)
>
> (term-char-mode)
>
>
>
> (term-set-escape-char ?\C-x)
>
> term-ansi-buffer-name))
>
>
>
> (defun ash-org-screen (name)
>
>   "Start a screen session with name"
>
>   (interactive "MScreen name: ")
>
>
>
>   (save-excursion
>
> (ash-org-screen-helper name "-S"))
>
>   (insert-string (concat "[[screen:" name "]]")))
>
> And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s\")")
> to org-link-abbrev-alist.
>  ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] using org-mode and screen

2008-02-06 Thread Andrew Hyatt
Thanks for the suggestion.  Sounds promising, but on the other hand screen
is on all unix distributions I know of, but dtach is harder to find.

On Feb 5, 2008 5:24 AM, Rick Moynihan <[EMAIL PROTECTED]> wrote:

> If you're using gnu screen primarily for it's detach capability then you
>  may want to consider 'dtach', which is pretty much just the feature of
> screen.  Consequently it has less keybindings etc, and is more
> compatible with various programs.  I've not really used it with emacs,
> but you might consider it unless you use screens other features.
>
> R.
>
> Andrew Hyatt wrote:
> > Hi everyone,
> > I use org-mode religiously these days.  I blogged about my use here (
> > http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please
> excuse
> > the fact that when I wrote this I didn't know about the existing
> org-mode
> > functionality to jump to the current clock).
> >
> > I generally have a problem of integrating the work I do in the shell
> with
> > the tasks in org-mode.   Plus, I often need access to the shells at home
> I
> > started from work.  I thought I'd combine these problems into a little
> > org-mode extension that ties screen and org-mode together, via
> ansi-term.
> >
> > For these to work, you have to load ansi-term, which my hack is based
> on.
> >
> > If there's enough interest, I'll make a real .el file out of this.
> >
> > The general idea is that you start a task in which all the work will
> take
> > place in a shell.  This usually is not a leaf-task for me, but usually
> the
> > parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
> > will prompt for the name of a session.  Give it a name, and it will
> insert a
> > link.  Open the link at any time to go the screen session containing
> your
> > work!
> >
> > It works pretty well for me.  The only problem is that I often run emacs
> in
> > a screen session itself, and I can never get scrolling to work right in
> > screen-in-screen.
> >
> > (defun ash-org-screen-buffer-name (name)
> >
> >   "Returns the buffer name corresponding to the screen name given."
> >
> >   (concat "*screen " name "*"))
> >
> >
> >
> > (defun ash-org-screen-helper (name arg)
> >
> >   ;; Pick the name of the new buffer.
> >
> >   (let ((term-ansi-buffer-name (generate-new-buffer-name
> > (ash-org-screen-buffer-name name
> > (setq term-ansi-buffer-name
> >
> >   (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen"
> nil
> >
> >arg name))
> >
> >
> >
> > (set-buffer term-ansi-buffer-name)
> >
> > (term-mode)
> >
> > (term-char-mode)
> >
> >
> >
> > (term-set-escape-char ?\C-x)
> >
> > term-ansi-buffer-name))
> >
> >
> >
> > (defun ash-org-screen (name)
> >
> >   "Start a screen session with name"
> >
> >   (interactive "MScreen name: ")
> >
> >
> >
> >   (save-excursion
> >
> > (ash-org-screen-helper name "-S"))
> >
> >   (insert-string (concat "[[screen:" name "]]")))
> >
> > And don't forget to add ("screen" . "elisp:(ash-org-goto-screen
> \"%s\")") to
> > org-link-abbrev-alist.
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Sync appointments to Google Calendar

2008-03-09 Thread Andrew Hyatt
Another solution is just create the entries in calendar with emacspeak
google calendar integration turned on.

http://bc.tech.coop/blog/070306.html

On Sun, Mar 9, 2008 at 9:54 AM, Carsten Dominik <[EMAIL PROTECTED]>
wrote:

>
> On Mar 7, 2008, at 11:14 PM, Kyle Sexton wrote:
>
> All,
>
> I was wondering if it would be possible to only push certain event types
> to an ical export.  I would like to export the event type of APPT only.
> I love the idea of syncing to ical, but hate having every item listed
> in my calendar.
>
> My end goal is to have an entry like:
>
> * APPT Dentist 10:00-11:00
>
> And then sync that to Google Calendar which can then SMS me prior to the
> event occurring.
>
>
> This has not been possible so far, but it is now.
>
> If you get the latest version from the git repository, you can do this
> like this:
>
> 1. Create an agenda view that contains only the entries you want to have.
>Assuming you have APPT as a TODO keyword, here is one way:
>
>C-c a T APPT
>
>
> 2. "Write" this view to an ics file.
>
>C-x C-w /path/to/calendars/org-appointments.ics
>
> This will write an ics file with all timestamps, deadlines, and scheduling
> associated with the selected items.  If you have turned on
> `org-icalendar-include-todo', the selected items will also be listed
> as TODO items.
>
> You can alos automate the creation of such an export using the means
> described in
>
>
> http://orgmode.org/manual/Exporting-Agenda-Views.html#Exporting-Agenda-Views
>
> HTH
>
> - Carsten
>
>
>
> --
> Thanks,
> Kyle Sexton
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Fix for emacs 23 bug on inserting diary entries

2008-07-24 Thread Andrew Hyatt
I remember seeing an emacs 23 git branch at some point, but I looked around
and cannot locate it anymore.  At any rate, this may be a dup, but in emacs
23 inserting diary entries in the agenda does not work.  Here's the patch to
fix it:

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 23cda50..56c7d62 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5120,7 +5120,7 @@ All the standard commands work: block, weekly etc."
   (unwind-protect
  (progn
(fset 'calendar-cursor-to-date
- (lambda (&optional error)
+ (lambda (&optional error dummy)
(calendar-gregorian-from-absolute
 (get-text-property point 'day
  (call-interactively cmd))
@@ -5307,5 +5307,3 @@ belonging to the \"Work\" category."
 ;; arch-tag: 77f7565d-7c4b-44af-a2df-9f6f7070cff1

 ;;; org-agenda.el ends here
-
-
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Patch to add schedule propagation to org-depend

2009-02-03 Thread Andrew Hyatt
I like to schedule items I'm supposed to be working on, so I like when
I complete a task that the next sibling task gets the schedule from
the previous one.  This implements that kind of workflow with the
org-depend contrib package.

I've also added a few methods to org.el to make working with schedules
& deadlines easier.


org-depend-scheduled.patch
Description: Binary data
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[O] [PATCH] org-capture-place-item better alignment for new lists.

2014-10-07 Thread Andrew Burgess
Creating an entry in org-capture-templates of type item adds entries
into a list, however, if the list is empty then the first list item
will be indented to depth 0 (so hard on the left) like this:

* Top Level
** Second Level
- item #1
- item #2
- item #3

I prefer to indent content, including lists, to a level matching the
parent, so something like this:

* Top Level
** Second Level
   - item #1
   - item #2
   - item #3

The patch below changes org-capture-place-item so that, when starting
a new list, the items are indented as in the second example above.

The existing behaviour is maintained when adding additional items to a
list, that is the indentation of new items will match the indentation
on items already in the list.

All feedback welcome,

Thanks,
Andrew


lisp/org-capture.el (org-capture-place-item): When starting a
new list use (1+ org-current-level) rather than just 0 for the
indentation. This ensures new lists are indented under their
parent element.
---
 lisp/org-capture.el | 19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 9e33d25..150ba1e 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1064,7 +1064,7 @@ may have been stored before."
   "Place the template as a new plain list item."
   (let* ((txt (org-capture-get :template))
 (target-entry-p (org-capture-get :target-entry-p))
-(ind 0)
+(ind (1+ (org-current-level)))
 beg end)
 (if (org-capture-get :exact-position)
(goto-char (org-capture-get :exact-position))
@@ -1078,18 +1078,13 @@ may have been stored before."
   (if (org-capture-get :prepend)
  (progn
(goto-char beg)
-   (if (org-list-search-forward (org-item-beginning-re) end t)
-   (progn
- (goto-char (match-beginning 0))
- (setq ind (org-get-indentation)))
- (goto-char end)
- (setq ind 0)))
+   (when (org-list-search-forward (org-item-beginning-re) end t)
+ (goto-char (match-beginning 0))
+ (setq ind (org-get-indentation
(goto-char end)
-   (if (org-list-search-backward (org-item-beginning-re) beg t)
-   (progn
- (setq ind (org-get-indentation))
- (org-end-of-item))
- (setq ind 0
+   (when (org-list-search-backward (org-item-beginning-re) beg t)
+ (setq ind (org-get-indentation))
+ (org-end-of-item
 ;; Remove common indentation
 (setq txt (org-remove-indentation txt))
 ;; Make sure this is indeed an item
-- 
1.9.3




  1   2   >