Re: [O] Comments break lists when exporting to TeX

2012-05-23 Thread Daniel Schoepe
On Wed, 23.05.2012 14:21, Nicolas Goaziou wrote:
> At the moment you insert text at column 0, the list ends.  You can use
> inline comments (i.e. #+ This isn't) instead.

This however, does not solve my original problem, since it doesn't work
with #+INCLUDE (with version 7.8.09):

* Test
  - This will not indent the code properly as a part of the list element
#+INCLUDE foo.c src c
  - This will print "#+INCLUDE .." literally:
#+INCLUDE foo.c src c
  - This works as expected:
  #+BEGIN_SRC c
  
  #+END_SRC

Of course I could fall back to something like \lstlistinginput, but that
works only for TeX-export and hence defeats the whole point of
result-format-agnostic directives such as #+INCLUDE (at least when it's
used for source files).

> I do not. Export is consistent with in-buffer behaviour. You have
> created two lists here, not one, and it has nothing to do with export.

I find it odd for a comment to have such an effect on the "semantics" of
the document. My intuition about comments (that aren't special
directives) is that they have no effect on the final result (the PDF in
this case, or the binary in the case of compilable source code).

I think what I'm saying is that the comment shouldn't break up the lists
in the buffer either, but I don't have any strong feelings about this,
as long I can get #+INCLUDE to work in list elements. (But it would be a
nice, general rule that would allow #+INCLUDE to work as "expected".
Another alternative would be to make all such directives also work when
they're not at column 0).

Cheers,
Daniel


pgpkmMn1GC4ou.pgp
Description: PGP signature


[O] Comments break lists when exporting to TeX

2012-05-22 Thread Daniel Schoepe
Hi,

while trying to include a source file in a list element via #+INCLUDE, I
discovered the following behavior: A comment between two list elements breaks
the list into two lists when exporting. For example:

* Test
  - This is a list element.
# This isn't.
  - This is another list element.

Becomes after exporting to .tex:

..
\begin{itemize}
\item This is a list element.
\end{itemize}
\begin{itemize}
\item This is another list element.
\end{itemize}
..

I think it makes sense for comments to have no effect on this (i.e. it
should behave the same during export as if it wasn't there), so I
consider this a bug.

This has the unfortunate side effect of no longer being able to include
a source file using #+INCLUDE while preserving its indentation in the
resulting PDF (as using #+BEGIN_SRC .. #+END_SRC would).

Cheers,
Daniel


pgplkt0Ht9WTK.pgp
Description: PGP signature


[O] [Daniel Schoepe] Re: LaTeX-export: letters after $..$ turn off math-mode

2012-02-06 Thread Daniel Schoepe
John Hendy, answered my question off-list, presumably unintentionally
(sorry about my forwarding parts of your mail, if that assumption is
wrong), so here's my answer to that which I also forgot to send to the
list. The solution / workaround was to use `\(n\)th' instead.

--- Begin Message ---
On Mon, 6 Feb 2012 12:37:33 -0600, John Hendy  wrote:
> What are your settings for #+options: tex:t/nil latex:t/nil ?

I tried all combinations of those two options, but it made no
difference. I also tried LaTeX:verbatim, but that didn't help either.

> -- $nth$
> -- $n^{th}$
> -- $n$ th (note the space)
> 
> How do those work?

All of those work fine. It really seems to be the lack of a space
afterwards that triggers $ being escaped.

> 
> After some behavior with $ that I didn't like, it was pointed out that
> I could use \(math\) as well. Perhaps '\(n\)th' would work for you?

That works, thank you!

Nevertheless, I'd still be interested if anyone
has a way to disable this escaping behavior completely.

Cheers,
Daniel


pgpihkVOe0x09.pgp
Description: PGP signature
--- End Message ---


pgpkdeEDnQThH.pgp
Description: PGP signature


[O] LaTeX-export: letters after $..$ turn off math-mode

2012-02-06 Thread Daniel Schoepe
Hi,

I have the following issue: If I write something like `$n$th' in an org
file and then export it to LaTeX, it will produce `\$n\$th', whereas I
would like it to export this as `$n$th'. Is there some way I can disable
escaping of dollar signs entirely (Leaving it to me to escape them, when
I don't use them as math-mode delimiters)?

I did not find any option to that end in the documentation, but it's of
course possible that I just overlooked it.

Cheers,
Daniel



pgpn8BUV09jkx.pgp
Description: PGP signature


Re: [O] Dynamically generating todo entries

2011-11-23 Thread Daniel Schoepe
On Wed, 23 Nov 2011 17:41:49 +0100, suvayu ali  
wrote:
> You can take pointers from here:
> 

Yeah, I figured out a solution that works for me:

(defadvice org-todo-list (before org-todo-gen-notmuch activate)
  (let ((buf (get-file-buffer "~/org/notmuch_todo.org")))
(when buf
  (kill-buffer buf)))
  (call-process "notmuch-org"))

(Together with a not very interesting python script that generates
notmuch_todo.org).

Thanks anyway.

Cheers,
Daniel


pgpqslxiISjjf.pgp
Description: PGP signature


Re: [O] Dynamically generating todo entries

2011-11-02 Thread Daniel Schoepe
On Wed, 02 Nov 2011 19:11:38 -0400, Nick Dokos  wrote:
> They are generally called (somewhat misleadingly) diary sexps - they are
> executed by org-agenda-get-sexps (assuming that they are in some agenda
> file) when the agenda is constructed, once for every day displayed: they
> do their things and that's that. They are mostly used to remind one of
> birthdays, anniversaries etc, hence diary sexps.

Ah, okay. Thanks.

> > By the way: Is there a resource describing what special variables are
> > available to such functions (I only know about date) and how their
> > output should look like? I couldn't find anything in the org manual.
> > 
> 
> What do you mean by special variables? Any variable in the dynamic chain
> is fair game: date is available because a caller (org-agenda-list) goes
> to the trouble of binding it. Any other variable in this function or in
> any parent of org-agenda-get-sexps can be used (unless it's shadowed),
> but I'm not sure what use they would be.

I was just wondering if there is a listing of such variables specific to
org and explicitly intended to be used by diary sexps (i.e. not an
implementation detail that might change without warning).

> The function just has to return a string: the agenda code takes care
> of printing the result in the agenda.

Okay, I guess their simplicity explains why I couldn't find more
information on them in the manual.

> Diary sexps is probably the wrong thing to use for what you want: I
> don't know how far you want to take it, but iiuc, the easiest thing to
> do is write a script (in your favorite language) that generates a file
> of entries, say foo.org:
> 
> ,
> | 
> | * notmuch threads
> | 
> | ** TODO check out this thread [[some link][thread title]]
> | ** TODO check out that thread [[some other link][other thread title]]
> | ...
> `
> 
> Then open it in emacs and include it in your agenda with C-c [

Now that you mention it, this is a perfectly obvious solution. :)

By advising (there does not seem to be a hook for that) `org-todo-list'
I can even avoid running that script in a cronjob and thus not allowing
the agenda to become out of sync with the actual notmuch tags.

Thank you for your time and your answers.

Cheers,
Daniel


pgp7mSHRr4rMI.pgp
Description: PGP signature


[O] Dynamically generating todo entries

2011-11-02 Thread Daniel Schoepe
Hello,

I'm trying to dynamically generate a list of TODO entries (specifically,
a list of notmuch[1] threads that have a "todo" tag) that I'd like to
see in the TODO agenda, but not in the normal daily agenda (just like a
ordinary TODO entry without a date). A simple try like

(defun foo ()
  "Test function"
  "TODO foo")
--
in something.org:
%%(foo)

ends up generating an entry for every day in the weekly/daily agenda,
but this entry is not recognized as a TODO entry. Is %%(foo) (I don't
know the actual name of this feature) the wrong mechanism for my goal?
If so, is there an alternative for accomplishing what I had in mind?

By the way: Is there a resource describing what special variables are
available to such functions (I only know about date) and how their
output should look like? I couldn't find anything in the org manual.

[1] http://notmuchmail.org

Cheers,
Daniel


pgpjmuP7ZsDUl.pgp
Description: PGP signature


[Orgmode] Can't complete with tab when using auto-complete with orgmode

2010-11-13 Thread Daniel Schoepe
Hello.

When I try to use auto-complete with orgmode, I can no longer complete
with , like I can in other modes. The completion menu is shown as
usual, but pressing tab triggers orgmode to reindent the line or show
`FOLDED' in the echo area when I'm on a headline.

Is there a way to fix this, or do I have to use a different key (which
works fine) than tab for auto-complete?

I'm using the latest git head of both orgmode and auto-complete and
emacs 23.2.1.

Regards,
Daniel Schoepe

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