[O] Error message could be improved - Specified time is not representable

2011-05-24 Thread Julian Bean
Hi all,

On upgrading to emacs 23.3 (from emacs 23.1) my daily/weekly agenda became 
unusable, giving the error message "Specified time is not representable".

After a bit of poking around in the backtrace I tracked this down to an 
erroneous SCHEDULED date of 1st January 1904 buried inside a task. (This date 
was created by a bug in a script I was using to import TODOs from another 
system).

Evidently, for some reason, calling (encode-time 0 0 0 1 1 1904) on 23.3 causes 
the error above, whereas on 23.1 it's silently ignored?

I think the best thing for org-mode is to catch this error and report it to the 
user in a more understandable way so they can locate and fix the buggy 
timestamp - at least, include the full text of the timestamp so they can easily 
grep for it?

Jules






Re: [O] Completing with anything

2011-05-24 Thread Julien Danjou
On Tue, May 24 2011, Stefan Monnier wrote:

> I've now added a :exit-function property that
> completion-at-point-functions can return which is a function that gets
> called when completion is finished.  It operates outside of the
> completion-table, so has access to the buffer text and can do things
> like abbrev-expand.
>
> It gets a status argument which tells it whether the completion is
> `exact' (basically, it's valid according to the completion-table, but
> there may be further completions available), `sole' (it's the only
> completion), and `finished' (not only it's the sole completion, but the
> user is not expected to want to change it).  `sole' is used by cycling,
> so the :exit-function can call abbrev-expand when the status is
> `finished' and it won't interfere with cycling (which simply won't
> benefit from abbrev-expansion).

That sounds really tremendous Stefan! Just what was needed.

Thanks a lot.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpSrPZ76Mjx7.pgp
Description: PGP signature


[O] automatically closing example?

2011-05-24 Thread Steinar Bang
Is there a shortcut to quickly add an #+END_EXAMPLE at the same
indentation level as the #+BEGIN_EXAMPLE I have just typed?  I have
googled but not found.

I know that I can type C-j # + b M-TAB e M-TAB, but what I get then is
basically what I wanted after I had completed the BEGIN_EXAMPLE.

Ie. I never want an unbalanced BEGIN_EXAMPLE.




Re: [O] Error message could be improved - Specified time is not representable

2011-05-24 Thread Giovanni Ridolfi
Julian Bean  writes:

Hi Jules,

>
> On upgrading to emacs 23.3 (from emacs 23.1) my daily/weekly agenda
> became unusable, giving the error message "Specified time is not
> representable".

>
> [...] I tracked this down to an erroneous SCHEDULED date of 1st
> January 1904 buried inside a task. [...]
>
> Evidently, for some reason, calling (encode-time 0 0 0 1 1 1904) on
> 23.3 causes the error above, 

" This is probably related to the same problem as discussed in this
  thread:
  http://thread.gmane.org/gmane.emacs.orgmode/39206

  on the limitations of unix time (whether on Unix or not...)."

> whereas on 23.1 it's silently ignored?

Since it is an Emacs problem I think you should ask Emacs's 
developers:
emacs-de...@gnu.org 

or file a bug report: 
M-x report-emacs-bug or write to
bug-gnu-em...@gnu.org

cheers,
Giovanni



Re: [O] automatically closing example?

2011-05-24 Thread Puneeth Chaganti
Hello,

On Tue, May 24, 2011 at 1:38 PM, Steinar Bang  wrote:
> Is there a shortcut to quickly add an #+END_EXAMPLE at the same
> indentation level as the #+BEGIN_EXAMPLE I have just typed?  I have
> googled but not found.
>
> I know that I can type C-j # + b M-TAB e M-TAB, but what I get then is
> basically what I wanted after I had completed the BEGIN_EXAMPLE.
>
> Ie. I never want an unbalanced BEGIN_EXAMPLE.
>

http://orgmode.org/org.html#Easy-Templates

HTH,
Puneeth



Re: [O] Error message could be improved - Specified time is not representable

2011-05-24 Thread Julian Bean

On 24 May 2011, at 09:16, Giovanni Ridolfi wrote:

> Julian Bean  writes:
> 
>> 
>> [...] I tracked this down to an erroneous SCHEDULED date of 1st
>> January 1904 buried inside a task. [...]
>> 
>> Evidently, for some reason, calling (encode-time 0 0 0 1 1 1904) on
>> 23.3 causes the error above, 
> 
> " This is probably related to the same problem as discussed in this
>  thread:
>  http://thread.gmane.org/gmane.emacs.orgmode/39206
> 
>  on the limitations of unix time (whether on Unix or not...)."

Thanks, I missed that. You're right, that describes another manifestation of 
the same issue.

> 
>> whereas on 23.1 it's silently ignored?
> 
> Since it is an Emacs problem I think you should ask Emacs's 
> developers:
> emacs-de...@gnu.org 
> 
> or file a bug report: 
> M-x report-emacs-bug or write to
> bug-gnu-em...@gnu.org

I disagree. It's not a clear emacs bug - the docstring for encode-time says 
very clearly "Years before 1970 are not guaranteed to work.  On some systems, 
year values as low as 1901 do work.". encode-time is working as documented and 
I certainly don't understand emacs' date-time internals well enough to suggest 
a better way.

The *org-mode* bug is, simply, the error message (hence my message title). If 
this exception does occur, it would be nice if org-mode would catch it, and 
provide better information to the user about which timestamp he needs to fix.

Jules




[O] [patch] Do not run flyspell checks on org keywords

2011-05-24 Thread Sébastien Delafond
Here is a small patch that prevents flyspelle from checking all the Org
keywords. This is especially useful when using a dictionary other than
english.

Cheers,

--Seb

>From 0a6493331f1d84a4c44533bdea1c3c9b41c997eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= 
Date: Mon, 23 May 2011 18:16:57 +0200
Subject: [PATCH] [flyspell] Do not run flyspell-checks on 
{todo,all-time,additional-option-like}-keywords

  * this is useful when using flyspell with a non-English dictionary,
or if some of your keywords are in another language
---
 lisp/org.el |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 9f8fa92..676f08f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20135,9 +20135,15 @@ To get rid of the restriction, use 
\\[org-agenda-remove-restriction-lock]."
 
 ;; Make flyspell not check words in links, to not mess up our keymap
 (defun org-mode-flyspell-verify ()
-  "Don't let flyspell put overlays at active buttons."
-  (and (not (get-text-property (max (1- (point)) (point-min)) 'keymap))
-   (not (get-text-property (max (1- (point)) (point-min)) 
'org-no-flyspell
+  "Don't let flyspell put overlays at active buttons, or on
+   {todo,all-time,additional-option-like}-keywords."
+  (let ((pos (max (1- (point)) (point-min)))
+   (word (thing-at-point 'word)))
+(and (not (get-text-property pos 'keymap))
+(not (get-text-property pos 'org-no-flyspell))
+(not (member word org-todo-keywords-1))
+(not (member word org-all-time-keywords))
+(not (member word org-additional-option-like-keywords)
 
 (defun org-remove-flyspell-overlays-in (beg end)
   "Remove flyspell overlays in region."
-- 
1.7.2.5





[O] org babel support for tcl and awk

2011-05-24 Thread orgm...@h-rd.org

Hi,

I am looking for support for Tcl (and AWK) for org-babel.  Both have a  
supplied emacs mode and Tcl also has an inferior interpreter mode.  I  
was trying to do it myself, however I am quite lost in the  
instructions.  Is there someone with the knowledge and willingness to  
provide a support file for org babel for Tcl (and maybe awk)?


thanks.





Re: [O] Org Contacts, Gnus and Yasnippet Not Playing Nicely

2011-05-24 Thread Tassilo Horn
Ian Barton  writes:

Hi Ian,

> I am trying to set up Org Contacts and gnus. Org Contacts suggests
> that pressing +  in the To: field in a message buffer should
> offer a list of tags from my contacts file. However, I just get a Tab.
>
> I suspect that Yasnippet is interfering, as entering the abbreviation
> for any of my snippets and pressing Tab auto-completes the
> snippet. Does anyone have a tip for making Yasnippets, gnus and
> org-contacts play nicely together?

It works fine for me using emacs 24.  Maybe you've set
`org-contacts-completion-ignore-case' set to nil (which is not the
default), and you are trying to complete a lowercase starter while all
of your contacts have names starting uppercase?

If not, start writing a mail and go to the To: header.  Type the first
character of a contact that definitively exists.  You should get a
*Completion* buffer, or it should complete to the sole matching contact.
Additionally, doing `C-h k TAB' should tell you that TAB executes
`completion-at-point'.

(Even with emacs 24, before the first TAB it'll tell me that TAB calls
`yas/expand'...)

Bye,
Tassilo




Re: [O] org-capture in message-mode buffer

2011-05-24 Thread Tassilo Horn
Leo  writes:

Hi!

>> is there an agreement here on whether the patch appearing in this
>> thread
>>
>> http://patchwork.newartisans.com/patch/783/
>>
>> should be applied or not?
>
> I don't really know.

Ditto. :-)

The problem is that creating a link to a message with no Gcc errors
right now.  For interactive use, that's the right thing, I guess.  But
of course preventing `org-capture' from working is bad.

An alternative to the proposed patch is this:

--8<---cut here---start->8---
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a5ece8b..bc5ab20 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -187,7 +187,8 @@ If `org-store-link' was called with a prefix arg the 
meaning of
  group newsgroups message-id x-no-archive))
   (org-add-link-props :link link :description desc)
   link))
-   ((eq major-mode 'message-mode)
+   ((and (eq major-mode 'message-mode)
+(called-interactively-p))
 (setq org-store-link-plist nil)  ; reset
 (save-excursion
   (save-restriction
--8<---cut here---end--->8---

If `org-store-link' is called interactively but no Gcc header is there,
you get an error just like it is right now.  But if it is called
non-interactively through `org-capture', the condition fails and thus no
org-gnus link is created, but a file link to your draft folder.  One may
argue that a file link is not the right thing, either.

Basically, there should be a possibility to let the link creator
functions return "yes, I was the right handler, but because of reason X,
I couldn't create a link".  Is there something like that?

Bye,
Tassilo




Re: [O] Adjust org-contacts-wl functions to used standards

2011-05-24 Thread Carsten Dominik

Hi Michael,

I did apply the patches, but had problems.  Please verify that it came out 
right

Thanks.

- Carsten


On May 12, 2011, at 9:15 PM, Michael Markert wrote:

> On 12 May 2011, Julien Danjou wrote:
>> On Thu, May 12 2011, Michael Markert wrote:
>> 
>>> I missed a nasty bit: `org-contacts-wl-get-name-email' was not updated
>>> and contained another bug.
>>> :(
>> 
>> Michael,
>> 
>> This does not apply as it is and your previous set of patches does not
>> seems to have made it. I never received it. Is it me or?
> 
> No, I forgot to CC you the patches, they only went to the list. My bad.
> 
> They are also on patchwork[1] and my org clone on github[2] if that's
> easier for you.
> 
> Michael
> 
> Footnotes:
> 
> [1] starting with: http://patchwork.newartisans.com/patch/791/
> 
> [2] https://github.com/cofi/myOrg-Mode/tree/wl-contacts

- Carsten






Re: [O] org-capture in message-mode buffer

2011-05-24 Thread Carsten Dominik

On May 24, 2011, at 12:41 PM, Tassilo Horn wrote:

> Leo  writes:
> 
> Hi!
> 
>>> is there an agreement here on whether the patch appearing in this
>>> thread
>>> 
>>> http://patchwork.newartisans.com/patch/783/
>>> 
>>> should be applied or not?
>> 
>> I don't really know.
> 
> Ditto. :-)
> 
> The problem is that creating a link to a message with no Gcc errors
> right now.  For interactive use, that's the right thing, I guess.  But
> of course preventing `org-capture' from working is bad.
> 
> An alternative to the proposed patch is this:
> 
> --8<---cut here---start->8---
> diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
> index a5ece8b..bc5ab20 100644
> --- a/lisp/org-gnus.el
> +++ b/lisp/org-gnus.el
> @@ -187,7 +187,8 @@ If `org-store-link' was called with a prefix arg the 
> meaning of
> group newsgroups message-id x-no-archive))
>   (org-add-link-props :link link :description desc)
>   link))
> -   ((eq major-mode 'message-mode)
> +   ((and (eq major-mode 'message-mode)
> +  (called-interactively-p))
> (setq org-store-link-plist nil)  ; reset
> (save-excursion
>   (save-restriction
> --8<---cut here---end--->8---
> 
> If `org-store-link' is called interactively but no Gcc header is there,
> you get an error just like it is right now.  But if it is called
> non-interactively through `org-capture', the condition fails and thus no
> org-gnus link is created, but a file link to your draft folder.  One may
> argue that a file link is not the right thing, either.
> 
> Basically, there should be a possibility to let the link creator
> functions return "yes, I was the right handler, but because of reason X,
> I couldn't create a link".  Is there something like that?

What happens if you return t in this case, without calling org-store-link-props 
?

Regards

- Carsten


Re: [O] [PATCH] customize latex table export

2011-05-24 Thread Carsten Dominik
Hi Christophe,

On May 19, 2011, at 2:34 PM, Christophe Rhodes wrote:

> Hi,
> 
> To produce documents in something approaching my organization's house
> style, I need to be able to style the headers of tables.  It's nice that
> orgtbl has the functionality for this, but the call to orgtbl-to-latex
> has a hard-coded list of parameters with no possibility for extension.
> With the attached patch, I am able to put e.g.
> 
> #+BIND: org-export-latex-tables-orgtbl-extra-parameters (:hfmt 
> "\\multicolumn{1}{c}{\\bf\\color{white}\\cellcolor{blue}%s}")
> 
> in the header of my document, and tables throughout the document all
> pick up this style.
> 
> I daresay that this is not the optimal way of doing things; while this
> solves my immediate problem there is likely to be a more general way of
> doing things.

would it be better to be able to set these parameters on a per-table basis with 
ATTR_LaTeX ?
Would you like to try to prepare a patch to this effect?

- Carsten






Re: [O] LaTeX export: underscores and the syntax package

2011-05-24 Thread Carsten Dominik

On May 18, 2011, at 9:23 AM, Peter Frings wrote:

> Good morning Nicholas,
> 
> Your suggested change in org-exp.el did the trick, thanks! I have not 
> observed any side-effects, but then again, my files aren’t that complicated 
> either, only using rather simple markup and a few floating images, no complex 
> math or so… 
> 
> I wouldn’t mind having it changed as a fix, if only to avoid clashes with the 
> syntax package, which I use a lot. Furthermore, I personally dislike 
> underscores: they’re ugly and harder to type than a hyphen, but since they’re 
> generated automatically those arguments don’t stand a chance :-)
> 
> Anyway, now I know where to look I can always change it after installing a 
> new release of org :-)


Hi Peter, Nicolas,

one disadvantage of applying this patch would be that existing links
to sections in HTML pages would become invalid.  For the rest, I don't care.

Thinking more about this, I think that people who want permanent
links to sections in HTML pages will use CUSTOM_ID rather than relying on 
section
numbers.

OK, I am applying Nicolas' patch.

- Carsten

P.S. I think it counts as a bug in the syntax package, that it makes labels with
underscore invalid.  Maybe you could investigate this and submit a bug report?

> 
> 
> Cheers,
> Peter.
> 
> 
> On 14 May 2011, at 05:50, Nick Dokos wrote:
> 
>>> On May 12, 2011, at 9:00 AM, peter.fri...@agfa.com wrote:
>>> 
 Good afternoon all,
 
 I spent the best part of the afternoon trying to figure out why an 
 org-generated .tex file wouldn’t compile with my set-up. It turns out that 
 the `syntax’ package messes a bit with the definition of an underscore, 
 making it impossible to use the underscore in a \label.
 
 Unfortunately, the LaTeX exporter uses underscores in its section labels.
 
>> 
>> I'm really replying to Peter here, not to Robert, but I cannot find
>> Peter's original mail.
>> 
>> You can change the underscore to e.g. a hyphen and get
>> 
>> ,
>> | \subsubsection{Experiment 1}
>> | \label{sec-1-1-1}
>> `
>> 
>> in the LaTeX output, by changing it in org-exp.el around line 1300 (I
>> don't want this to end up on patchwork, so I am trying to camouflage it
>> by boxquoting it - I hope that works for hiding the patch from patchwork
>> and also gives you enough context to make the change if you so desire):
>> 
>> ,
>> | diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> | index cda1f98..ac07c68 100644
>> | --- a/lisp/org-exp.el
>> | +++ b/lisp/org-exp.el
>> | @@ -1298,7 +1298,7 @@ Also find all ID and CUSTOM_ID properties and store 
>> them."
>> |   (org-outline-level
>> |  (setq target (org-solidify-link-text
>> |(format "sec-%s" (replace-regexp-in-string
>> | -"\\." "_"
>> | +"\\." "-"
>> |  (org-section-number level)
>> |  (setq last-section-target target)
>> |  (push (cons target target) target-alist)
>> `
>> 
>> What I don't know is if this change will break something, either in
>> the LaTeX exporter or in the other exporters. So you might test it
>> and report any problems and if there are no problems, maybe you can
>> suggest it as a permanent fix. In my limited experimentation, exporting
>> a simple org file to latex/pdf, text and html, I did not observe any
>> problems, but that does not mean that they don't exist.
>> 
>> Nick
> 
> 

- Carsten






[O] [Accepted] Change underscores to hyphens in section labels

2011-05-24 Thread Carsten Dominik
Patch 809 (http://patchwork.newartisans.com/patch/809/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C5905.1305748720%40alphaville.americas.hpqcorp.net%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Change underscores to hyphens in section labels
> Date: Thu, 19 May 2011 00:58:40 -
> From: Nick Dokos 
> X-Patchwork-Id: 809
> Message-Id: <5905.1305748...@alphaville.americas.hpqcorp.net>
> To: emacs-orgmode@gnu.org
> Cc: n...@dokosmarshall.org
> 
> commit 5b6ac88c0c021f77d214d4fea37b305ab4928ebd
> Author: Nick Dokos 
> Date:   Sun May 15 16:49:55 2011 -0400
> 
> Change underscores to hyphens for labels
> 
> * lisp/org-exp.el (org-export-define-heading-targets): Currently,
> the section number (a string of the form "X.Y.Z") is used to
> manufacture a section label of the form sec-X_Y_Z. Underscores are
> overloaded however, both in org and in LaTeX, and cause conflicts
> with some packages. This patch changes underscores to hyphens in
> section labels.
> 
> TINYCHANGE
> 
> ---
> Peter Frings reported a conflict with the ``syntax'' LaTeX
> package. Light testing (exporting simple files to LaTeX, by both
> Peter and myself, as well as exporting to ascii and HTML) has not
> uncovered any problems. I have not tested docbook, or Jambunathan
> K's odt exporter.
> 
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index cda1f98..ac07c68 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -1298,7 +1298,7 @@ Also find all ID and CUSTOM_ID properties and store 
> them."
>  (org-outline-level
> (setq target (org-solidify-link-text
>   (format "sec-%s" (replace-regexp-in-string
> -   "\\." "_"
> +   "\\." "-"
> (org-section-number level)
> (setq last-section-target target)
> (push (cons target target) target-alist)
> 



Re: [O] org-capture in message-mode buffer

2011-05-24 Thread Tassilo Horn
Carsten Dominik  writes:

>> Basically, there should be a possibility to let the link creator
>> functions return "yes, I was the right handler, but because of reason X,
>> I couldn't create a link".  Is there something like that?
>
> What happens if you return t in this case, without calling
> org-store-link-props ?

Then no link will be created.  Basically, that's what we'd like to have.

But somehow my `called-interactively-p' check now always returns nil.
I'm pretty sure it didn't when I tested my last patch.  But according to
its docs, the current behavior is correct.  It should only check if the
*containing* function was called interactively, not if its caller was
called interactively.

So I'd say the current behavior, i.e., erroring if there's no Gcc
header, is correct and neither one of the two proposed patches shall be
applied.  Instead of making the low-level functions aware of their call
context (an interactive org-store-link call called org-gnus-store-link
vs. an interactive org-capture called org-store-link that in turn called
org-gnus-store-link), the caller should be adapted to handle the error
appropriately.

Here's a patch for the `org-capture' use case.  I've tested it.  In a
message buffer without Gcc header, calling `org-store-link' will produce
an error indicating the problem to the user.  When called by
`org-capture', the error is still produce but simply ignored so you
still can capture.  In that case, the %a format spec is empty.

Bye,
Tassilo

--8<---cut here---start->8---
>From dbee3ff4f0a6584c4437af8ebff285babc87db30 Mon Sep 17 00:00:00 2001
From: Tassilo Horn 
Date: Tue, 24 May 2011 13:29:53 +0200
Subject: [PATCH 3/3] Ignore errors from link creation.

2011-05-24  Tassilo Horn  

* org-capture.el (org-capture): Ignore errors from link
creation.
---
 lisp/org-capture.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 0af4529..ccfca75 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -415,7 +415,7 @@ bypassed."
   (annotation (if (and (boundp 'org-capture-link-is-already-stored)
org-capture-link-is-already-stored)
   (plist-get org-store-link-plist :annotation)
-(org-store-link nil)))
+(ignore-errors (org-store-link nil
   (initial (and (org-region-active-p)
 (buffer-substring (point) (mark
   (entry (org-capture-select-template keys)))
-- 
1.7.5.rc3

--8<---cut here---end--->8---



Re: [O] org-capture in message-mode buffer

2011-05-24 Thread Carsten Dominik

On May 24, 2011, at 1:35 PM, Tassilo Horn wrote:

> Carsten Dominik  writes:
> 
>>> Basically, there should be a possibility to let the link creator
>>> functions return "yes, I was the right handler, but because of reason X,
>>> I couldn't create a link".  Is there something like that?
>> 
>> What happens if you return t in this case, without calling
>> org-store-link-props ?
> 
> Then no link will be created.  Basically, that's what we'd like to have.
> 
> But somehow my `called-interactively-p' check now always returns nil.
> I'm pretty sure it didn't when I tested my last patch.  But according to
> its docs, the current behavior is correct.  It should only check if the
> *containing* function was called interactively, not if its caller was
> called interactively.
> 
> So I'd say the current behavior, i.e., erroring if there's no Gcc
> header, is correct and neither one of the two proposed patches shall be
> applied.  Instead of making the low-level functions aware of their call
> context (an interactive org-store-link call called org-gnus-store-link
> vs. an interactive org-capture called org-store-link that in turn called
> org-gnus-store-link), the caller should be adapted to handle the error
> appropriately.

I agree.

> 
> Here's a patch for the `org-capture' use case.  I've tested it.  In a
> message buffer without Gcc header, calling `org-store-link' will produce
> an error indicating the problem to the user.  When called by
> `org-capture', the error is still produce but simply ignored so you
> still can capture.  In that case, the %a format spec is empty.

Thanks!

- Carsten

> 
> Bye,
> Tassilo
> 
> --8<---cut here---start->8---
> From dbee3ff4f0a6584c4437af8ebff285babc87db30 Mon Sep 17 00:00:00 2001
> From: Tassilo Horn 
> Date: Tue, 24 May 2011 13:29:53 +0200
> Subject: [PATCH 3/3] Ignore errors from link creation.
> 
> 2011-05-24  Tassilo Horn  
> 
>   * org-capture.el (org-capture): Ignore errors from link
>   creation.
> ---
> lisp/org-capture.el |2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index 0af4529..ccfca75 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -415,7 +415,7 @@ bypassed."
>  (annotation (if (and (boundp 'org-capture-link-is-already-stored)
>   org-capture-link-is-already-stored)
>  (plist-get org-store-link-plist :annotation)
> -  (org-store-link nil)))
> +  (ignore-errors (org-store-link nil
>  (initial (and (org-region-active-p)
>(buffer-substring (point) (mark
>  (entry (org-capture-select-template keys)))
> -- 
> 1.7.5.rc3
> 
> --8<---cut here---end--->8---

- Carsten






Re: [O] [BUG] Crash with LaTeX exporter

2011-05-24 Thread Carsten Dominik

On Apr 6, 2011, at 11:14 AM, Lawrence Mitchell wrote:

> Jambunathan K wrote:
>> [1. text/plain]
> 
> 
>> Exporting the below table to LaTeX throws an error. Let me know if you
>> need any additional info.
> 
>> [2. text/x-verbatim]
> 
> 
>> *** Table.el Table with no Spanning
>>+---+---+
>>|Term   |Percentage |
>>+---+---+
>>|Quarter|25%|
>>|One-Fourth |   |
>>+---+---+
>>|Half   |50%|
>>|One-by-Two |   |
>>+---+---+
>>|Three-Quarters |75%|
>>|Three-Fourths  |   |
>>+---+---+
>>|Full   |100%   |
>>|Whole  |   |
>>+---+---+
>> [3. text/plain]
> 
> A more minimal table demonstrating the problem is:
> 
> +---+---+
> |foo|bar|
> +---+---+
> |baz|33%|
> +---+---+
> 
> This is because the percent signs are escaped in the table that
> table.el sees, but the column width is not updated
> appropriately.  The export process converts "%" into "\%" so that
> table.el sees the following table:
> 
> +---+---+
> |foo|bar|
> +---+---+
> |baz|33\%|
> +---+---+
> 
> And so column/row calculations are incorrect.  Since table.el's
> export correctly deals with escaping of percent signs, one could
> just remove the escapes from the table.
> 
> It's possible that something like the below would fix things.
> 
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index b8be87a..d591358 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -1963,6 +1963,9 @@ The conversion is made depending of STRING-BEFORE and 
> STRING-AFTER."
> floatp (or label caption))
> (and (get-buffer "*org-export-table*")
>(kill-buffer (get-buffer "*org-export-table*")))
> +(save-excursion
> +  (while (search-forward "\\%" nil t)
> + (replace-match "%" nil t)))
> (table-generate-source 'latex "*org-export-table*" "caption")
> (setq tbl (with-current-buffer "*org-export-table*"
>   (buffer-string)))
> 
> Patchwork maintainers, please don't pick this up, it's a horrible
> fix :P.

I have now turned off Org-mode special character preprocessing
in table.el.  So the above table should now export OK.
However, note that table.el does not protect the ampersand,
so tables with that will still fail.

- Carsten




Re: [O] Completing with anything

2011-05-24 Thread Stefan Monnier
> So, could you add 'failed, which means that no function was able to
> complete? That way I could do something like

> (setq completion-extra-properties '(:exit-function my-exit-function))

> (defun my-exit-function (string finished)
>   (when (eq finished 'failed)
> (dabbrev-expand)))

> and always get a dabbrev-expand as fallback to completion-at-point?

Hmm... interesting way to attack that problem.  I don't think that will
work quite like this: if the completion provides its own :exit-function
(e.g. to add a terminator string), then yours won't be run.


Stefan



Re: [O] Performance problem

2011-05-24 Thread Matt Lundin
Michael Welle  writes:

> Matt Lundin  writes:
>
>> Michael Welle  writes:
>>
>>> I use Emacs 23.2.1 and org-mode 7.5. After some time, usually after a
>>> few days of 'uptime', building an agenda becomes very slw.
>>
>> Is this the standard agenda or a custom agenda?
> it's a custom agenda that collects all appointments for the next four
> weeks:
>
>( "z" "Appointments for the next four weeks" agenda ""
> ((org-agenda-skip-function
>   (lambda nil
> (org-agenda-skip-entry-if 'nottodo '("APPT"
>  (org-agenda-ndays 28)
>  (org-agenda-include-diary nil )))

A monthly view does indeed take a long time to appear. Skip functions
are very useful but, alas, not particularly efficient. This command
first considers all entries (SCHEDULED, DEADLINE, timestamp) that fall
within the next 28 days and then selects only those entries with the
keyword APPT.

Might I ask whether your appointments are all timestamps or diary sexps
(as opposed to SCHEDULED or DEADLINE entries)? If so, adding the
following setting to the command may speed things up a bit:

(org-agenda-entry-types '(:timestamp :sexp))

Best,
Matt



Re: [O] org babel support for tcl and awk

2011-05-24 Thread Eric Schulte
Hi,

Are you aware of the ob-template.el file [1], which can be used as a
jumping off point to simplify the addition of new languages?  After
globally replacing the term "template" with you language name, the only
function that necessarily needs to be re-written is the main
`org-babel-execute:template' function.

I would recommend starting with only non-session based evaluation, and
then slowly adding functionality.  If you run into any specific problems
I am happy to help trouble shoot.

As an example, I've worked up an very simple ob-awk.el file from
ob-template.el, it is attached along with an example org-mode file which
demonstrates its usage.

Best -- Eric



ob-awk.el
Description: application/emacs-lisp
* example use of ob-awk

Header Arguments
- cmd-line :: command line flags to pass to =awk=
- in-file :: the text file on which to run the resulting =awk= script

Currently only string results are returned directly from STDOUT.

Currently only external (i.e., non-session) evaluation is supported.

#+begin_src awk :in-file columns-of-numbers.txt
  {print $1}
#+end_src

#+results:
: 0
: 1
: 2
: 3
: 4
: 5
: 6
: 7
: 8


"orgm...@h-rd.org"  writes:

> Hi,
>
> I am looking for support for Tcl (and AWK) for org-babel.  Both have a
> supplied emacs mode and Tcl also has an inferior interpreter mode.  I
> was trying to do it myself, however I am quite lost in the
> instructions.  Is there someone with the knowledge and willingness to
> provide a support file for org babel for Tcl (and maybe awk)?
>
> thanks.
>
>
>

Footnotes: 
[1]  http://repo.or.cz/w/Worg.git/blob/HEAD:/org-contrib/babel/ob-template.el

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


[O] [Accepted] org-html.el: Fix export of table.el tables.

2011-05-24 Thread Carsten Dominik
Patch 764 (http://patchwork.newartisans.com/patch/764/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C81hb9nclv4.fsf%40gmail.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] org-html.el: Fix export of table.el tables.
> Date: Mon, 25 Apr 2011 03:42:23 -
> From: Jambunathan K 
> X-Patchwork-Id: 764
> Message-Id: <81hb9nclv4@gmail.com>
> To: emacs-orgmode@gnu.org
> 
> Changelog
> -
> 
> org-html.el: Fix export of table.el tables.
> 
> * lisp/org-html.el (org-export-as-html): Don't expand non-data
> lines of table.el tables.
> (org-html-expand): Removed the (buggy) test for non-data lines
> in table.el tables. The test is now done as part of
> org-export-as-html.
> (org-format-table-table-html-using-table-generate-source):
> Added test for spanning of cells in table.el tables using
> table.el's own library routine. Optionlly Suppress export of
> simple table.el tables.
> (org-format-table-html): Removed the (buggy) test for spanned
> table.el tables. The test is now done as part of
> org-format-table-table-html-using-table-generate-source.
> * Table.el Table with no Spanning
> # See org-export-prefer-native-exporter-for-tables
> 
> +---+---+
> |Term   |Percentage |
> +---+---+
> |Quarter|25%|
> |One-Fourth |   |
> +---+---+
> |Half   |50%|
> |One-by-Two |   |
> +---+---+
> |Three-Quarters |75%|
> |Three-Fourths  |   |
> +---+---+
> |Full   |100%   |
> |Whole  |   |
> +---+---+
> 
> * Table.el Table with Spanning
>
>   +--+-+--+
>   |Name  |cmdcalls |Percentage|
>   +--+ +--+
>   |rgb   |93 534   |46%   |
>   +--+ +--+
>   |Xah   |82 090   |40%   |
>   +--+ +--+
>   |total |203118   |100%  |
>   +--+-+--+
>   
> * Another Table.el Table with Spanning
> 
>   +---+--+
>   |   R1C1|   R1C2   |
>   +---+--+
>   |  R2C1 R2C2   |
>   +---+--+
>   |   R3C1|   R3C2   |
>   |   +--+
>   |   R4C1|   R4C2   |
>   +---+--+
> 
> * buggy export (pre-patch)
> 
> ** org-export-prefer-native-exporter-for-tables is nil
>  
> #+begin_src html
>   
>   1 Table.el Table 
> with no Spanning 
>   
> 
> 
>  frame="hsides">
>   Term
>   Percentage
>   QuarterOne-Fourth
>   25%
>   HalfOne-by-Two
>   50%
>   Three-QuartersThree-Fourths
>   75%
>   FullWhole
>   100%
> 
> 
>   
> 
>   
> 
>   
>   2 Table.el Table 
> with Spanning 
>   
> 
> 
>
>   -——— 
> -———
>   -——— 
> -———
>   -——— 
> -———
>rules="groups" frame="hsides">
>   NamergbXahtotal
>   cmdcalls93 53482 
> 090203118
>   Percentage46%40%100%
> 
> 
>   
> 
>   
> 
>   
>   3 Another Table.el 
> Table with Spanning 
>   
> 
> 
>  frame="hsides">
>   R1C1
>   R1C2
>   R2C1 R2C2
>   R3C1-———R4C1
>   R3C2R4C2
> 
>   
>   
> #+end_src
> 
> 
> * correct export (post-patch)
> ** org-export-prefer-native-exporter-for-tables is t
> #+begin_src html
>   
> 1 Table.el Table 
> with no Spanning 
> 
>   
>   
>   
>   
> 
>   
> 
> Term   
>   
>   
> Percentage 
>   
> 
> 
>   
> Quarter
> One-Fourth 
>   
>   
> 
> 25%  />
> 
>    
>   
> 
> 
>   
> 
> Half   
> One-by-Two 
>   
>   
> 
> 50%  />
> 
>    
>   
> 
> 
>   
> Three-Quarters 
> Three-Fourths  
>   
>   
> 
> 75%  />
> 
>    
>   
> 
> 
>   
> 
> Full   
> Whole  
>   
>   
> 
> 100%   

Re: [O] [Patch] For the Manual: using org-crypt

2011-05-24 Thread Carsten Dominik
Hi,

Is anyone working on making this a complete patch?

Thanks

- Carsten

On Mar 23, 2011, at 5:03 PM, Jambunathan K wrote:

> 
> Thanks Christian. Some minor improvements. The intention is not to
> nitpick but to build on top of what you have provided and help the
> reviewer.
> 
>> +org-crypt will encrypt the text of an entry, but not the headline, or
>> +properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt
>> +files. 
> 
> --8<---cut here---start->8---
>> EasyPG is part of recent Emacs releases (at least Emacs 23). It is
>> +available as a separate package for earlier versions of Emacs. If your
>> +version of Emacs already has EasyPG do not install the package manager's
>> +version. Doing so will lead to unpredictable results.
> --8<---cut here---end--->8---
> 
> This information could be captured elsewhere and be left out of the
> manual. (This parts reads like a tutorial entry)
> 
>> +
>> +To use org-crypt you will need to have something like the following in your
>> +@file{.emacs}:
> 
> `Recommendation', `suggestion' would be a better word. Word `something'
> is ambiguous.
> 
> --8<---cut here---start->8---
>> +If you want to use Public Key Encryption, you will need to generate a
>> +suitable pubic/private key pair using @command{gnupg}.
> --8<---cut here---end--->8---
> 
> This portion better be left out of the Org manual.
> 
> --8<---cut here---start->8---
>> +Now any text below a headline that has a @samp{:crypt:} tag will be
>> +automatically be encrypted when the file is saved. 
> --8<---cut here---end--->8---
> 
> Above portion qualifies to be part of introductory text.
> 
> 
> --8<---cut here---start->8---
>> +Preventing tag inheritance stops you having encrypted text inside encrypted
>> +text.
> --8<---cut here---end--->8---
> 
> Above segment seems a bit out of context ... May be some supplementary
> information has to go with it or is it just an implementation artefact
> that the user need not bother about. Or is this part of the user
> configuration?
> 
>> +To decrypt the text just call @kbd{M-x org-decrypt-entry} and the encrypted
>> +text where the point is will be replaced with the plain text. 
> 
> The first part is complete in itself. The latter can be removed.
> 
> --8<---cut here---start->8---
>> If you use this +feature a lot, you will probably want to bind
>> @kbd{M-x org-decrypt-entry} to +a key.
> --8<---cut here---end--->8---
> 
> Shouldn't part of the manual?
> 
> Jambunathan K.
> 
> 
> -- 
> 

- Carsten






Re: [O] indirect buffer for properties

2011-05-24 Thread Bernt Hansen
Michael Brand  writes:

> What do you think about an indirect buffer for properties (or is there
> already one I don't know of yet?) that lets one view and maybe even
> edit all properties of the typically folded current heading of the
> primary buffer in an indirect buffer? 

I just use C-c C-x p with IDO completion to show property names.  This
shows the current value if any and allows editing the value.  Does this
do what you want?

-Bernt



[O] [Accepted] Allow inactive timestamps in org-expiry (copy of lost patch)

2011-05-24 Thread Carsten Dominik
Patch 722 (http://patchwork.newartisans.com/patch/722/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C20110328202149.67a32bdc%40hsdev.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Allow inactive timestamps in org-expiry (copy of lost patch)
> Date: Mon, 28 Mar 2011 22:21:49 -
> From: Marcel van der Boom 
> X-Patchwork-Id: 722
> Message-Id: <20110328202149.67a32...@hsdev.com>
> To: emacs-orgmode@gnu.org
> 
> Hi,
> 
> Attached is a patch to org-expiry.el in contrib/lisp to allow a
> customization of the timestamps inserted by org-expiry for 'CREATED'
> and 'EXPIRED' properties.
> 
> This patch is what is attached to the message displayed at [1]. I have
> been using this patch for a while and it works fine. From searching it
> looks like this patch was 'forgotten', but I may have overlooked
> something.
> 
> If the patch was rejected, you can ignore me. If it was forgotten I'd
> like to request to include it.
> 
> Thx,
> marcel
> 
> [1] http://www.mail-archive.com/emacs-orgmode@gnu.org/msg20882.html
> 
> 
> diff --git a/contrib/lisp/org-expiry.el b/contrib/lisp/org-expiry.el
> index 4a49399..930b921 100644
> --- a/contrib/lisp/org-expiry.el
> +++ b/contrib/lisp/org-expiry.el
> @@ -81,6 +81,11 @@
>:tag "Org Expiry"
>:group 'org)
>  
> +(defcustom org-expiry-inactive-timestamps nil
> +  "Insert inactive timestamps for the created and expired time properties"
> +  :type 'boolean
> +  :group 'org-expiry)
> +
>  (defcustom org-expiry-created-property-name "CREATED"
>"The name of the property for setting the creation date."
>:type 'string
> @@ -283,21 +288,25 @@ to today's date.  With two `C-u' prefixes, prompt the 
> user for to
>  update the date."
>(interactive "P")
>(let* ((d (org-entry-get (point) org-expiry-created-property-name))
> -  d-time d-hour)
> +  d-time d-hour timestr)
>  (when (or (null d) arg)
>;; update if no date or non-nil prefix argument
>;; FIXME Use `org-time-string-to-time' 
> -  (setq d-time (if d (apply 'encode-time (org-parse-time-string d))
> +  (setq d-time (if d (org-time-string-to-time d)
>(current-time)))
>(setq d-hour (format-time-string "%H:%M" d-time))
> +  (setq timestr
> + ;; two C-u prefixes will call org-read-date
> + (if (equal arg '(16))
> + (concat "<" (org-read-date
> +  nil nil nil nil d-time d-hour) ">")
> +   (format-time-string (cdr org-time-stamp-formats
> +  ;; maybe transform to inactive timestamp
> +  (if org-expiry-inactive-timestamps
> +   (setq timestr (concat "[" (substring timestr 1 -1) "]")))
>(save-excursion
>   (org-entry-put
> -  (point) org-expiry-created-property-name
> -  ;; two C-u prefixes will call org-read-date
> -  (if (equal arg '(16))
> -  (concat "<" (org-read-date
> -   nil nil nil nil d-time d-hour) ">")
> -(format-time-string (cdr org-time-stamp-formats
> +  (point) org-expiry-created-property-name timestr)
>  
>  (defun org-expiry-insert-expiry (&optional today)
>"Insert a property with the expiry date.
> @@ -306,15 +315,20 @@ and insert today's date."
>(interactive "P")
>(let* ((d (org-entry-get (point) org-expiry-expiry-property-name))
>d-time d-hour)
> -(setq d-time (if d (apply 'encode-time (org-parse-time-string d))
> +(setq d-time (if d (org-time-string-to-time d)
>  (current-time)))
>  (setq d-hour (format-time-string "%H:%M" d-time))
> +(setq timestr (if today
> +   (format-time-string (cdr org-time-stamp-formats))
> + (concat "<" (org-read-date
> +  nil nil nil nil d-time d-hour) ">")))
> +;; maybe transform to inactive timestamp
> +(if org-expiry-inactive-timestamps
> + (setq timestr (concat "[" (substring timestr 1 -1) "]")))
> + 
>  (save-excursion
>(org-entry-put
> -   (point) org-expiry-expiry-property-name
> -   (if today (format-time-string (cdr org-time-stamp-formats))
> -  (concat "<" (org-read-date
> -   nil nil nil nil d-time d-hour) ">"))
> +   (point) org-expiry-expiry-property-name timestr
>  
>  ;;; Functions to process expired entries:
>  
> 



Re: [O] Completing with anything

2011-05-24 Thread Antoine Levitt
24/05/11 14:47, Stefan Monnier
>> So, could you add 'failed, which means that no function was able to
>> complete? That way I could do something like
>
>> (setq completion-extra-properties '(:exit-function my-exit-function))
>
>> (defun my-exit-function (string finished)
>>   (when (eq finished 'failed)
>> (dabbrev-expand)))
>
>> and always get a dabbrev-expand as fallback to completion-at-point?
>
> Hmm... interesting way to attack that problem.  I don't think that will
> work quite like this: if the completion provides its own :exit-function
> (e.g. to add a terminator string), then yours won't be run.

Mmh, true. 

Oh well, I guess that I'm the only one who wants this kind of behaviour,
so I just ended up with an advice which seems to do the trick. Sorry for
hijacking this thread. In case anyone is interested:

(defadvice completion-at-point
  (after completion-at-point-complete-if-failed activate)
  "Fallback on dabbrev if completion didn't do anything useful."
(unless ad-return-value
  (dabbrev-expand nil)))



Re: [O] Org Contacts, Gnus and Yasnippet Not Playing Nicely

2011-05-24 Thread Ian Barton

On 24/05/11 11:21, Tassilo Horn wrote:

Ian Barton  writes:

Hi Ian,


I am trying to set up Org Contacts and gnus. Org Contacts suggests
that pressing +  in the To: field in a message buffer should
offer a list of tags from my contacts file. However, I just get a Tab.

I suspect that Yasnippet is interfering, as entering the abbreviation
for any of my snippets and pressing Tab auto-completes the
snippet. Does anyone have a tip for making Yasnippets, gnus and
org-contacts play nicely together?


It works fine for me using emacs 24.  Maybe you've set
`org-contacts-completion-ignore-case' set to nil (which is not the
default), and you are trying to complete a lowercase starter while all
of your contacts have names starting uppercase?

If not, start writing a mail and go to the To: header.  Type the first
character of a contact that definitively exists.  You should get a
*Completion* buffer, or it should complete to the sole matching contact.
Additionally, doing `C-h k TAB' should tell you that TAB executes
`completion-at-point'.

(Even with emacs 24, before the first TAB it'll tell me that TAB calls
`yas/expand'...)



Thanks Tassilo. I am using Emacs 23.2.1. `C-h k TAB' shows:

TAB (translated from ) runs the command yas/expand, which is an
interactive Lisp function in `yasnippet.el'.

It is bound to TAB,   .

(yas/expand)

Expand a snippet before point.

If no snippet expansion is possible, fall back to the behaviour
defined in `yas/fallback-behavior'

I have just downloaded and compiled Emacs 24, where it all works as 
expected. So it seems specific to the version of Emacs with Ubuntu.  So 
far Emacs 24 seems stabe on my system, so this is an acceptable workaround:)


Ian.




Re: [O] [ANN] ELPA Repo for org-html/org-odt

2011-05-24 Thread Jambunathan K


Suvayu

A quick question, I follow the org-mode HEAD. Does using your 
fork

mean I fall behind the org-mode HEAD, or does it still track the
org-mode HEAD and includes your commits? Sorry if my question is
trivial, never tried a forked project before.


I plan to publish a tarball whenever

1. There is a major addition or a user-visible change to org-odt 
or 
2. When I have accumulated sufficient number of bugfixes.


On the day of release,

1. I will pull in all the changes in master branch.
2. I will drop or whimsically cherry-pick bug fixes to org-html.

In summary, org-odt is the cutting edge org-mode on the day of 
release with HTML exporter most likely staying at the 23 Mar 2011 
levels. 

March 2011 levels for HTML exporter may sound too bad, but it is 
not so. 

If you consider org-odt-20110519.tar, it is as good as 
org-20110516

with *only* the following changes left out.

| 2f50b1 | add an alternate for inline images 
 |
| 49e6bc | Fix for html & docbook export of desc list items 
 |
| a201b1 | Fix HTML export of footnotes with lists, tables, 
 quotes. |
| 9f57b8 | Mixed export of numbered and unnumbered sections in 
 HTML |


I am planning to publish my changes to GNU ELPA very soon. My 
tarball has few of the OpenDocument schemas and I need to have 
them integrated in the manner that is acceptable to Emacs 
maintainers [1].


Jambunathan K.

Footnotes:  
[1]  http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00113.html




Re: [O] Completing with anything

2011-05-24 Thread Stefan Monnier
> Oh well, I guess that I'm the only one who wants this kind of behaviour,

No, I'm interested as well, but haven't found a good solution yet.


Stefan



Re: [O] Completing with anything

2011-05-24 Thread Stefan Monnier
> (defadvice completion-at-point
>   (after completion-at-point-complete-if-failed activate)
>   "Fallback on dabbrev if completion didn't do anything useful."
> (unless ad-return-value
>   (dabbrev-expand nil)))

BTW, you can avoid the advice by using your own

  (defun al-completion-at-point ()
(interactive)
(or (completion-at-point)
(dabbrev-expand nil)))


-- Stefan



Re: [O] Completing with anything

2011-05-24 Thread Antoine Levitt
24/05/11 16:05, Stefan Monnier
>> (defadvice completion-at-point
>>   (after completion-at-point-complete-if-failed activate)
>>   "Fallback on dabbrev if completion didn't do anything useful."
>> (unless ad-return-value
>>   (dabbrev-expand nil)))
>
> BTW, you can avoid the advice by using your own
>
>   (defun al-completion-at-point ()
> (interactive)
> (or (completion-at-point)
> (dabbrev-expand nil)))

I'd do that, but completion-at-point is used in places I don't fully
understand when I set (setq tab-always-indent 'complete).

Also there's some weirdness with dabbrev that makes it bug out when it's
called indirectly. For instance, seemingly simple code like (artificial
example here, but similar things happen when for instance you indent and
then complete with the same key)

(setq counter 0)
(defun my-my-dabbrev-expand ()
  (interactive)
  (setq counter (mod (+ 1 counter) 2))
  (when (equal counter 0)
(dabbrev-expand nil)))
(local-set-key (kbd "C-c C-c") 'my-my-dabbrev-expand)

behaves in a very unexpected way : it actually jumps (!) to the location
where the completion was found. I wasn't able to understand this, but
it's definitely a bug in dabbrev. It looks like it's related to the way
dabbrev checks it's continuing a completion:

(eq last-command this-command)

but I wouldn't know how to fix this.



Re: [O] Org Contacts, Gnus and Yasnippet Not Playing Nicely

2011-05-24 Thread Rémi Vanicat
Ian Barton  writes:

> On 24/05/11 11:21, Tassilo Horn wrote:
>> Ian Barton  writes:
>>
>> Hi Ian,
>>
>>> I am trying to set up Org Contacts and gnus. Org Contacts suggests
>>> that pressing +  in the To: field in a message buffer should
>>> offer a list of tags from my contacts file. However, I just get a Tab.
>>>

[...]

>
> Thanks Tassilo. I am using Emacs 23.2.1. `C-h k TAB' shows:
>
> TAB (translated from ) runs the command yas/expand, which is an

[...]


For those (like me) that stay with old Emacs 23, this will fix it:

#+begin_src emacs-lisp
  (defun set-yas/fallback-behavior ()
(setq yas/fallback-behavior '(apply completion-at-point)))
  
  (add-hook 'message-mode-hook 'set-yas/fallback-behavior)
#+end_src


-- 
Rémi Vanicat




[O] Passing font size to exported LaTeX table

2011-05-24 Thread John Hendy
Hi,


I can control a table font size directly from the .tex file like so:

---
\scriptsize{
\begin{center}
\begin{tabular}{lllrr}

table entries here

\end{tabular}
\end{center}
}
---

Any way to pass this from org-mode? Otherwise, I keep changing the org file,
exporting, and then having to add this to the tex file and re-export.

I tried:
---
#+begin_latex
\scriptsize{
#+end_latex

|org|table|here|

#+begin_latex
}
#+end_latex
---

without success.


Thanks,
John


Re: [O] automatically closing example?

2011-05-24 Thread Steinar Bang
> Puneeth Chaganti :

>  Look at http://orgmode.org/org.html#Easy-Templates

Cool!  Exactly what I was looking for.

Thanks!





Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Sebastien Vauban
Hi John,

John Hendy wrote:
> I can control a table font size directly from the .tex file like so:
>
> ---
> \scriptsize{
> \begin{center}
> \begin{tabular}{lllrr}
>
> table entries here
>
> \end{tabular}
> \end{center}
> }
> ---
>
> Any way to pass this from org-mode? Otherwise, I keep changing the org file,
> exporting, and then having to add this to the tex file and re-export.
>
> I tried:
> ---
> #+begin_latex
> \scriptsize{
> #+end_latex
>
> |org|table|here|
>
> #+begin_latex
> }
> #+end_latex
> ---
>
> without success.

You put the things in the wrong order:

1. put a group around some LaTeX commands
2. add the macro \scriptsize in it

Hence:

#+begin_src org
  #+begin_latex
  {\scriptsize
  #+end_latex

  |org|table|here|

  #+begin_latex
  }
  #+end_latex
#+end_src

should do it (not tested).

Best regards,
  Seb

-- 
Sébastien Vauban




[O] orgmode/beamer - won't export blocks

2011-05-24 Thread Benjamin Slade
I'm having the same trouble which seems to be reported in this thread (I'm
not running Aquamacs though, just GNU Emacs under Linux, with orgmode v7.4):
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28752.html


I've followed tutorials, and orgmode isn't generating beamer \block
structures (I checked the LaTeX code generated: it is generating \itemize
rather than \block).

Did anyone ever figure out the reason for this?

-

[Orgmode] Baffled by beamer blocks

Philip J. Hollenback
Tue, 17 Aug 2010 08:31:43 -0700

I've got a basic org-mode 7.01g + beamer setup working and am able to
create and export presentations.  However I am completely unable to
create presentations with blocks in them.  I've followed the examples on
the website such as http://orgmode.org/worg/org-tutorials/org-beamer.php
with no success.

When I try to write a presentation with blocks, I find that instead of
blocks I end up with nested lists in the frames.  The LaTeX output shows
no \block structures.  I see no error messages in any of my emacs
buffers. I should note that I'm running Aquamacs 1.9 on the mac.

Can anyone suggest what in my setup might be preventing blocks from
working?  I'm really baffled at this point.

Thanks,
P.
--
Philip J. Hollenback
phil...@pobox.com
www.hollenback.net


Re: [O] Adjust org-contacts-wl functions to used standards

2011-05-24 Thread Michael Markert
Hi Carsten,

On 24 May 2011, Carsten Dominik wrote:
>
> Hi Michael,
>
> I did apply the patches, but had problems.  Please verify that it came out
> right
>
> Thanks.
>
> - Carsten

Looks good to me. Thanks for merging. :)

Michael

> On May 12, 2011, at 9:15 PM, Michael Markert wrote:
>
>> On 12 May 2011, Julien Danjou wrote:
>>> On Thu, May 12 2011, Michael Markert wrote:
>>>
 I missed a nasty bit: `org-contacts-wl-get-name-email' was not updated
 and contained another bug.
 :(
>>>
>>> Michael,
>>>
>>> This does not apply as it is and your previous set of patches does not
>>> seems to have made it. I never received it. Is it me or?
>>
>> No, I forgot to CC you the patches, they only went to the list. My bad.
>>
>> They are also on patchwork[1] and my org clone on github[2] if that's
>> easier for you.
>>
>> Michael
>>
>> Footnotes:
>>
>> [1] starting with: http://patchwork.newartisans.com/patch/791/
>>
>> [2] https://github.com/cofi/myOrg-Mode/tree/wl-contacts
>
> - Carsten


pgplKdMAKx8xU.pgp
Description: PGP signature


Re: [O] Completing with anything

2011-05-24 Thread Stefan Monnier
> Oh well, I guess that I'm the only one who wants this kind of behaviour,
> so I just ended up with an advice which seems to do the trick.  Sorry for
> hijacking this thread.  In case anyone is interested:

To get back to this discussion.  Before worrying about how to implement
it, I'm wondering what should the behavior be.

The way I look at it, the issue is whether the completion data returned
by completion-at-point-functions is "exclusive": currently it is
exclusive, which means that if that data leads to a completion failure,
then the whole completion-at-point fails, even though there might be
further functions on completion-at-point-functions which could return
data that does lead to a successful completion.

This "exclusive"ness is a bit similar to the must-match argument of
completion-read: it presumes that the function knows that anything
outside of the completion table is simply undesirable at point.

This "exclusive" behavior is what causes you pain.  Now one possible
strategy is to make the behavior non-exclusive and keep trying the next
functions until one of them returns data that leads to a successful
completion, which is largely what used to happen with
comint-dynamic-complete-function.

Another is to do it more selectively, flag some of
completion-at-point-functions as "not-exclusive", meaning that if
completion fails with those we should keep trying with subsequent
functions.  E.g. the nick completion in rcirc could be flagged as
non-exclusive since it applies everywhere, which in turn would let your
dabbrev-expand kick in when nick-completion fails.

Yet another is to do what your defadvice does: let all completion
functions from completion-at-point-functions be exclusive with respect
to each other, but make them non-exclusive with respect to some
"fallback completion".


Stefan



Re: [O] Completing with anything

2011-05-24 Thread Antoine Levitt
24/05/11 20:05, Stefan Monnier
>> Oh well, I guess that I'm the only one who wants this kind of behaviour,
>> so I just ended up with an advice which seems to do the trick.  Sorry for
>> hijacking this thread.  In case anyone is interested:
>
> To get back to this discussion.  Before worrying about how to implement
> it, I'm wondering what should the behavior be.
>
> The way I look at it, the issue is whether the completion data returned
> by completion-at-point-functions is "exclusive": currently it is
> exclusive, which means that if that data leads to a completion failure,
> then the whole completion-at-point fails, even though there might be
> further functions on completion-at-point-functions which could return
> data that does lead to a successful completion.
>
> This "exclusive"ness is a bit similar to the must-match argument of
> completion-read: it presumes that the function knows that anything
> outside of the completion table is simply undesirable at point.
>
> This "exclusive" behavior is what causes you pain.  Now one possible
> strategy is to make the behavior non-exclusive and keep trying the next
> functions until one of them returns data that leads to a successful
> completion, which is largely what used to happen with
> comint-dynamic-complete-function.
>
> Another is to do it more selectively, flag some of
> completion-at-point-functions as "not-exclusive", meaning that if
> completion fails with those we should keep trying with subsequent
> functions.  E.g. the nick completion in rcirc could be flagged as
> non-exclusive since it applies everywhere, which in turn would let your
> dabbrev-expand kick in when nick-completion fails.

This seems to be the most flexible, while still keeping all the
completions in the same UI. I'd make the non-exclusive behaviour the
default though: let the functions that want to "take over" the
completion state it explicitely.



Re: [O] org babel support for tcl and awk

2011-05-24 Thread Eric S Fraga
Eric Schulte  writes:

[...]

> As an example, I've worked up an very simple ob-awk.el file from
> ob-template.el, it is attached along with an example org-mode file which
> demonstrates its usage.

Eric,

this is great to see as I use awk quite often.  What is involved in
extending this to be able to run an awk script on input from within the
org file (output of another babel block, for instance, as my typical use
of awk is to re-arrange output from another program...)?  Or, if you
wish, can you suggest one of the ob-XXX modules that best illustrates
how to do this and I can give it a try?

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.298.g7c436)



Re: [O] org babel support for tcl and awk

2011-05-24 Thread orgm...@h-rd.org

Hi Eric,

yes I am aware of op-template and tried to use it.  However it was not  
clear to me how to proceed and I looked into ob-perl, ob-ruby,  
ob-scheme and ob-python.  But it seemed to me they use a different  
structure than op-template and I was stuck.  I also saw that the file  
ob-template is documented, however I am not so good in org-emacs-speak  
that I can decipher it.


Really thanks for the awk example, I will tru to study it.

thanks.

Quoting Eric Schulte :


Hi,

Are you aware of the ob-template.el file [1], which can be used as a
jumping off point to simplify the addition of new languages?  After
globally replacing the term "template" with you language name, the only
function that necessarily needs to be re-written is the main
`org-babel-execute:template' function.

I would recommend starting with only non-session based evaluation, and
then slowly adding functionality.  If you run into any specific problems
I am happy to help trouble shoot.

As an example, I've worked up an very simple ob-awk.el file from
ob-template.el, it is attached along with an example org-mode file which
demonstrates its usage.

Best -- Eric









Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread John Hendy
On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban <
wxhgmqzgw...@spammotel.com> wrote:

> Hi John,
>
> John Hendy wrote:
> > I can control a table font size directly from the .tex file like so:
> >
> > ---
> > \scriptsize{
> > \begin{center}
> > \begin{tabular}{lllrr}
> >
> > table entries here
> >
> > \end{tabular}
> > \end{center}
> > }
> > ---
> >
> > Any way to pass this from org-mode? Otherwise, I keep changing the org
> file,
> > exporting, and then having to add this to the tex file and re-export.
> >
> > I tried:
> > ---
> > #+begin_latex
> > \scriptsize{
> > #+end_latex
> >
> > |org|table|here|
> >
> > #+begin_latex
> > }
> > #+end_latex
> > ---
> >
> > without success.
>
> You put the things in the wrong order:
>
> 1. put a group around some LaTeX commands
> 2. add the macro \scriptsize in it
>
> Hence:
>
> #+begin_src org
>   #+begin_latex
>  {\scriptsize
>  #+end_latex
>
>  |org|table|here|
>
>  #+begin_latex
>  }
>  #+end_latex
> #+end_src
>
> should do it (not tested).
>
>
I'm getting this error upon export (no PDF created):
---
! Argument of \frame has an extra }.

\par
l.142 }

Runaway argument?
 \par \par \par
! Paragraph ended before \frame was complete.

   \par
l.142 }

! Extra }, or forgotten \endgroup.
 }

l.142 }

! Extra }, or forgotten \endgroup.
\endframe ->\egroup
\begingroup \def \@currenvir {frame}
l.145 \end{frame}

)
Runaway argument?
---

I'm assuming something is not liking that dangling "}"...

Thoughts?


John


> Best regards,
>  Seb
>
> --
> Sébastien Vauban
>
>
>


Re: [O] Bug: The org-entry-put add extra space after each invoking [7.5 (release_7.5.260.geb2a)]

2011-05-24 Thread David Maus
At Sun, 8 May 2011 23:02:30 +0800,
wujun zhou wrote:
> 
> Each time I invoke the org-entry-put, I will get an extra space before
> the value, like this:
>  :prop: 1
>  :prop:  2
>  :prop:3
> 
> It's harmless to org-property API, but somewhat annoying.
> 
> I think, this is introduced by commit
> 92b603c8920623d9c581e2c58809ad2c73fcd475.
> 
> It changed the regex from
> 
> (concat "^[ \t]*:" property ":\\(.*\\)") (cdr range) t)
> 
> to
> 
> (concat "^[ \t]*:" (regexp-quote property) ":[ \t]*\\(\\S-.*\\)"))
> 
> Thus, the following
> (goto-char (match-beginning 1))
> will be after instead of before the spaces.
> 
> And the
> (and value (insert " " value))
> will add the extra space.

Thanks for the analysis, I just pushed a fix for this problem to
master.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de



Re: [O] org babel support for tcl and awk

2011-05-24 Thread Eric Schulte
Eric S Fraga  writes:

> Eric Schulte  writes:
>
> [...]
>
>> As an example, I've worked up an very simple ob-awk.el file from
>> ob-template.el, it is attached along with an example org-mode file which
>> demonstrates its usage.
>
> Eric,
>
> this is great to see as I use awk quite often.  What is involved in
> extending this to be able to run an awk script on input from within the
> org file (output of another babel block, for instance, as my typical use
> of awk is to re-arrange output from another program...)?  Or, if you
> wish, can you suggest one of the ob-XXX modules that best illustrates
> how to do this and I can give it a try?
>

I've made a quick change so that any variable named "stdin" is treated
specially, in that, rather than using its value to replace strings of
$stdin in the text of the awk code, the value of the stdin variable is
saved into the file processed by awk.  This allows awk to operate over
Org-mode references.

See the attached example file.

If babel code block supported a pipe or an actual stdin header argument,
that would be the ideal way to add this behavior, but currently nothing
of that nature exists.

Please let me know if this misses part of your suggestion, or more
generally what else may be advisable before we add this to the core.

Cheers -- Eric

* awk example

#+results: simple-table
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |

#+begin_src awk :var stdin=simple-table
  {print $1}
#+end_src

#+results:
: 1
: 4
: 7

#+results: simple-text
: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
: eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad
: minim veniam, quis nostrud exercitation ullamco laboris nisi ut
: aliquip ex ea commodo consequat. Duis aute irure dolor in
: reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
: pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
: culpa qui officia deserunt mollit anim id est laborum.


ob-awk.el
Description: application/emacs-lisp

>
> Thanks,
> eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


Re: [O] [PATCH] Allow inactive timestamps in org-expiry (copy of lost patch)

2011-05-24 Thread David Maus
At Mon, 28 Mar 2011 14:55:13 -0400,
Nick Dokos wrote:
>
> Marcel van der Boom  wrote:
>
> > This patch is what is attached to the message displayed at [1]. I have
> > been using this patch for a while and it works fine. From searching it
> > looks like this patch was 'forgotten', but I may have overlooked
> > something.
> >
> > If the patch was rejected, you can ignore me. If it was forgotten I'd
> > like to request to include it.
> >
>
> I don't think it was rejected outright, it looks as if it was
> inadvertently dropped. Probably part of the reason is that David sent
> the patches as application/octet-stream so they never made it to
> patchwork (was patchwork even running back in 2009? I don't remember
> when it was set up.)

IIRC Patchwork was set up in Summer 2010.


> The third part might be that it was Dec. 31, so people were out
> partying instead of applying patches (unimaginable, I know :-) )

Wow, I really did send this one Dec 31st 2009 - how time flies!

Best,
  -- Davdi
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp6JxoojtarB.pgp
Description: PGP signature


Re: [O] indirect buffer for properties

2011-05-24 Thread Michael Brand
Hi Bernt

Thanks for the suggestion. "C-c C-x p" with completion is perfect
for me to _edit_ a certain outline item and one of its
properties.

But I would also like the possibility to fast _walk through_ an
outline tree to only see _all_ properties per item _at a glance_.

The idea was to have a "primary Org buffer" (see below), opened
e. g. in the state org-content, and a second "indirect buffer for
properties" (see below) to show all the properties of the item
where the point in the primary buffer is currently in. Moving up
and down in the primary buffer would automatically update the
indirect buffer to follow the current item. Possibly _edit_ a
property here and there in the indirect buffer would be a nice
add-on as an alternative to "C-c C-x p" for some cases but not
the main purpose.

/---/
/ * section /
/ ** [#C] first subsection...   /
/ ** [#B] second subsection...  /
/ ** DONE third subsection...   /
/   /
/-- (the primary Org buffer) ---/
/ :ITEM: second subsection  /
/ :PRIORITY: B  /
/ :prop: short value/
/ :property_with_long_key: property with long value /
/ [... many more custom properties ...] /
/   /
/-- (the indirect buffer for properties) ---/

This idea is inspired by org-tree-to-indirect-buffer (C-c C-x b)
and the recently introduced org-table-follow-field-mode with its
thread about truncated long lines in tables:
http://thread.gmane.org/gmane.emacs.orgmode/41584

Michael

On Tue, May 24, 2011 at 15:17, Bernt Hansen  wrote:
> Michael Brand  writes:
>> What do you think about an indirect buffer for properties (or is there
>> already one I don't know of yet?) that lets one view and maybe even
>> edit all properties of the typically folded current heading of the
>> primary buffer in an indirect buffer?
>
> I just use C-c C-x p with IDO completion to show property names.  This
> shows the current value if any and allows editing the value.  Does this
> do what you want?



Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Nick Dokos
John Hendy  wrote:

> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban 
>  wrote:
> 
> Hi John,
>
> John Hendy wrote:
> > I can control a table font size directly from the .tex file like so:
> >
> > ---
> > \scriptsize{
> > \begin{center}
> > \begin{tabular}{lllrr}
> >
> > table entries here
> >
> > \end{tabular}
> > \end{center}
> > }
> > ---
> >
> > Any way to pass this from org-mode? Otherwise, I keep changing the org 
> file,
> > exporting, and then having to add this to the tex file and re-export.
> >
> > I tried:
> > ---
> > #+begin_latex
> > \scriptsize{
> > #+end_latex
> >
> > |org|table|here|
> >
> > #+begin_latex
> > }
> > #+end_latex
> > ---
> >
> > without success.
>
> You put the things in the wrong order:
>
> 1. put a group around some LaTeX commands
> 2. add the macro \scriptsize in it
>
> Hence:
>
> #+begin_src org
>  #+begin_latex
>  {\scriptsize
>  #+end_latex
>
>  |org|table|here|
>
>  #+begin_latex
>  }
>  #+end_latex
> #+end_src
>
> should do it (not tested).
> 
> I'm getting this error upon export (no PDF created):
> ---
> ! Argument of \frame has an extra }.
>  
>                 \par 
> l.142 }
>        
> Runaway argument?
>  \par \par \par 
> ! Paragraph ended before \frame was complete.
>  
>                    \par 
> l.142 }
>        
> ! Extra }, or forgotten \endgroup.
>  }
>                  
> l.142 }
>        
> ! Extra }, or forgotten \endgroup.
> \endframe ->\egroup 
>                     \begingroup \def \@currenvir {frame}
> l.145 \end{frame}
>                  
> )
> Runaway argument?
> ---
> 
> I'm assuming something is not liking that dangling "}"...
> 
> Thoughts?
> 

I didn't try Seb's workaround but your original solution almost works:
what stops it is YAB in the latex exporter, but having been bitten by
such a couple of times in the past, I applied my usual[fn:1] workaround
and presto! it works:

,
| 
| * foo
| 
| #+begin_latex
| \scriptsize{ %}
| #+end_latex
| 
| #+tblname: foo
| | table | here |
| |---+--|
| | table | here |
| 
| #+begin_latex
| }
| #+end_latex
`

The opening brace on the \scriptsize line confuses the exporter and it
leaves the table alone. Adding a commented-out closing brace unconfuses
it.

Nick

Footnotes:

[fn:1] Maybe I should add it to the FAQ?




Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread John Hendy
On Tue, May 24, 2011 at 2:25 PM, Nick Dokos  wrote:

> John Hendy  wrote:
>
> > On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban <
> wxhgmqzgw...@spammotel.com> wrote:
> >
> > Hi John,
> >
> > John Hendy wrote:
> > > I can control a table font size directly from the .tex file like
> so:
> > >
> > > ---
> > > \scriptsize{
> > > \begin{center}
> > > \begin{tabular}{lllrr}
> > >
> > > table entries here
> > >
> > > \end{tabular}
> > > \end{center}
> > > }
> > > ---
> > >
> > > Any way to pass this from org-mode? Otherwise, I keep changing the
> org file,
> > > exporting, and then having to add this to the tex file and
> re-export.
> > >
> > > I tried:
> > > ---
> > > #+begin_latex
> > > \scriptsize{
> > > #+end_latex
> > >
> > > |org|table|here|
> > >
> > > #+begin_latex
> > > }
> > > #+end_latex
> > > ---
> > >
> > > without success.
> >
> > You put the things in the wrong order:
> >
> > 1. put a group around some LaTeX commands
> > 2. add the macro \scriptsize in it
> >
> > Hence:
> >
> > #+begin_src org
> >  #+begin_latex
> >  {\scriptsize
> >  #+end_latex
> >
> >  |org|table|here|
> >
> >  #+begin_latex
> >  }
> >  #+end_latex
> > #+end_src
> >
> > should do it (not tested).
> >
> > I'm getting this error upon export (no PDF created):
> > ---
> > ! Argument of \frame has an extra }.
> > 
> > \par
> > l.142 }
> >
> > Runaway argument?
> >  \par \par \par
> > ! Paragraph ended before \frame was complete.
> > 
> >\par
> > l.142 }
> >
> > ! Extra }, or forgotten \endgroup.
> >  }
> >
> > l.142 }
> >
> > ! Extra }, or forgotten \endgroup.
> > \endframe ->\egroup
> > \begingroup \def \@currenvir {frame}
> > l.145 \end{frame}
> >
> > )
> > Runaway argument?
> > ---
> >
> > I'm assuming something is not liking that dangling "}"...
> >
> > Thoughts?
> >
>
> I didn't try Seb's workaround but your original solution almost works:
> what stops it is YAB in the latex exporter, but having been bitten by
> such a couple of times in the past, I applied my usual[fn:1] workaround
> and presto! it works:
>
> ,
> |
> | * foo
> |
> | #+begin_latex
> | \scriptsize{ %}
> | #+end_latex
> |
> | #+tblname: foo
> | | table | here |
> | |---+--|
> | | table | here |
> |
> | #+begin_latex
> | }
> | #+end_latex
> `
>
>
Awesome!! And now I recall seeing it before on the list. Very cool.


> The opening brace on the \scriptsize line confuses the exporter and it
> leaves the table alone. Adding a commented-out closing brace unconfuses
> it.
>
> Nick
>
> Footnotes:
>
> [fn:1] Maybe I should add it to the FAQ?
>

Perhaps -- the tough things is that an issue with braces is not what I would
have expected the problem was. I thought I just wasn't combining things
right or that the org exporter was making something like this impossible
based on how it parsed the text. In any case, yes, it would be cool to have
in public written somewhere. Thanks!


Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Sebastien Vauban
Hi John and Nick,

Nick Dokos wrote:
> John Hendy  wrote:
>> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban 
>>  wrote:
>> John Hendy wrote:
>> > I can control a table font size directly from the .tex file like so:
>> >
>> > ---
>> > \scriptsize{
>> > \begin{center}
>> > \begin{tabular}{lllrr}
>> >
>> > table entries here
>> >
>> > \end{tabular}
>> > \end{center}
>> > }
>> > ---
>> >
>> > Any way to pass this from org-mode? Otherwise, I keep changing the org 
>> file,
>> > exporting, and then having to add this to the tex file and re-export.
>> >
>> > I tried [...]
>> > without success.
>>
>> You put the things in the wrong order:
>>
>> 1. put a group around some LaTeX commands
>> 2. add the macro \scriptsize in it
>>
>> Hence:
>>
>> #+begin_src org
>>  #+begin_latex
>>  {\scriptsize
>>  #+end_latex
>>
>>  |org|table|here|
>>
>>  #+begin_latex
>>  }
>>  #+end_latex
>> #+end_src
>>
>> should do it (not tested).
>> 
>> I'm getting this error upon export (no PDF created):
>> ---
>> ! Argument of \frame has an extra }.
>>  
>>                 \par 
>> l.142 }
>>        
>> Runaway argument?
>>  \par \par \par 
>> ! Paragraph ended before \frame was complete.
>>  
>>                    \par 
>> l.142 }
>>        
>> ! Extra }, or forgotten \endgroup.
>>  }
>>                  
>> l.142 }
>>        
>> ! Extra }, or forgotten \endgroup.
>> \endframe ->\egroup 
>>                     \begingroup \def \@currenvir {frame}
>> l.145 \end{frame}
>>                  
>> )
>> Runaway argument?
>> ---
>> 
>> I'm assuming something is not liking that dangling "}"...
>> 
>> Thoughts?

Now, a real-life example that used to work -- and still does!

#+LaTeX: {\fontsize{3.8}{4.2}\selectfont

#+BEGIN: columnview :hlines 1 :id local
| Task |  Orig. |   Time | Estim. | PRIOR | SCHEDULED | 
DEADLINE |
|--++++---+---+--|
| * POC| 856:00 | 698:50 | 775:55 |   |   | 
 |
| ** Setup |  32:00 |   2:00 |  10:00 |   |   | 
 |
| *** Bugs or features ||  32:05 |   0:15 |   |   | 
 |
| *** TODO Caching?||||   |   | 
 |
#+END:

#+LaTeX: }

So, diffs are here:

- I'm using an explicit size
- I don't use LaTeX blocks but just LaTeX one-liners


> I didn't try Seb's workaround but your original solution almost works:
> what stops it is YAB in the latex exporter, but having been bitten by
> such a couple of times in the past, I applied my usual[fn:1] workaround
> and presto! it works:
>
> ,
> | 
> | * foo
> | 
> | #+begin_latex
> | \scriptsize{ %}
> | #+end_latex
> | 
> | #+tblname: foo
> | | table | here |
> | |---+--|
> | | table | here |
> | 
> | #+begin_latex
> | }
> | #+end_latex
> `
>
> The opening brace on the \scriptsize line confuses the exporter and it
> leaves the table alone. Adding a commented-out closing brace unconfuses
> it.
>
> [fn:1] Maybe I should add it to the FAQ?

Asking the question is answering it... ;-)

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] orgmode/beamer - won't export blocks

2011-05-24 Thread Sebastien Vauban
Hi Benjamin,

Benjamin Slade wrote:
> I'm having the same trouble which seems to be reported in this thread (I'm
> not running Aquamacs though, just GNU Emacs under Linux, with orgmode v7.4):
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28752.html
>
>
> I've followed tutorials, and orgmode isn't generating beamer \block
> structures (I checked the LaTeX code generated: it is generating \itemize
> rather than \block).
>
> Did anyone ever figure out the reason for this?
>
> -
>
> [Orgmode] Baffled by beamer blocks
>
> Philip J. Hollenback
> Tue, 17 Aug 2010 08:31:43 -0700
>
> I've got a basic org-mode 7.01g + beamer setup working and am able to
> create and export presentations.  However I am completely unable to
> create presentations with blocks in them.  I've followed the examples on
> the website such as http://orgmode.org/worg/org-tutorials/org-beamer.php
> with no success.
>
> When I try to write a presentation with blocks, I find that instead of
> blocks I end up with nested lists in the frames.  The LaTeX output shows
> no \block structures.  I see no error messages in any of my emacs
> buffers. I should note that I'm running Aquamacs 1.9 on the mac.
>
> Can anyone suggest what in my setup might be preventing blocks from
> working?  I'm really baffled at this point.
>
> Thanks,
> P.
> --
> Philip J. Hollenback
> phil...@pobox.com
> www.hollenback.net

If you search for accurate help, please post an "ECM" (Example Complete and
Minimal), so that one can very quickly try your file, report if it works or
not, and try to spot the problem.

Best regards,
  Seb

-- 
Sébastien Vauban




[O] beamer export questions

2011-05-24 Thread John Hendy
Hi,


I've fiddled with org-mode and beamer before successfully, but it's been a
while. I'm having a few issues i don't understand.

This is currently my header:
---
#+DATE:  2011-05-25
#+OPTIONS:   H:2 num:t toc:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t author:nil
#+startup: beamer
#+LaTeX_CLASS: beamer
#+BEAMER_FRAME_LEVEL: 2
#+latex_header: \usepackage{lmodern}
---

Is there any way to get the generated index on the right to include the
frames themselves? This is just a simple presentation for a meeting --
basically, i just exported my outline for the meeting to beamer so I'll have
something to show, and then I'll take notes in the same org file itself as
we discuss. It's like so:

---
* top headline (only because
** agenda
** updates
** roles and responsibilities
** open discussion
---

When I export, the outline only includes the top headline. Not a big deal; I
basically just re-created what i want via my agenda slide. Also, the index
on the left only lists the top slide.

While I understand that for longer presentations where you have many "top
level" sections, you might want the index/TOC to only contain those major
sections, for this type of application where one doesn't need more than two
levels deep, it would be nice to at least have the option to make the TOC
list everything (even omitting the top level heirarchically since it's silly
to have it shown in this case).

I tried just using all top level headlines, but then I can't seem to get the
TOC to show up at all, even with options H:1 and toc:1 (and verifying that
\setcounter{tocdepth}{1} is in the .tex file).

Any suggestions/pointers as to what I'm doing wrong? My goal would be:
- index where all frames are shown
- a TOC where all frames are listed


Thanks,
John


Re: [O] org babel support for tcl and awk

2011-05-24 Thread Sebastien Vauban
Hi Eric(s),

Eric Schulte wrote:
> Eric S Fraga  writes:
>> this is great to see as I use awk quite often. What is involved in
>> extending this to be able to run an awk script on input from within the org
>> file (output of another babel block, for instance, as my typical use of awk
>> is to re-arrange output from another program...)? Or, if you wish, can you
>> suggest one of the ob-XXX modules that best illustrates how to do this and
>> I can give it a try?
>
> I've made a quick change so that any variable named "stdin" is treated
> specially, in that, rather than using its value to replace strings of $stdin
> in the text of the awk code, the value of the stdin variable is saved into
> the file processed by awk. This allows awk to operate over Org-mode
> references.
>
> If babel code block supported a pipe or an actual stdin header argument,
> that would be the ideal way to add this behavior, but currently nothing of
> that nature exists.
>
> Please let me know if this misses part of your suggestion, or more generally
> what else may be advisable before we add this to the core.

Could this be implemented for sh as well?

AFAI understand, this is exactly the missing piece for me to be able to:

- run consecutive partial blocks of code in my Org buffer (seeing what they
  really do on input data),

- export the full list of block as a script.

This was described in
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg36976.html, and still
impossible -- for me! -- to do right now. But I'm not very sure I wrote my
thoughts in an enough understandable way -- maybe not clear enough to me?

Best regards,
  Seb

-- 
Sébastien Vauban




Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Thomas S. Dye
John Hendy  writes:

> On Tue, May 24, 2011 at 2:25 PM, Nick Dokos  wrote:
>
>> John Hendy  wrote:
>>
>> > On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban <
>> wxhgmqzgw...@spammotel.com> wrote:
>> >
>> > Hi John,
>> >
>> > John Hendy wrote:
>> > > I can control a table font size directly from the .tex file like
>> so:
>> > >
>> > > ---
>> > > \scriptsize{
>> > > \begin{center}
>> > > \begin{tabular}{lllrr}
>> > >
>> > > table entries here
>> > >
>> > > \end{tabular}
>> > > \end{center}
>> > > }
>> > > ---
>> > >
>> > > Any way to pass this from org-mode? Otherwise, I keep changing the
>> org file,
>> > > exporting, and then having to add this to the tex file and
>> re-export.
>> > >
>> > > I tried:
>> > > ---
>> > > #+begin_latex
>> > > \scriptsize{
>> > > #+end_latex
>> > >
>> > > |org|table|here|
>> > >
>> > > #+begin_latex
>> > > }
>> > > #+end_latex
>> > > ---
>> > >
>> > > without success.
>> >
>> > You put the things in the wrong order:
>> >
>> > 1. put a group around some LaTeX commands
>> > 2. add the macro \scriptsize in it
>> >
>> > Hence:
>> >
>> > #+begin_src org
>> >  #+begin_latex
>> >  {\scriptsize
>> >  #+end_latex
>> >
>> >  |org|table|here|
>> >
>> >  #+begin_latex
>> >  }
>> >  #+end_latex
>> > #+end_src
>> >
>> > should do it (not tested).
>> >
>> > I'm getting this error upon export (no PDF created):
>> > ---
>> > ! Argument of \frame has an extra }.
>> > 
>> > \par
>> > l.142 }
>> >
>> > Runaway argument?
>> >  \par \par \par
>> > ! Paragraph ended before \frame was complete.
>> > 
>> >\par
>> > l.142 }
>> >
>> > ! Extra }, or forgotten \endgroup.
>> >  }
>> >
>> > l.142 }
>> >
>> > ! Extra }, or forgotten \endgroup.
>> > \endframe ->\egroup
>> > \begingroup \def \@currenvir {frame}
>> > l.145 \end{frame}
>> >
>> > )
>> > Runaway argument?
>> > ---
>> >
>> > I'm assuming something is not liking that dangling "}"...
>> >
>> > Thoughts?
>> >
>>
>> I didn't try Seb's workaround but your original solution almost works:
>> what stops it is YAB in the latex exporter, but having been bitten by
>> such a couple of times in the past, I applied my usual[fn:1] workaround
>> and presto! it works:
>>
>> ,
>> |
>> | * foo
>> |
>> | #+begin_latex
>> | \scriptsize{ %}
>> | #+end_latex
>> |
>> | #+tblname: foo
>> | | table | here |
>> | |---+--|
>> | | table | here |
>> |
>> | #+begin_latex
>> | }
>> | #+end_latex
>> `
>>
>>
> Awesome!! And now I recall seeing it before on the list. Very cool.
>
>
>> The opening brace on the \scriptsize line confuses the exporter and it
>> leaves the table alone. Adding a commented-out closing brace unconfuses
>> it.
>>
>> Nick
>>
>> Footnotes:
>>
>> [fn:1] Maybe I should add it to the FAQ?
>>
>
> Perhaps -- the tough things is that an issue with braces is not what I would
> have expected the problem was. I thought I just wasn't combining things
> right or that the org exporter was making something like this impossible
> based on how it parsed the text. In any case, yes, it would be cool to have
> in public written somewhere. Thanks!
> On Tue, May 24, 2011 at 2:25 PM, Nick Dokos  dir="ltr"> wrote:
> John Hendy  wrote:
>
>> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban 
>>  wrote:
>>
>>     Hi John,
>>
>>     John Hendy wrote:
>>     > I can control a table font size directly from the .tex file like so:
>>     >
>>     > ---
>>     > \scriptsize{
>>     > \begin{center}
>>     > \begin{tabular}{lllrr}
>>     >
>>     > table entries here
>>     >
>>     > \end{tabular}
>>     > \end{center}
>>     > }
>>     > ---
>>     >
>>     > Any way to pass this from org-mode? Otherwise, I keep changing the org 
>> file,
>>     > exporting, and then having to add this to the tex file and re-export.
>>     >
>>     > I tried:
>>     > ---
>>     > #+begin_latex
>>     > \scriptsize{
>>     > #+end_latex
>>     >
>>     > |org|table|here|
>>     >
>>     > #+begin_latex
>>     > }
>>     > #+end_latex
>>     > ---
>>     >
>>     > without success.
>>
>>     You put the things in the wrong order:
>>
>>     1. put a group around some LaTeX commands
>>     2. add the macro \scriptsize in it
>>
>>     Hence:
>>
>>     #+begin_src org
>>      #+begin_latex
>>      {\scriptsize
>>      #+end_latex
>>
>>      |org|table|here|
>>
>>      #+begin_latex
>>      }
>>      #+end_latex
>>     #+end_src
>>
>>     should do it (not tested).
>>
>> I'm getting this error upon export (no PDF created):
>> ---
>> ! Argument of \frame has an extra }.
>>  
>>                 \par 
>> l.142 }
>>        
>> Runaway argument?
>>  \par \par \par 
>> ! Paragraph ended before \frame was complete.
>>  
>>                    \par 
>> l.142 }
>>        
>>

Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Nick Dokos
John Hendy  wrote:

> The opening brace on the \scriptsize line confuses the exporter and it
> leaves the table alone. Adding a commented-out closing brace unconfuses
> it.
>
> Nick
>
> Footnotes:
>
> [fn:1] Maybe I should add it to the FAQ?
> 
> Perhaps -- the tough things is that an issue with braces is not what I
> would have expected the problem was. I thought I just wasn't combining
> things right or that the org exporter was making something like this
> impossible based on how it parsed the text. In any case, yes, it would
> be cool to have in public written somewhere. Thanks! 
> 
> 

The best debugging technique I can suggest here is to export to LaTeX
and then look at the .tex file. It's usually clear what broke, who is
responsible and, often, how to fix it.

In this case, the org table looked untouched by the exporter, but when I
got rid of the ``\scriptsize {'', the table was properly exported.

Nick



Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Nick Dokos
Thomas S. Dye  wrote:

> 
> This appears to work for tabular environments only.  When I add a
> caption the table is set normalsize and the text following it is set
> scriptsize. Or, am I doing something wrong?
> 

Oy, vey: I don't think you are doing anything wrong - I get the same
thing.

Can \scriptsize be used as a macro with argument? I don't have
my references here.  If I do it the way Seb suggested, inside an
environment, it seems to work better, in the sense that it does not
change the thing after the table - but the table is unaffected
nevertheless. I guess the table environment sets a font size explicitly,
overriding outside settings.

Nick




Re: [O] orgmode/beamer - won't export blocks

2011-05-24 Thread Eric S Fraga
> Benjamin Slade wrote:
>> I'm having the same trouble which seems to be reported in this thread (I'm
>> not running Aquamacs though, just GNU Emacs under Linux, with orgmode v7.4):
>> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28752.html

Benjamin,

But that is quite old.  That thread ended inconclusively because the OP
never got back to us with further details.  And as Sebastien says:

[...]

"Sebastien Vauban"  writes:
> If you search for accurate help, please post an "ECM" (Example Complete and
> Minimal), so that one can very quickly try your file, report if it works or
> not, and try to spot the problem.
>
> Best regards,
>   Seb

Please give us a small *complete* org file (say, one slide with one or
two blocks) that doesn't work and we can see what is happening.  It
might also be worthwhile updating your version to org to the most recent
stable release (7.5), if you can.

In any case, I would suggest you look at the configuration options in
your org file, specifically #+BEAMER_FRAME_LEVEL and the H: #+OPTIONS
setting.

I use org+beamer practically daily and it works just fine!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.299.gb638.dirty)



Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Nick Dokos
Nick Dokos  wrote:

> Thomas S. Dye  wrote:
> 
> > 
> > This appears to work for tabular environments only.  When I add a
> > caption the table is set normalsize and the text following it is set
> > scriptsize. Or, am I doing something wrong?
> > 
> 
> Oy, vey: I don't think you are doing anything wrong - I get the same
> thing.
> 
> Can \scriptsize be used as a macro with argument? I don't have
> my references here.  If I do it the way Seb suggested, inside an
> environment, it seems to work better, in the sense that it does not
> change the thing after the table - but the table is unaffected
> nevertheless. I guess the table environment sets a font size explicitly,
> overriding outside settings.
> 

table -> float -> xfloat -> floatboxreset -> normalsize

So you can redefine floatboreset to change the size:

scripttab.sty:
--8<---cut here---start->8---
\makeatletter
\def \@floatboxreset {%
\reset@font
\scriptsize
\@setminipage
}
\makeatother
--8<---cut here---end--->8---

scripttab.org:




Re: [O] beamer export questions

2011-05-24 Thread Eric S Fraga
John Hendy  writes:

> Hi,
>
>
> I've fiddled with org-mode and beamer before successfully, but it's been a
> while. I'm having a few issues i don't understand.
>
> This is currently my header:
> ---
> #+DATE:  2011-05-25
> #+OPTIONS:   H:2 num:t toc:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> #+OPTIONS:   TeX:t LaTeX:t author:nil
> #+startup: beamer
> #+LaTeX_CLASS: beamer
> #+BEAMER_FRAME_LEVEL: 2
> #+latex_header: \usepackage{lmodern}
> ---
>
> Is there any way to get the generated index on the right to include the
> frames themselves? This is just a simple presentation for a meeting --
> basically, i just exported my outline for the meeting to beamer so I'll have
> something to show, and then I'll take notes in the same org file itself as
> we discuss. It's like so:

If I understand you correctly, this has more to do with the beamer theme
you use than anything org does or can actually do!

Org does nothing more than translate (given your BEAMER_FRAME_LEVEL
setting) top level headings to latex sections and second level headings
to frames.  Interpreting sections and frames is up to the beamer theme.
Some will indeed display frame titles, IRC, but it's not something I've
ever done/needed/wanted!

What beamer theme are you using?  Have you tried any others?  Check out
the beamer manual and the web pages for alternatives.  

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.299.gb638.dirty)



Re: [O] Passing font size to exported LaTeX table

2011-05-24 Thread Nick Dokos
[Fat-fingered it and sent it prematurely - sorry about that]

Nick Dokos  wrote:

> Nick Dokos  wrote:
> 
> > Thomas S. Dye  wrote:
> > 
> > > 
> > > This appears to work for tabular environments only.  When I add a
> > > caption the table is set normalsize and the text following it is set
> > > scriptsize. Or, am I doing something wrong?
> > > 
> > 
> > Oy, vey: I don't think you are doing anything wrong - I get the same
> > thing.
> > 
> > Can \scriptsize be used as a macro with argument? I don't have
> > my references here.  If I do it the way Seb suggested, inside an
> > environment, it seems to work better, in the sense that it does not
> > change the thing after the table - but the table is unaffected
> > nevertheless. I guess the table environment sets a font size explicitly,
> > overriding outside settings.
> > 
> 
> table -> float -> xfloat -> floatboxreset -> normalsize
> 

This was supposed to say that yes, indeed, the table environment sets
\normalsize explicitly, through this sequence of macro calls.

> So you can redefine floatboreset to change the size:
  floatboxreset
> 
> scripttab.sty:
> \makeatletter
> \def \@floatboxreset {%
> \reset@font
> \scriptsize
> \@setminipage
> }
> \makeatother
> 
> scripttab.org:
> 

scripttab.sty:
--8<---cut here---start->8---
\makeatletter
\def \@floatboxreset {%
\reset@font
\scriptsize
\@setminipage
}
\makeatother
--8<---cut here---end--->8---

scripttab.org:
--8<---cut here---start->8---
#+LaTeX_HEADER: \usepackage{scripttab}

* foo

What's this?


#+tblname: foo
#+CAPTION: foo
| table | here |
|---+--|
| table | here |

What's this?

--8<---cut here---end--->8---

I think this works OK.

Nick



Re: [O] beamer export questions

2011-05-24 Thread suvayu ali
On Tue, May 24, 2011 at 2:15 PM, Eric S Fraga  wrote:
> What beamer theme are you using?  Have you tried any others?  Check out
> the beamer manual and the web pages for alternatives.

This might be of help.

http://www.hartwork.org/beamer-theme-matrix/

-- 
Suvayu

Open source is the future. It sets us free.



[O] org-contacts: error on message startup

2011-05-24 Thread Sven Bretfeld
Hi all

Just trying to use org-contacts. There is an error for me whenever I
start a new message:

Debugger entered--Lisp error: (void-variable completion-at-point-functions)
  add-to-list(completion-at-point-functions 
org-contacts-message-complete-function)
  (lambda nil (add-to-list (quote completion-at-point-functions) (quote 
org-contacts-message-complete-function)))()
  run-hooks(text-mode-hook message-mode-hook)
  apply(run-hooks (text-mode-hook message-mode-hook))
  run-mode-hooks(message-mode-hook)
  message-mode()
  message-pop-to-buffer("*mail*" nil)
  message-mail()
  gnus-group-mail(nil)
  call-interactively(gnus-group-mail nil nil)

Have I missed a point in the setup? I just added (require 'org-contacts)
and threw out all bbdb related code from .emacs and .gnus.el. Is there
anything else to do?

I'm using the latest git version of orgmode (release 7.5.299.gb638),
Emacs 23.1.50.1 (Ubuntu) and Gnus v5.13.

Thanks for help,

Sven



Re: [O] org babel support for tcl and awk

2011-05-24 Thread Eric Schulte
"Sebastien Vauban"  writes:

> Hi Eric(s),
>
> Eric Schulte wrote:
>> Eric S Fraga  writes:
>>> this is great to see as I use awk quite often. What is involved in
>>> extending this to be able to run an awk script on input from within the org
>>> file (output of another babel block, for instance, as my typical use of awk
>>> is to re-arrange output from another program...)? Or, if you wish, can you
>>> suggest one of the ob-XXX modules that best illustrates how to do this and
>>> I can give it a try?
>>
>> I've made a quick change so that any variable named "stdin" is treated
>> specially, in that, rather than using its value to replace strings of $stdin
>> in the text of the awk code, the value of the stdin variable is saved into
>> the file processed by awk. This allows awk to operate over Org-mode
>> references.
>>
>> If babel code block supported a pipe or an actual stdin header argument,
>> that would be the ideal way to add this behavior, but currently nothing of
>> that nature exists.
>>
>> Please let me know if this misses part of your suggestion, or more generally
>> what else may be advisable before we add this to the core.
>
> Could this be implemented for sh as well?
>
> AFAI understand, this is exactly the missing piece for me to be able to:
>

Hi Seb,

Unfortunately this simple hack for ob-awk does not address the need you
link to below -- which I am aware of and which is on my list of larger
longer-term Babel development items.  I think that a future piping
implementation will be the ultimate solution to the issues you address.

Such an implementation -- allowing data to flow between concurrently
executing blocks utilizing posix pipes -- will require more
sophisticated processes interaction and possibly some form of
multi-threaded elisp execution.

Best -- Eric

>
> - run consecutive partial blocks of code in my Org buffer (seeing what
>   they really do on input data),
>
> - export the full list of block as a script.
>
> This was described in
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg36976.html, and still
> impossible -- for me! -- to do right now. But I'm not very sure I wrote my
> thoughts in an enough understandable way -- maybe not clear enough to me?
>
> Best regards,
>   Seb


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-contacts: error on message startup

2011-05-24 Thread Nick Dokos
Sven Bretfeld  wrote:

> Hi all
> 
> Just trying to use org-contacts. There is an error for me whenever I
> start a new message:
> 
> Debugger entered--Lisp error: (void-variable completion-at-point-functions)
>   add-to-list(completion-at-point-functions 
> org-contacts-message-complete-function)
>   (lambda nil (add-to-list (quote completion-at-point-functions) (quote 
> org-contacts-message-complete-function)))()
>   run-hooks(text-mode-hook message-mode-hook)
>   apply(run-hooks (text-mode-hook message-mode-hook))
>   run-mode-hooks(message-mode-hook)
>   message-mode()
>   message-pop-to-buffer("*mail*" nil)
>   message-mail()
>   gnus-group-mail(nil)
>   call-interactively(gnus-group-mail nil nil)
> 
> Have I missed a point in the setup? I just added (require 'org-contacts)
> and threw out all bbdb related code from .emacs and .gnus.el. Is there
> anything else to do?
> 
> I'm using the latest git version of orgmode (release 7.5.299.gb638),
> Emacs 23.1.50.1 (Ubuntu) and Gnus v5.13.
> 

C-h v completion-at-point-functions RET says:

,
| completion-at-point-functions is a variable defined in `minibuffer.el'.
| Its value is (tags-completion-at-point-function)
| 
| 
|   This variable is potentially risky when used as a file local variable.
| 
| Documentation:
| Special hook to find the completion table for the thing at point.
| Each function on this hook is called in turns without any argument and should
| return either nil to mean that it is not applicable at point,
| or a function of no argument to perform completion (discouraged),
| or a list of the form (START END COLLECTION &rest PROPS) where
|  START and END delimit the entity to complete and should include point,
|  COLLECTION is the completion table to use to complete it, and
|  PROPS is a property list for additional information.
| Currently supported properties are:
|  `:predicate'   a predicate that completion candidates need to 
satisfy.
|  `:annotation-function' the value to use for `completion-annotate-function'.
`

so it's an emacs thing, not an org thing. You can try loading minibuffer.elc but
it is rather surprising that it's not there already. Unless it's an emacs23 vs 
emacs24
thing - I run emacs24 and it's present there, but I just tried emacs23 and it 
does not
seem to be there even after I load-library minibuffer.el.

Nick



Re: [O] orgmode/beamer - won't export blocks

2011-05-24 Thread Benjamin Slade
Thanks, Sebastien and Eric.

I updated to org-mode v7.5 [stable], but I'm still having the same problem.

I include below a minimal example and also the snippet of code in my
.emacs config file which is relevant.

Cheers, Ben.

%%Minimal example begins%%
#+startup: beamer
#+LaTeX_CLASS: beamer
#+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
#+BEAMER_FRAME_LEVEL: 2

#+MACRO: BEAMERMODE presentation
#+MACRO: BEAMERTHEME Madrid
#+MACRO: BEAMERCOLORTHEME lily
#+MACRO: BEAMERSUBJECT RMRF
#+MACRO: BEAMERINSTITUTE Miskatonic University, Astrology Dept.
#+TITLE: Presentation with Org-Mode and Beamer
#+AUTHOR: Someone

* My presentation

** Overview

   1. Blocks

   2. That's it

** Blocks
Nothing to see here.
*** A block   :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:
  - Hello, world
  - I can't see any block here!
%%Minimal example ends%%


I have the following in my .emacs, in case there's something here that
is causing a problem (taken from
http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.html
)

%%snippet from .emacs begins%%
;; #+LaTeX_CLASS: beamer in org files
(unless (boundp 'org-export-latex-classes)
  (setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
  ;; beamer class, for presentations
  '("beamer"
 "\\documentclass[11pt]{beamer}\n
  \\mode<{{{beamermode}}}>\n
  \\usethemebeamertheme\n
  \\usecolorthemebeamercolortheme\n
  \\beamertemplateballitem\n
  \\setbeameroption{show notes}
  \\usepackage[utf8]{inputenc}\n
  \\usepackage[T1]{fontenc}\n
  \\usepackage{hyperref}\n
  \\usepackage{color}
  \\usepackage{listings}
  \\lstset{numbers=none,language=[ISO]C++,tabsize=4,
  frame=single,
  basicstyle=\\small,
  showspaces=false,showstringspaces=false,
  showtabs=false,
  keywordstyle=\\color{blue}\\bfseries,
  commentstyle=\\color{red},
  }\n
  \\usepackage{verbatim}\n
  \\institutebeamerinstitute\n
   \\subjectbeamersubject\n"

 ("\\section{%s}" . "\\section*{%s}")


 ("\\begin{frame}[fragile]\\frametitle{%s}"
   "\\end{frame}"
   "\\begin{frame}[fragile]\\frametitle{%s}"
   "\\end{frame}")))

  ;; letter class, for formal letters

  (add-to-list 'org-export-latex-classes

  '("letter"
 "\\documentclass[11pt]{letter}\n
  \\usepackage[utf8]{inputenc}\n
  \\usepackage[T1]{fontenc}\n
  \\usepackage{color}"

 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
%%snippet from .emacs ends%%


From: Eric S Fraga
Subject: Re: [O] orgmode/beamer - won't export blocks
Date: Tue, 24 May 2011 22:11:07 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)


> Benjamin Slade wrote:
>> I'm having the same trouble which seems to be reported in this thread (I'm
>> not running Aquamacs though, just GNU Emacs under Linux, with orgmode v7.4):
>> http://www.mail-archive.com/address@hidden/msg28752.html

Benjamin,

But that is quite old.  That thread ended inconclusively because the OP
never got back to us with further details.  And as Sebastien says:

[...]

"Sebastien Vauban"  writes:
> If you search for accurate help, please post an "ECM" (Example Complete and
> Minimal), so that one can very quickly try your file, report if it works or
> not, and try to spot the problem.
>
> Best regards,
>   Seb

Please give us a small *complete* org file (say, one slide with one or
two blocks) that doesn't work and we can see what is happening.  It
might also be worthwhile updating your version to org to the most recent
stable release (7.5), if you can.

In any case, I would suggest you look at the configuration options in
your org file, specifically #+BEAMER_FRAME_LEVEL and the H: #+OPTIONS
setting.

I use org+beamer practically daily and it works just fine!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.299.gb638.dirty)



[O] [Announce] A GitHub Issues interface for Org-mode

2011-05-24 Thread Puneeth Chaganti
Hello Orgsters,

Issue Tracker integration with Org-mode has been something that a lot
of people have been looking for. Being the GitHub addict, that I am, I
decided to hack up something that integrates GitHub issues with
Org-mode.

It presently allows
- Importing all open issues from a project into an org-file. [Milestone
  due dates (if any) are added as Deadlines.
- Closing Issues, Editing Tags, Changing Issue Name
- Convert a TODO item into an Org-mode issue.

However, it uses APIv3 of GitHub, which is Beta. So, expect some
erratic behaviour. :)

I have put up my code here [1]. The code isn't all that clean and
robust, but it works. Hope atleast some of you will find it useful.
Any suggestions, feedback and code help is more than welcome.

Thanks,
Puneeth

[1] https://github.com/punchagan/org-ghi



[O] [bug] corrupted export

2011-05-24 Thread Samuel Wales
The following exports to HTML and ASCII incorrectly.

The line starting "Among" is not exported in The following exports to
HTML and ASCII incorrectly.

The line starting "Among" is not exported using c-c c-e A or
programmatically to HTML in Org-mode version 7.5
(release_7.5.304.g2f5f9).

* List of possible diseases
Among the lesser-known but striking results are chronic Lyme
at 100% (something like 65/65) and breast cancer at 25%
infection.

* Results
 List of possible diseases
 =

Date: 2011-05-24 22:43:40 MST


at 100% (something like 65/65) and breast cancer at 25%
infection.


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.



Re: [O] [bug] corrupted export

2011-05-24 Thread Samuel Wales
Another example of corrupted export:

*** test
Some definitions using the same name /exclude/ people who
have serious disease.  Can you predict the results?

Only the first line of body text gets exported.



[O] some kind of bisect tool

2011-05-24 Thread Samuel Wales
I wonder if we can make a bisect tool that will use git bisect, load
org source, and let you tell git whether the bug exists.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.



Re: [O] [bug] corrupted export

2011-05-24 Thread Christian Moe

I can't reproduce these.

Yours,
Christian


On 5/25/11 8:14 AM, Samuel Wales wrote:

Another example of corrupted export:

*** test
Some definitions using the same name /exclude/ people who
have serious disease.  Can you predict the results?

Only the first line of body text gets exported.