[O] org-export-select-tags behaviour

2014-10-09 Thread Seb Frank
Hi,

Quoting the manual (12.1 Selective Export):

"1. Org first checks if any of the *select* tags is present in the buffer...
 2. If none of the select tags is found, the whole buffer will be selected
for export."

Is it possible to change this behaviour (i.e., to select nothing for export
if none of the /select/ tags are present), at least as an option? I'm using
org-caldav to synchronise selected entries in my org files with an external
calendar, and at some times in an org file there might happen to be no
headline present that I want exported -- in that case, I'd prefer not to
have /every/ headline exported, but none.

I've been trying to find where the selection/exclusion is done (in ox.el?),
but my limited lisp skills didn't get me far enough. Any pointers?

Many thanks,
  Seb


Re: [O] *text* in headlines and export to latex

2014-05-15 Thread Seb Frank
Is this customizable at all? I've seen some old threads where people
used @ for alert (and a hack to replace it with something else if the
\alert command didn't exist, see
http://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00614.html
and http://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00754.html
), but the solutions mentioned there don't seem to work with the
current version of org.

On 5/15/14, Sebastien Vauban  wrote:
> Seb Frank wrote:
>> On Wed, May 14, 2014 at 7:19 PM, Eric S Fraga  wrote:
>>> On Wednesday, 14 May 2014 at 18:00, Seb Frank wrote:
>>>> Latex export converts *text* to \textbf -- this doesn't work well
>>>> for headlines that get turned into section titles as these appear to
>>>> be bold by default. Is there a way to change this to \emph in
>>>> headlines that get converted to (sub)sections?
>>>
>>> Silly question but: can you not simply use /text/ instead in the
>>> headlines?  Mind you, I think that bold + emph is not pretty... but
>>> that's a personal taste issue!
>>
>> Yes -- but that changes it to emph (instead of alert) in beamer export.
>
> As a side note, as both \alert and \textbf do exist in Beamer, I do
> think *text* should never be translated to \alert.
>
> That's because of that different translation between the two backends
> that you see that problem only in one backend.
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>



Re: [O] beamer columns and printout

2014-05-15 Thread Seb Frank
I've solved the first problem, using a something similar to what has been
suggested here:
http://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents

The solution is to define
#+begin_src emacs-lisp
(defun sf-ignore-headline (contents backend info)
  "Ignore headlines with tags `ignoreheading" or `columns'."
  (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
 (string-match "\\`.*\\(ignoreheading\\|columns\\).*\n"
   (downcase contents)))
(replace-match "" nil nil contents)))

(add-to-list 'org-export-filter-headline-functions 'sf-ignore-headline)
#+end_src emacs-lisp

This removes headlines with tags "columns" (or "ignoreheading", for that
matter), which is what I wanted. Any ideas for the second problem? I.e.,
how to get rid of the BMCOL in export to latex/html/etc. while keeping the
headlines/content?

On Wed, May 14, 2014 at 5:51 PM, Seb Frank  wrote:

> Hi,
>
> I'm interested in using org-mode to generate beamer slides and an
> article-like printout (using the article class, usepackage{beamerarticle}
> and latex export) from the same source, and I am running into two problems
> with the export to article when there are multiple columns.
>
> 1.) I often use an empty headline with B_columns tag to allow me to
> specify top alignment. E.g.,
>
> #+begin_src org
> * :B_columns:
> :PROPERTIES:
> :BEAMER_env: columns
> :BEAMER_opt: T
> :END:
> ** Column 1 :BMCOL:
> :PROPERTIES:
> :BEAMER_col: 0.35
> :END:
> ** Column 2:BMCOL:
> :PROPERTIES:
> :BEAMER_COL: 0.6
> :END:
> #+end_src org
>
> In the printout, this yields an ugly empty section with a number if num:t.
> Is there a better way to pass [T] to the title-less columns environment, or
> (less preferably) a way to specify a title for the section without it
> appearing on the beamer slide?
>
> 2.) In the above example, the B_columns and BMCOL tags get exported to the
> latex file for the printout (with an error because the underscore is used
> outside of math mode). Can these be suppressed?
>
> Thanks,
>   Seb
>


Re: [O] *text* in headlines and export to latex

2014-05-14 Thread Seb Frank
Yes -- but that changes it to emph (instead of alert) in beamer export.


On Wed, May 14, 2014 at 7:19 PM, Eric S Fraga  wrote:

> On Wednesday, 14 May 2014 at 18:00, Seb Frank wrote:
> > Hi,
> >
> > Latex export converts *text* to \textbf -- this doesn't work well for
> > headlines that get turned into section titles as these appear to be bold
> by
> > default. Is there a way to change this to \emph in headlines that get
> > converted to (sub)sections?
>
> Silly question but: can you not simply use /text/ instead in the
> headlines?  Mind you, I think that bold + emph is not pretty... but
> that's a personal taste issue!
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org
> release_8.2.6-958-g7c8559-git
>


[O] *text* in headlines and export to latex

2014-05-14 Thread Seb Frank
Hi,

Latex export converts *text* to \textbf -- this doesn't work well for
headlines that get turned into section titles as these appear to be bold by
default. Is there a way to change this to \emph in headlines that get
converted to (sub)sections?

Thanks,
  Seb


[O] beamer columns and printout

2014-05-14 Thread Seb Frank
Hi,

I'm interested in using org-mode to generate beamer slides and an
article-like printout (using the article class, usepackage{beamerarticle}
and latex export) from the same source, and I am running into two problems
with the export to article when there are multiple columns.

1.) I often use an empty headline with B_columns tag to allow me to specify
top alignment. E.g.,

#+begin_src org
* :B_columns:
:PROPERTIES:
:BEAMER_env: columns
:BEAMER_opt: T
:END:
** Column 1 :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.35
:END:
** Column 2:BMCOL:
:PROPERTIES:
:BEAMER_COL: 0.6
:END:
#+end_src org

In the printout, this yields an ugly empty section with a number if num:t.
Is there a better way to pass [T] to the title-less columns environment, or
(less preferably) a way to specify a title for the section without it
appearing on the beamer slide?

2.) In the above example, the B_columns and BMCOL tags get exported to the
latex file for the printout (with an error because the underscore is used
outside of math mode). Can these be suppressed?

Thanks,
  Seb


[O] org-caldav: problems connecting to owndrive

2014-05-07 Thread Seb Frank
Hi there,

I've been trying to setup org-caldav to sync to my owndrive calendar.

Setup is

#+begin_src emacs-lisp
(setq org-caldav-url "
https://my.owndrive.com/remote.php/caldav/calendars/myusername";)
(setq org-caldav-calendar-id "myid")
(setq org-caldav-inbox "~/org/test.org")
#+end_src

When I try org-caldav-sync, it fails with:

Contacting host: my.owndrive.com:443
gnutls.c: [0] (Emacs) fatal error: Public key signature verification has
failed.
gnutls.el: (err=[-89] Public key signature verification has failed.) boot:
(:priority NORMAL :hostname my.owndrive.com :loglevel 0 :min-prime-bits 256
:trustfiles nil :crlfiles nil :keylist nil :verify-flags nil :verify-error
nil :callbacks nil)
edebug-signal: GnuTLS error: #, -89

Testing this with gnutls on the command line confirms the problem:
% gnutls-cli -V -p 443 my.owndrive.com
...
- Status: The certificate is NOT trusted. The signature in the certificate
is invalid.
*** Verifying server certificate failed...
*** Fatal error: Error in the certificate.
*** Handshake has failed
GnuTLS error: Error in the certificate.

Does anyone know if there is a way to tell org-caldav or url-dav to use an
untrusted certificate?

Thanks,
  Seb


Re: [O] org-ref code

2014-05-01 Thread Seb Frank
Hi Eric,

Now that you have mentioned it, do you have a good web resource / manual
for your set up, or would you mind sharing bits of it? It looks eminently
useful. I have a set up largely following this

http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

but I wouldn't know how to get some of the things you mention (type of
citation entry, biblatex vs latex etc.) to work.

Thanks,
  Seb

On Thu, May 1, 2014 at 6:01 AM, Eric S Fraga  wrote:

> John,
>
> I've been playing with the package although, so far, only for
> citations.  A few points:
>
> 1. Do you have any support for choosing the type of citation entry
>  (i.e. \cite versus \autocite versus ...) when inserting a
>  citation in the text?
>
> 2. You define org-link-types.  Unfortunately, this overwrites my own
>  definitions, especially for "cite".  I wonder whether this type
>  of customisation belongs in org-ref itself.  This is similar to
>  my earlier comment about key bindings, I guess.
>
> 3. I sometimes use biblatex instead of bibtex.  As a result, I do not
>  use \bibliography and use \addbibresource instead.  I have
>  defined my bibliography files in org-ref-default-bibliography but
>  this is only picked up on initialisation.  It is difficult to
>  update this for a document in progress (I had to locally set
>  reftex-default-bibliography manually).
>
> 4. The customisation interface for org-ref-default-bibliography should be
>  list aware...
>
> Otherwise, seems to working just fine.
>
> Thanks,
> eric
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11
>
>


Re: [O] customizing org-beamer--format-frame

2014-04-27 Thread Seb Frank
Yes, that's right. H:2


On Sun, Apr 27, 2014 at 12:42 PM, Eric S Fraga  wrote:

> On Sunday, 27 Apr 2014 at 10:14, Seb Frank wrote:
> > Thanks so much! I was trying to get a bit more flexibility with that
> > separate slide (e.g., have the title in the centre of the page and no
> toc).
> > So I took inspiration from your great solution and defined a latex macro
>
> Interesting solution!  Thanks for this.  I can see its uses.  For
> completeness, I assume you are using the H:2 option?
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org
> release_8.2.5h-1027-g4c0a29
>


Re: [O] customizing org-beamer--format-frame

2014-04-27 Thread Seb Frank
Thanks so much! I was trying to get a bit more flexibility with that
separate slide (e.g., have the title in the centre of the page and no toc).
So I took inspiration from your great solution and defined a latex macro

#+begin_src latex
\newcommand{\singleslide}[1]{{%
\usebeamerfont{title}
\begin{frame}[plain,c]
  \begin{center}
\begin{minipage}[h]{.75\textwidth}
  \centering
  \textcolor{title}{\Large#1}
  \end{minipage}
  \end{center}
\end{frame}
}}
#+end_src

and a latex class

#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
  '("my-org-beamer"
"\\documentclass{beamer}

("\\singleside{%s}" . "\\singleslide{%s}")
#+end_src

which did the job.

Best,
  Seb

On Sat, Apr 26, 2014 at 9:05 AM, Eric S Fraga  wrote:

> On Friday, 25 Apr 2014 at 08:24, Seb Frank wrote:
> > Hi there,
> >
> > I have customized org-beamer--format-frame to change the way headlines
> are
> > treated (as I want a separate slide with only the headline in the center
> > and plain frames not showing headlines after that). The way I currently
> do
> > this is by redefining the function itself (using "defun
> > org-beamer--format-frame"). This works, but is there any way to make this
> > more modular, i.e. tell org-mode somewhere to use a different function
> > (e.g., my-org-beamer--format-frame) to format a frame, so that it's easy
> to
> > switch back and forth between different ones, as well as to revert to the
> > default?
> >
> > Thanks,
> >   Seb
>
> As you haven't explained why you want this, it's difficult to understand
> the actual use case.  So, guessing at your intent, I wonder whether you
> have thought about making use of section headings as well as frame
> headings to accomplish what you want?
>
> Assuming you are using org v8.x and not something older, if you set
> option H:2, second level headings define frames and top level headings
> define sections.  You can then have section headings appear as a
> separate slide using code such as this:
>
> #+begin_src org
>   ,#+latex_header:
> \AtBeginSection[]{\begin{frame}\frametitle{Topic}\tableofcontents[currentsection]\end{frame}}
> #+end_src
>
> In this case, any time a section heading is encountered (i.e. top level
> org heading), you'll get a slide with a table of contents with that
> heading emphasised.  You can obviously do something different which more
> closely matches what you want.
>
> If you don't want individual frames to have headings, simply don't put
> any text in the headline for that frame.
>
> This way, you do not need to manipulate how beamer displays frames.  An
> example set of slides with two sections and two out of four slides
> having no headline would look like this:
>
> #+begin_src org
>   ,#+options: H:2
>   ,#+latex_header:
> \AtBeginSection[]{\begin{frame}\frametitle{Topic}\tableofcontents[currentsection]\end{frame}}
>   ,* Introduction
>   ,** First slide
>   some text on the first slide
>   ,**
>   some text on the second slide which has no heading
>   ,* Results
>   ,**
>   some third slide text, also on a slide with no heading
>   ,** conclusions
>   This was a great talk.
> #+end_src
>
> HTH,
> eric
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org
> release_8.2.5h-1027-g4c0a29
>


[O] customizing org-beamer--format-frame

2014-04-26 Thread Seb Frank
Hi there,

I have customized org-beamer--format-frame to change the way headlines are
treated (as I want a separate slide with only the headline in the center
and plain frames not showing headlines after that). The way I currently do
this is by redefining the function itself (using "defun
org-beamer--format-frame"). This works, but is there any way to make this
more modular, i.e. tell org-mode somewhere to use a different function
(e.g., my-org-beamer--format-frame) to format a frame, so that it's easy to
switch back and forth between different ones, as well as to revert to the
default?

Thanks,
  Seb


[O] taskjuggler - using gaplength or gapduration

2014-02-12 Thread frank
One issue that I am having is regarding gaplength and gapduration for 
tasks.  Under the TJ3 syntax, the command would be

" depends !!PHII {gapduration 7w} ".

I added gaplength and gapduration under ' Org Taskjuggler Valid Task 
Attributes ' and added the following in my org-mode file:


*** PSF
:PROPERTIES:
:Task_id: PSF
:depends: PHII
:gaplength: 7w
:duration: 10d
:END:

The resulting export comes out:
depends !!PHII
duration 10d
gaplength 7w

which is incorrect.  What am I doing wrong.

Frank



[O] [PATCH] org-contacts: Implement a way to ignore certain new addresses

2013-08-22 Thread Frank Terbeck
With some bugtrackers (like the one github uses or with roundup for
example) or when you use gwene to follow certain site's RSS feeds,
you may run into situations, where `org-contacts-check-mail-address'
will ask if it should add a non-sensical email-address.

With this change, you can fine-tune in which situations org-contacts
is going ask you about whether or not you want to add a given new
address to an existing contact.

Valid values are functions that accept one argument and strings, that
will be used at regular expressions via `string-match'.

A minimal example is this:

  (add-to-list 'org-contacts-new-address-ignore
   "notifications@github\\.com")

The following is equivalent:

  (add-to-list 'org-contacts-new-address-ignore
   #'(lambda (x)
   (string-match "notifications@github\\.com" x)))

Signed-off-by: Frank Terbeck 
---

  Please keep me CC:ed, as I am not subscribed.

 contrib/lisp/org-contacts.el | 45 +++-
 1 file changed, 40 insertions(+), 5 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 97171d0..dd90a92 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -155,6 +155,25 @@ The following replacements are available:
   :type 'string
   :group 'org-contacts)
 
+(defcustom org-contacts-new-address-ignore
+  nil
+  "List of checks to run to determine whether or not to add a new
+email address to an existing contact.
+
+If an entry is a string, it is assumed to be a regular expression
+to match against the new address. If it is a symbol, it is
+assumed to be a function, that takes one argument, which is going
+to be set to the new address.
+
+If the regular expression matches or the function returns a
+non-nil value, the new address is not considered to be added to
+the existing account.
+
+Finally, here is an example:
+
+  (add-to-list 'org-contacts-new-address-ignore
+   \"notifications@github.com\")")
+
 (defcustom org-contacts-matcher
   (mapconcat 'identity (list org-contacts-email-property
 org-contacts-alias-property
@@ -728,13 +747,29 @@ This function should be called from 
`gnus-article-prepare-hook'."
   (concat (org-contacts-format-name name) " <" email ">")
 email))
 
+(defun org-contacts-new-address-ignored (mail)
+  "Check whether a mail address is marked to be ignored via the
+`org-contacts-new-address-ignore' list."
+  (catch 'ignored-mail
+(dolist (matcher org-contacts-new-address-ignore)
+  (cond ((stringp matcher)
+ (and (string-match matcher mail)
+  (throw 'ignored-mail t)))
+((functionp matcher)
+ (and (funcall matcher mail)
+  (throw 'ignored-mail t)))
+;; Ignore all other entries.
+(t t)))
+(throw 'ignored-mail nil)))
+
 (defun org-contacts-check-mail-address (mail)
   "Add MAIL address to contact at point if it does not have it."
-  (let ((mails (org-entry-get (point) org-contacts-email-property)))
-(unless (member mail (split-string mails))
-  (when (yes-or-no-p
- (format "Do you want to add this address to %s?" (org-get-heading 
t)))
-(org-set-property org-contacts-email-property (concat mails " " 
mail))
+  (unless (org-contacts-new-address-ignored mail)
+(let ((mails (org-entry-get (point) org-contacts-email-property)))
+  (unless (member mail (split-string mails))
+(when (yes-or-no-p
+   (format "Do you want to add this address to %s?" 
(org-get-heading t)))
+  (org-set-property org-contacts-email-property (concat mails " " 
mail)))
 
 (defun org-contacts-gnus-check-mail-address ()
   "Check that contact has the current address recorded.
-- 
1.8.3




Re: [O] [PATCH] Make `org-contacts-message-complete-function' work with byte compilation

2013-03-11 Thread Frank Terbeck
Daimrod wrote:
> Achim Gratz  writes:
>> Daimrod writes:
>>> @All: Can I use (require 'cl) and ignore the warning or is there better
>>> solution?
>>
>> You could if this would never go into mainline, where it is not allowed
>> due to the namespace pollution that cl causes.  You could use cl-lib
>> instead, but then this would be an Emacs-24 only solution.  In general,
>> the stanza ((eval-when-compile (require 'cl)) only works as intended
>> when you are only using cl macros, but you seem to use defuns.  You
>> could check how hard it is to replace these with plain elisp, aside from
>> syntactical inconveniences this is usually not a big problem.
>
> I've done this, thanks for the advice.


I've just given the latest git HEAD version a spin and it seems to work
as expected. Thanks for taking an interesting and fixing this so
promptly. ;)


Regards, Frank



[O] [PATCH] Make `org-contacts-message-complete-function' work with byte compilation

2013-03-09 Thread Frank Terbeck
Without this patch (when I am _byte-compiling_ org-contacts.el), I am
getting error messages like this (when attempting address completion via
`completion-at-point' and `org-contacts-message-complete-function'):

Symbol's function definition is void: remove-duplicates
Symbol's function definition is void: some

With this patch, it seems to be working as expected.
---

Disclaimer: I'm no Elisp expert. Maybe this should be solved
differently.

 contrib/lisp/org-contacts.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index ab44a7b..ac5ff6d 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -36,10 +36,8 @@
 ;;
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl))
-
 (eval-and-compile
+  (require 'cl)
   (require 'org))
 (require 'gnus-util)
 (require 'gnus-art)
-- 
1.8.2.rc1




Re: [O] org-capture with org-contacts template causing problems

2013-03-04 Thread Frank Terbeck
Frank Terbeck wrote:
> Frank Terbeck wrote:
> [...]
>> When using `org-capture' (and then selecting "c" in the menu window), I
>> get the following error message in the "CAPTURE-contacts.org" buffer:
>>
>> * %![Error: (invalid-function gnus-with-article-headers)]
>> :PROPERTIES:
>> :EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
>> :END:
> [...]
>
> Turns out, this problem is triggered when I byte-compile org-contacts.el
> inside my .emacs.d directory. The compilation process yields the
> following warnings:
>
> Compiling /home/hawk/.emacs.d/vendor/org-contacts.el...
[...]
> vendor/org-contacts.el:870:1:Warning: the following functions are not known to
> be defined: org-reverse-string, mail-abbrev-in-expansion-header-p,
> gnus-with-article-headers, diary-ordinal-suffix, gnus-with-article-buffer,
> elmo-message-field, std11-narrow-to-header, std11-fetch-field,
> erc-get-channel-user-list, org-install-letbind, google-maps-static-show
> Wrote /home/hawk/.emacs.d/vendor/org-contacts.elc
>
>
> `org-capture' with the `org-contacts' template works fine if I move the
> corresponding .elc file out of the way.
>
> My guess is, that there are a few `requires' missing in the
> `eval-and-compile' form on top of `org-contacts.el'. Maybe someone with
> more intimate knowledge of the involved code than myself has an idea as
> to how to fix this?

Here's a diff, that removes some of the warnings and in turn makes my
use-case work again, even with a byte-compiled `org-contacts.el':


diff --git a/vendor/org-contacts.el b/vendor/org-contacts.el
index 4ffe360..f6234b6 100644
--- a/vendor/org-contacts.el
+++ b/vendor/org-contacts.el
@@ -42,6 +42,8 @@
 (eval-and-compile
   (require 'org))
 (require 'gnus-util)
+(require 'gnus-art)
+(require 'mail-utils)
 (require 'org-agenda)
 (require 'org-capture)
 
I guess, similar additions could fix the other warnings as well.

Regards, Frank



Re: [O] org-capture with org-contacts template causing problems

2013-03-04 Thread Frank Terbeck
Frank Terbeck wrote:
[...]
> When using `org-capture' (and then selecting "c" in the menu window), I
> get the following error message in the "CAPTURE-contacts.org" buffer:
>
> * %![Error: (invalid-function gnus-with-article-headers)]
> :PROPERTIES:
> :EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
> :END:
[...]

Turns out, this problem is triggered when I byte-compile org-contacts.el
inside my .emacs.d directory. The compilation process yields the
following warnings:

Compiling /home/hawk/.emacs.d/vendor/org-contacts.el...

In org-contacts-db-need-update-p:
vendor/org-contacts.el:169:14:Warning: function `some' from cl package called
at runtime

In org-contacts-filter:
vendor/org-contacts.el:211:37:Warning: function `some' from cl package called
at runtime

In org-contacts-test-completion-prefix:
vendor/org-contacts.el:373:12:Warning: function `find-if' from cl package
called at runtime

In org-contacts-complete-name:
vendor/org-contacts.el:445:71:Warning: function `remove-duplicates' from cl
package called at runtime

In org-contacts-gnus-insinuate:
vendor/org-contacts.el:646:15:Warning: reference to free variable
`gnus-summary-mode-map'

In end of data:
vendor/org-contacts.el:870:1:Warning: the following functions might not be
defined at runtime: some, find-if, remove-duplicates
vendor/org-contacts.el:870:1:Warning: the following functions are not known to
be defined: org-reverse-string, mail-abbrev-in-expansion-header-p,
gnus-with-article-headers, diary-ordinal-suffix, gnus-with-article-buffer,
elmo-message-field, std11-narrow-to-header, std11-fetch-field,
erc-get-channel-user-list, org-install-letbind, google-maps-static-show
Wrote /home/hawk/.emacs.d/vendor/org-contacts.elc


`org-capture' with the `org-contacts' template works fine if I move the
corresponding .elc file out of the way.

My guess is, that there are a few `requires' missing in the
`eval-and-compile' form on top of `org-contacts.el'. Maybe someone with
more intimate knowledge of the involved code than myself has an idea as
to how to fix this?


Regards, Frank



[O] org-capture with org-contacts template causing problems

2013-03-03 Thread Frank Terbeck
Good day!

So, I tried giving org-contacts another go.

For capturing new contacts, I have this template configured (based on
the example on org-contacts.el):

#+begin_src elisp
(add-to-list 'org-capture-templates
  '("c" "Contacts" entry (file "~/org/contacts.org")
  "
** %(org-contacts-template-name)
:PROPERTIES:
:EMAIL: %(org-contacts-template-email)
:END:"))
#+end_src

When using `org-capture' (and then selecting "c" in the menu window), I
get the following error message in the "CAPTURE-contacts.org" buffer:

* %![Error: (invalid-function gnus-with-article-headers)]
:PROPERTIES:
:EMAIL: %![Error: (invalid-function gnus-with-article-headers)]
:END:

The following however works from the `*scratch*' buffer:

#+begin_src elisp
(gnus-with-article-headers
  (mail-fetch-field "From"))
#+end_src

This is with an emacs snapshot, M-x version:
GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of
2013-03-01 on jim, modified by Debian

M-x org-version:
Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @ /usr/share/emacs/24.3.50/lisp/org/)

This is with `org-contacts.el' from org-mode's git HEAD.

I'm unsure about how to debug this. Any pointers welcome.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
  -- RFC 1925



[O] Org-Mode Reference Card "bug"

2013-02-27 Thread Frank Mueller
Just a remark to the Org-Mode Reference Card (http://orgmode.org/orgcard.pdf).
There is a little bug in the spreadsheet description.
wrong:sum from 2nd to 3rd hline |:=vsum(@II..@III)|
correct:sum from 2nd to 3rd hline |:=vsum(@II..III)|
The second at symbol must be deleted for correct working.
Regards,-frank
 



[O] Bug: Additional empty line in TeXinfo export of #+BEGIN_SRC ... #+END_SRC [7.9.3e (7.9.3e-957-g03e433 @ /home/fifr/.emacs.d/el-get/org-mode/lisp/)]

2013-02-10 Thread Frank Fischer
Consider the following minimal org-file:

===
One line before
#+BEGIN_SRC shell
Some example
#+END_SRC
One line after
===

When exporting to texi, the file contains an additional empty line
before the "@end example":

===
...
One line before
@example
Some example

@end example
One line after
...
===

While this makes no difference for the resulting "info" file when
converting this file by "makeinfo test.texi", it does make a difference
when converting to pdf by "texi2pdf test.texi": there's an extra empty
line between the example and the following text. Therefore I think the
exported file should not contain that empty line.


Emacs  : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-11-09 on lakoocha, modified by Debian
Package: Org-mode version 7.9.3e (7.9.3e-957-g03e433 @
~/.emacs.d/el-get/org-mode/lisp/)



[O] Taskjuggler 3

2013-02-06 Thread Frank
Any information on an exporter for taskjuggler version 3?

-- 
Frank Breen, PG
Hydrogeologist
Breen GeoScience Management, Inc.
PMB 354, 4234 I-75 Business Spur
Sault Ste. Marie, MI. 49783

ph:   (906) 248-5682
cell: (906) 322-2605
fax:  (800) 471-4855

f...@breengeosci.com

--
This message and any attachments may contain confidential information protected 
by the attorney-client or other privilege.
If you believe that it has been sent to you in error, please reply to the 
sender that you received the message in
error.  Then delete it.  Thank you.
--




Re: [O] Organizing a collection of papers

2012-06-28 Thread Frank
Victor Miller  gmail.com> writes:

> 
> I've just started using org-mode, and so far find it quite
> useful. I have a very large collection of technical papers in a
> directory tree, and I'd like to go through them and index them
> through org-mode. What I'd like is to have a way of going through
> them and look at the unannotated ones, and annotate them one by
> one. I imagine doing this by first making up a file of links like
> [[xxx.pdf][not done yet]], and then being presented with the not
> done ones, glancing at them and deciding how what annotations to
> put in. In addition I'd like to add tags. What I'd really like is
> to be able to make up new tags on the fly. Has anyone done
> anything like this in org-mode?

I've used org-mode about a year and a half, and I don't think it's the best
application for what you describe.  There are several packages available to do
this; the one I've used most often and successfully is Zotero (zotero.org). 
This is a browswer plug-in which implements a very nice database for your
papers.  At this point, I've indexed 1092 papers (PDFs, web pages and other
materials).  In some cases, I have multiple files attached to each of them.

Zotero helps me manage the PDFs I have already, and makes it non unusual for me
to add a few dozen to my collection, all nicely cross-referenced and ready for
citations using Word or Latex.  Once you realize how easy it is to get from a
google scholar result to another PDF in your database, and the database entry is
completely ready to support insertion as a citation, as a footnote or
end-note,... this gets very addictive.  I can't imagine any org-mode package
accelerating the process of finding, displaying, indexing and citing sources as
much as Zotero does for me.




[O] i want to subscribe

2012-04-19 Thread frank
hello, respectable orgmode team ,
thank you 



Re: [O] entering inactive timestamp "7.2.12" results in [2012-03-16 Fr]

2012-03-16 Thread Frank Haun
Rainer Stengele  writes:

> Entering "7.2.12" as an incative timestamp (C-c !)
>
> I get [2012-03-16 Fr].
>
> Entering "7.2.2012" results in [2012-02-07 Di].
>
> I have german settings in my emacs.
> Is there a chance to get wanted behaviour?
>
> "dd.mm.yy" seems to be a standard calendar date format.

I think its not possible, from org.el:

#v+
  (defconst org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>")
"Formats for `format-time-string' which are used for time stamps.
It is not recommended to change this constant.")
#v-


One solution is to customize `org-time-stamp-custom-formats'.

Use `#+STARTUP: customtime' in your file or/and set
`org-display-custom-times' to `t'. Hm, and you should read this
<http://orgmode.org/manual/Custom-time-format.html>.

Frank
-- 
http://fhaun.blogspot.com/




[O] Symbol's function definition is void: fill-forward-paragraph

2011-03-10 Thread Frank Jäkel
Hi all,

* A
I'm trying to fill this
paragraph by pressing
M-q now

I get the following error:

Debugger entered--Lisp error: (void-function fill-forward-paragraph)
  (fill-forward-paragraph -1)
  (save-excursion (fill-forward-paragraph -1) (setq itemp
(org-in-item-p)))
  (cond ((and ... ...) t) (table\.el-p t) (table-p (org-table-align) t)
(itemp (let* ... ... ... t)) ((save-excursion ... ...) (let ... ...)) (t
nil))
  (let ((table-p ...) (table\.el-p ...) (itemp ...)) (cond (... t)
(table\.el-p t) (table-p ... t) (itemp ...) (... ...) (t nil)))
  org-fill-paragraph(nil)
  fill-paragraph(nil)
  call-interactively(fill-paragraph)

Strangely, if I now go back to the buffer and try M-q this time it will
fill the paragraph as intended.

A solution that worked for me was to replace all calls to
fill-forward-paragraph with fill-paragraph.

Cheers,
Frank

Emacs  : GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll
bars)
 of 2010-03-31 on crested, modified by Ubuntu
Package: Org-mode version 7.5






[Orgmode] Re: with-parsed-tramp-file-name

2010-09-30 Thread Austin F. Frank
l as if I explicitly (require 'ob).  This
feels to me like it isn't even getting to the point where the TRAMP
errors could arise.

>> If I manually load ob.el by M-x load-file with Location as
>> /path/to/ob.el then C-c C-c works. But (require 'ob) is not
>> working. Am I missing something?

With the above minimal config file edited locally with a remote
execution directory, I get the same as Noruul.  The above error
disappears if I (load-file "~/src.remote/org-mode/lisp/ob.el").  I also
no longer get the TRAMP error I originally reported.

> Noruul, what does (featurep 'ob) evaluate to before you manually attempt
> the (require 'ob) ? And what goes wrong when you do the require?

(featurep 'ob) reports `t' for me, before a (require 'ob).
(fboundp #'org-babel-temp-file) and
(fboundp #'with-parsed-tramp-file-name) both return nil.  After I
explicitly load, org-babel-tempfile is defined (but this does NOT work
with just (require 'ob), as reported by Noruul).  After I (require
'tramp), (fboundp #'with-parsed-tramp-file-name) is `t'.  After I
(require 'tramp-sh), (boundp 'tramp-remote-path) is `t'.

It looks to me like there are two issues affecting my original report.

The first is that with (require 'org-install) and even with (require
'ob), certain babel-related functions aren't being exported (don't know
if that's the right term).

The second is that I _need_ to be able to add 'tramp-own-remote-path to
'tramp-remote-path, which at least on my system requires doing (require
'tramp) and (require 'tramp-sh).  That is, presumably, a TRAMP bug.

Some interaction with explicitly requiring the tramp packages and then
trying to use org-babel's remote functions seems to be messing things
up.

> If (part of) this is an issue of tramp differences between emacs23 and
> 24 then the tramp author Michael Albinus has already been extremely
> helpful on several occasions with tramp issues and I am confident he
> will be able to advise.

Thanks for all of your help already.  I'm sure we'll chase this down.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpcWzSNbsi5G.pgp
Description: PGP signature
___
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] [babel] with-parsed-tramp-file-name

2010-09-29 Thread Austin F. Frank
Hello!

Recently I discovered that I can no longer evaluate R source code blocks
on a file opened using TRAMP.  I've recreated the bug using a minimal
config.  The process to reproduce this bug is described below.


Using Org-mode version 7.01trans (release_7.01h.746.g72c5) with the
following minimal configuration:

--8<---cut here---start->8---
;; specific to my setup
(add-to-list 'load-path (expand-file-name "~/src.remote/org-mode/lisp/"))
(add-to-list 'load-path (expand-file-name "/usr/local/share/emacs/site-lisp/"))

;; general instructions
(require 'tramp)
(require 'tramp-sh) ; have to do this to set tramp-remote-path?
(require 'ess-site)
(require 'org-install)

(setq debug-on-error t)

;; active Babel languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))

;; required for R to work correctly on my remote server
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
--8<---cut here---end--->8---

I evaluate the following code block from a file accessed using TRAMP:

--8<---cut here---start->8---
#+source:  R-options
#+BEGIN_SRC R :cache no :results silent :exports none
options(digits = 4)
theme_set(theme_bw(18))
theme_thesis <- theme_update(panel.margin = unit(1.5, "lines"))
theme_set(theme_thesis)
lattice.options(default.args = list(as.table = TRUE))
dev.new()
#+END_SRC
--8<---cut here---end--->8---

And get the following backtrace:

#v+
Debugger entered--Lisp error: (invalid-function with-parsed-tramp-file-name)
  with-parsed-tramp-file-name("/scpc:bcs:/tmp/R-22126Grk" nil nil)
  org-babel-local-file-name("/scpc:bcs:/tmp/R-22126Grk")
  org-babel-process-file-name("/scpc:bcs:/tmp/R-22126Grk" noquote)
  org-babel-R-evaluate-session("*R*" "options(digits = 
4)\ntheme_set(theme_bw(18))\ntheme_thesis <- theme_update(panel.margin = 
unit(1.5, \"lines\"))\ntheme_set(theme_thesis)\nlattice.options(default.args = 
list(as.table = TRUE))\ndev.new()" value nil nil)
  org-babel-R-evaluate("*R*" "options(digits = 
4)\ntheme_set(theme_bw(18))\ntheme_thesis <- theme_update(panel.margin = 
unit(1.5, \"lines\"))\ntheme_set(theme_thesis)\nlattice.options(default.args = 
list(as.table = TRUE))\ndev.new()" value nil nil)
  org-babel-execute:R("options(digits = 
4)\ntheme_set(theme_bw(18))\ntheme_thesis <- theme_update(panel.margin = 
unit(1.5, \"lines\"))\ntheme_set(theme_thesis)\nlattice.options(default.args = 
list(as.table = TRUE))\ndev.new()\n" ((:cache . "no") (:comments . "") 
(:exports . "none") (:height . "600") (:hlines . "no") (:noweb . "no") 
(:results . "silent") (:session) (:shebang . "") (:tangle . "no") (:width . 
"1000")))
  org-babel-execute-src-block(nil ("R" "options(digits = 
4)\ntheme_set(theme_bw(18))\ntheme_thesis <- theme_update(panel.margin = 
unit(1.5, \"lines\"))\ntheme_set(theme_thesis)\nlattice.options(default.args = 
list(as.table = TRUE))\ndev.new()\n" ((:cache . "no") (:comments . "") 
(:exports . "none") (:height . "600") (:hlines . "no") (:noweb . "no") 
(:results . "silent") (:session) (:shebang . "") (:tangle . "no") (:width . 
"1000")) "" "R-options" nil 0))
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  org-ctrl-c-ctrl-c(nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
#v-

But I can see that `with-parsed-tramp-file-name' is a defined function
by using C-h f, which reports:

#v+
with-parsed-tramp-file-name is a Lisp macro in `tramp.el'.

(with-parsed-tramp-file-name FILENAME VAR &rest BODY)
#v-

Can anyone help me understand why I can't evaluate R source blocks on a
remote machine?  Is there further debugging information I can provide?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp5w6Y9DTNg3.pgp
Description: PGP signature
___
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] [babel] Re: Removing the blank lines between code and results blocks in LaTeX export

2010-09-09 Thread Austin F. Frank
Professor Bates--

I used org, org-babel, and lme4 to write my PhD dissertation over the
past few months.  Thanks for your continued excellent work, and I'm glad
to see you here.  I look forward to reading the org source of your
beamer presentations!

Sorry that answers haven't been quicker to arrive-- the org-babel folks
are incredibly productive, but there's a lot on their plates.  One way
to get a quicker response to questions about org-babel is to prefix the
subject with a bracketed "babel" label, as I've done in this response.

On Mon, Sep 06 2010, Douglas Bates wrote:

> Recently Dan Davidson posted a patch to suppress the removal of blank
> lines in exported source code.  I have the opposite problem -
> suppression of blank lines added during LaTeX export
>
>  snip --- begin org file 
> * An R example with :exports both
> The following code
> #+begin_src R :exports both :results output
> 2 + 2
> #+end_src
> shows that there are blank lines added between the code and the
> results sections in \LaTeX export.  Is this configurable? In \LaTeX{}
> the blank lines cause a new paragraph which often I don't want.
> --- snip --- end org file ---
>
> Just copy those lines to an org file and export it to LaTeX to see
> what I mean.

I had similar problems while writing my dissertation, and arrived at
this workaround:

--8<---cut here---start->8---
#+BEGIN_SRC R :exports results :results output latex
library(lme4)
fit <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
latex(summary(fit)@coefs,
  file = "",
  dec = 3,
  center = "centering",
  caption = "Parameter estimates for reaction time data",
  label = "tab:reaction-mer")
#+END_SRC
--8<---cut here---end--->8---

Hopefully this will tide you over until Eric and Dan get a chance to
look at your example.  I recognize that it does not accomplish your goal
of typesetting your code according to your customizations, but it worked
for me for including results from mer models.  Please forgive the bad
practice of reaching directly into the summary object to print results
;)

> A related issue is the LaTeX environment for the results.  At present
> it is hard-wired in the function org-export-latex-fixed-width in
> org-latex.el to be the verbatim environment.  I would like to
> configure the appearance of the results using the LaTeX package
> fancyvrb and it would be much easier if I could customize the strings
> preceding and following the exported results.  The current strings are
> "\\begin{verbatim}\n" and "\\end{verbatim}\n\n" and, again, the two
> blank lines inserted after the results can be problematic.

I know Dan Davison has been working on using different verbatim
environments for latex export of source code blocks (not results),
having been dissatisfied with the defaults from listings.  I believe he
recently made the minted package available for LaTeX export-- this does
have some python language dependencies, so it still may not be your
answer.  For exporting source code (as opposed to tabular results), I
find the minted syntax highlighting to be very visually appealing.

Dan or Carsten, is it possible that org-export-latex-listings could be
reconfigured so that the package used for source code export in latex is
configurable?  Or does this functionality already exist and I've missed
it?

And, directly to Professor Bates' question, could a similar treatment be
given to the environment that controls export of verbatim regions?

Sorry not to provide a patch, I've got this pesky defense thing on
Monday.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp9swh0anAdb.pgp
Description: PGP signature
___
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] OT: smex.el (was Re: keys and command name info)

2010-08-10 Thread Austin Frank
On Mon, Aug 09 2010, Carsten Dominik wrote:

> I don't think anyone calls Org commands with M-x, and if a hacker
> needs to find a command name, `C-h b' and in particular `C-h k' are
> the perfect ways to get to the names.

I don't have a horse in this race, but I will note that I call Org
commands with M-x /all the time/.  There's just so much functionality
that even when keybindings exist I may not know them.  And of course I
don't use the menu because that would require reaching for the mouse ;)

For anyone else in this situation, I can't recommend strongly enough the
package smex.el (I get it from http://github.com/nonsequitur/smex/, but
it's also in the Emacs Lisp Package Archive).  It offers ido-like
completion for function names.  For me, this makes the entire emacs
environment, but Org especially, much more discoverable via the M-x
interface.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpDEjduY6R3F.pgp
Description: PGP signature
___
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] [babel] help debugging latex export

2010-08-06 Thread Austin Frank
Hi all!

I've got a very mysterious mystery bug that keeps biting me, and I don't
know how to hunt it down.  Even worse, I haven't been able to replicate
it in a small example file... it only happens in this one particular
document, but it happens consistently in that document.

I start with the following source block:

#v+
#+CAPTION:  Regression coefficients from standardized model of training trials
#+LABEL:  fig:reg-coef-train
#+ATTR_LATEX:  width=5in, height=3in
#+BEGIN_SRC R :exports results :file fig-reg-coef-train.png
names <- rownames(summary(fit.a.lm.z)$coef)
coefs <- summary(fit.a.lm.z)$coef[, 1]
sds <- summary(fit.a.lm.z)$coef[, 2]
CI <- sds * 1.96
a.coefs <- data.frame(label = names, estimate = coefs, sd = sds, lower = coefs 
- CI, upper = coefs + CI)
a.coefs.gg <-
ggplot(a.coefs,
   aes(x = label, y = estimate,
   ymin = lower, ymax = upper)) +
geom_pointrange() +
geom_hline(yintercept = 0) +
coord_flip()
a.coefs.gg
#+END_SRC

#+results[9d390c2ddaa0e5cc63614611542c9cfdf0f21d41]:
[[file:fig-reg-coef-train.png]]
#v-

When I run org-export-as-latex on the entire document, this block gets
incorrectly exported as:

#v+
[[file:fig-reg-coef-train.png][file:fig-reg-coef-train.png]]
#v-

Whereas if I select just that block and run org-export-region-as-latex,
it gets correctly exported as:

#v+
\begin{figure}[htb]
\centering
\includegraphics[width=5in, height=3in]{fig-reg-coef-train.png}
\caption{\label{fig:reg-coef-train}Regression coefficients from standardized 
model of training trials}
\end{figure}
#v-

This happens to some graphic-producing source blocks in the file and not
others.  I haven't been able to figure out what the common element is
that causes some to export correctly under all circumstances, and others
to have a link description added and be exported as plain text.

Does anyone have any advice on how to begin to identify where and why
this is happening?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpNcmMvEOGeZ.pgp
Description: PGP signature
___
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] Re: insert .org file into other .org file by link

2010-07-28 Thread Austin Frank
On Wed, Jul 28 2010, Rainer M Krug wrote:

> I have a .org file (lets call it basic.org), which creates me a report
> from a simulation (of a variable x, saved from R) - it works fine for
> export to html and pdf.
>
> Now I want to create a report (all.org), which should include the report
> from basic.org 10 times, but basic.report should be created from
> different simulations (X1, X2, X3, ..., X10).
>
> How can I acieve this, without having to copy - paste the .org file in
> 10 times? I would like to have a kind of dynamic lining, so that I can
>
> a) specify the name of the variable to be analysed
> b) the all.org is using basic.org to create the "all" report, so that
> when I change basic.org, the report based on all.org is also changed.

To start, you probably want to use the #+SETUPFILE and #+INCLUDE
directives [fn:1] [fn:2].  An untested Babel-based dynamic solution
might look something like

--8<---cut here---start->8---
#+BEGIN_SRC perl :results value org :var $n=10 $file=basic.org
# I've never actually used per with babel,
# so don't know how the :var headers work exactly
for (my $i = 0; $i < $n; $i++) {
  print "#+INCLUDE:  $file\n";
}
#+END_SRC
--8<---cut here---end--->8---

Hope that helps!  Let me know what you come up with.

/au

Footnotes:

[fn:1] [[info:org:Export%20options][Export options]]

[fn:2] [[info:org:Include%20files][Include files]]

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpVQUrBZdszB.pgp
Description: PGP signature
___
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] Re: include value of single table cell in text?

2010-07-28 Thread Austin Frank
On Tue, Jul 27 2010, Eric Schulte wrote:

> The following should work.  It uses an inline code block
>
> #+TBLNAME:  test-table
> | key | value |
> |-+---|
> | a   | 1 |
> | b   | 2 |
>
> Is there any way to refer to cell @2$2 within the text of an org-mode
> document, and have that reference converted to the value
> src_emacs-lisp[:var d=test-table[3,1]]{d} during export?

Eric--

This is great!  Thanks very much.  If you're accepting feature requests,
I'd still love to have a way to use org-table reference syntax to embed
cell values inline.  I don't know whether this is better thought of as a
core or babel feature, though.

Looking at the source of org-table-fix-formulas and
org-table-eval-formula in org-table.el, there may be some room for
refactoring the reference resolution procedure into a standalone
function.  I'm in the middle of wrapping up my thesis and moving, so I
definitely won't look at this any time soon.  If this itch still needs
scratching in September I may revisit it then.  If a talented soul
addresses it before then, even better!

Thanks again,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpCV6Nb186NW.pgp
Description: PGP signature
___
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] include value of single table cell in text?

2010-07-27 Thread Austin Frank
Hello!

Is it possible to include the value of a single cell from an org-mode
table in the body of an org-mode document? That is, given

#+TBLNAME:  test-table
| key | value |
|-+---|
| a   | 1 |
| b   | 2 |

Is there any way to refer to cell @2$2 within the text of an org-mode
document, and have that reference converted to the value "2" during
export?

I believe one approach would be to use babel's in-line source evaluation
capabilities along with the remote() function from the org spreadsheet
editor.  But I haven't yet been able to identify the right combination
of those functions to get the desired result.  This, for example,
doesn't work for me:

--8<---cut here---start->8---
#+TBLNAME:  test-table
| key | value |
|-+---|
| a   | 1 |
| b   | 2 |

I'm testing to see whether
src_emacs-lisp{(org-table-eval-formula "remote(test-table @2$2)")}
works.
--8<---cut here---end--->8---

It throws an error during export, because I'm not in a table data field.


Additionally, if there's not already a built-in way to do this, I'd
nominate this functionality for some special syntax.  Following babel's
inlining and remote reference conventions, maybe

  table{test-table @2$2}

or

  <>

This would make it very easy to refer to specific elements the tabular
output of babel blocks, adding to the utility of babel as a
meta-programming language for org-mode.


Thanks for any help!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpSmyTtIf88T.pgp
Description: PGP signature
___
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] Re: [babel] help debugging org-babel-execute-buffer

2010-07-26 Thread Austin Frank
On Tue, Jul 27 2010, Nick Dokos wrote:

> Have you tried C-c C-c on each source block in the buffer? If one (or
> more) fails, you know what to do.

I went back and named all of my source blocks so that I would get some
debugging information from the *Messages* buffer.  The error is thrown
when org-babel-execute-buffer has executed the last block in the file.
The error is not thrown when I evaluate any single block individually.

I'll try more of your suggestions later.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpr6LSDqdD43.pgp
Description: PGP signature
___
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] [babel] help debugging org-babel-execute-buffer

2010-07-26 Thread Austin Frank
Hello!

I have a document that always throws an error when I call
org-babel-execute-buffer.  I'd guess that there's one particular block
that is to blame, but I can't tell which block babel is in at the point
when the error is thrown.

The error is:

#v+
Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
  org-save-outline-visibility(t 1 nil nil)
  org-babel-execute-buffer(nil)
  call-interactively(org-babel-execute-buffer nil nil)
#v-

Looking at the macro for org-save-outline-visibility, I think the
problem has to do with the last two arguments being passed in as nil
nil.  I don't, however, know how this is happening.

I know that I probably haven't given enough information to actually
diagnose this bug.  Can anyone give me a hand on what my next debugging
step should be for this problem?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpwNsLdDrOhU.pgp
Description: PGP signature
___
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] Re: [babel] apply #+TABLEFM lines during export?

2010-07-13 Thread Austin Frank
On Tue, Jul 13 2010, Eric Schulte wrote:

> if you want to use my approach above more widely you could name the code
> block say #+source:less-precision, then add :exports none to each of
> your existing code blocks that output over-precise data, and for each
> such block add a call of the following form
>
> #+call: less-precision(tab=overly-precise-R-block) :exports results
>
> which should work, but would litter your file with these call lines.  I
> guess this is an instance where a post-processing function specified at
> the file/subtree level could potentially be useful.

Yes, the post-processing approach really seems appropriate here--
looking forward to seeing what you come up with.

In the mean time, is there definitely not any hook that applies

 a) during export, and
 b) after results are generated from source blocks?

If not, is it possible that adding a hook like

 org-post-execution-pre-export-hook

would be a reasonable suggestion?  Carsten, thoughts?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpH7G6Cm64uU.pgp
Description: PGP signature
___
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] [babel] report name of source block during execution

2010-07-12 Thread Austin Frank
Hello!

I know I've been making a lot of suggestions on the org-babel front
lately-- if I'm asking too much, please let me know!

During execution of source blocks through org babel, a message appears
to indicate that code is being executed, like

  executing LANG code block...

In cases where the block being executed is a named block, would it be
possible to include the name of the block in this echo?  Maybe something
like

  executing LANG code block (NAME)...

This would provide a rudimentary progress tracking mechanism during long
operations like org-babel-execute-buffer.

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpKBkmDCLJS0.pgp
Description: PGP signature
___
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] Re: [babel] apply #+TABLEFM lines during export?

2010-07-12 Thread Austin Frank
On Sun, Jul 11 2010, Eric Schulte wrote:

> Under the current setup, I don't know of a way to ensure that the
> formula will be re-run.  This may be a good place for future
> (post-feature-freeze) functionality.  There has also been discussion
> of adding a header argument for "post-processing" code blocks which
> could accept the output of the evaluated code block as input -- this
> might be related.

Yes, eager to see where this goes.

> As a work-around, I would suggest the following emacs-lisp code block.
> Export of this code block will trigger the evaluation of the R code
> block, and it will then trim the output of said block resulting in the
> desired table precision.
>
> #+begin_src emacs-lisp :var tab=anova-example :colnames yes :cache yes
>   (mapcar
>(lambda (row)
>  (mapcar
>   (lambda (cell) (if (numberp cell) (format "%.4f" cell) cell))
>   row))
>tab)
> #+end_src


I tried to customize your approach to apply to the whole buffer.  This
code seems to do a nice job of changing the appearance of the tables
within the buffer, but the extra precision is still maintained on
export.

--8<---cut here---start->8---
#+source:  format-table-floats
#+BEGIN_SRC emacs-lisp :results silent :exports none
(add-hook 'org-export-preprocess-final-hook
  (lambda ()
(while (re-search-forward
"|?[ ]+\\(-?[0-9]+\\.[0-9]+\\)\\(e-\\)?[ ]+|"
nil t)
  (progn
(replace-match (concat
(format "%.4f"
(string-to-number (match-string 1)))
" |"))
(org-table-align)
#+END_SRC
--8<---cut here---end--->8---

Can anyone suggest another approach that would change the precision of
floats in all tables in the buffer before export?  Perhaps there's a
different hook I should be using for LaTeX export?

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUqQ9qISTMi.pgp
Description: PGP signature
___
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] Re: [babel] re-hash cached blocks on each execution? or, force re-hash?

2010-07-12 Thread Austin Frank
On Mon, Jul 12 2010, Eric Schulte wrote:

> You've found an error.  The hash should be updated every time a new
> result is inserted into the buffer.  I've just pushed up a fix which I
> believe should take care of this error.  Please let me know if any
> problems persist, or if some portion of your request remains
> unfulfilled.

Thanks, working great.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpJ5Z1ILw7Vf.pgp
Description: PGP signature
___
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] [babel] re-hash cached blocks on each execution? or, force re-hash?

2010-07-12 Thread Austin Frank
Hello!

I would find it extremely useful if the org-babel-execute-* family of
commands re-hashed the executed blocks on each execution, or,
alternatively, accepted a prefix argument that meant "re-execute this
block even if cached, and replace the cache-hash if necessary".

Currently, if a block is cached, when I change something inside the
block and then execute the block again, the hash in the #+results line
doesn't change.  In cases where the contents of the block change but the
output of the block does not, this makes it very difficult to tell
whether the block has been re-executed or not.

If there are good reasons not to re-hash the block on each execution and
update the hash in the results line, I would like to be able to force
this behavior.  In cases where I know that I want the block to be
re-hashed and re-executed, it seems like C-u C-c C-c or C-u C-u C-c C-c
would be a natural and org-ish way to force this.

Here's a simple test case:

--8<---cut here---start->8---
* elisp example
#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(print "hello world")
(print "re-hash and re-execute, please!")
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: hello world

Now I change the above block in place (but reproduce the changes
sequentially here):

#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(print "hello world")
(print "re-hash and re-execute, please!")
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: re-hash and re-execute, please!

Note that the block changed, and the results changed, but the hash did
not.

Now we change it again, in a way that doesn't change the output:

#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(setq four (+ 2 2))
(print "hello world")
(print "re-hash and re-execute, please!")
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: re-hash and re-execute, please!

Again the block changed, but this time the results did not change and
neither did the hash.  This makes it very hard to tell whether the code
has been re-executed or not.  If the hash changed when the block
changed, I could tell that the new code had been detected and run.

Finally, we check whether the previous change was actually evaluated:

* elisp test
#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(setq four (+ 2 2))
(print "hello world")
(print "re-hash and re-execute, please!")
(print four)
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: 4

So the block is re-evaluated when it's changed, but the hash isn't
updated.  The only way we can tell if an altered block is re-run is if
the output changes, but that won't necessarily be the case for every
change in a block.  It would be very useful if the block were re-hashed
before each execution, and the cache line updated whenever the hash
changes.  One possible solution is to force re-hashing and re-execution
with a prefix argument (or double prefix argument, if preferred).
--8<---cut here---end--->8---


Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpjr3yn7t5DQ.pgp
Description: PGP signature
___
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] [babel] key binding requests

2010-07-10 Thread Austin Frank
Hello!

I'm loving the level of polish and sophistication that have been
achieved with org-babel.  My entire PhD thesis is currently written in
org and org-babel, and it's the best authoring system I've ever used.

That said, I have a couple of features that I regularly find myself
missing.  I wonder whether other folks might also find them useful.

First, in terms of navigation, I would love to have keybindings under
the C-c C-v prefix that would navigate to the next and previous babel
blocks.  org-babel-goto-named-source-block[fn:1] is great, but a) not all my
blocks are named, and b) I don't always remember the name of the block
I'm looking for.  On that note...

Currently, org-babel-goto-named-source-block doesn't currently offer any
completion facilities in my setup.  Is there a way to hook it into the
rest of org's completion mechanisms so that I can hit tab to complete
the names of my source blocks?

Finally, to go along with facilities to navigate from source block to
source block, I'd also make regular use of something like
org-execute-src-block-and-step, which would execute the current block
and then jump to the next (or previous) one.

Thanks again for these excellent tools,
/au

Footnotes:

[fn:1] This is the only function that uses "source" instead of "src" in
its name.  Should this be changed for consistency?


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUVITjy9T3J.pgp
Description: PGP signature
___
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] [babel] apply #+TABLEFM lines during export?

2010-07-10 Thread Austin Frank
Hi all--

I have a (hopefully quick question) about formatting tabular output from
ob-R.  Consider the following block:

--8<---cut here---start->8---
#+source:  anova-example
#+BEGIN_SRC R :cache yes :exports results :colnames yes :results value
library(ez)
library(lme4)

eza <- ezANOVA(dv = .(Reaction),
   sid = .(Subject),
   within = .(Days),
   data = sleepstudy)

print(eza$ANOVA)
#+END_SRC
--8<---cut here---end--->8---

This produces the following output:
--8<---cut here---start->8---
#+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example
| Effect | DFn | DFd | SSn |  SSd |F |  
  p | p<.05 |  pes |
|+-+-+-+--+--+--+---+--|
| Days   |   9 | 153 | 166235.12250176 | 151101.038615303 | 18.7026979326383 | 
8.99534541600196e-21 | * | 0.52384550792003 |
--8<---cut here---end--->8---

That's more precision than I want in export, so I add a formula line to
the results, hoping to change the formatting of the floats.  After
hitting C-u C-u C-c C-c in the table, I get the following:

--8<---cut here---start->8---
#+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example
| Effect | DFn | DFd | SSn | SSd |   F |  p | p<.05 |   
 pes |
|+-+-+-+-+-++---+|
| Days   |   9 | 153 | 166235.1200 | 151101.0400 | 18.7027 | 0. | * | 
0.5238 |
#+TBLFM: $4=$4;%.4f::$5=$5;%.4f::$6=$6;%.4f::$7=$7;%.4f::$9=$9;%.4f
--8<---cut here---end--->8---

That's much better!  But, if I export this section to LaTeX, the formula
line is not applied and I end up with the full precision in my table.

--8<---cut here---start->8---
\begin{center}
\begin{tabular}{lrrlr}
 Effect  &  DFn  &  DFd  &  SSn  &   SSd  & 
F  & p  &  p<.05  &   pes  \\
\hline
 Days&9  &  153  &  166235.12250176  &  151101.038615303  &  
18.7026979326383  &  8.99534541600196e-21  &  *  &  0.52384550792003  \\
\end{tabular}
\end{center}
--8<---cut here---end--->8---

Is there a way to make sure that the table formula is applied to the
results block during export?  Alternatively, is there another way to
reduce the precision of the numbers produced during export?

Thanks for any help!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpHFIPcCavpX.pgp
Description: PGP signature
___
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] Re: [babel] exports, caching, remote execution

2010-06-17 Thread Austin Frank
Eric--

Thanks for the reply.

On Thu, Jun 17 2010, Eric Schulte wrote:

> I believe the exporter does respect caching, the following minimal
> example worked (i.e. was not re-run) for me on export to html.  Could
> you provide an example that demonstrates the problem?

Yes, I'll keep an eye on this and try to narrow it down to an example if
I can.

> Not that I'm currently aware of.  Dan has handled most of the remote
> execution work so he may know more than me in this regard.

And thanks to him for that!  I tipped him off to using TRAMP with ESS,
and he took it and ran further than I ever hoped!

> Is "scpc" in the line above a transport protocol?

Yes, it is scp over an existing ssh connection.  The following org-style
link goes to the relevant info page.

[[info:tramp:External%20methods][info:tramp:External methods]]

> Maybe this should be an org-mode wide features, i.e. the ability to
> resolve remote file references with C-c C-o and on export.  Does that
> sound reasonable, and would it take care of the need in this
> particular case?

C-c C-o actually works!  I was extremely encouraged to see this, and it
got my hopes up for export =)

If remote file references could be resolved during export, that would be
ideal.

> A block like the following may be an acceptable workaround in the near
> term (notice I named your block above).
>
> #+begin_src sh :file test.png :var remote=rplot :exports results
>   scp $remote ./test.png
> #+end_src

Nice suggestions, I'll try it later today.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUhoMm4Ichl.pgp
Description: PGP signature
___
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] [babel] exports, caching, remote execution

2010-06-16 Thread Austin Frank
Hey all--

Two (hopefully quick) questions:

1) Does the exporter respect the :cache argument?  When I evaluate a
   buffer, I can tell that cached blocks are not re-run, as expected.
   When I export to \LaTeX or PDF, it seems that all blocks in the file
   are re-run.  Is there a way to force the exporter to respect caching?

2) Is there a way to generate graphical output on a remote host and
   still have it included in export?  A block like

   #+BEGIN_SRC R :exports results :dir /u...@example.com: :file test.png
   plot(my-object)
   #+END_SRC
   
   Gives me
   
   #+results:
   [[file:/scpc:u...@example.com:/users/home/user/test.png]]

   When I export to latex or pdf, the graphic isn't included because the
   file for export is local but the graphic is remote.  Is there a way
   to include remotely generated graphics in a locally exported file?
   Something like downloading via scp before exporting?


Thanks for any help,
/au
   
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUgec5CBe4Q.pgp
Description: PGP signature
___
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] [org-babel] suggestions for using tikz() graphic device with org-babel-R

2010-04-13 Thread Austin Frank
Hi all--

I'm very excited about a relatively new R package, tikzDevice.  This
takes R graphics and generates LaTeX code inside a tikzpicture
environment that reproduces the desired graphic.  This allows, among
other things, for all text in a figure to use the same fonts as the rest
of your document, and for graph annotations to use latex math markup.

I have attached an example org file that has embedded R code that
generates figures using the tikz() device.[fn:1]

The output from a call to tikz() is a .tex file, which is intended to be
included in a larger LaTeX file using the \input{} command.

How would the org-babel gurus suggest that I automate the process of
embedding these TeX-based graphics in an org file?  What is the right
combination of :file, :exports, and :results arguments to have the
generated file automatically included by a LaTeX \input{} command?

Thanks for any advice!
/au

Footnotes:

[fn:1] If requested, I can send the generated tex and pdf files as well

#+TITLE: Generating PGF graphics from R in org-babel
#+AUTHOR:Austin F. Frank
#+EMAIL: austin.fr...@gmail.com
#+DATE:  2009-12-11 Fri
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tikz} 


Recently a new =R= package, =pgfSweave=, was announced.[fn:1]  This
package boasts a fascinating capability:  generating all R graphics as
\{LaTeX} code that will be typeset using the tikz package and included
as PGF graphics.[fn:2]  This is an appealing option for several
reasons:
  1.  Scaling of size and adjustments of position should be handled
  seamlessly and without loss of resolution
  2.  Colors can be specified identically for graphics and any other
  markup in the $\LaTeX$ document
  3.  Since they're just more $\LaTeX$ code, graphics can be manually
  edited in emacs
  4.  Same fonts will be used for text in figures as are used in the
  text of the document
  5.  $\LaTeX$ markup can be used in figure text
  6.  tikz integrates nicely with Beamer

Given this list of features, I decided to see whether I could get
similar functionality in org-babel.
* R code
** Load =tikzDevice=
   First, we need to load the packages required for producing tikz
   output in =R=.  If all goes well, you should get a message about
   the paths to the various programs required to generate $\LaTeX$
   markup from within =R=.

#+source: load_tikzDevice
#+BEGIN_SRC R :results output :exports both :cache
## I want to show the messages that are generated when the package is
## loaded.  These are printed to the equivalent of stderr, so I have
## to rewrite the `message' function to produce output that I can
## print back later.
tikz.message <-
  capture.output(withCallingHandlers(library(tikzDevice),
 message =
 function (m) cat(m$message)))

cat(tikz.message, sep="\n")
#+END_SRC

** R example
#+source: lmer_example
#+BEGIN_SRC R :results output :exports both :cache :session
## I use this library all the time
library(lme4)

## here's the standard example
m <- lmer(Reaction ~ Days + (1 | Subject), sleepstudy)
print(m)
#+END_SRC

** Graphics creation
#+source: tikz_example
#+BEGIN_SRC R :results file :exports code :cache :session
library(tikzDevice)
ranef.m <- ranef(m, postVar = TRUE)
tikz(file = "ranef.tex", width=4, height=4)
print(qqmath(ranef.m))
dev.off()
#+END_SRC

#+BEGIN_CENTER
#+CAPTION:  sample graphics
\input{ranef}
#+END_CENTER

* Footnotes

[fn:1] http://thread.gmane.org/gmane.comp.lang.r.packages/351

[fn:2] http://sourceforge.net/projects/pgf/




-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpdnIg73bmpu.pgp
Description: PGP signature
___
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] Re: [org-timer] mode line request

2010-04-09 Thread Austin Frank
On Thu, Feb 25 2010, Bastien wrote:

> Austin Frank  writes:
>
>> Would it be possible for timers set using org-timer-set-timer to
>> display their current value in the mode line?
>
> I'm working on this.

Ping?  I know you're a busy fella, but have you had a chance to look at
this.  If not, any takers?  If not, any tips for an example function I
can look at for how to set and update the mode-line?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpcqgk62s6ox.pgp
Description: PGP signature
___
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] Re: Using Org for browsing and managing buffers

2010-04-08 Thread Austin Frank
Dan--

Very nice.  I will say, though, that the very first thing I did was

  (define-key org-buffers-mode-map "q" 'bury-buffer)

I would request that something like this be included in the default
keybindings.  A smarter version might try to restore the window config
From before org-buffers-list was called.  See ibuffer-quit for an
example.

Will report back after more testing!

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpO8fd0TNvK1.pgp
Description: PGP signature
___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-07 Thread Austin Frank
On Wed, Apr 07 2010, Carsten Dominik wrote:

> Looks I am having a bad day.
>
> Can you please pull and try again?  As soon as possible?

This works correctly for my test file on Org-mode version 6.35b
(release_6.35b.30.g9115).  It also works for a more complex document
with my full configuration loaded.

In case it matters, the \tolerance{1000} line doesn't show up with an
org-reload.  I had to restart emacs before that aspect of the default
header was incorporated.  But I could be imagining things on that one.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpyBcgTCV6tl.pgp
Description: PGP signature
___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank
On Wed, Apr 07 2010, Robert Klein wrote:

> Also, when I put
>
> (add-to-list 'org-export-latex-packages-alist '("" "listings"))

What's the value of `org-export-latex-listings'?  Carsten, how should
listings be addressed in the new setup?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpPPMYqkomZU.pgp
Description: PGP signature
___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank
On Wed, Apr 07 2010, Austin Frank wrote:

> I then document some unexpected behavior when exporting to latex.
> Options specified with #+LATEX_HEADER are not exported, and if
> `org-export-latex-packages-alist' is customized then only those packages
> are exported.

Upgrading to Org-mode version 6.35b (release_6.35b.27.g35f5) allows my
packages from `org-export-latex-packages-alist' packages to be exported
correctly, but following the steps in my previous mail still does not
result in the inclusion of packages specified in #+LATEX_HEADER lines.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpxScspNd67E.pgp
Description: PGP signature
___
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: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how 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.


(Apologies, I made some copy-paste errors in my first report.  The
reported behavior hasn't changed, but the exact latex output now matches
what I'm seeing on my end.  Thanks.)

Hello!

I'm having trouble getting the new latex export set up correctly.  Below
I start with a a bare-bones config file, as follows:

 1. start with emacs -Q, then do
 2. (add-to-list 'load-path (expand-file-name "path/to/org.git/lisp"))
 3. (require 'org-install)

I then document some unexpected behavior when exporting to latex.
Options specified with #+LATEX_HEADER are not exported, and if
`org-export-latex-packages-alist' is customized then only those packages
are exported.

Thanks for any help,
/au

With the following test file and no emacs customizations, I get the
following latex export:

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:31
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

When I include extra options via #+LATEX_HEADERS, as follows, I get the
following output.  Note that the options specified in #+LATEX_HEADERS are
not exported at all.

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:33
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

If I evaluate the following elisp code, then run export on the following
org file, I get the final tex output.  Note that only the packages
described in `org-export-latex-packages-alist' are exported.

#v+
(mapc #'(lambda (spec)
  (add-to-list 'org-export-latex-packages-alist spec))
  '(("" "listings")
("" "xcolor")
("" "tikz")
("" "amsmath")
("" "microtype")
("" "fixltx2e")))
#v-

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:34
\documentclass[11pt]{article}
\usepackage{fixltx2e}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

At the end of the experiment, this was the org setup:

#v+
current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-e

[Orgmode] Bug: trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how 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.


Hello!

I'm having trouble getting the new latex export set up correctly.  Below
I start with a a bare-bones config file, as follows:

 1. start with emacs -Q, then do
 2. (add-to-list 'load-path (expand-file-name "path/to/org.git/lisp"))
 3. (require 'org-install)

I then document some unexpected behavior when exporting to latex.
Options specified with #+LATEX_HEADER are not exported, and if
`org-export-latex-packages-alist' is customized then only those packages
are exported.

Thanks for any help,
/au

With the following test file and no emacs customizations, I get the
following latex export:

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 00:52
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}


\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

When I include extra options via #+LATEX_HEADERS, as follows, I get the
following output.  Note that the options specified in LATEX_HEADERS are
not exported at all.

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 00:52
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}


\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

If I evaluate the following elisp code, then run export on the following
org file, I get the final tex output.  Note that only the packages
described in `org-export-latex-packages-alist' are exported.

#v+
(mapc #'(lambda (spec)
  (add-to-list 'org-export-latex-packages-alist spec))
  '(("" "listings")
("" "xcolor")
("" "tikz")
("" "amsmath")
("" "microtype")
("" "fixltx2e")))
#v-

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:01
\documentclass[11pt]{article}
\usepackage{fixltx2e}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

At the end of the experiment, this was the org setup:

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 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-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-latex-packages-alist '(

[Orgmode] Re: org-mode tutorial questionaire

2010-03-25 Thread Austin Frank
On Wed, Mar 24 2010, Ian Barton wrote:

> I keep my stuff in git too, but recently I have found Dropbox very
> useful. Once I discovered how to install it on my server it meant that
> all my config files were automatically kept in sync on my
> computers. in fact Dropbox is still great even if you don't run your
> own server.
>
> Git is still very useful for letting you easily go back if you make a
> mistake, or want to start over again from an earlier version.

Even better, make a git repo in your dropbox directory.  Great tastes
that taste great together!

(There's a valid question as to whether the git repo in dropbox should
be a bare repo to facilitate pushing and pulling, or a working repo so
that you can use it directly.  Suggestions on this point are welcome).

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpjwWoCFRmzP.pgp
Description: PGP signature
___
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] Re: Publish atom feeds based on Org files

2010-03-19 Thread Austin Frank
David--

This is an absolutely phenomenal development.  I can't wait to add this
to my setup.  Thank you so much for this contribution.

Cheers,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpxKB93cmT3p.pgp
Description: PGP signature
___
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] Re: [PATCH 2/2] Fix adaptive filling.

2010-03-11 Thread Austin Frank
On Thu, Mar 11 2010, Carsten Dominik wrote:

> Hi everyone,
>
>
> I know that a few people have been using this patch.
>
> How has it been working?

Brilliant.  When composing messages in mml-mode with orgstruct++-mode
enabled, I now get mml-appropriate wrapping in non-orgish parts of the
message.  This mostly means that on message sections with more than one
level of quoting I get proper wrapping.

Thanks for the patch, and I'd be in favor of including it in core org.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp3WQ7bjFkqV.pgp
Description: PGP signature
___
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] Re: [PATCH 2/2] Fix adaptive filling.

2010-03-03 Thread Austin Frank
On Wed, Mar 03 2010, Carsten Dominik wrote:

> Hi,
>
> can I ask a few volunteers to try out this patch?  I am not sure if I
> can completely oversee if this will not have adverse effects.
>
> Thanks Dan!

I've applied this patch and will report back.  I've noticed that with
orgstruct++-mode enabled for message composition, I lose wrapping of
paragraphs with multiple prefixed quote indicators (e.g., "> >").  I'm
eager to see if this addresses that.

For anyone wondering how to apply a patch from an email in gnus, here's
what I just figured out:

 1. Save the entire message using `gnus-uu-decode-save' (bound to `X o'
on my system).  I saved it to ~/repos/org-mode.remote/adaptive.patch
 2. cd to the org-mode repository
 3. apply the patch using git am:

git am < adaptive.patch

I was pleased that this was so was so easy to do once I figured it out.
I honestly didn't expect 'git am' to work with a message saved from
gnus, since the man page talks about mbox files and so on.  But it did
work, and I figured I'd pass it on.

Have a good one,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpNKqAF7j8R1.pgp
Description: PGP signature
___
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] Re: [org-timer] PATCH add hooks to org-timer.el

2010-02-20 Thread Austin Frank
On Sat, Feb 20 2010, Carsten Dominik wrote:


>> @@ -317,7 +346,10 @@ VALUE can be `on', `off', or `pause'."
>> +  (setq org-timer-mode-line-timer
>> +(run-with-timer 1 1 'org-timer-update-mode-
>> line))
>
> Could you please coment on the above section?  What exactly is it
> doing and why?

These two lines were left in accidentally.  This was my initial attempt
at addressing the issue I brought up in my other post about putting
countdown timers in the mode line.  It didn't work and can be removed.

A clean patch is attached.

Thanks,
/au

From ec22f579f9c1fe3169e6103ad05d05658ab90f8e Mon Sep 17 00:00:00 2001
From: Austin F. Frank 
Date: Sat, 20 Feb 2010 09:42:48 -0500
Subject: [PATCH] add hooks to start/stop/pause functions for relative and countdown timers

---
 lisp/org-timer.el |   34 --
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index ed5a423..9cee0b4 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -48,6 +48,31 @@ the value of the relative timer."
   :group 'org-time
   :type 'string)
 
+(defcustom org-timer-start-hook nil
+  "Hook run after relative timer is started."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-stop-hook nil
+  "Hook run before relative timer is stopped."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-pause-hook nil
+  "Hook run before relative timer is paused."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-set-hook nil
+  "Hook run after countdown timer is set."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-cancel-hook nil
+  "Hook run before countdown timer is canceled."
+  :group 'org-time
+  :type 'hook)
+
 ;;;###autoload
 (defun org-timer-start (&optional offset)
   "Set the starting time for the relative timer to now.
@@ -82,7 +107,8 @@ the region 0:00:00."
   (org-timer-set-mode-line 'on)
   (message "Timer start time set to %s, current value is %s"
 	   (format-time-string "%T" org-timer-start-time)
-	   (org-timer-secs-to-hms (or delta 0))
+	   (org-timer-secs-to-hms (or delta 0)))
+  (run-hooks 'org-timer-start-hook
 
 (defun org-timer-pause-or-continue (&optional stop)
   "Pause or continue the relative timer.  With prefix arg, stop it entirely."
@@ -102,6 +128,7 @@ the region 0:00:00."
 (org-timer-set-mode-line 'on)
 (message "Timer continues at %s" (org-timer-value-string)))
(t
+(run-hooks 'org-timer-pause-hook)
 ;; pause timer
 (setq org-timer-pause-time (current-time))
 (org-timer-set-mode-line 'pause)
@@ -110,6 +137,7 @@ the region 0:00:00."
 (defun org-timer-stop ()
   "Stop the relative timer."
   (interactive)
+  (run-hooks 'org-timer-stop-hook)
   (setq org-timer-start-time nil
 	org-timer-pause-time nil)
   (org-timer-set-mode-line 'off))
@@ -264,6 +292,7 @@ VALUE can be `on', `off', or `pause'."
   (interactive)
   (mapc (lambda(timer)
 	  (when (eval timer)
+(run-hooks 'org-timer-cancel-hook)
 	(cancel-timer timer)
 	(setq timer nil)))
 	'(org-timer-timer1
@@ -317,7 +346,8 @@ VALUE can be `on', `off', or `pause'."
 		  (setq org-timer-last-timer
 			(run-with-timer
 			secs nil 'org-notify (format "%s: time out" hl) t))
-		  (set timer org-timer-last-timer)))
+		  (set timer org-timer-last-timer)
+  (run-hooks 'org-timer-set-hook)))
 	  '(org-timer-timer1
 		org-timer-timer2
 		org-timer-timer3)
-- 
1.7.0




-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpGSOskDj4TN.pgp
Description: PGP signature
___
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] [org-timer] mode line request

2010-02-20 Thread Austin Frank
Hi!

Would it be possible for timers set using org-timer-set-timer to display
their current value in the mode line?

I think all of the required pieces to implement this exist already, but
I haven't been able to get it to work.  The relevant functions seem to
be org-timer-update-mode-line and parts of
org-timer-show-remaining-time.

I'd like to be able to watch as the timer counts down towards zero.  If
this behavior isn't desired generally, could we introduce a variable to
control whether these timers are shown in the mode line?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpaNZVhczxDA.pgp
Description: PGP signature
___
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] [org-timer] PATCH add hooks to org-timer.el

2010-02-20 Thread Austin Frank
Hello all--

I'm experimenting with the pomodoro technique [1] and trying to
integrate it with org mode.  I've attached a patch that defines some
hooks for org-timer.el.  My intention is to use these hooks to automate
record keeping and interactions with org-clock.

If this isn't the correct approach to adding hooks to timer functions,
what would you suggest?

Thanks for considering it,
/au

[1] http://www.pomodorotechnique.com

From 86de94d18302bda17379c35f11423788b11348c2 Mon Sep 17 00:00:00 2001
From: Austin F. Frank 
Date: Sat, 20 Feb 2010 08:22:47 -0500
Subject: [PATCH 3/3] add hooks for relative and countdown timers

---
 lisp/org-timer.el |   36 ++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index ed5a423..47397aa 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -48,6 +48,31 @@ the value of the relative timer."
   :group 'org-time
   :type 'string)
 
+(defcustom org-timer-start-hook nil
+  "Hook run after relative timer is started."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-stop-hook nil
+  "Hook run before relative timer is stopped."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-pause-hook nil
+  "Hook run before relative timer is paused."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-set-hook nil
+  "Hook run after countdown timer is set."
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-cancel-hook nil
+  "Hook run before countdown timer is canceled."
+  :group 'org-time
+  :type 'hook)
+
 ;;;###autoload
 (defun org-timer-start (&optional offset)
   "Set the starting time for the relative timer to now.
@@ -82,7 +107,8 @@ the region 0:00:00."
   (org-timer-set-mode-line 'on)
   (message "Timer start time set to %s, current value is %s"
 	   (format-time-string "%T" org-timer-start-time)
-	   (org-timer-secs-to-hms (or delta 0))
+	   (org-timer-secs-to-hms (or delta 0)))
+  (run-hooks 'org-timer-start-hook
 
 (defun org-timer-pause-or-continue (&optional stop)
   "Pause or continue the relative timer.  With prefix arg, stop it entirely."
@@ -102,6 +128,7 @@ the region 0:00:00."
 (org-timer-set-mode-line 'on)
 (message "Timer continues at %s" (org-timer-value-string)))
(t
+(run-hooks 'org-timer-pause-hook)
 ;; pause timer
 (setq org-timer-pause-time (current-time))
 (org-timer-set-mode-line 'pause)
@@ -110,6 +137,7 @@ the region 0:00:00."
 (defun org-timer-stop ()
   "Stop the relative timer."
   (interactive)
+  (run-hooks 'org-timer-stop-hook)
   (setq org-timer-start-time nil
 	org-timer-pause-time nil)
   (org-timer-set-mode-line 'off))
@@ -264,6 +292,7 @@ VALUE can be `on', `off', or `pause'."
   (interactive)
   (mapc (lambda(timer)
 	  (when (eval timer)
+(run-hooks 'org-timer-cancel-hook)
 	(cancel-timer timer)
 	(setq timer nil)))
 	'(org-timer-timer1
@@ -317,7 +346,10 @@ VALUE can be `on', `off', or `pause'."
 		  (setq org-timer-last-timer
 			(run-with-timer
 			secs nil 'org-notify (format "%s: time out" hl) t))
-		  (set timer org-timer-last-timer)))
+      (setq org-timer-mode-line-timer
+(run-with-timer 1 1 'org-timer-update-mode-line))
+		  (set timer org-timer-last-timer)
+  (run-hooks 'org-timer-set-hook)))
 	  '(org-timer-timer1
 		org-timer-timer2
 		org-timer-timer3)
-- 
1.7.0


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpsQVrbZg3Vk.pgp
Description: PGP signature
___
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] [org-clock] default clock for non-org-mode buffers

2010-02-10 Thread Austin Frank
Hello--

Sometimes I want to clock in but I'm not in an org-mode buffer.  Would
it be possible to either provide a function or hook that uses the
current buffer to add a selection to the destinations provided by
`org-clock-select-task'?

I can see two possible functions I would add to an
`org-clock-prepare-selections-hook'.  First, a version with remember
that would create a new task to clock into based on the current buffer

#v+
(defun au-clock-in-to-new-task ()
  (if (fboundp org-remember)
;; use one of my remember templates that creates a TODO entry under
;; the heading "uncategorized tasks".  it includes a link to the
;; current buffer
(org-remember nil (kbd "t")))
  ;;
  ;; then either clock in to the task right away,
  ;; or add the new task to the selection buffer somehow
  ;; ...
)
#v-

And second, a version that lets you browse to an existing task.

#v+
;; I think this one doesn't work as written, but only because I don't
;; know what I am doing
(defun au-clock-in-go-to-task ()
  ;; use the org-refile interface to go to an existing task
  (org-refile t)
  ;;
  ;; then do something with link to buffer we clocked in on
  ;; ...
)
#v-

Does a hook or some other way of introducing this functionality already
exist?  If not, would other people use it?

Thanks,
/au
  
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpVzm5iTVPy3.pgp
Description: PGP signature
___
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] [org-habit] repetition specification

2010-02-08 Thread Austin Frank
Hello--

I'm trying to get started with org-habit, which looks to be a great
addition to the already fantastic org-mode.

For me, certain habitual tasks are best thought of as "do this n times
within d days".  For example, I might try to exercise 5 times per 7
days, to eat my vegetables 3 times per 1 day, or to clean the oven 4
times per 365 days.  Similar to the original description of habits, it
doesn't matter exactly when within the period these events occur, nor is
any one occurrence especially important.  Rather, I just want to see if
I'm getting close to my desired number of repetitions within a given
period.

Is there a way of mapping this conception of habitual repetitions into
the functions provided by org-habit?  Is there a different way to do
this in org-mode that I'm missing?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp9hfo9Ai4Zf.pgp
Description: PGP signature
___
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] Re: [org-beamer] inline slides?

2010-01-29 Thread Austin Frank
On Thu, Jan 28 2010, Darlan Cavalcante Moreira wrote:

> I can see the merit of your idea about writing the slides when writing
> the thesis, but you could also create a "Presentation" headline at the
> and of the org file and put commented anchor and links in the the
> thesis and in the slides. This would allow you to easily jump from on
> to another.

Nice suggestion, thanks!  I don't tend to use links within the same
file, but I definitely see the application here.  I'd have to make sure
that those links weren't exported, but that's easily done.

> Another option would be splitting the frame in two windows, one
> showing the thesis and the other one showing the slides.

My issue with this approach is that I'll definitely be using org-babel
code blocks, and will want to use their output in both the thesis and
the presentation.  Named code and result blocks make this possible, as
long as components are in the same file.

Thanks for the ideas!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpXCytVWjJmm.pgp
Description: PGP signature
___
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] Re: [org-beamer] inline slides?

2010-01-29 Thread Austin Frank
On Wed, Jan 27 2010, Eric S Fraga wrote:


> I could see it being useful, along the lines of all the tangling
> examples in org-babel.

Yes!  Tangling of embedded code is a good comparison.

> more importantly, I often will prepare more than one presentation
> based on a given project and each presentation will be substantially
> different enough to make it difficult to embed slides.

> Yes, this I can see.  However, the type of different content you may
> wish to attach/embed will depend on its final purpose.  That is, in
> terms of presentations, who will be in the audience?

These are good points.  My inclination would be to handle variations on
the same talk using git.  For projects where this workflow makes sense,
I would write the initial paper and presentation together.  Upon
completion, I would make a git tag marking the finished state for that
version of the talk.  Subsequent talks could be created by creating a
branch.  In most cases, I would probably edit the slides-only version of
the file directly (rather than in the context of the original paper).

>> Since slides are mostly just headlines with special tags and properties,
>> at the end of the process I could easily selectively export just the
>> text of the dissertation or just the embedded slides.
>
> This begs the question: maybe an "export to org based on tags"
> function is all that is required?  And this is probably already
> implemented; I hesitate to suggest how or where, given my lack of
> awareness of all the various multitude of features of org-mode, but I
> can imagine that sparse trees could be part of any solution?

Yes, I think that the basis of the export function will be building a sparse
tree and then exporting the visible buffer.  I wouldn't say this is all that
is required, though.  I'd really like to have the

*** embedded slide
*** END

style of inline definition.  Again, this allows slides to be embedded
without changing the surrounding outline context.

> Just some thoughts...

Thanks!

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpqjNPRzo0CS.pgp
Description: PGP signature
___
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] [org-beamer] inline slides?

2010-01-26 Thread Austin Frank
Carsten and other beamerers--

Thanks for the excellent extension to org.  I've used it for one
presentation already and found it quite useful.

I have an idea that doesn't yet qualify as a feature request, more like
an idea for discussion.  What do people think about the idea of adding
the capability to write inline slides, akin to the way we can currently
write inline TODO items?

The parallels between the two applications seem pretty significant to
me.  Sometimes you're in the middle of a long block of text or an
outline tree where you don't want to disrupt the structure, and you want
to add a different kind of content alongside the current material.

The application I have in mind has to do with writing my doctoral
thesis.  I know that I'll be writing long chapters; I also know that
I'll have to prepare slides for my public defense.  Ideally, during the
writing process I'll be able to notice a series of important points and
drop into an inline slide to jot them down for the talk.  Similarly, I
could see wanting to start a section with an overview slide, but not
wanting to alter the structure of the section.

Since slides are mostly just headlines with special tags and properties,
at the end of the process I could easily selectively export just the
text of the dissertation or just the embedded slides.

Early on in the process of developing org-beamer, a suggestion was made
that footnotes could serve as a way of entering \note{} elements into
beamer slides.  That proposal sees notes as ways of annotating slides.
I'm interested in sort of flipping that idea around, so that slides are
basically short annotations of the major points in my thesis.

Do people think that an inline-slides interface akin to the inline-tasks
interface would be a useful way of incorporating beamer slides into org
documents?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpJzCvq8EDZf.pgp
Description: PGP signature
___
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] Re: How to combine the analogue (Moleskine) world with digital (org-mode) world ?

2010-01-25 Thread Austin Frank
On Sun, Jan 24 2010, Torsten Wagner wrote:

> What I'am looking for is a smart way to keep both in sync and that
> without big hassle. It has to be something which does the job quite
> quick thus I will do it directly e.g., every morning before starting
> work... instead of pushing and pushing it away from me. Thought maybe
> I simply mark the entries in the paper version whether I added them to
> org-mode already or not and create a tag in org-mode for the vice
> versa reason.

The moleskine notebooks are VERY nice and I love the construction
quality and feel of them.  Unfortunately, this exact feature kept me
From using what ended up being the most effective strategy.  When I'm
being good and keeping analog and org in sync, it's because I am
making one note per page and indiscriminately tearing them out of my
notebook as I process them.  Nowadays I keep a cheaper flimsier notebook
in my back pocket at all times [1].  In addition to letting me
guiltlessly destroy the thing, it's also more comfortable to sit on.

I don't have a great system for going back the other direction, but am
at my computer often enough to make that process less important to me.

HTH,
/au

[1] 
http://www.officedepot.com/a/products/323629/Office-Depot-Brand-Mini-Marble-Composition/

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpnhJXUjwg7d.pgp
Description: PGP signature
___
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] Re: org-babel: Managing a bibtex database

2010-01-25 Thread Austin Frank
On Thu, Jan 21 2010, Taru Karttunen wrote:

> I am wondering whether org-babel would be suitable for managing a
> bibtex database of ~1500 entries. I am thinking of making Bibtex
> entries into literate source code and thus have org-mode managing them
> in a more sensible way.

> Has anyone else done something like this? Any better ideas how to
> accomplish this?

As an intermediate step, I'd be interested in seeing integration between
ebib [1, 2] and org-mode.  At the least, it would be great to store a
link in the ebib buffer, have it inserted as a link to the ebib database
when added to the org buffer, and have it exported as a working
reference (at least when exporting to \LaTeX).

Thanks,
/au

[1] http://ebib.sourceforge.net/
[2] http://repo.or.cz/w/ebib.git

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpxtqK2vlCYZ.pgp
Description: PGP signature
___
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] Re: [babel] R - variable names in summary

2009-12-09 Thread Austin Frank
On Wed, Dec 09 2009, Dan Davison wrote:

> Graham Smith  writes:

>> Next question is is to do with output with things like summary. In R
>> if you have lots of variables,the output wraps so it fits on the
>> screen. With babel it runs off the edge of the page. is there a quick
>> way of getting the output to fit an anticipated a4 pdf output.
>
> I'd suggest using :results output, and controlling the width of the
> output with options(width=whatever) in R. E.g.
>
> #+begin_src R :session babeltest :colnames t :results output
> options(width=80)
> summary(cbind(babeltest, babeltest))
> #+end_src

I don't know whether this will end up fitting into your setup, but
there's an emacs function `ess-execute-screen-options' that does what
Dan just suggested on a per-session basis taking the width of the
current buffer into account.  Even if it doesn't help with org-bable, it
makes life in ESS much pleasanter.

You can also look at the latex() function in the R package Hmisc and the
function xtable() from the R package xtable.  For data frames, matrices,
and some common summary functions, these functions will create a latex
table out of your R object.  Maybe Dan can suggest how latex code
generated in R could be properly included and typeset in org-babel.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpdCA1QxmnkQ.pgp
Description: PGP signature
___
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] Re: [babel] R - variable names in summary

2009-12-08 Thread Austin Frank
On Tue, Dec 08 2009, Graham Smith wrote:

> The colnames t works as expected, but how do I then see the variable
> names when using the summary command, and str doesn't work at all
> (source block produced no output) . They appear OK in the R buffer.

This is help from the R side, not from the org-babel side.  If these
suggestions don't work, one of the babelers will have to step in.

Many functions that print output to the interactive buffer will not
produce that output when called outside of the interactive buffer.  For
these functions, if you wrap them in print() you can usually get the
results you want.  So, in your R code blocks, try

  print(summary(whatever))

and

  print(str(whatever))

If all you need is the names of the columns,

  print(names(whatever))

might be useful.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUu6btqC7eX.pgp
Description: PGP signature
___
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] Re: ANN: org-mac-protocol : AppleScripts to invoke org-protocol from various applications

2009-07-20 Thread Austin Frank
On Mon, Jul 20 2009, Christopher Suckling wrote:

> [...]
>
> Currently supported apps are:
>
> Finder

Christopher--

Thanks!  This looks really interesting.  Is there any way to use
applescript to track change in application focus?  I'd be interested in
logging when I change to or away from each application, and having that
time tracking information available from within org.  Does this seem
possible?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc



___
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] Cannot use org-mode and remember templates

2009-07-17 Thread Frank Rust
Hi all,

sorry for the confusion but I finally found the reason for my problem.

I set the variable "org-time-stamp-rounding-minutes" in my .emacs correctly
but unfortunately I didn't recognize the same variable in
"custom-set-variables" section. :(

@Bastien: In the meantime I installed the actual version "Org-mode version
6.28e"

Thanks a lot for all your efforts.

Kind regards,
Frank

PS: At least I learned some aspects of lisp debugging. :)
___
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] Cannot use org-mode and remember templates

2009-07-17 Thread Frank Rust
Thanks to all for the hints so far but unfortunately the setting for
"org-time-stamp-rounding-minutes" did not solve my problem.

Here is an actual backtrace:

Debugger entered--Lisp error: (wrong-type-argument listp 5)
  org-current-time()
  (or org-overriding-default-time (org-current-time))
  (let* ((entry ...) (ct ...) (dct ...) (ct1 ...) (tpl ...) (plist-p ...)
(file ...) (headline ...) (v-c ...) (v-x ...) (v-t ...) (v-T ...) (v-u ...)
(v-U ...) (v-i ...) (v-a ...) (clipboards ...) (v-A ...) (v-n
user-full-name) (v-k ...) (v-K ...) v-I (org-startup-folded nil)
(org-inhibit-startup t) org-time-was-given org-end-time-was-given x prompt
completions char time pos default histvar) (when (functionp file) (setq file
...)) (when (and file ...) (setq file ...)) (setq org-store-link-plist
(append ... org-store-link-plist)) (unless tpl (setq tpl "") (message "No
template") (ding) (sit-for 1)) (erase-buffer) (insert
(substitute-command-keys ...)) (insert tpl) (goto-char (point-min)) (while
(re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t) (when ... ...)
(replace-match ... t t)) (goto-char (point-min)) (while (re-search-forward
"%\\[\\(.+\\)\\]" nil t) (let ... ... ... ...)) (goto-char (point-min))
(while (re-search-forward "%\\((.+)\\)" nil t) (goto-char ...) (let ... ...
...)) (when plist-p (goto-char ...) (while ... ...)) (let (...) (org-mode)
(org-remember-mode 1)) (if (and file ... ...) (org-set-local ... file)) (if
headline (org-set-local ... headline)) (goto-char (point-min)) (while
(re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t) (setq
char ... prompt ...) (goto-char ...) (replace-match "") (setq completions
nil default nil) (when prompt ...) (cond ... ... ... ... ... ...))
(goto-char (point-min)) (if (re-search-forward "%\\?" nil t) (replace-match
"") (and ... ...)))
  (if org-remember-templates (let* (... ... ... ... ... ... ... ... ... ...
... ... ... ... ... ... ... ... ... ... ... v-I ... ... org-time-was-given
org-end-time-was-given x prompt completions char time pos default histvar)
(when ... ...) (when ... ...) (setq org-store-link-plist ...) (unless tpl
... ... ... ...) (erase-buffer) (insert ...) (insert tpl) (goto-char ...)
(while ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (while
... ... ...) (when plist-p ... ...) (let ... ... ...) (if ... ...) (if
headline ...) (goto-char ...) (while ... ... ... ... ... ... ...) (goto-char
...) (if ... ... ...)) (let (...) (org-mode) (org-remember-mode 1)))
  org-remember-apply-template()
  run-hooks(text-mode-hook remember-mode-hook)
  apply(run-hooks (text-mode-hook remember-mode-hook))
  run-mode-hooks(remember-mode-hook)
  remember-mode()
  remember(nil)
  call-interactively(remember nil nil)

I hope this helps.

Thanks and regards,
Frank



On Thu, Jul 16, 2009 at 7:07 PM, Nick Dokos  wrote:

> Frank Rust  wrote:
>
> > Debugger entered--Lisp error: (wrong-type-argument listp 5)
> >   org-current-time()
> >   org-remember-apply-template()
> >   run-hooks(text-mode-hook remember-mode-hook)
> >   apply(run-hooks (text-mode-hook remember-mode-hook))
> >   run-mode-hooks(remember-mode-hook)
> >   remember-mode()
> >   remember(nil)
> >   call-interactively(remember nil nil)
> >
> >
> >
> > Debugger entered--Lisp error: (wrong-type-argument listp 5)
> >   org-current-time()
> >
> > ...
> >
> > I hope this helps.
> > p
>
> In this case, no, because Seb Vauban nailed the cause (he must have
> recently polished his crystal ball, so he did not need a backtrace at
> all): org-time-stamp-rounding-minutes should be a list of two numbers.
>
> In general, however, a bug report with a backtrace and uncompiled code
> makes things much easier: from your backtrace, anybody (with some
> knowledge of lisp) can see what the problem is - no crystal ball
> required.
>
> Thanks,
> 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] Cannot use org-mode and remember templates

2009-07-16 Thread Frank Rust
>
> Please provide a backtrace: set the variable `debug-on-error' to t, e.g.
> by doing
>
>   M-x set-vardebug-on-errort
>

>
> and do whatever is necessary to produce the error - the backtrace should
> appear in a buffer called '*Backtrace*.


Debugger entered--Lisp error: (wrong-type-argument listp 5)
  org-current-time()
  org-remember-apply-template()
  run-hooks(text-mode-hook remember-mode-hook)
  apply(run-hooks (text-mode-hook remember-mode-hook))
  run-mode-hooks(remember-mode-hook)
  remember-mode()
  remember(nil)
  call-interactively(remember nil nil)



> If you can do that with
> uncompiled code, that is vastly preferable: do
>
>  M-x load-library org-remember.el
>
> first and then try to produce the error.
>


Debugger entered--Lisp error: (wrong-type-argument listp 5)
  org-current-time()
  (or org-overriding-default-time (org-current-time))
  (let* ((entry ...) (ct ...) (dct ...) (ct1 ...) (tpl ...) (plist-p ...)
(file ...) (headline ...) (v-c ...) (v-x ...) (v-t ...) (v-T ...) (v-u ...)
(v-U ...) (v-i ...) (v-a ...) (clipboards ...) (v-A ...) (v-n
user-full-name) (v-k ...) (v-K ...) v-I (org-startup-folded nil)
(org-inhibit-startup t) org-time-was-given org-end-time-was-given x prompt
completions char time pos default histvar) (when (functionp file) (setq file
...)) (when (and file ...) (setq file ...)) (setq org-store-link-plist
(append ... org-store-link-plist)) (unless tpl (setq tpl "") (message "No
template") (ding) (sit-for 1)) (erase-buffer) (insert
(substitute-command-keys ...)) (insert tpl) (goto-char (point-min)) (while
(re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t) (when ... ...)
(replace-match ... t t)) (goto-char (point-min)) (while (re-search-forward
"%\\[\\(.+\\)\\]" nil t) (let ... ... ... ...)) (goto-char (point-min))
(while (re-search-forward "%\\((.+)\\)" nil t) (goto-char ...) (let ... ...
...)) (when plist-p (goto-char ...) (while ... ...)) (let (...) (org-mode)
(org-remember-mode 1)) (if (and file ... ...) (org-set-local ... file)) (if
headline (org-set-local ... headline)) (goto-char (point-min)) (while
(re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t) (setq
char ... prompt ...) (goto-char ...) (replace-match "") (setq completions
nil default nil) (when prompt ...) (cond ... ... ... ... ... ...))
(goto-char (point-min)) (if (re-search-forward "%\\?" nil t) (replace-match
"") (and ... ...)))
  (if org-remember-templates (let* (... ... ... ... ... ... ... ... ... ...
... ... ... ... ... ... ... ... ... ... ... v-I ... ... org-time-was-given
org-end-time-was-given x prompt completions char time pos default histvar)
(when ... ...) (when ... ...) (setq org-store-link-plist ...) (unless tpl
... ... ... ...) (erase-buffer) (insert ...) (insert tpl) (goto-char ...)
(while ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (while
... ... ...) (when plist-p ... ...) (let ... ... ...) (if ... ...) (if
headline ...) (goto-char ...) (while ... ... ... ... ... ... ...) (goto-char
...) (if ... ... ...)) (let (...) (org-mode) (org-remember-mode 1)))
  org-remember-apply-template()
  run-hooks(text-mode-hook remember-mode-hook)
  apply(run-hooks (text-mode-hook remember-mode-hook))
  run-mode-hooks(remember-mode-hook)
  remember-mode()
  remember(nil)
  call-interactively(remember nil nil)
  recursive-edit()
  byte-code("  --> bytecode" [unread-command-char debugger-args x
debugger-buffer noninteractive debugger-batch-max-lines -1 debug
backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode
debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string
kill-emacs "" nil recursive-edit middlestart buffer-read-only
standard-output] 4)
  debug(error (wrong-type-argument listp 5))
  org-current-time()
  org-remember-apply-template()
  run-hooks(text-mode-hook remember-mode-hook)
  apply(run-hooks (text-mode-hook remember-mode-hook))
  run-mode-hooks(remember-mode-hook)
  remember-mode()
  remember(nil)
  call-interactively(remember nil nil)


>
> Thanks,
> Nick
>

I hope this helps.

Thanks and regards,
Frank
___
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] Cannot use org-mode and remember templates

2009-07-16 Thread Frank Rust
Hi,

I'm using a new version of emacs for windows (GNU Emacs 23.1.50.1
(i386-mingw-nt5.1.2600) of 2009-06-30 on LENNART-69DE564 (patched)) which
provides Org-mode in version 6.21b.

After the last upgrade the remember templates are not working anymore.
Everytime I select a template with my shortcuts I receive the following
error:

Select template: [t]odo [j]ournal*
org-remember-apply-template: Wrong type argument: listp, 5*


This is the relevant entry in my .emacs

;; Remember mode
(require 'remember)
(org-remember-insinuate)
(setq org-remember-store-without-prompt t)

(setq org-remember-templates
 '(("Todo" ?t "* TODO %^{Brief Description} %^g\nAdded: %U"
"~/emacs/gtd/gtd.org" "Tasks")
  ("Journal" ?j "\n* %^{topic} %T \n%i%?\n" "journal.org" "Ideas")))


Unfortunately I'm not very experienced in lisp programming and I couldn't
find any hints with google. Is there any way to fix this?

Thanks for your efforts and regards,
Frank
___
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] application switching hook

2009-06-02 Thread Austin Frank
Hi all--

I'd like to extend my time tracking to some activities outside of emacs.
More specifically, I'd like to be prompted to log a note in the active
time clock block whenever I change to an application outside of emacs.
I'm trying to be honest with myself about why I move from one
application to another (the difference between "needed a reference from
Zotero" and "got bored so went to check the score of the baseball
game").

In Mac OS X, I switch applications using the Command-Tab key sequence.
I suspect that the solution to my problem involves writing some
applescript that fires a call to emacsclient every time Command-Tab is
pressed, or perhaps every time the focused application changes.

I think the relevant command line call will be something like

  emacsclient -e "(progn (org-clock-goto) (org-add-note))"

But maybe other people have better ideas for this part of the solution.
Perhaps calling a remember template with the current clock as its target
(using whichever function drives `C-2 C-c C-c' in the remember buffer)
would be better?


Unfortunately, I know nothing of applescript and haven't turned up any
promising leads in web searches.  I know I've seen some applescript
posted to this list before, so someone out there must know something
about it.  Any chance one of you folks has an idea about how to
implement this functionality?

Alternatively, does emacs have something like an
`emacs-loses-focus-hook'?  I don't see anything using `M-x apropos' or
`M-x apropos-variable' for "focus", but perhaps I'm looking in the wrong
place.

Thanks for any comments,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpSIoJYbN2mN.pgp
Description: PGP signature
___
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: GOAL keyword with DEADLINE semantics?

2009-03-10 Thread Austin Frank
On Mon, Mar 09 2009, Carsten Dominik wrote:

> since you want to use the same semantics as for deadlines, i.e. the
> same warning period etc, this really is a psychological issue :-)

But isn't that why we have org-mode in the first place-- to help us
label our way out of these pesky psychological issues?  :P

> What I would do if I was bothered by this would be
>
> (setq org-deadline-string "DUE:")
>
> which captures both the colors of DEADLINE and GOAL pretty well, I
> think.

Yes, I will use this.

I think that the case I described where I wanted both a GOAL and a
DEADLINE for the same task can be handled reasonably well by creating
two different tasks and giving each a due date.  So instead of

* TODO submit manuscript
  GOAL: 
  DEADLINE: 

I can do

* TODO submit manuscript
  DUE: 

*** publisher deadline
DUE: 


This way I have all of the information in one place, and both dates get
into the agenda.  The top level TODO and its due date represent my goal
for submitting.  The sub-heading isn't a TODO because I'm working on my
schedule, not theirs.  But, I put the hard deadline there just in case
my schedule and the official deadline get too close for comfort.  Also,
if I keep them close together, then follow mode helps me see both at the
same time.

I don't know if DEADLINE timestamps are supposed to be applied to
non-TODO headings, but it didn't seem to break anything, so I'm going to
go forward with this approach for now.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp45XibPyZRq.pgp
Description: PGP signature
___
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] GOAL keyword with DEADLINE semantics?

2009-03-08 Thread Austin Frank
Hi all!

Currently we can use the DEADLINE keyword to indicate a target date for
an item to be finished.  By my way of thinking, deadlines make sense for
externally imposed constraints.  I also try to set goals for myself for
when an item will be completed.  These are softer than deadlines, but
I think they could share the same semantics for creation, display, and
export.

Would it be possible to make `org-deadline-string' a list of strings
that get handled in the same way as DEADLINE is currently handled?  That
way I could do things like

* TODO write first chapter
  GOAL:  <2009-03-09 Mon>

* TODO submit manuscript
  GOAL:  <2009-05-15 Fri>
  DEADLINE:  <2009-06-01 Mon>

Where the first represents my own planning process and the second
contains my target completion date (trying to work ahead!) and the hard
constraint imposed by whoever I'm submitting to.  In all cases, I'd like
agenda notification as the date approaches, I'd like to know if I've
passed it by, and I'd like the option of including it in ical export.

Or maybe I should just learn to treat my GOALs like DEADLINEs and stop
letting myself off the hook so easily ;)

Do other people think about things this way?  Would you have a use for
a customizable list of keywords that all had the same semantics that
DEADLINE currently has?

Thanks for considering it,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpdzgoCrVqWy.pgp
Description: PGP signature
___
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: bug? in orgstruct-mode

2009-02-25 Thread Austin Frank
On Sun, Feb 22 2009, Carsten Dominik wrote:

> yes, this is something I have been missing myself.

Glad it wasn't just me.  I feel guilty if I'm the only one requesting
the feature.  Now that you've implemented it, are you using
orgstruct++-mode?

> orgstruct-mode is a mode that steals away bindings from the major mode
> and overrules them in certain contexts.  In general, it does make
> sense to keep the regions where this applies small, so that the normal
> functions bound to the same keys can do there thing everywhere else.

Maybe it makes sense for people who still cling to the idea that there
are useful modes outside of org-mode ;)

> You are describing here a case, where you actually never want to use
> the original function of that key M-RET, right?

Yes, I almost never want to use `message-newline-and-reformat'.

> (defun org-run-insert-heading ()
>(interactive)
>(run-like-in-org-mode 'org-insert-heading))

Did not know about `run-like-in-org-mode'.  Very cool.

> What I have now done as well is to extend orgstruct++-mode so that it
> will do what you ask for.  You neet to pull the git version for this
> change.

I use this full time in text-based modes now.  It's especially great for
composing emails (message-mode) and editing commit messages
(magit-log-edit-mode).

Thanks for adding this feature.  I understand why it can't be the
default, but I would encourage folks to try it.  It works really well
for me.

Have a good one,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgptWBgxD85yc.pgp
Description: PGP signature
___
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 orgstruct-mode

2009-02-21 Thread Austin Frank
Hi all--

In normal org buffers, creating a new list item works fine at the end of
a multi-line list item, or on the line following a multi-line list item,
even if the multi-line item covers lots of lines.  In orgstruct-mode, it
seems that new items can't be inserted unless the current line is a list
item.

Can orgstruct-mode be made to be as good as org-mode at recognizing when
it's in a plain list?  It'd be nice to be able to create a new list item
after a multi-line item in orgstruct-mode.

Steps to reproduce:
1. emacs -Q -nw test.txt
2. `M-:' (require 'org-install)
3. `M-x orgstruct-mode'
4. Create a list item like

--8<---cut here---start->8---
- item 1
--8<---cut here---end--->8---

5. `M-return' to get a new list item
6. `C-u C-4 C-0 x SPC C-u C-4 C-0 x' to get two long "words"
7. `M-q' to wrap the long list item.  Now looks like:

--8<---cut here---start->8---
- item 1
- 
  
--8<---cut here---end--->8---

8a. At the end of the third line, try to add a new list item with
`M-return'.  I get the message:

#v+
orgstruct-error: This key has no function outside structure elements
#v-

8b. At the beginning of a new line below the third line, hit
`M-return'.  Same error.

Expected behavior:
Following the same sequence in org-mode, steps 8a and 8b will both
result in a new list item being created correctly.


This took me longer to figure out than it should have, but this also has
an unpleasant interaction with the default keybindings for message-mode.
If I am writing an email and try to insert a new list item after a
wrapped like using `M-return' I end up invoking
`message-newline-and-reformat', which moves me down a line and then
inserts four blank lines-- not what I wanted to do!  If orgstruct-mode
learns to recognize when it's in plain list context, this problem will
disappear :)

Thanks!
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpwfjH0ec1U6.pgp
Description: PGP signature
___
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: POLL: the 40 variables project

2009-01-29 Thread Austin Frank
On Thu, Jan 29 2009, Carsten Dominik wrote:

> - why you set the variable like this
> - if you feel that the default value of that variable
>   should be different
> - Any other comments you might what to give.

I have four org config files:  org-config.el, org-config-remember.el,
org-config-latex.el, and org-config-publish.  At the beginning of
org-config.el I load the other three.

From org-config.el:
--8<---cut here---start->8---
(add-hook 'org-mode-hook
  (lambda ()
(imenu-add-to-menubar "Imenu")
(local-set-key "\M-I" 'org-toggle-iimage-in-org)))

;;; general org functionality tweaks
(setq org-completion-use-ido t)

;;; customized list and outline behaviors
(setq org-empty-line-terminates-plain-lists t
  org-log-state-notes-insert-after-drawers t
  org-hide-leading-stars t)

;;; agenda customization
(setq org-agenda-files '("~/org/"))
(setq
 org-agenda-window-setup 'other-frame
 org-agenda-include-diary t
 org-agenda-ndays 7
 org-deadline-warning-days 14
 org-agenda-show-all-dates t
 org-agenda-skip-deadline-if-done t
 org-agenda-skip-scheduled-if-done t
 org-agenda-skip-timestamp-if-done t
 org-agenda-start-on-weekday nil
 org-stuck-projects
 '("+LEVEL=2+CATEGORY=\"PROJ\"|+CATEGORY=\"TASK\"/-DONE-CANCELED"
   ("NEXT" "WAITING")
   nil
   "")
 org-agenda-custom-commands
 '(("n" "NEXT items" todo "NEXT")
   ("w" "WAITING items" todo "WAITING")
   ("h" "at Home" tags "@CASTLE|@ERRANDS|@WEGMANS")
   ("w" "at Work" tags "@LAB|@OFFICE")
   ("j" "Just Todos" todo "TODO")
   ("r" todo "TO-READ")
   ("z" todo "TO-SUMMARIZE")
   ("o" todo "TO-NOTE")
   ("f" todo "TO-FILE")
   ("p" "All reading tasks" ((todo "TO-READ")
 (todo "TO-SUMMARIZE")
 (todo "TO-NOTE")
 (todo "TO-FILE")

(add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1))) 

;;; notes
(setq
 org-default-notes-file "~/notes.org"
 org-reverse-note-order t)

;;; org-mairix
(setq org-mairix-gnus-results-group 'nnmairix-default-group
  org-mairix-gnus-select-display-group-function)

;;; GTD setup
(setq
 org-todo-keywords
 '((sequence "TODO(t)" "NEXT(n)" "WAITING(w@/!)" "|" "DONE(d!)" "SOMEDAY(s)")
   (sequence "TO-FIND(l)" "TO-READ(r)" "READ-NEXT(x)" "TO-SUMMARIZE(z)" 
"TO-NOTE(o)" "TO-FILE(f)"  "|" "READ(e!)")
   (sequence "|" "CANCELED(c@/!)")))

(setq
 org-log-done t
 org-fast-tag-selection-single-key 'expert
 org-tags-match-list-sublevels t
 org-use-fast-todo-selection t
 org-fast-tag-selection-include-todo t)

(defun org-toggle-iimage-in-org ()
  "Display images in your org file"
  (interactive)
  (if (face-underline-p 'org-link)
  (set-face-underline-p 'org-link nil)
(set-face-underline-p 'org-link t))
  (iimage-mode))

;; sometimes we need IDs?
(setq org-id-method 'uuidgen)

;; moving items
(setq
 org-refile-targets '((org-agenda-files . (:maxlevel . 3)))
 org-refile-use-outline-path 'file)
--8<---cut here---end--->8---
   
From org-remember.el:
--8<---cut here---start->8---
;; moving tasks
(setq org-remember-use-refile-when-interactive t)

;; remember
(setq
 org-remember-store-without-prompt t
 org-remember-default-headline "Unfiled"
 org-remember-templates
 '(("todo"
?t "* TODO %? %^G\n  CREATED:  %u\n%a\n"
"~/org/todo.org"
"Unscheduled tasks")
   ("deadline"
?d "* TODO %? %^G\n  DEADLINE:  %^T\nCREATED:  %u\n%a\n"
"~/org/todo.org"
"Unscheduled tasks")
   ("standing"
?s "* %?\n  CREATED:  %u\n%^T\n%a\n"
"~/org/todo.org"
"Standing obligations")
   ("event"
?e "* %? %^G\n  CREATED:  %u\n%^T\n%a\n"
"~/org/todo.org"
"One-time events")
   ("project todo"
?p "* TODO %? %^G\n  CREATED:  %u\n%a\n"
"~/org/projects.org")
   ("note"
?n "* %u %? %^G"
"~/org/notes.org"
"Unfiled Notes")
   ("to-read"
?r "* TO-READ %a\n** Details\n%:author (%:year). %:title.  In %:journal, 
%:pages.\n\n"
"~/org/todo.org"

[Orgmode] Re: desirability of boxquote-style snippets for helping new users

2009-01-15 Thread Austin Frank
On Thu, Jan 15 2009, Samuel Wales wrote:

> I have noticed more people using boxquote and similar ways of setting
> off code.  This makes it pretty and makes it stand out, both of which
> are good things.
>
> [snip]
>
> What do you think?

For anyone using gnus, I think a good alternative is to use
message-mark-inserted region.  Select a region and hit C-c M-m to get

--8<---cut here---start->8---
a region set apart in this manner.
--8<---cut here---end--->8---

If you use a prefix on the command, C-u C-c M-m, you get slrn style
verbatim marks,

#v+
resulting in a region set a part in this manner.
#v-

Gnus gives nice highlighting in buffers containing sections like these.
Even for mail readers that don't recognize them, I think at least the
first is a good way of setting examples apart from the rest of the text.

FWIW, I do like boxquote for quoting excerpts from Info pages.  On an
info page, put some text into the kill ring (I use kill-ring-save, which
is M-w in my setup).  Then call M-x boxquote-info.

,[ (info "(message)Insertion") ]
| `C-c M-m'
|  Mark some region in the current article with enclosing tags.  See
|  `message-mark-insert-begin' and `message-mark-insert-end'.  When
|  called with a prefix argument, use slrn style verbatim marks
|  (`#v+' and `#v-').
`

Just my $0.02.
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpz2eS7mJokf.pgp
Description: PGP signature
___
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: Inline images in exported HTML

2009-01-14 Thread Austin Frank
On Wed, Jan 14 2009, Graham Smith wrote:

> Carsten,
>
> I think it worth while mentioning that I am looking for a "quick
> preview" of my document, that also shows the images.
>
> These are natively produced by R on the Mac as PDFs. I want to keep
> them in vector format for the final report, so a) don't really want to
> change the output from R, Or b) convert them to PNGs just to allow me
> a quick Preview, which would no longer be "quick"

Graham--

As another option, you might consider svg() from the RSvgDevice
package.  SVG images display in some modern web browsers.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpK8ed4HTNkR.pgp
Description: PGP signature
___
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: Org-mode and ESS

2008-11-12 Thread Austin Frank
On Wed, Nov 12 2008, Eric Schulte wrote:

> In the above example how would you/Sweave handle the case where there
> are multiple R blocks in the same file?  For example

Sweave puts all variables defined in a document into the same
environment.  So assigning to a twice overwrites the first assignment.

,[ tmp2.Rorg ]
| #+BEGIN_R
| a <- 3
| a
| #+END_R
| 
| - the value of a is \R{a}
| - the value of a + 3 is \R{a + 3}  
| 
| #+BEGIN_R
| a <- 8
| a
| #+END_R
| 
| - the value of a is \R{a}
| - the value of a + 3 is \R{a + 3}  
`

,[ tmp2.org ]
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
| > a <- 3
| > a
| \end{Sinput}
| \begin{Soutput}
| [1] 3
| \end{Soutput}
| \end{Schunk}
| #+END_LaTeX
| 
| - the value of a is 3
| - the value of a + 3 is 6  
| 
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
| > a <- 8
| > a
| \end{Sinput}
| \begin{Soutput}
| [1] 8
| \end{Soutput}
| \end{Schunk}
| #+END_LaTeX
| 
| - the value of a is 8
| - the value of a + 3 is 11  
`

> With that questions answered it should be relatively straightforward
> to implement exporting as you described using only org-mode's block
> processing, and letting ESS do the actual calculations all without any
> dependence on Sweave.

There is a Sweave.sty that handles formatting of the Schunk, Sinput, and
Soutput environments.  While you may not need to depend on Sweave for
the preprocessing step, it would be nice if the formatted document at
least had the option of having the same appearance as Sweave-processed
files.  Still, I suppose I could just add a #+LATEX_HEADER line for
these files.

> if you have examples of graphic creation, I'd be interested to see how
> they work, and relatedly how difficult it would be to move that
> functionality into org-mode.

OK, here comes the first attempt.  The additional feature demonstrated
in this example is the inclusion of options to the Sweave preprocessor
at the beginning of the block.  In this case I've specified fig=TRUE to
tell the preprocessor to generate image files for the plot commands
contained in the block.  By default, Sweave creates a .eps and a .pdf
file for each block that contains a plotting or printing command and has
the fig=TRUE argument, and then inserts an \includegraphics{} command in
the output file.

,[ tmp3.Rorg ]
| * first figure
| #+BEGIN_R fig=TRUE
| x <- rnorm(100)
| y <- rnorm(100)
| 
| plot(x,y)
| #+END_R
`

,[ tmp3.org ]
| * first figure
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
| > x <- rnorm(100)
| > y <- rnorm(100)
| > plot(x, y)
| \end{Sinput}
| \end{Schunk}
| #+END_LaTeX
| #+LaTeX:  \includegraphics{tmp3-001}
`

,[ tmp3.tex ]
| % Created 2008-11-12 Wed 23:46
| \documentclass[11pt,a4paper]{article}
| \usepackage[utf8]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage{graphicx}
| \usepackage{hyperref}
| \usepackage{Sweave}
| 
| \title{tmp3}
| \author{Austin Frank}
| \date{12 November 2008}
| 
| \begin{document}
| 
| \maketitle
| 
| 
| \section*{first figure}
| \label{sec-1}
| 
| \begin{Schunk}
| \begin{Sinput}
| > x <- rnorm(100)
| > y <- rnorm(100)
| > plot(x, y)
| \end{Sinput}
| \end{Schunk}
| \includegraphics{tmp3-001}
| 
| \end{document}
`

And the pdf is attached.



tmp3.pdf
Description: Adobe PDF document

I haven't looked into it too closely, but I would guess that when
fig=TRUE is specified, first the R block is run, and then the additional
R commands

  dev.copy2eps()
  dev.copy2pdf()
  
are run.  This results in the creation of eps and pdf files based on the
last thing plotted.  The functions could each take a file="foo" argument
(the filename defaults to Rplots.[eps|pdf]).  Sweave uses automatically
incremented names for its generated graphics files.  If your block
system could have an after-block hook, you could evaluate the original
block, then the appropriate dev.copy function, and then add an
additional line to the exported file for inclusion of the graphics file.

> However I think the rest of the point you make immediately below would
> be easily addressed through using an org-mode only approach.

Exciting!  If you're interested in what other options the Sweave
preprocessor contains, the manual can be found at
http://www.stat.auckland.ac.nz/~dscott/782/Sweave-manual-20060104.pdf.

Sweave also has a processing option called "tangle".  This extracts all
of the R code from a document and puts into its own file.  This would be
a useful feature in a generic block exporter as well, I would think.
Take all of the blocks of a certain type and dump the content into a
file with the appropriate extension for whatever the major mode was for
that block.

Finally , a couple of systems for caching Sweave output have sprung up.
I think these use the strategy of hashing the content of each block,
saving the output of each block, and only re-running the block if the
content has changed

[Orgmode] Re: Org-mode and ESS

2008-11-12 Thread Austin Frank
On Tue, Nov 11 2008, Graham Smith wrote:

> Is any one using Org-mode with ESS.  ESS seems to need a file with a
> *.R name to work, but it would be really useful to use Org-mode
> features to keep notes of comments and code, before sending to R, and
> of course to copy results back into an Org-Mode file from R.
>
> As a search here and a google hasn't thrown up anything obvious, I
> assume not, but I thought I would ask.

In my local git repo of the org sources I have a pretty nice setup for
using R or S inside org-mode.  I liked the in-file native editing of
source code so much that I decided that I wanted to use org files as
source files with Sweave (instead of using .Rtex or .Rnw files).  My
goal was to export documents with embedded R code, rather than to use
org within the comments of R files.  I can certainly see a use for the
latter approach (which seems to be what you have in mind), as well.

There was recently a thread where someone created a preprocessing system
for specific types of blocks.  That would be another possible strategy
for evaluating blocks of R code before export.  Since that facility
didn't exist yet and there was already the extensible Sweave
pre-processor, I took the route of making Sweave org-aware.


Basically, in the workflow I've developed, I create a file with the
extension .Rorg, say homework_key.Rorg.  Within that file, I can embed
blocks of R code, and can refer to variables defined in the R code
contained in the document.

--8<---cut here---start->8---
#+BEGIN_R
a <- 3
a
#+END_R

* the value of a is \R{a}
* the value of a + 3 is \R{a + 3}  
--8<---cut here---end--->8---

Executing C-c ' inside the block takes you into a temporary buffer
that's in ESS mode, with full support for interactive evaluation.


When I'm ready to export, I run the R command

  Sweave("homework_key.Rorg", driver=RweaveOrgLatex, syntax=SweaveSyntaxOrg).

(I've defined those driver and syntax functions locally).  This creates
a new file, homework_key.org.  In the new file, the above text would be
translated into

--8<---cut here---start->8---
#+BEGIN_LATEX
\begin{Schunk}
\begin{Sinput}
> a <- 3
> a
\end{Sinput}
\begin{Soutput}
[1] 3
\end{Soutput}
\end{Schunk}
#+END_LATEX

* the value of a is 3
* the value of a + 3 is 6
--8<---cut here---end--->8---

The plain homework_key.org file could then be exported into \LaTeX.  It
even works with the new pdf export.
  

I haven't put the code anywhere public because there are several things
I still need to do:

- test graphic creation and export
- improve generation of latex headers
- automate processing from .Rorg to .tex (or .pdf) (currently at least 3
  steps, should be 1)
- come up with suggested keybindings for inserting the #+BEGIN/END_R
  blocks
- create a driver to generate HTML instead of \LaTeX

Still, it is in a works-for-me state at the moment, and I could send a
pull request to Carsten or could push it worg if folks were interested.

Let me know,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp68slAN4f7E.pgp
Description: PGP signature
___
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: possible latex export bug

2008-10-14 Thread Austin Frank
On Tue, Oct 14 2008, Carsten Dominik wrote:

> Hi Austin,
>
> please give it another try, I think I have fixed this problem.
>
> - Carsten

Carsten--

Very very close!  As far as I can tell, there's just one bug left with
the ordering of export operations.  The problem is that a line within a
#BEGIN/END_LATEX block that starts with a + is exported as belonging to
an itemized list.  My expectation is that no org formatting should be
applied inside a block that's been declared with one of
org-additional-option-like-keywords or org-edit-src-region-extra.

Bug report follows.

Thanks!
/au

Start emacs with emacs -Q

evaluate (require 'org-install)

open a new file in org mode, testing.org

enter the following content:

--8<---cut here---start->8---

* test
#+BEGIN_LATEX
\begin{verbatim}
a <-
+ 3
\end{verbatim}
#+END_LATEX
--8<---cut here---end--->8---

execute org-export-as-latex

get the following output

--8<---cut here---start->8---
% Created 2008-10-14 Tue 22:46
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}


\title{testing}
\author{Austin Frank}
\date{14 October 2008}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents


\section{test}
\label{sec-1}

\begin{verbatim}
a <-
\begin{itemize}
\item 3
\end{itemize}

\end{verbatim}


\end{document}
--8<---cut here---end--->8---


--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpS3v9Qzywr5.pgp
Description: PGP signature
___
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: possible latex export bug

2008-10-12 Thread Austin Frank
On Fri, Oct 10 2008, Carsten Dominik wrote:

> I believe this bug has been fixed recently by Bastien.  Could you
> please check and confirm that this is the case?

Carsten and Bastien--

I still get this behavior.  To reproduce

1.  Start emacs with emacs -Q
2.  Evaluate the line

  (require 'org-install)

3.  Open a new file, tesing.org.  Execute M-x org-mode.
4.  Put the following content in testing.org

--8<---cut here---start->8---

* test
#+BEGIN_LATEX
\begin{verbatim}
a <- 3
\end{verbatim}
#+END_LATEX
--8<---cut here---end--->8---

5.  Execute org-export-as-latex by C-c C-e l
6.  Output is

--8<---cut here---start->8---
% Created 2008-10-12 Sun 23:43
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}


\title{testing}
\author{Austin Frank}
\date{12 October 2008}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents


\section{test}
\label{sec-1}

\begin{verbatim}
a <- 3
\end{verbatim}
#+END_LATEX


\end{document}
--8<---cut here---end--->8---


I also am seeing that file-local variables at the bottom of the file are
still exported into the latex.  For now I'm assuming that it's the same
bug, but if the #+END_LATEX bug gets fixed and the other persists, I'll
file another report :)

Org-mode version 6.09a
GNU Emacs 23.0.60.1 (powerpc-apple-darwin8.11.0, *Step 9.0) of
2008-10-12

Just to be sure, I also ran

  git diff origin lisp/org-exp.el
  git diff origin lisp/org-export.el

and found no differences between my local copy and the copy in the
origin repository.  I think that's the right way to check, but feel free
to correct me if I'm comparing things incorrectly.

Thanks,
/au

--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpLJlCbQb0vB.pgp
Description: PGP signature
___
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: Question about agenda

2008-10-08 Thread Austin Frank
On Wed, Oct 08 2008, Robert Goldman wrote:

> I think this means that I don't really understand the meaning of
> SCHEDULED, nor do I understand how the agendas are composed.  But I'm
> looking at the info manual now, and I'm not actually enlightened.
>
> Is there something I should do to tag something SCHEDULED like this so
> that it no longer appears in my agenda view as something still to be
> done?  Is there a HAPPENED tag, or something like that?

,[ (info "(org)Deadlines and scheduling") ]
| SCHEDULED
|  Meaning: you are planning to start working on that task on the
|  given date.
| 
|  The headline will be listed under the given date(1).  In addition,
|  a reminder that the scheduled date has passed will be present in
|  the compilation for _today_, until the entry is marked DONE.
|  I.e., the task will automatically be forwarded until completed.
| 
|   *** TODO Call Trillian for a date on New Years Eve.
|   SCHEDULED: <2004-12-25 Sat>
| 
|  Important: Scheduling an item in Org mode should not be understood
|  in the same way that we understand scheduling a meeting.  Setting
|  a date for a meeting is just a simple appointment, you should mark
|  this entry with a simple plain time stamp, to get this item shown
|  on the date where it applies.  This is a frequent
|  mis-understanding from Org-users.  In Org mode, scheduling means
|  setting a date when you want to start working on an action item.
`


HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpE9VGeInpOB.pgp
Description: PGP signature
___
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] custom link type for files in a git repo

2008-10-05 Thread Austin Frank
Hey org-folk--

I originally included this in my questions to John and Carsten about the
new attach system, but decided it deserved its own thread.  Apologies if
this seems like too much git-spam.

Now that org and git are starting to be used in conjunction by more and
more of us, would anyone else find it useful to have a custom link type
for linking to git objects?

I could imagine that calling org-store-link on a file or directory that
is in a git repo could link to the current HEAD version, and we could
have access to all of the information from calling git-log on the file
(commit, author, date, message).  Similarly, we'd want to be able to
link to arbitrary objects in the repo's history (tags, particular
commits, merge points, etc).

I think most of this could be done via git.el that is distributed with
git.  One cool application of this would be a git post-commit-hook that
called remember to create a link to the new commit in the relevant
project file.  This would be a really neat way to keep a timeline for a
particular project's commits right alongside all of the other
information stored in org.  I can also see it being really useful to
link to a particular version of a non-org file within some org notes.
That file might change, making it difficult to interpret some notes or
making specific line numbers irrelevant, but a link to the exact version
being discussed would make such notes future proof.

I think I could probably get at least a skeleton of these kinds of
functions working myself, but I won't be able to get to it until the
winter holidays.  If these ideas scratch the itches of another org user
who wants to code this up, I promise I'll a) use it b) praise your
awesomeness, and c) buy you a beer if we're ever in the same city.

Thoughts?  Other features that could go into this?

Thanks,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp6LcTwvdvgU.pgp
Description: PGP signature
___
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: RELEASE: Org-mode 6.08a

2008-10-05 Thread Austin Frank
As always, thanks so much for the hard work!  And also to John!

On Sun, Oct 05 2008, Carsten Dominik wrote:

> New attachment system
> -
>
> You can now attach files to each node in the outline tree.  This
> works by creating special directories based on the ID of an entry,
> and storing files in these directories.  Org can keep track of
> changes to the attachments by automatically committing changes to
> git.  See the manual for more information.
>
> Thanks to John Wiegley who contributed this fantastic new concept
> and wrote org-attach.el to implement it.

Well!  My curiosity's certainly piqued, but I confess that I don't quite
get the applications here.  Any chance Carsten or John would be willing
to let us know how they're using this?

Also, the synopsis above and the manual both mention git integration,
but I don't understand what exactly is done.  It sounds like if the org
file lives in a directory that is a git repo, any additions or changes
to the files in the auto-generated data/ subdirectory are automatically
committed?  Is this the right idea?  What does the synchronize command
do if the directory isn't a git repo?

I am thrilled to see a move towards some nice defaults for org and git
integration.  I see that in org-attach.el you're using shell-command to
call git directly.  If you don't mind, may I ask if you considered using
git.el that is distributed with git (in contrib/emacs/), or even magit
(http://zagadka.vm.bytemark.co.uk/magit/)?

Thanks again,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpMIgliYE4Ei.pgp
Description: PGP signature
___
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: BUG - Note logging to wrong task

2008-10-02 Thread Austin Frank
On Thu, Oct 02 2008, Carsten Dominik wrote:

> And with a well-prepared bug report like in this case, it really
> does not take longer than  that.

/me hangs his head in shame

:P

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpDfaA9pkSgW.pgp
Description: PGP signature
___
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] possible latex export bug

2008-10-02 Thread Austin Frank
Hello!

I'll start by confessing up front that I've been tinkering with
different exporting functions these past few weeks, so it's possible
that the bug I'm reporting here is of my own making.  I can't track it
down, so here I am, hat in hand, to ask

a) is this reproducible?  and,
b) if not, any idea which functions I should look at to chase it
   down?

If I have the following org file

--8<---cut here---start->8---
* this is a test
#+begin_latex
\mu
#+end_latex
--8<---cut here---end--->8---

and run org-export-as-latex, I get the following output

--8<---cut here---start->8---
% normal preamble stuff
% ...

\begin{document}

\maketitle


\section*{this is a test}


\mu

\end{document}
--8<---cut here---end--->8---

That's the correct behavior.  If I use this org file

--8<---cut here---start->8---
* this is a test
#+begin_latex
\begin{quote}
\mu
\end{quote}
#+end_latex
--8<---cut here---end--->8---


and run org-export-as-latex, I get

--8<---cut here---start->8---
% normal preamble stuff
% ...
\begin{document}

\maketitle


\section*{this is a test}


\begin{quote}
\mu
\end{quote}
#+end_latex

\end{document}
--8<---cut here---end--->8---

In the second example, the #+end_latex line is not removed during
org-export-to-latex.

Possibly related, possibly unrelated, I'm also seeing that file-local
variables defined at the end of a buffer are being exported verbatim
during org-export-as-latex.  This only happens in cases where the
#+end_latex is also erroneously exported.

--8<---cut here---start->8---
* this is a test
#+begin_latex
\begin{quote}
\mu
\end{quote}
#+end_latex

#+ Local Variables:
#+ org-export-latex-append-header: "
#+ \\usepackage{graphicx}
#+ "
#+ End:
--8<---cut here---end--->8---
  
gives

--8<---cut here---start->8---
% normal preamble stuff
% ...

\begin{document}

\maketitle

\begin{quote}
\mu
\end{quote}
#+end_latex

#+ Local Variables:
#+ org-export-latex-append-header: "
#+ \\usepackage{graphicx}
#+ "
#+ End:

\end{document}
--8<---cut here---end--->8---

This doesn't just apply to the quote environment, I've reproduced it
with other #begin/end_latex blocks that contain latex environments.
That is to say

--8<---cut here---start->8---
* this is a test
#+begin_latex
\begin{verbatim}
\mu
\end{verbatim}
#+end_latex
--8<---cut here---end--->8---

has the same problem of including the #+end_latex tag after export.

This is with Org-mode version 6.08-pre01, GNU Emacs 23.0.60.1
(powerpc-apple-darwin8.11.0, *Step 9.0) of 2008-10-01.


Can anyone reproduce this?  Any debugging tips?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpHYFsxY3RKQ.pgp
Description: PGP signature
___
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] #+LATEX_PREAMBLE

2008-10-01 Thread Austin Frank
Carsten and org-ers--

I have a feature request related to \LaTeX export.  I know that we can
set up custom \documentclass declarations in org-export-latex-classes,
and that each of these can contain arbitrary preamble information along
with the \documentclass{} declaration.  I also know that the preamble
can be further customized using file local variables to set
org-export-latex-append-header.  These two solutions can seem relatively
heavyweight when one just wants to add a new \usepackage{} declaration
to the preamble of a specific file.

Any chance we could have a mechanism to add single line declarations to
the preamble of the exported tex file using the #+FOO syntax?  I would
really love to be able to do something like

#+LATEX_PREAMBLE:  \usepackage{pstricks}
#+LATEX_PREAMBLE:  \usepackage{Sweave}

at the top of a file and have each of those lines inserted before the
\begin{document} line of the exported tex file.  I think for readability
and flexibility the possibility of having multiple declarations would be
really nice, but I could certainly live with

#+LATEX_PREABMLE:  "\\usepackage{pstricks}\n\\usepackage{Sweave}"

if that were easier to implement.

Thanks for considering it,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpqsMSTgRZeX.pgp
Description: PGP signature
___
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: Latex exporting

2008-09-24 Thread Frank Dekens
Russell Adams  AdamsInfoServ.Com> writes:

> 
> Those are only honored when the file is opened, or you can hit 
> 
> 'M-x normal-mode' 
> 
> to reload them.
> 
> Don't forget that the same applies to the template options header org
> can put at the top of the file. Its honored at open, or if you update
> a line you can C-c C-c on it to load that line.
> 
> This is why I use a Makefile that invokes a separate copy of email to
> export / pdflatex my output. I never have to worry about if my
> variables are current.
> 
> Enjoy!
> 

Ok, I got the Latex export to work. In the mean time I have also learned
to COMMENT and :ARCHIVE: the by now long header area, so I keep it nicely
hidden and not bothering me.

When I first read your post, I didn't understand the second paragraph,
(I believe you mean emacs instead of email), but now that I have
forgotten a step in the process so many times (usually the C-c C-e l
part of coarse), I understand why you use a Makefile.

All that to say: Can you please post a copy of that makefile, because I
have no idea how to invoke all those commands that way.

Thanks,
Frank D.




___
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: org-export-sweave

2008-09-22 Thread Austin Frank
On Thu, Sep 18 2008, Carsten Dominik wrote:

> These regular expressions are incorrect. \\s- is the way to denote
> whitespace.  However, since that also includes newlines, I prefer to
> write "[ \t]" in such cases.

Carsten--

Thanks for the tip.  I now to get dumped into r-mode correctly when I
hit C-c ' inside the regions defined in the attached patch.  There's one
annoying quirk left, though.

When coming out of r-mode by hitting C-c ' in the Org Edit Src Example
buffer, the line that ends the example (#+latex:  \end{Scode}) is
concatenated to the last line of the source code, regardless of how many
new lines are included at the end of the source code in the temporary
buffer.

   #+latex: \begin{Scode}
   a <- 3
   #+latex: \end{Scode}

goes to

   #+latex: \begin{Scode}
   a <- 3#+latex: \end{Scode}

Any suggestions on how to preserve the formatting of the end marker?

Thanks,
/au

diff --git a/lisp/org.el b/lisp/org.el
index 3143e13..75f25f8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5562,6 +5562,8 @@ the language, a switch telling of the content should be in a single line."
 	   ("^#\\+begin_example.*\n" "^#\\+end_example" "fundamental")
 	   ("^#\\+html:" "\n" "html" single-line)
 	   ("^#\\+begin_html.*\n" "\n#\\+end_html" "html")
+   ("^[ \t]*begin{scode}\\({.*}\\)?\\s-+" "^[ \t]*end{scode}\\({.*}\\)?\\s-+" "r")
+	   ("^#\\+latex:[ \t]*begin{scode}\\({.*}\\)?\\s-+" "^#\\+latex:[ \t]*end{scode}\\({.*}\\)?\\s-+" "r")
 	   ("^#\\+begin_latex.*\n" "\n#\\+end_latex" "latex")
 	   ("^#\\+latex:" "\n" "latex" single-line)
 	   ("^#\\+begin_ascii.*\n" "\n#\\+end_ascii" "fundamental")

   
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
___
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-agenda-busy-at

2008-09-17 Thread Austin Frank
Carsten and other org-folk--

Any chance that it would be possible to query the agenda to see whether
anything is scheduled at a particular time?  The application I have in
mind is scheduling new events with remember templates.  If there's
already something in the agenda for the timestamp I enter in a new
remember entry, I would love to be given the message "There is already
an event scheduled at that time.  Really use this timestamp?"

I could see a further extension of this, such that it allowed different
behavior for different kinds of time stamps.  Something like

(setq org-agenda-busy-warn
  '(active . t)
  '(scheduled . "-1h +1h")
  '(deadline . "+3d"))

would warn you if you tried to add a new timestamp that occurred within
the range of an active timestamp; and would warn you if the new
timestamp were within plus or minus one hour of a timestamp with the
SCHEDULED property; and would also warn you if you tried to add a new
timestamp within three days of a deadline.

"You tried to create a new event with timestamp <2008-10-31
20:00-21:30>.   There is already an entry with timestamp <2008-10-31
20:30-12:00>.  You have an event SCHEDULED at <2008-10-31 19:30>.  You
have a DEADLINE on <2008-11-2>.  Proceed/Edit timestamp/Cancel?"

We could then use a function, org-agenda-busy-at, to check timestamps
included in new remember notes before they get filed.  

I don't know whether this kind of information is easily retrievable from
the agenda, or whether it could be stored as the agenda is built.  Is
there someplace in the code that I should look to check into the
feasibility of this idea?  Is it just impossible?  Is it one of those
things where Carsten says a mystical incantation and it's done?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpu7uH1VU0ty.pgp
Description: PGP signature
___
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: org-export-sweave

2008-09-17 Thread Austin Frank
Carsten--

Thanks for the response!

On Tue, Sep 16 2008, Carsten Dominik wrote:

> since you want to include tis code literally into LaTeX,  the best is
> probably to encapsulate it into
>
> #+BEGIN_LATEX  #+END_LATEX
>
> and to try to solve only the local editing issue.

Yes, this makes sense.  Though, since really all I need to do is wrap
source code written in R in a \LaTeX environment, I might also like to
use

#v+
#+LATEX:  \begin{Scode}
a <- 3
a
#+LATEX:  \end{Scode}
#v-

> Take a look at the function org-edit-src-find-region-and-lang.  There
> is a list of regular expressions that can be used to identify regions
> that should be edited in special modes - maybe I can make this list
> extensible - first, give it a try and see if you can get it working by
> editing the list.

While I think opening up this list to customization is probably a good
idea, I could not get my new entries to behave the way I wanted.  The
problem, I suspect, may have to do with the ordering of the different
language environments.  Suppose I had

#v+
#+BEGIN_LATEX
\begin{Scode}
a <- 3
a
\end{Scode}
#+END_LATEX
#v-

in an org file.  I guess that I want the code within the Scode
environment to me in r-mode, and the code outside of that but still
within the LATEX block to be in LaTeX-mode.  In what order should these
two definitions appear within the re-list?

FWIW, attached is a patch of the setup I tried to use.  When I hit C-c '
inside either of the above examples, I get a temporary buffer that's in
latex-mode.  I was hoping to get a temporary buffer in r-mode.  I also
tried a version of the code that used the same entries in the re-list,
but put them at the bottom, under the entries for ascii.  Same results.

Thanks for any further advice,
/au

diff --git a/lisp/org.el b/lisp/org.el
index 4b29704..0612653 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5562,6 +5562,8 @@ the language, a switch telling of the content should be in a single line."
 	   ("^#\\+begin_example.*\n" "^#\\+end_example" "fundamental")
 	   ("^#\\+html:" "\n" "html" single-line)
 	   ("^#\\+begin_html.*\n" "\n#\\+end_html" "html")
+   ("^\\s*begin{scode}" "^\\s*end{scode}" "r")
+	   ("^#\\+latex:\\s*begin{scode}" "^#\\+latex:\\s*end{scode}" "r")
 	   ("^#\\+begin_latex.*\n" "\n#\\+end_latex" "latex")
 	   ("^#\\+latex:" "\n" "latex" single-line)
 	   ("^#\\+begin_ascii.*\n" "\n#\\+end_ascii" "fundamental")



-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpA7norSaf0y.pgp
Description: PGP signature
___
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: Latex exporting

2008-09-10 Thread Frank Dekens
Russell Adams  AdamsInfoServ.Com> writes:

> 
> 
> End of file.org --
> 
> #+ Local Variables:
> #+ org-export-latex-title-command: ""
> #+ org-export-latex-append-header: "\
> #+ \\usepackage{graphicx}
> #+ \\usepackage{multicol}
> #+ \\geometry{headheight=47pt}
> #+ \\fancyhead[L]{\\LARGE This is the header title}
> #+ \\fancyfoot[L]{\\small Overridden filename \\today}
> #+ "
> #+ End:
> 
> 
> 

Hi,
 I have seen these local variable additions in several examples on
the web, but for some reason they never make it into my .tex file. Is
there a trick to getting these to appear? I'm using v6.02 of org with
Carbon Emacs on a Mac.
 I'll try the .emacs style from your example in the mean time, but
it would still be nice to get these variables to work.
 Thanks,
 Frank D.
PS: Thanks for the great example.



___
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-export-sweave

2008-09-01 Thread Austin Frank
Hello!

Sweave is a preprocessing step that can be applied to LaTeX files that
contain code written in the S or R programming languages.  Sweave allows
authors to embed their statistical analyses in body of their LaTeX
articles, enabling what I find to be a very nice style of literate
programming.  It seems to me like org currently has all of the
functionality needed to be a top-notch Sweave authoring environment, but
I can't get the pieces to work correctly together.  So this is both a
feature request and a request for implementation advice.

I'm hoping that it will be possible to add an option for exporting
Sweave blocks from org mode.  A Sweave block in LaTeX looks like

  % NB:  options are comma separated, spaces are optional
  \begin{Scode}{opt1=foo, opt2=bar,opt3=baz}
  a <- 3
  a
  \end{Scode}

Right now I can easily get this exported using

  #+LATEX: \begin{Scode}{opt1=foo, opt2=bar,opt3=baz}
  a <- 3
  a
  #+LATEX: \end{Scode}

But I would also like to be able to use the native editing mode for
writing the code, as happens in #+BEGIN_SRC blocks. I can't currently
get a combination of #+BEGIN_SRC and #+LATEX blocks to work.

Would it be possible to have something like

  #+BEGIN_SWEAVE: language opt1=foo, opt2=bar, opt3=baz
  a <- 3
  a
  #+END_SWEAVE

where the code inside the SWEAVE block is edited in the appropriate
major mode for the language argument?  An actual use, then, would look
like

  #+BEGIN_SWEAVE:  r fig=TRUE, echo=FALSE,keep.source=TRUE
  x <- runif(100, 0, 100)
  y <- runif(100, 0, 100)
  plot(x ~ y)
  #+END_SWEAVE

C-c ' inside the block would call out to r-mode from the package ESS.
LaTeX export would result in

  \begin{Scode}{fig=TRUE, echo=FALSE,keep.source=TRUE}
  x <- runif(100, 0, 100)
  y <- runif(100, 0, 100)
  plot(x ~ y)
  \end{Scode}

The file output by export to LaTeX should have the extension .Rtex.  The
author can then run Sweave on the file to generate a .tex file, and then
the normal LaTeX compilation process continues.

I've started trying to put this together myself, but haven't gotten very
far.  Some of the existing behavior for exporting source code relies on
prefixing the code inside the block with a ':' at the beginning of the
line, which then results in a verbatim environment in LaTeX.  I can't
figure out how to override this selectively for Sweave blocks, while
retaining the major-mode switching with C-c '.


Thanks for any implementations tips or (even better!) working
implementations ;)

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpFX0PuQTxAx.pgp
Description: PGP signature
___
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] [WISH] LaTeX Export: Expand link abbreviations first before exporting LaTeX links

2008-07-04 Thread Frank Chang
Hi, Carsten

Thank you for fixing the tag problem in headline.
It's really amazing that the problem can be fixed so quick (just few hours)!

Now I have another problem:)

Since I put all image files in one directory called, for example, ~/notes/img.
And I want it to be a link abbreviation,

#+LINK: imagefile:~/notes/img/

so the image link will be easy to write:

   [[image:demo.jpg]]

and also easy to maintain.

But when I export the file, LaTeX exporter doesn't take it as a valid image link
(\includegraphics[...]{~/notes/img/demo.jpg}).

In function org-export-latex-links(), it seems that only the links beginning
with 'file:' can be valid image links, and the link abbreviations are not
replaced first.

So is it possible to expand link abbreviations first before exporting LaTeX
links (maybe apply the function org-link-expand-abbrev() in org.el)?


Thanks.


Best regards,
Frank




___
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] LaTeX Export: The output of headline is incorrect when tag contains '_' or '@'

2008-07-03 Thread Frank Chang

Hello everyone,

I'm new to Emacs (22.1) and org-mode (6.05b).
Recently I start to use org-mode for note-taking, and it's really useful.

But the problem comes when I try to export my org file to LaTeX.
For example, if the headline is:

   * Headline :@tag_1:tag_2:tag3:

which contains 3 tags: '@tag_1', 'tag_1',  and 'tag3',
then the output will become

   #+OPTIONS:   toc:nil ^:nil
   \section{Headline :@tag\_{}1:tag\_{}2}

   #+OPTIONS:   toc:nil ^:{}
   #+OPTIONS:   toc:nil ^:t
   \section{Headline :@$tag_1$:$tag_2$}

which seems incorrect.

I look at the source code 'org-export-latex.el', and find the statement 
in function org-export-latex-keywords-maybe()


   ;; convert tags
   (when (re-search-forward "\\(:[a-zA-Z0-9]+\\)+:" nil t)
 (if (or (not org-export-with-tags)
 (plist-get remove-list :tags))
 (replace-match "")
   (replace-match (format "\\texttt{%s}" (match-string 0)) t t)))

It seems that LaTeX exporter takes only letters and numbers as parts of 
tags.


But even I add '_' and '@' in regex it doesn't work, because '_'  has 
been exported

by the function org-export-latex-special-chars() (maybe '\_{}')

I'm a Emacs newbie, and really don't know what to do next:)

So is there anyway to work around or fix it?

Thanks.


Best regards,
Frank


___
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] LaTeX Export: The output of headline is incorrect when tag contains '_' or '@'

2008-07-03 Thread Frank Chang
Hello everyone,

I'm new to Emacs (22.1) and org-mode (6.05b).
Recently I start to use org-mode for note-taking, and it's really useful.

But the problem comes when I try to export my org file to LaTeX.
For example, if the headline is:

   * Headline :@tag_1:tag_2:tag3:

which contains 3 tags: '@tag_1', 'tag_1',  and 'tag3',
then the output will become

   #+OPTIONS:   toc:nil ^:nil
   \section{Headline :@tag\_{}1:tag\_{}2}

   #+OPTIONS:   toc:nil ^:{}
   #+OPTIONS:   toc:nil ^:t
   \section{Headline :@$tag_1$:$tag_2$}

which seems incorrect.

I look at the source code 'org-export-latex.el', and find the statement in
function org-export-latex-keywords-maybe()

   ;; convert tags
   (when (re-search-forward "\\(:[a-zA-Z0-9]+\\)+:" nil t)
 (if (or (not org-export-with-tags)
 (plist-get remove-list :tags))
 (replace-match "")
   (replace-match (format "\\texttt{%s}" (match-string 0)) t t)))

It seems that LaTeX exporter takes only letters and numbers as parts of tags.

But even I add '_' and '@' in regex it doesn't work, because '_'  has been
exported by the function org-export-latex-special-chars() (maybe '\_{}')

I'm a Emacs newbie, and really don't know what to do next:)

So is there any way to work around or fix it?

Thanks.


Best regards,
Frank




___
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


  1   2   >