[Orgmode] HTML: add extra content

2010-10-27 Thread Rasmus
Hi,

Publishing org projects to html, it is possible to add a nice content which is
placed in the upper corner. The html code is given by:

,
| 
| 
|   UP 
|  |
|   HOME 
| 
`

I would like to add buttons to "content", namely a pdf button and maybe a
"beamer" button.

When I publish my project I publish it as html and pdf. Naturally, the name is
identical. Thus, a button linking to NAME.pdf (where name is the same for
NAME.{org,html,pdf}).

Ideally, I would like to add generic buttons so I would also be able to add a
NAME-b.pdf for beamer slides generated by a seperate file.

Is this possible?

Thanks,
Rasmus



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


[Orgmode] LaTeX exporter #+INCLUDE bug

2010-12-20 Thread Rasmus
Hi,
I think there might be a bug when using #+INCLUDE and the LaTeX exporter. The
content of the included file is exported twice, although slightly different in
each case. I experience this when I include org-files starting with a headline,
i.e. "*".

I use Org-mode 7.4 with GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.22.1)

The following example illustrates the problem. Note, the problem does not exist
when using the HTML exporter. 

$ cat main.org 
#+INCLUDE: "included.org" org
$ cat included.org 
* CDs
  - Neil Young
$ tail -n 16 main.tex 
\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}
* CDs
\begin{itemize}
\item Neil Young
\end{itemize}

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

\begin{itemize}
\item Neil Young
\end{itemize}

\end{document}

Thanks,
Rasmus


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


Re: [O] Org Mode dedicated app on OS X

2011-07-05 Thread Rasmus

How about 

   emacsclient -ca "" --eval "(org-mode)" 

or just your index.org file:

   emacsclient -ca "" ~/index.org

In Gnome or other fancy DE you'd just create a .desktop file to make an
entry in your launcher. I don't know how one does something similar in
Macs.

–Rasmus

-- 
Sent from my Emacs






Re: [O] Release 7.6

2011-07-07 Thread Rasmus
Bastien  writes:

> Dear all,
>
> I'm releasing Org 7.6.

Looking forward to to trying the new beast.

Kudos to Bastien. I foresee that JK's odt exporter will become handy
when working with Org illiterates.

Thanks!

-- 
Sent from my Emacs




Re: [O] org-odt and bibliography

2011-07-08 Thread Rasmus


Torsten Wagner  writes:
> There is jabref [1].
Exactly. I was also going to point out JabRef. I have had Bibtex
illiterates manageing Bib files using JabRef.

> It also claims to have a Openoffice support
> never tried.

I tried it once and it works very nice. There were annoying limitations
in OOo built-in bib. manager. I know JabRef used the proper solution
cause references and the litterature list was set in the document with
that grey color that is also used by the TOC.

Hence, if you are going to use a bib-file in OOo JabRef seems to be the
way to go. Still, an Org-Centric solutoin based on \cite would be best.

–Rasmus

-- 
Sent from my Emacs




Re: [O] Calendar-like view of the org-agenda

2011-07-17 Thread Rasmus
Hi,

Thank a bunch for Calfw. It is great. 

> - Add defcustoms for line drawing chars.
> - Added cfw:org-agenda-schedule-args variable to limit the schedule items. 

Is is somehow possible to change the font family used in Calfw windows
only? Using my regular font, Monofur, the table gets screwed when using
Unicode characters for line drawing. If I switch to e.g. Terminus
everything looks properly.

Thus, I'd like something like 
#+begin_src emacs-lisp
(set-frame-parameter (selected-frame) 'font "Terminus-11")
#+end_sry
But very local (i.e. only in 'this' particular windows). 

For some reason, changeing the font family for Calfw's line drawing
affects all of Emacs.

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] Calendar-like view of the org-agenda

2011-07-17 Thread Rasmus
Rasmus  writes:

> Is is somehow possible to change the font family used in Calfw windows
> only?

Hardly perfect, the following let me change the font used in Calfw
sessions. It seems rather fragile, though as it only seems to work with
`:height 90'. Obviously there is a more fundamental problem that I ought
to address. 

#begin_src emacs-lisp
(add-hook 'cfw:calendar-mode-hook
  '(lambda ()
;; (local-set-key (kbd "q") 'kill-this-buffer)
 (buffer-face-set '(:family "monofur" :height 90))
))

(setq cfw:fchar-junction ?╋
  cfw:fchar-vertical-line ?┃
  cfw:fchar-horizontal-line ?━
  cfw:fchar-left-junction ?┣
  cfw:fchar-right-junction ?┫
  cfw:fchar-top-junction ?┯
  cfw:fchar-top-left-corner ?┏
  cfw:fchar-top-right-corner ?┓)
#+end_src

–Rasmus

-- 
Sent from my Emacs




Re: [O] Represent *everything* in Org-mode

2011-07-18 Thread Rasmus
Hi,

It sounds very interesting. I would use something like that if it did
not require to much hassle after initial setup.

It would for example be interesting to use with one's old agenda. "What
did I do on June 7th?" and it pops up whatever you did.  The key is
probably easy access to the data using some preferred method,
e.g. search, a plain list for day or a calendar-like view.

Python is a nice language, and I too feel more comfortable writing it
than Emacs Lisp. The latter is more eloquent though.

Lets us know how it goes.
–Rasmus

-- 
Sent from my Emacs




Re: [O] Use org for jobs/resume writing?

2011-07-19 Thread Rasmus
Daniel Clemente  writes:
> Apart from each person creating their own resume… a pre-filled
> template in .org could be made to produce a resume in the Europass [1]
> format, or similar widely accepted formats.

There is a LaTeX class mimicking Europass. I used to use it. I find
Europass ugly and disturbing/hard to read, though.

Anyhow, creating a cv_barebone.org should not be too hard.

–Rasmus 

-- 
Sent from my Emacs




Re: [O] New backend for org-agenda: (Was Calendar-like view of the org-agenda)

2011-07-20 Thread Rasmus
SAKURAI Masashi  writes:
> What does '/per-se/' mean ?
It means 'as such'

Here is the entry from Merriam Webster Unabriged 

,
| per se
| Function: adverb
| Etymology: Latin
| : by, of, or in itself or oneself or themselves : as such : INDEPENDENTLY, 
INTRINSICALLY
| 
|  
| 
|  
| 
| 
`

> Excuse me for asking a trivial word.  No worries.
No worries. 

–Rasmus

-- 
Sent from my Emacs




[O] [calfw] Better use of space

2011-07-21 Thread Rasmus
Hi, 

I have a feature request for Calfw.

Masashi, would you prefer these to be posted here or on your github
page?

Anyhow, the month view is just superb!

However, when using especially the two week view (and this is probably
also true for the week view) I would like calfw to utilize vertical
space better. By 'better' I basically mean that I would like calfw to be
greedy.

Refer to the following screenshot:

   http://ompldr.org/vOWtjdA

Compare (the second week) to Google Cal: 

   http://ompldr.org/vOWtjdg

Seeing there is a lot of space left in each of Calfw's day-column it
would be nice if it could be used to enhance the overview. This could
for example be archived mapping events against time on the vertical axis
as the Google calendar does (and also Mozilla Lightning but it no longer
work on my system). This might also allow for printing more text from
the even entry (using multiple lines).

On the other hand we probably also want to make sure that it is still
works on a 800x600 display. Thus, it might be best to introduce a
governing variable.

Unfortunately, my own Emacs Lisp skills are not sufficient to implement
such a thing at the moment.  

Thanks a bunch for Calfw. It a great supplement to Org-Agenda. 

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] [calfw] Better use of space

2011-07-22 Thread Rasmus
Hi Masashi,

> I like here
We're trilled that you're here! 

> Thanks for your request and good images.
> I think this request involves 3 functions.

You are probably right. 

> * Time table layout
>
> I think this function is very difficult, because it needs many study
> for me to implement, including following functions.
> Of course, I consider the time table view is one of the goal of calfw.

Oh, right; it could be done as a seperate view or layout. 

> * Display multiple-lines items (the source splits an item multiple lines.)
>
> This is not so difficult. In this mechanism, the source objects can
> propose some formats, for example, "15:00 appointment" and ("15:00-15:30" 
> "appointment"). Then, calfw chooses the suitable format and displays 
> in the current layout algorithm.

It could be a string similar to how BBDB, Gnus and other Emacs mode does
it. See for example (describe-variable 'gnus-summary-line-format).

User could specify calfw:timeview-format "%Starttime-%Endtime: %Event"
or whatever. 

> * Word-wrapping and folding lines (calfw splits lines within a column.)
>
> This is little difficult. I think word-wrapping, folding lines and
> truncating strings can not be achieved in the narrow columns
> straightforwardly. I need a time to study this issue.

Hmm, 
I guess the width of column is calculated when generating the view. 
I'll use pseudo-code as my Emacs Lisp isn't great.  
#+begin_src emacs-lisp
  (if (> (calfw:timeview-entry-length) (calfw:column-length))
   (#split-entry after column-length, preferbly after word
# and retur
   )
#+end_src
I hope it makes sense. . . 

–Rasmus

-- 
Sent from my Emacs




Re: [O] calculating column averages

2011-07-22 Thread Rasmus
Jude DaShiell  writes:

> In this case I don't want to tell org-mode how many rows to calculate, and 
> I put a table together with an averages line in its own footer section.  I 
> prefer when doing these things to output final averages and totals just 
> under table headers then go down into detail records after that.  Could 
> someone take a look at the following table and tell me how to get an 
> average on column 2 of this table?

I am not sure I quite follow but this might be what you're after: 


| Date Stamp | Systalic | Diastalic | Pulse |
|+--+---+---|
| [2011-07-19 Tue 02:26] |  138 |92 |74 |
| [2011-07-21 Thu 03:50] |  128 |79 |76 |
| [2011-07-20 Wed 04:03] |  130 |85 |74 |
| [2011-07-22 Fri 02:33] |  121 |80 |79 |
||  |   |   |
|+--+---+---|
| Averages   |   129.25 |   |   |
#+TBLFM: @7$2=vmean(@2..@-1)


The field @7$2 calculates the average (vmean) from line 2 (@2) to the
line just above itself (@-1).

–Rasmus

-- 
Sent from my Emacs




Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller  writes:

> I wrote a Python script that [1] uses the GData API to download events
> for your Google Calendar and prints them to a given org-file. It is a
> very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py n...@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Python script to download Google Calendar events

2011-07-22 Thread Rasmus

Hi Felix, 

Felix Geller  writes:

> I wrote a Python script that [1] uses the GData API to download events
> for your Google Calendar and prints them to a given org-file. It is a
> very tiny script, but perhaps it is of use to other people as well.

Now I've had some time to play around with your script and it is very
nice and fast. I tingled a bit with it.

I (think) I have added support for other calendars using the
https://.*/private/full urls. I've also added a category.

Thus, one can specify gcal2org.py n...@gpost.com file uri 

and if uri is left out it will work as your script. 

I have hosted the alternative script here:

  http://andromeda.kiwilight.com/~pank/gcal2org.txt (no .py allowed)
  http://andromeda.kiwilight.com/~pank/gcal2org.diff

The thing is, I don't know where you find these private/full urls in the
web-interface. I found them via Gdata. Optimally, it should just use
one of the urls from the web-interface.

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Beamer latex export of included partial files

2011-08-07 Thread Rasmus
LanX  writes:

> Is there a recommended way to do this?

>From the beamer manual: 

┏━━━┫ 4.3.3 Ways of Improving Compilation Speed ┃
┃ While working on your presentation, it may sometimes be useful to TeX
┃ your .tex file quickly and have the presentation contain only the most
┃ important information. This is especially true if you have a slow
┃ machine.  In this case, you can do several things to speed up the
┃ compilation. First, you can use the draft class option.
┃ 
┃ #+begin_src latex
┃ \documentclass[draft]{beamer}
┃ #+end_src
┃ 
┃ Causes the headlines, footlines, and sidebars to be replaced by gray
┃ rectangles (their sizes are still computed, though). Many other
┃ packages, including pgf and hyperref, also “speed up” when this option
┃ is given.  
┃
┃ Second, you can use the following command:
┃ #+begin_src latex
┃ \includeonlyframes{⟨frame label list⟩}
┃ #+end_src
┃ 
┃ This command behaves a little bit like the \includeonly command: Only
┃ the frames mentioned in the list are included. All other frames are
┃ suppressed. Nevertheless, the section and subsection commands are still
┃ executed, so that you still have the correct navigation bars. By
┃ labeling the current frame as, say, current and then saying
┃ \includeonlyframes{current}, you can work on a single frame quickly.
┃ 
┃ The ⟨frame label list⟩ is a comma-separated list (without spaces) of the
┃ names of frames that have been labeled. To label a frame, you must pass
┃ the option label=⟨name⟩ to the \frame command or frame environment.
┃ 
┃ Example:
┃ #+begin_src latex
┃ \includeonlyframes{example1,example3}
┃ \frame[label=example1]
┃ {This frame will be included. }
┃ \frame[label=example2]
┃ {This frame will not be included. }
┃ \frame{This frame will not be included.}
┃ \againframe{example1} % Will be included
┃ #+end_latex
┗━━━

-- 
Sent from my Emacs




Re: [O] org-babel and python3

2011-08-10 Thread Rasmus
henry atting  writes:

> How can I cause org-babel to use python3 instead of python2?
> Emacs (in python-mode) already does it flawlessly with
>
> (setq py-python-command "/usr/bin/python3")

There is a variable: 

┏━━━┫ org-babel-python-command ┃
┃ 
┃ org-babel-python-command is a variable defined in `ob-python.el'.  Its
┃ value is "python2"
┃ 
┃   This variable is potentially risky when used as a file local variable.
┃ 
┃ Documentation: Name of command for executing python code.
┃ 
┗━━━

You could change it. I never managed to get Python2/3 working well in
Org-mode,

-- 
Sent from my Emacs




Re: [O] OSX: Display cur. task in Menu Bar?

2011-08-12 Thread Rasmus

I don't know anything about mac os x.

I pipe conky into my bar. I use the following command:

#+begin_src sh
emacsclient -e "(my/org-clocked-in)" | cut -d '"' -f 2
#+end_src

Here is the function I call. I might have stolen it from somewhere, but
I haven't written a source in my .emacs.

#+begin_src emacs-lisp
(defun my/org-clocked-in ()
"I use this small function to write what I am doing in my taskbar
(conky piped into i3bar). "
(concat
 (if 
 (not 
  (eq org-clock-current-task
  nil)) (message " Working on: " ) (message ""))
 org-clock-current-task 
 (if 
 (not 
  (eq org-clock-current-task
  nil)) (message " |" ) (message ""
#+end_src

Judging from this¹ you wont be able to get it in the dock easily
though.

—Rasmus

Footnotes: 
¹  
http://apple.stackexchange.com/questions/19539/add-info-to-dock-menubar-from-shell-in-macosx

-- 
Sent from my Emacs




Re: [O] Wishlist: LaTeX export: automatically append backslash to "." unless at end of sentence

2011-08-19 Thread Rasmus
Andras Major  writes:

> Org-mode export doesn't allow me to easily include these hints without
> affecting readability and export to other formats.  Therefore I ask
> that LaTeX export places ". " or ".\ " in the output automatically
> depending on the context:

I would like something like this too. Actually, what I would prefer even
more would be to stop Org from interpreting '{', '}', '\' and other common
TeX symbols. More often than not I will want to use '\' as an escape
character.

—Rasmus

-- 
Sent from my Emacs




Re: [O] [babel] [bug] inline src_R breaks downstream src block

2011-08-22 Thread Rasmus
"Charles C. Berry"  writes:

> And I get
>
> [...]
> Code block evaluation complete.
> if: Args out of range: -1, -1

I have updated to latest Emacs bzr and org-git. Starting emacs with the
-q flag and trying the simple example src_R{1+1} I get the above error
when I use org-babel-exp-inline-src-blocks. Eval via C-c C-c works as
expected but when I export it halts due to
org-babel-exp-inline-src-blocks errors.

—Rasmus

-- 
Sent from my Emacs




Re: [O] Not merging org-lparse, org-xhtml & org-odt to the core

2011-08-24 Thread Rasmus

>> Nothing I list is a serious error. But put everything together, I get
>> a picture of a person who is holding the maintainership and falling
>> seriously short of the role he is expected to play.


> If the overall Org community is sharing your view, and if someone if
> willing to step up as a maintainer, I am glad to step down as the Org
> maintainer.

I appreciate Bastien's engagement as an Org maintainer. I can appreciate
that the learning curve for being (the Org) maintainer is steep.

Further, I echo Christian Moe: Org-odt is an important
contribution. I cannot judge whether someone has done anythin wrong,
but in any case it is `human' to make mistakes. The important thing is
to correct ones future behavior IMO (I haven't had any philosophy
classes beside `worldly' ones). From my perspective Bastien and the rest
of the Org-devs seems to live up to this.

I hope this issue can be resolved and that we can enjoy odt export in a
not to distant future without having to go through extra hoops such as
ELPA.

—Rasmus

-- 
Sent from my Emacs




Re: [O] two tools may be useful for org-export

2011-08-25 Thread Rasmus
Bastien  writes:

> zwz  writes:
>
>> Those days I came across two tools which I thought interesting and
>> helpful if could be combined with org-export in some way.
>>
>> 1. Deck.js: a js lib for making modern html presentation. See 
>> http://imakewebthings.github.com/deck.js/#intro for more info.
>>
>> 2. Tralics: a LaTeX to XML translator,
>> http://www-sop.inria.fr/apics/tralics/

I wonder if epubs could be generated using LaTeX → Tralics . . .

-- 
Sent from my Emacs




[O] Date-centric Clocktable

2011-08-31 Thread Rasmus
Hi, 

Is is possible to have a clocktabke with times in the left-most column?
The people I am doing some work for now prefer it that way for unknown
reasons. 

This is an example

| date   | Headline| total |
|+-+---|
| [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails   |  0:23 |
| [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing |  0:45 |

And so forth.

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-06 Thread Rasmus
Bernt Hansen  writes:

> Rasmus  writes:
>
>> Hi, 
>>
>> Is is possible to have a clocktabke with times in the left-most column?
>> The people I am doing some work for now prefer it that way for unknown
>> reasons. 
>>
>> This is an example
>>
>> | date   | Headline| total |
>> |+-+---|
>> | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails   |  0:23 |
>> | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing |  0:45 |
>>
>> And so forth.
>
> Hi Rasmus,
>
> I'm not aware of any way to automatically get the clock report in that
> format using existing org-mode functions but you can just manually move
> the column before you publish it to whomever wants it in column 1.  Just
> put point in the total column and M- to shift the column
> where you want it.

Well, this would require me to collect some 40 logbook entries myself
and associate them with a headline.  What I need is a summary showing
what I did when.  In other words, the default clock table summarizes too
much.

It might be easier to process the file with some other tool and extract
logbook entries with a regexp.  Are there any specialized
Org/Emacs-command I could use for generating a custom clock table?

–Rasmus

-- 
Sent from my Emacs




Re: [O] Beamer export: Are handout notes possible?

2011-09-07 Thread Rasmus
Tassilo Horn  writes:

> Hi all,
>
> I'm a big fan of the LaTeX beamer export.  However, now I've hit a
> problem that I don't know how to solve.
>
> In plain LaTeX beamer, every text I write between \begin{frame}
> ... \end{frame} is of course not in a frame but will be there if I
> compile the tex file in beamer's handout mode.  That's very convenient
> for putting notes there that you want to mention only in the "audio
> track" of a presentation.
>
> Because the frames are written as org outlines, there's no explicit
> \end{frame}, but everything up to the next outline is put into a frame.
>
> Is there still some way to what I want?

I have asked the same thing earlier.  Eric Fraga suggested the
following:

--8<---cut here---start->8---
** Previous frame
   text here

#+begin_latex
\end{frame}
\againframe<2>{overview.fig}
\begin{frame}
#+end_latex

** Following frame
--8<---cut here---end--->8---

From: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg42140.html


For what you are doing I'd might use only environment.  That way you can
have text in frames which are not displayed on frames.  I use the
following snippet 

I use 
#+begin_src emacs-lisp
(setq org-beamer-environments-extra (quote (("onlyenv" "O" "
\\begin{onlyenv}%a" "\\end{onlyenv}"
#+end_src 

And do something like: 
#+begin_src org
* section
** Frame
*** Frame text

*** Extra text
:PROPERTIES:
:BEAMER_env: onlyenv
:BEAMER_envargs: 
:END:

some more text
#+end_src 

And you can even use \only and similar in frames and it will work.

Still, what you are asking would be nice but unless things have changed
only a fragile solution exists.

–Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus

Hi Carsten, 

>>>> This is an example
>>>> 
>>>> | date   | Headline| total 
>>>> |
>>>> |+-+---|
>>>> | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails   |  0:23 
>>>> |
>>>> | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing |  0:45 
>>>> |
> Have you tried log mode in the agenda:
>
> Make an agenda for the time intervar you are interested in,
> day week month, or so.  Then press `C-u C-u v L'.  Maybe you can work from 
> there?

That is certainly better! One minor problem is that it displays total
time only, I need the time interval and total time.

I don't know whether the time sheets used by my university is very
different from everywhere else . . . As said, each entry requires an
interval, a total time and an entry text. Certainly the interval seems
silly as  hourly wage is flat rate, I believe. 

–Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus
Hi Bernt,

> As Carsten mentioned, the agenda view with logging enabled (and
> appropriate tag filters) may get you closer to what you are looking
> for.  I use a combination of that and C-u R in the daily / weekly agenda
> to get a summary of clock detail lines.

I am impressed with the possibilities of Org-agenda.  Although I have
used it extensively I know only a fraction of the possibilities, it
seems.  It only revels total time, it seems, which unfortunately isn't
enough cf. my other post.

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] [calfw] Better use of space

2011-09-07 Thread Rasmus
SAKURAI Masashi  writes:

> I pushed the multiline branch on the github.
> https://github.com/kiwanami/emacs-calfw/tree/multiline(including some minor 
> updating)

Thanks!

>
> Then, I found that the complicated algorithms, such as 'Knuth/Plass
> line-breaking Algorithm', are difficult to implement on the Emacs Lisp
> efficiently, because the line breaking function is called many time
> during rendering the view.  (I hope that Emacs support native
> line-breaking function.)

Emacs has several built-in word wrapping mechanisms.  See
   Options → Line Wrapping in this buffer 
for an overview.  My preferred method is Word Wrap.  Whether this can
   easily be utilized by calfw I don't know.

> If you have a time, will you check it out?
> I would like to hear feeling from the not East Asians users,
> using line breaking without no smart word-wrapping and hyphenation.

It works okay.  The problem is not so much the line breaking as the lack
of appropriately segregating entries.  

The following view is decent, and word wrap certainly improves
the ease of obtaining information:
   http://ompldr.org/vYThpOQ

On the other hand information is not easily obtained from a week with
lots of scheduled class from a single file: 
   http://ompldr.org/vYThpYQ

 - An easy solution might be do add a `\n' but this might not always be
   desirable.
 - Events could also be separated by lines.
 - Different shades might also be a possibility. Here is a screenshot of
   my Gnus group buffer which is striped. 
  http://ompldr.org/vYThpZQ

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus
Hi Olaf, 

> Why don't you just use a simple (perl/python/...) script to collect your
> data? Here's a quick hack in perl:

That was my plan if I was not able to do from within Org. To me it would
be a lot faster than hacking something together in emacs-lisp,
unfortunately. 

Thanks for the link to Pythonic flavors.

–Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus
Olaf Dietsche  writes:
> If you insist on elisp, maybe something along these (untested) lines
> might work:

It just nicer to do text stuff from within Emacs but my personal Lisp
skill are surpassed by my Python skills.  That is not to say that any of
the skill sets are high. . . 

The function didn't work in my test.org in emacs -q. I will investigate
more later when I've got more time. 

> ---8<--- cut here ---
> (defvar clockstable)
>
> (defun collect-clock-lines ()
>   (org-narrow-to-subtree)
>   (let ((re (concat "^[ \t]*" org-clock-string "[ \t]+\\(.+?\\)[ \t]+=>[ 
> \t]+\\(.+\\)"))
>   (headline (nth 4 (org-heading-components
> (while (re-search-forward re)
>   (setq clockstable (concat clockstable (match-string 1) "|" headline "|" 
> (match-string 2) "\n")
>
> (defun summarize-clocks ()
>   (interactive)
>   (setq clockstable "| date | headline | total |\n|-++|\n")
>   (org-map-entries collect-clock-lines nil 'agenda)
>   (insert clockstable))
> --- cut here --->8---

Thanks again,
Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus
Olaf Dietsche  writes:

>>> ---8<--- cut here ---
> [snip]
>>> --- cut here --->8---
>>
>> this is great!
>
> Thank you :-)

It is. 

> I don't know, wether adding small special purpose functions adds real
> value, since we already have "org-map-entries". Maybe adding generic
> functions to org or showing lisp snippets at worg would be more useful.

In my experience this is the kind of table most working class heroes
will need to hand in.  With Org-sort and you second script it's easy to
get the kind of table I at least need quite often.  Using the totaling
function of regular clock tables everything will probably be swell. 

If it shouldn't be incorporated in Org it should probably retire to
Worg.

Thanks a bunch!

–Rasmus

-- 
Sent from my Emacs




Re: [O] Date-centric Clocktable

2011-09-07 Thread Rasmus
> ---8<--- cut here ---
> (defun collect-clock-lines ()
>   (let ((re (concat "^[ \t]*" org-clock-string "[ \t]+\\(.+?\\)[ \t]+=>[ 
> \t]+\\(.+\\)"))
>   (headline (nth 4 (org-heading-components)))
>   clocks)
> (org-narrow-to-subtree)
> (while (re-search-forward re nil t)
>   (setq clocks (concat clocks (format "| %s | %s | %s |\n" (match-string 
> 1) headline (match-string 2)
> (widen)
> clocks))
>
> (defun summarize-clocks ()
>   (interactive)
>   (insert "| date | headline | total |\n|-++|\n")
>   (let ((headings (org-map-entries 'collect-clock-lines nil 'file)))
> (mapc (lambda (clocks)
>   (mapc (lambda (line) (insert line)) clocks))
>   headings)))
> --- cut here --->8---
>
> This version works a little bit better, but has its own drawbacks.
> Anyway, it's a start and I don't want to take all the fun away. ;-)

I think I found one of the drawbacks :)  

#+begin_src org
* COMMENT Organization Headline
** Collecting data
   :LOGBOOK:
   CLOCK: [2011-09-08 Thu 00:31]--[2011-09-08 Thu 00:59] =>  0:28
   :END:
* Clocktable
  :LOGBOOK:
  CLOCK: [2011-09-08 Thu 01:30]--[2011-09-08 Thu 01:37] =>  0:07
  :END:

Note that subitems are counted twice: 

| date   | headline 
 | total |
|+---+---|
| [2011-09-08 Thu 00:31]--[2011-09-08 Thu 00:59] | COMMENT Organization 
Headline |  0:28 |
| [2011-09-08 Thu 00:31]--[2011-09-08 Thu 00:59] | Collecting data  
 |  0:28 |
| [2011-09-08 Thu 01:30]--[2011-09-08 Thu 01:37] | Clocktable   
 |  0:07 |

#+end_src

I might look into it later.

–Rasmus

-- 
Sent from my Emacs




Re: [O] Adding Timestamps

2011-09-10 Thread Rasmus
Chris Niven  writes:

> Is there any way to sum timestamps in org-mode?

Clocktables?

-- 
Sent from my Emacs




Re: [O] deft - A Notational Velocity mode for emacs

2011-09-10 Thread Rasmus
timetrap  writes:

> And you can specify your own major mode(perfect for org-mode) ... my
> head just exploded, and my weekend schedule is now centered around
> rewriting my init.el. :-)
>
> http://jblevins.org/projects/deft/
>
> This is different than org-velocity, as it uses multiple text files
> rather than an org-file or a bucket file, you can also add or delete
> files from within deft-mode.

I don't know howm, but deft seems swell. 

However, it might be nice to have deft-directory accept a list of
folders.  I keep my notes in multiple folders based on subject.
Alternatively, I could collect symlinks to important files in one
folder, but this requires more work on my part. The same may be true for
deft-extension.  I might want to keep my ledger file as well as my org
files in deft.

In a similar spirit, when I create a new file I'd want it to placed in a
specific folder.  It it would be nice if deft would ask me where to save
the new file.  Maybe there could even be a variable containing my
favorite folders, which I could quickly select from.

A use case would be the following:

   - Type in the name of the note RET
   - A list of known folders is shown. A sensible default is
 highlighted. Thus, RET RET will simulate current behavior.
   - Alternatively I may select a desired folder from the list (I am
 thinking an ido-list). 

Just a though.

I appreciate your work. 

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] would take more than an org-mode strip-down.

2011-09-28 Thread Rasmus
Hi James,

Thanks for your mails.


> You can not deny, however, that even the design of this
> forum is but one example of how the Emacs community maintains its
> exclusivity. Own up to it. 

It's a mailing list ≠ forum :) Anyway news is not fashionable, but sites
like Gmane makes it quite available.  The problem is not news but that
people generally does not know news.


> But for those who are following the statements on comparing org-mode
> to commercial substitutes like Taskpaper 

It's only a substitute if you so desire.

> In order for org-mode to be attractive as an alternative to popular
> self-help like GTD, Covey and the market of task managers both digital
> and paper that exist, this community would need to take all this
> extensive documentation and package it. 

I simply can grasp this.  The manual is provided in several flavors; if
anything the manual is lacking in some areas, but in general it's great.
Several tutorials, specifically on GTD exists on Worg (our `wiki').


> Do not confuse content with transparency.

Do not confuse a learning curve with transparency.  Algebra, philosophy
and economics also take time.


> Should open-source software not concern itself with good
> bullet points?

Emacs and therefore Org is free software.


>  Does this imply that I’m not appreciative of the work?

Course not, please keep voicing your opinion and let me voice mine :) 


> There’s an opportunity cost with finding the time for even this
> thread, which I’m hoping we can agree should not be a barrier of entry
> for those who are simply interested in trying org-mode. As it stands,
> however, just trying org-mode takes lots of reading if just to install
> correctly. That’s all I’m saying.

By now several packages of Emacs for beginners exists.  On mac there is
the Aquamacs, on Windows I think there is something called ErgoMacs or
something like that.  Plus there are various Emacs Starter Kits.


> Text is but one way that people learn. If you’re documenting sofware,
> it leans towards rational, logical, and linear thinking. 

This method has proven evolutionary stable so far, has it not?


> Some people require a full-picture model first seeing things from many
> angles. Other’s prefer trial and error, and others, still, enjoy
> hypotheticals. 

All of these seems compatible to a linear presentation.  All text is
linear but you may elect a certain order of texts suiting your needs.


> People can adopt different strategies along the way. But to insist on
> only one method of learning and sharing, while being concerned that
> you’re not meeting a larger audience is tantamount to calling the rest
> of the class stupid, or simply a manner of dishonesty with one’s own
> motivations.

This is the greatness of a freedom of ideas.  People may opt in on their
favorite approach, no?


> Maybe what would be helpful is some bridge instruction: “Graduating
> from Taskpaper: so you’re ready to try org-mode. What to expect:” I do
> find that if I have an orientation point, even if it wasn’t the best
> decision in the first place, I have a better reference as to the
> changes I would envision and what the value of future options would
> be.

You are talking about specific to general `solutions'.  As many have
pointed out this will necessarily lead to a restricted set of
possibilities.  It further assumes that there is an `appropriate' or
`encouraged' way of utilizing Org.  Aside from a few hard-coded¹ symbols
this is very much not the case.  I use Org for writing first and task
management second.  Other use it for management first. 

That being said Worg is open.  If you feel a particular tutorial
(usually specific to specific documents) is missing feel free to add it,
/or/ describe what is lacking.  For instance theoretical as well as
practical toughs on GTD is widely discussed on Worg.


> what’s the ethical ambiguity in earning a living from setting up
> management systems for people and institutions, even if you’re using
> open-source material? 

There is no ethical ambiguity.  It would be selling a service.  This is
encouraged.  The ethical issues is concerned with not providing people
with the opportunity to `remix' and re-share to use a slightly different
terminology (see freedom 0-3 of free software definition).

–Rasmus


Footnotes: 
¹  Is that still the case or was everything such a `*' changed to
variables?

-- 
Sent from my Emacs



Re: [O] permanent LaTeX preview

2011-09-29 Thread Rasmus


>> 1. Pressing C-c C-x C-l to render a formula in other part of the
>> document. All other formulas revert to LaTeX code in that case.
>> 2. Pressing C-c C-c to, for instance, evaluate some babel block. In
>> this particular case it looks like I need to reassign the C-c C-c
>> keybinding used to remove the images, but I don't know which function
>> is called to achieve that.
>
> I don't think either is possible with the current code. 

Would it be possible to use the more sophisticated Preview LaTeX of
AUCTeX? IMO it has a nicer way of dealing with previews.

–Rasmus 

-- 
Sent from my Emacs




Re: [O] permanent LaTeX preview

2011-09-29 Thread Rasmus
Nick Dokos  writes:

> Do you mean: "replace the org preview mechanism with the preview-latex
> preview mechanism"? or "turn on auctex mode/preview-latex in addition to
> org-mode in the org file"? or perhaps "export to latex and then use
> preview-latex on the latex file"?

Either (i) or (ii), I guess.  I just checked.  It seems preview-latex
needs a tex file to work as it call filename.tex.  Of course, a file
could be generated upon request.  I don't know whether one could weave
them back together afterwards. 

Which I mostly miss from preview-latex is the possibility to `walk into'
generated pictures, and to easily regenerate stuff.

–Rasmus

-- 
Sent from my Emacs



[O] Question on ical2org script

2011-10-07 Thread Rasmus
Hi, 

I am maintaining my calendar in gcal and org.

I have been switching back and forth between Eric's awk script and a
python script posted on this list recently.  The later contains some
bugs.  

However, I experience two issues with Eric's script.

* Repeated events

For repeated events only the first occurrence seems to translated.  Here
is an example:

┏━━━
┃ BEGIN:VEVENT
┃ DTSTART;TZID=Europe/London:20111012T15
┃ DTEND;TZID=Europe/London:20111012T17
┃ RRULE:FREQ=WEEKLY;COUNT=9;BYDAY=WE
┃ DTSTAMP:20111008T014417Z
┃ UID:dihhjpn9hrnct6fj00epk9b...@google.com
┃ CREATED:20111007T222923Z
┃ DESCRIPTION:
┃ LAST-MODIFIED:20111007T222923Z
┃ LOCATION:
┃ SEQUENCE:0
┃ STATUS:CONFIRMED
┃ SUMMARY:Micro Class
┃ TRANSP:OPAQUE
┃ END:VEVENT
┗━━━

Note line 4. It reads that the event should be repeated weekly nine
times.  It does not seem to be repeated in the org-file generated by
ical2org.  Does other experience this as well?

* All day events. 

For me all day events spans two days and are further given a time.

Here is an example:

┏━━━
┃ BEGIN:VEVENT
┃ DTSTART;VALUE=DATE:20111012
┃ DTEND;VALUE=DATE:20111013
┃ UID:5oshl25lnn7da5mmog9bbem...@google.com
┃ CREATED:20111007T214920Z
┃ DESCRIPTION:
┃ LAST-MODIFIED:20111007T214920Z
┃ LOCATION:
┃ SEQUENCE:0
┃ STATUS:CONFIRMED
┃ SUMMARY:exam\, math
┃ TRANSP:TRANSPARENT
┃ END:VEVENT
┗━━━

Which is translated to 

*  exam, math
  <2011-10-12 Wed 00:00>--<2011-10-13 Thu 00:00>

I don't know why Google writes time as

┏━━━
┃ DTSTART;VALUE=DATE:20111012
┃ DTEND;VALUE=DATE:20111013
┗━━━

but the event is on 20111012 only and it might be more correct to
translate it to 

*  exam, math
  <2011-10-12 Wed>

which would (correctly) be interpreted as an all-day event in
org-agenda. 

Does anyone else experience this all-day issue?

Thanks,
Rasmus

-- 
Sent from my Emacs




[O] Cdlatex questions

2011-10-17 Thread Rasmus
Hi, 

I would like to add to cdlatex.  However, it does not seem to work.
This is probably the best place to ask. 

First, I want to add \mathbb{·} to cdlatex-math-modify-alist. 

Second, I want to change \mathbf{·} to \boldsymbol{·}, which is nicer
and works with greek letters.

I have tried to add the following code:

#+begin_src emacs-lisp
(add-to-list 'cdlatex-math-modify-alist
 '(98 "\\boldsymbol" "\\textbf" t nil nil))

(add-to-list 'cdlatex-math-modify-alist
 '(115 "\\mathbb" nil t nil nil))
#+end_src

However, it does not work; should I do something else to add symbols to
cdlatex?

Third, I would like to change the cdlatex-math symbol to something less
annoying.  I have tried

#+begin_src emacs-lisp 
(org-defkey org-cdlatex-mode-map "¨" 'cdlatex-math-symbol)
#+end_src 

However, this does not catch all cases, and for example "¨ ¨" will not
go to the second page.  Is there an easy way to change '`'.

–Rasmus

-- 
Sent from my Emacs




Re: [O] Wish: babel for python3

2011-10-18 Thread Rasmus
Torsten Wagner  writes:
> alternatively (a trick Eric is never tired to mention to me ) you
> could
> add a little lisp block which change all kind of language related
> aspects for you. This could include many more options and modify your
> emacs environment just to your personal needs for a certain language.
>
> Make one for python2 and one for python3 and execute them dependent on
> which system you are going to use.
>
> Without testing and without guarantee it should be something like the
> below code. To demonstrate some more functionality lets change the
> modebar background colour to make it more visible which python mode
> you
> are currently using.
> #+srcname: python2_env
> #+begin_src emacs-lisp
>   (setq org-babel-python-command "python")
>   (set-face-background 'modeline "#4477aa")
> #+end_src
> #+srcname: python3_env
> #+begin_src emacs-lisp
>   (setq org-babel-python-command "python3")
>   (set-face-background 'modeline "#771944")
> #+end_src


That is pure awesomeness!  

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] org-contacts or bbdb?

2011-10-20 Thread Rasmus
pmli...@free.fr (Peter Münster) writes:

> Hello,
>
> I would like to manage my contacts, so that I can
> - easily search them
> - add new email addresses from gnus (summary buffer)
> - complete email addresses in gnus (message buffer and prompts in
>   mini-buffer)
> - and perhaps more in the future
>
> Could you guide me please, what to choose, org-contacts or bbdb?
> I don't see the advantages of the one or of the other...
> TIA for any hints!

I used org-contacts but now use bbdb3.  I think bbdb does it all and
it's quite nice.

I don't remember why I dropped Org-contant, but I think I found it hard
to manage my contacts in the way I would ideally like to with it.

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] Video showing Jambunathan's ODT exporter

2011-11-03 Thread Rasmus
Herbert Sitz  writes:

> Here's a 3 minute video showing how it works (calling odt export from
> a document open in VimOrganizer): http://vimeo.com/31564708

Thanks, it is a nice video. You should add it to the Worg.

> This is some seriously cool functionality for Org that deserves wider
> exposure.  Jambunathan's done a great job.

Very much so.

–Rasmus

-- 
Sent from my Emacs



[O] Publish HTML Without Title

2011-11-25 Thread Rasmus
Hi,

I publish my website with Org. have defined my title in
org-publish-project-alist under the :html-preamble.

However, it seems that recent Orgs have become 'smart' and now I don't
know how to disable the publishing of title and I have the title printed
twice.  As I recall this was not an issue before.

It seems to stem from org-html. el around 1358:

#+begin_src emacs-lisp
;; begin wrap around body
(insert (format "\n"
;; FIXME org-export-html-content-div is obsolete since 
7.7
(or org-export-html-content-div
(nth 1 org-export-html-divs)))
;; FIXME this should go in the preamble but is here so
;; that org-infojs can still find it
"\n" title "\n"))
#+end_src

Are there any known solutions to this at the moment?

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] Stars in headlines

2011-12-04 Thread Rasmus
Francisco Javier Molina Lopez  writes:

> Is it possible to replace the initial stars in headlines with any
> other utf-8 symbol?

There was a huge discussion on this a way back.  I think the outcome was
to hardcode * everywhere.  You could use regexp to display something in
place of stars if so desire.  In particular you could look into
org-icons (although I don't know if a maintained version exists).

–Rasmus

-- 
Sent from my Emacs




Re: [O] Publish HTML Without Title

2011-12-11 Thread Rasmus
Bastien  writes:

> Hi Rasmus,
>
> Rasmus Pank Roulund  writes:
>
>> Note, I never asked for the second title and this is the one I want to
>> go away, but I don't know how.  As I pointed out in the previous case,
>> it seems that it may be hardcoded, but I don't know.
>
> Yes, this is hardcoded.  Hopefully we will get rid of such problems in
> the next versions of org-html.el.  For now, you can simply use a css to
> make this title invisible:
>
> .title {display:none;}

But I do want the title.  I just want it where I coded it to be and not
where Org coded it to be.

I am looking forward to org-html-next.

Thanks,
Rasmus

-- 
Sent from my Emacs



Re: [O] Release 7.8.01

2011-12-12 Thread Rasmus
Bastien  writes:
> Special thanks to Jambunathan, Nicolas, Eric and Carsten for
> their work on this release.  

Thanks a bunch to Jambunathan!  Great to see your work being part of
Org.

This seems like a very exciting release!  Thanks to Bastien and other
new and old contributors.  Good job!

–Rasmus

-- 
Sent from my Emacs




[O] Questions on LaTeX Exporter

2011-03-05 Thread Rasmus
Hi, 

I am trying to move more seriouse text tasks from AUCTeX to Org. Mostly
because it allows me to link to pdf articles, and have * COMMENT in the
same file.

However, I have noticed at least one non-acceptable issue. When using
using English, LaTeX (via Babel or just default) full-stops (≈double
space) will be inserted after dots. However, with abbrevation one would
use an ordinary space (i.e.\ an escaped space ("\ ") in LaTeX). Org does
not seem to notice abbrivations—how could it?—and further "\ " is
interpreted literaly. I need to have an escaped space.

One solution, which would yield much overheat, would be to use babel and
LaTeX fragments. See:

  
http://repo.or.cz/w/Worg.git/blob_plain/HEAD:/org-contrib/babel/examples/o18.org

Also, for fixme notes, I use =[[latex:fixme][insert citation]]= at the
moment. Does anybody have a nicer solution? For example, having the
fixme note folded, placed in a footnote or similar?

-- 
Thanks,
Rasmus





Re: [O] Questions on LaTeX Exporter

2011-03-06 Thread Rasmus

Hi,


This would make you an "early adopter."


Well, to be fair the latex exporter have been there for years and I have
used it for non-important documents for years. But papers utilizing more
features have proven difficult, so far.


Of course, the paper doesn't have abbreviations that end  with dots ...

The problem might be traced back to my less-than-stylish prose :)


Yes, and the overhead does get in the way, at least for my writing
projects.


With folding, AUCTeX buffers become quite readable. But linking, plannig
and TODOs are nice. Previously, I have had a notes.org and several
tex files.



On the other hand, I think it is the only way currently to get from
Org-mode to perfect LaTeX.


... And in that case AUCTeX provide a nicer environment in my
oppinion. Org would be nice for text heavy documents, though.


Fixme in Org

If you figure this one out, please share

I haven't. I think one of either of the following would be nice.

  1) Have them fold like I do in AUCTeX (i.e. \fxnote{·} is replaced by
 [fix] in the buffer)
  2) Use special footnotes. This could be an org-centric system, without
 the need of fixme.sty. This would require that Org could tell the
 difference between fn:x and fix:x, and further, one would need to
 be able to specify which set(s) of footnotes were to be exported.

*More questions, sorry*

Org populates every section with a label. I would
like to \ref or \vref these. I could predict \label's, but this a rather
fragile solution. When I use "Org-links" I get a text link suitable
for e.g. html. I want to use \ref to get a number. One solution is

,
|   * section
|   #+latex: \label{sec:sec}
`

But there /must/ be a better way to this, eh?

And other question, which should also be simple, but which I have not been
able to figure out.

I have internalized word count in my org file using babel:

,
| ** Getting Word Count
| #+srcname: wordcount
| #+BEGIN_SRC sh
|   #!/bin/bash
|   alias calc='Rscript -e "cat( file=stdout(), eval( parse( text=paste( 
commandArgs(TRUE), collapse=\"\"))),\"\n\")"'

|   calc `texcount -inc -sum -relaxed -1 -q -total assignment.tex`/400
| #+END_SRC
|
| #+results: wordcount
| : 0.6425
`

First, this should be evaluated post-export, but this is a trival issue
as I can export the document in question twice. However, I want to
include the result in a \thanks{·}-node in the #+TITLE.

I have tried varioues methods, but so far without luck. To given an
example, I want to replace X by the results of my Babel-snip in the
following:

,
| #+TITLE: \Large Education in Labor Markets With Asymmetric 
Information\thanks{Approximatly X words using \TeX Count}

`

Thanks in advance,
Rasmus



[O] [BUG] Did COMMENT break?

2011-03-13 Thread Rasmus
Hi,
It seems that 

,
| #+BEGIN_COMMENT 
|  ...
| #+END_COMMENT
`

Might be broken in Org-mode 7.5. According to the manual, 

,
| Finally, regions surrounded by
| ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
`

Consider the following example generated with Org-mode 7.5 in Emacs 24.0.50
(started without config files).

,
| #+TITLE: this is a test
| 
| #+BEGIN_COMMENT
| Don't export me
| #+END_COMMENT
| 
| I'd like to be exposed
`

The HTML export is:

,
| 
| this is a test
| 
| 
| 
| 
| 
| Don't export me
| 
| 
| 
| I'd like to be exposed
| 
`

The LaTeX export is:

,
| \begin{verbatim}
| Don't export me
| \end{verbatim}
| I'd like to be exposed
`

On another note, on the official Org-site, the link to the pdf-manual is
wrong. It links to 

http://orgmode.org/manual/release_7.5/ 

which doesn't exists. I guess it should be linking to 

http://orgmode.org/org.pdf

-- 
Thanks,
Rasmus




Re: [O] [BUG] Did COMMENT break?

2011-03-14 Thread Rasmus

Hi Thanks,


Indeed.

It seems that one of the hair-raising regexps that Carsten manages
to come up with is not quite right. Try this patch for now:


Hmm, it still does not seem to work for me, but I might not have changed 
the files correctly.


--Rasmus



Re: [O] [BUG] Did COMMENT break?

2011-03-14 Thread Rasmus

It seems that one of the hair-raising regexps that Carsten manages
to come up with is not quite right. Try this patch for now:


Hmm, it still does not seem to work for me, but I might not have changed
the files correctly.


Please ignore the above. Nicholas' patch works as described. I'd just 
forgotten to bite-compile ex post.


Thanks Nicholas.




Re: [O] Professional PDF LaTeX templates?

2011-03-17 Thread Rasmus

> I can't translate it into anything that looks the quality of
> using MS Word and Adobe Flashpaper.
Well, that sounds wrong. There are a number of blogs which publish
templates. Look into them. For starters, look into the blog-roll at
texample.

> Just wondering if anyone has some template examples of letter/logo
> headed well styled PDFs they use on a professional basis?

Yeah, I just defined my own org class, resembling my preferences
(primarly KOMA-Script with Kp-fonts). You should do the same. It quite
powerful. Whatever you are looking for, it is do-able in (La)TeX and
thus in org (with some minor quirks like not being able to escape space,
as I have discussed elsewhere). 




[O] Re: zotero (or mendeley) integration with org

2011-03-29 Thread Rasmus

> [Matt and William's setup]

I have looked for a good way to keep track of academic papers (pdfs) and
Bibtex for a long time. I'd love to see a worg page on this topic.

Meanwhile, I have found some sweet Bibtex-search interfaces for
Emacs. These will query a academic search engine and can copy Bibtex
entries directly to a .bib file. I found bibsnarfl[fn:1] being the most
interesting, but a similar code is available for PubMed[fn:2].
Unfortunately, being limited to certain fields, I am personally not able
to adopt either. It would be great to have an interface to a general
academic search engine (Google Scholar, ugh?).

Imagine the combination of a Emacs-powered interface to some search
engine, a university network and some magic snip that would download a 
pdf, add it to a .bib-file (removing annoying entries and adding a
sensible key), and making a nice, easy-to-browse Org-file. 

One day, maybe...

–Rasmus

Footnotes:

[fn:1] http://www.emacswiki.org/emacs/bibsnarf.el

[fn:2] http://www.bioinformatics.org/texmed/





[O] Re: Continuation of main section text after subsections ?

2011-03-30 Thread Rasmus

> --8<---cut here---start->8---
>  * Main headline
>Some thoughts expressed here
>
>  ** Subheading 1
> More thoughts expressed here
>  ** Subheading 2
> More thoughts expressed here
>  ** Main headline (cont.)
>
>   I would like to have this text part of 'Main headline', not of
>   'Subheading 2'
> --8<---cut here---end--->8---

I don't understand the logic in this. 

In terms of final layout, do you want to have subheading appear as a
"box"? Like in some (introductory) textbooks? If so, you could program a
certain ** to be export as a certain type of object. You might even be
able to use tags to determine how output should be formatted, like in
Org-latex-beamer mode. This might require some hacking. 


I do however, strongly support the idea of terminating headings, but for
other reasons. 

My problem is ending * COMMENT headings. 

This sketch the issue (in terms of LaTeX export):
#+begin_src emacs-org
* COMMENT This is were I put all my export settings, various notes and such

  it could be placed as the very last headline, but that is somewhat
  annoying an illogical to me. 

** Export 
#+TITLE: Test
#+AUTHOR: me 
[A bunch of paper-specific #+latex_header:] 

** An outline of the task at hand 
[...]

And HERE I want to put text before the first subsection. That is beneath
Title but before first section. 
#+end_src

In terms of LaTeX I need something like: 

#+begin_src latex
\begin{document}
\maketitle 
This is where I want some initial text
\section{first section}
#+end_src

Of course, I could start explicitly with a \section{intro} (i.e. *
Intro) right after \maketitle/\begin{document}, but for short papers I
find this is redundant.

Is my style the problem or should there be a way to terminate section, maybe
with an artificial new heading (similar to the :B_ignoreheading: tag)? 

Cheers,
Rasmus





Re: [O] Using orgmode to take "inline notes" for research

2011-04-17 Thread Rasmus

> It is cool but doesn't play well with margins, as you have seen.  I've
> given up on cool and use the following instead:

I agree on the cool not being cool. However, I do wonder why you would
want to use /ordinary/ footnotes rather than something easily removable
such as fixmenotes, e.g. \fxnote[footnote]. The great thing is they are
removed in the `final' print (i.e. when `draft' is not specified).

>> - Some of my notes are multi paragraphs, which I prefer non-indented
>> and separated by a line break rather than no line break and indented.
>> But when exported, multiple paragraphs just "stack up" with no line
>> break. Can I add this to your format?

I use the following for empty lines. It is quite easy to adopt it
document wide and probably even inside certain environments.

   \newcommand*{\tomlinje}[0]{\\[\baselineskip] \setlength{\parskip}{0pt}}

I didn't get whether you are asking for footnotes specifically, but if
this is the case you might be able to play around with
\setlength{\footparindent}{} and friends?

Cheers,
Rasmus

-- 
Sent from my Emacs




Re: [O] org-mode and ebib

2011-05-11 Thread Rasmus
Christian Moe  writes:

> I use Reftex for inserting -- from the .bib file, not from ebib --
> thanks to the setup tips here:
>
> http://article.gmane.org/gmane.emacs.orgmode/2406/match=bibliography
>
> http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/

I agree, reftex is very nice and Org will understand the
citations just fine.

Here is my setup, which might be (read `probably is') stolen from
somewhere:

,[ Reftex ]
| It is nice to be able to access reftex to insert citations 
| 
| #+begin_src emacs-lisp
| 
| (defun org-mode-reftex-setup ()
|   (load-library "reftex")
|   (and (buffer-file-name)
|(file-exists-p (buffer-file-name))
|(reftex-parse-all))
|   (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
| (add-hook 'org-mode-hook 'org-mode-reftex-setup)
| 
| #+end_src 
`

–Rasmus

-- 
Sent from my Emacs




Re: [O] Org as a publishing toolkit

2011-05-11 Thread Rasmus
Marcelo de Moraes Serpa  writes:

> 1) Cover image
> 2) The sub-cover:
>
>"Title""
>  My Name
>Date
>
> 3) TOC
>
> 4) Intro, chapters...
>
> How could I do that?

This is /one/ way, and the way I'd do it.

You'd need to do that specifically. I'd advice you to use my favorite
document class, KOMA-script, or Memoir, which is also superb. 

Then, you'd need to tell Org not to make a title, toc etc. I have no
idea how you'd do that, but I'd like to know. Alternatively, you could
redefine \maketitle, but it is more cumbersome in my opinion.

Third, you would want to specify your first page. In KOMA-Script lingo.
#+begin_src LaTeX
\begin{titlepage}
 \begin{center}
 \thispagestyle{empty}
  \vspace*{1cm}
  {\huge Title}}}\\
   \rule{\textwidth}{.5pt}\\
  \vspace{2.5em}
  {\larger{Author}}\\
  \vfill
  \includegraphics[width=\textwidth]{fig/67424_scape_stamp.pdf}
  \vfill
  \end{center}
\end{titlepage}
\cleardoublepage % depending on your setup
\tableofcontents
#+end_src

Something like that anyhow. You could probably use Org-babel in some
clever way.

–Rasmus

-- 
Sent from my Emacs




[O] Prettyfy agenda view (regexp)

2011-06-08 Thread Rasmus

Hi, 

I have some really long diary entries polluting my agenda view (more
than 30 lines). I'd like to show headlines only.

If I could parse entries by regexp before letting them populate my
agenda I'd be mighty happy!

To my relief I found the following function: 
  org-agenda-format-item[fn:1]

Alas this variable was never merged into the mainline. . .

Are there any plans to integrate this into org or any other way to
format agenda items?

Thanks,
Rasmus

Footnotes:

[fn:] 
http://git.naquadah.org/?p=~jd/org-mode.git;a=commitdiff;h=refs/heads/jd/agenda-format
-- 
Sent from my Emacs




[O] [bug] Potential agenda display bug

2011-06-08 Thread Rasmus
Hi

I am not quite satisfied with the look of my Agenda when the diary is
included (which it needs to be)[fn:1]

Previously, Bastien added a fix to:

#+BEGIN_QUOTE
 "puts multiline diary entries on a single
line when it makes sense (i.e. when lines don't start with a diary time
specification.)" 
#+END_QUOTE

I noticed this is my agenda today: 

  Diary:  Turn in paper; Status: CONFIRMED  (UID: 
n76mq9j54mlhctptk53du8n...@google.com); Inger (1930); Status: CONFIRMED 
  (UID: 3505199c-0241-401c-a296-20b0f9f2c3cc)

And corresponding diary code:

%%(and (diary-block 6 8 2011 6 8 2011)) Aflever Polle-Opgave
   Status: CONFIRMED(UID: n76mq9j54mlhctptk53du8n...@google.com)
[... ignored some 5000 lines ...] 
%%(diary-remind '(diary-anniversary 6 8 2000) '(7 6 5 4 3 2 1))  Inger (1930)
   Status: CONFIRMED(UID: 3505199c-0241-401c-a296-20b0f9f2c3cc)

Here is the display from diary

Wednesday, June 8, 2011:  Shavuot
=
Aflever Polle-Opgave
   Status: CONFIRMED(UID: n76mq9j54mlhctptk53du8n...@google.com)
 Inger (1930)
   Status: CONFIRMED(UID: 3505199c-0241-401c-a296-20b0f9f2c3cc)


These should be probably be separated by a \n in the Agenda... Otherwise
I'd easily miss the second event. 

Cheers,
Rasmus


Footnotes:

[fn:1] This is somewhat a sequel to a previous thread:
   http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37302.html


-- 
Sent from my Emacs




[O] Exporting booktabs as tables

2011-06-23 Thread Rasmus
Hi,

I use booktabs from library of babel for LaTeX export. 

I want to export an booktab-org-table as an actual latex-table (i.e. not
tabular only).

An example follows. The question is how to make #+call be recognized
and treated as a 'first-class' table. (I could do it in LaTeX manner,
but I am trying to become more 'Org-Centric').

#+begin_src org
#+LATEX_HEADER: \usepackage{booktabs}
* COMMENT Tables 
#+CAPTION: This is not a table! 
#+LABEL: tbl:table
#+ATTR_LaTeX: table 
#+tblname: budget
| Post   | Beløb [\textsc{dkk}] |
|+--|
| post 1 | 2250 |
| post 2 | 1500 |
| post 3 |  375 |
| post 4 |  525 |
|+--|
| Total  | 4650 |
#+TBLFM: @5$2=vsum(@1..@-1)
* Export 
#+call: booktabs(table=budget, align="@{}lr@{}") :results latex :exports 
results 

#+CAPTION: This is a table
| Post   | Beløb [\textsc{dkk}] |
|+--|
| post 1 | 2250 |
| post 2 | 1500 |
| post 3 |  375 |
| post 4 |  525 |
|+--|
| Total  | 4650 |
#+end_src

Which results in the following. Notice that the first is a tabular. I
want it to be wrapped in a table-environment. 
#+begin_src latex
% [snip]
\begin{tabular}{@{}lr@{}}
  \toprule
  Post & Beløb [\textsc{dkk}] \\
  \midrule
  post 1 & 2250 \\
  post 2 & 1500 \\
  post 3 & 375 \\
  post 4 & 525 \\
  \hline
  Total & 4650 \\
  \bottomrule
\end{tabular}

\begin{table}[htb]
  \caption{This is a table} 
  \begin{center}
\begin{tabular}{lr}
  Post&  Beløb [\textsc{dkk}]  \\
  \hline
  post 1  &  2250  \\
  post 2  &  1500  \\
  post 3  &   375  \\
  post 4  &   525  \\
  \hline
  Total   &  4650  \\
\end{tabular}
  \end{center}
\end{table}
#+end_src

Thanks,
Rasmus

-- 
Sent from my Emacs




[O] Extending org-koma-letter.el (was: HowTo: Letter template method using yasnippet)

2012-07-27 Thread Rasmus
Nicolas Goaziou  writes:

> Based on [Karl Voit's] work, I've put up the attached back-end:
> org-koma-letter.el.

Thanks.  It's wonderful writing letters with the new latex exporter.
You should consider adding it to org_contrib.

> It's far from being complete. See it as a proof of concept. Feel free
> to upgrade it.

I need two further features to fully adopt org-koma-letter.el, but I am
not sure how to proceed (I still haven't found too much [non-programmer]
documentation on how to hack the new org-exporter).

First, it should allow for contents after \closing{·}, e.g. \ps{·} and
\encl{·}.  Second, it should allow for arbitrary LaTeX command
\end{letter}, e.g. \includepdf{·}.


Thus, I basically want to extend org-koma-letter-template to include to
extra content-like elements.

   (defun org-koma-letter-template (contents info)
   ...
   ...
   (format "\n\\closing{%s}\n\n" (plist-get info :closing))
   ;; appendix in letter
   appendix
   ;; Letter ends.
   "\\end{letter}\n"
   after-letter
   ;; Document ends.
   "\\end{document}"


I am not sure how to implement this.  I want it to operate on tags.  So
I want
#+begin_src
* my-encl:appendix:
#+latex:\encl{
- doc 1
- doc 2
#+latex:}
#+end_src

to /not/ be part of contents, but be recognized as appendix inserted
after the signature.  Likewise headlines with tag :afterletter: should
only be inserted after \end{letter}.

Could anyone provide any hints as to how to archive this behavior.  (I
can't really understand all the details by just reading the API...).

BTW: scrlttr2 supports sections with certain lco-files, see
http://www.komascript.de/sections.lco.  So perhaps the
org-koma-letter-headline should contain this possibility.

Thanks,
Rasmus

-- 
. . . Stallman was indeed the tallest possible mountain and by
standing on his shoulders you could see forever. . .



Re: [O] are super-hidden technical blocks required?

2012-07-30 Thread Rasmus
Bastien  writes:

> I don't think this is about plain text vs à la XML (because XML and
> friends are plain text too) but about whether we should allow a new
> type of block to keep non-human-readable stuff out of the way.

How about just allowing for a list of properties being hidden.  For
instance all uuid properties could be hidden.

–Rasmus

-- 
A clever person solves a problem. A wise person avoids it




[O] Formatting Agenda entries

2012-07-30 Thread Rasmus
Hi,

I use org-google-weather.el to display the weather condition of a couple
of cities in my Agenda.  I would like to format the strings so that
certain elements are aligned.

Sometimes it looks like this: 

   W:I Clear, 19-35 ᵒC(Florence)
   W:I Partly Sunny, 19-26 ᵒC(Berlin)

(I is the icon).  I want it to look like:

   W:I Clear,19-35 ᵒC(Florence)
   W:I Partly Sunny, 19-26 ᵒC(Berlin)

The string I use is:

(setq org-google-weather-format
   "%i %c, %l-%h %s(%L)")

I tried something like 

   (format "%s %-7s %s %s %s" "%i" "%c," "%l-%h" "%s" "(%L)")

but this obviously doesn't work as the strings are only expanded in the
Agenda buffer.  Thus, I need to format my string after placeholders have
been expanded but before it's actually displayed in the Agenda buffer.

Is that somehow possible?

Thanks,
Rasmus

-- 
In theory, practice and theory are the same. In practice they are not




Re: [O] Formatting Agenda entries

2012-07-30 Thread Rasmus
Nick Dokos  writes:

> Have you tried something like
>
> (setq org-google-weather-format "%i %-30c, %l-%h %s (%L)")
>
> perhaps? Seems to work for me.

I can honestly say I haven't.  I only tried to (format ...) way, which
didn't work. 

Thanks for pointing it out.

–Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put




Re: [O] Getting source code to work

2012-08-01 Thread Rasmus
Mark Stoehr  writes:

> and my version (from M-x org-version) is
> Org-mode version 7.8.11

How about 

sh> python --version

On my system where python is 3.2.3 and python2 is 2.7.3 I have

   (setq org-babel-python-command "python2") 

–Rasmus  

-- 
Hooray!




[O] [BUG] turn-on-org-cdlatex

2012-08-02 Thread Rasmus

Hi,

It would seem there is a bug in turn-on-org-cdlatex whenever _ or ^ is
called.  And perhaps others. 

To reproduce:

bash> emacs -q 

In *scratch*

#+begin_src emacs-lisp
;; adjust the two following lines to your system
(load-file "/usr/share/emacs/site-lisp/auctex/texmathp.el")
(load-file "~/.emacs.d/elpa/cdlatex-4.0/cdlatex.el")
(require 'cdlatex)
(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(switch-to-buffer "test.org")
#+end_src
Then
  
  M-x org-mode

#+begin_src org
* test
  insert `$' then `x' then `_' then `1', i.e. $x_1$
#+end_src

I get the following backtrace

Debugger entered--Lisp error: (void-variable last-command-char)
  (char-to-string last-command-char)
  (concat (char-to-string last-command-char) "{")
  (string= (buffer-substring (max (point-min) (- (point) 2)) (point)) (concat 
(char-to-string last-command-char) "{"))
  (if (string= (buffer-substring (max (point-min) (- (point) 2)) (point)) 
(concat (char-to-string last-command-char) "{")) (progn (backward-char 1) 
(insert last-command-char) (forward-char 1)) (insert last-command-char) (insert 
"{}") (forward-char -1))
  (if (cdlatex-number-of-backslashes-is-odd) (insert last-command-char) (if 
(not (texmathp)) (cdlatex-dollar)) (if (string= (buffer-substring (max 
(point-min) (- (point) 2)) (point)) (concat (char-to-string last-command-char) 
"{")) (progn (backward-char 1) (insert last-command-char) (forward-char 1)) 
(insert last-command-char) (insert "{}") (forward-char -1)))
  cdlatex-sub-superscript()
  call-interactively(cdlatex-sub-superscript)
  org-cdlatex-underscore-caret(nil)
  call-interactively(org-cdlatex-underscore-caret nil nil)

System: 
GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4)
 of 2012-08-02 on rasmus

Org-mode version 7.8.11 (release_7.8.11-338-gecba55 @ 
/usr/share/emacs/site-lisp/org/)

-- 
In theory, practice and theory are the same. In practice they are not




Re: [O] Reftex in Org-Mode exporting and recognizing figures or equations

2012-08-03 Thread Rasmus

Jeffrey Spencer  writes:

> 1) I was wondering if anyone has got the reftex feature of easily
> recognizing the figures and equations to insert as a ref command to work in
> org-mode.

I haven't gotten this to work.  It's doable, but requires some work.
For now I'd be happy if I could replace the \ref

> 2) Also I had seen on a website that you can use the command to get
> org-mode type citations. This seems to export to latex as a \ref command
> with citep in the middle (eg. \ref{citep}).
> (reftex-set-cite-format
> "[[citep][%l]]")
> This doesn't seem to work for me but maybe I'm doing something wrong.

Here's my setup which works decently:

#+begin_src emacs-lisp
(defun org-mode-reftex-setup ()
(load-library "reftex")
(and (buffer-file-name)
 (file-exists-p (buffer-file-name))
 (reftex-parse-all))
(make-local-variable 'reftex-cite-format)
(setq reftex-cite-format 'org)
(define-key org-mode-map (kbd "C-c )") 'reftex-citation))

  (add-hook 'org-mode-hook 'org-mode-reftex-setup)


(eval-after-load 'reftex-vars
  '(progn

 (add-to-list 'reftex-cite-format-builtin
  '(org "Org-mode citation"
((?\C-m . "[[cite:%l]]")
 (?t . "[[textcite:%l]]")
 (?p . "[[parencite:%l]]")
 (?s . "[[posscite:%l]]")
     (?a . "[[citeauthor:%l]]")
 (?y . "[[citeyear:%l]]"))
#+end_src

I add nodes manually with C-l after inserting, if needed.

–Rasmus

-- 
⠠⠵




Re: [O] Proposal: starting of parallel asynchronous shell processes

2012-08-03 Thread Rasmus
Bastien  writes:

> Tobias Naehring  writes:
>
>> A poor man's solution to allow parallel shell processes would be to replace 
>> the
>> code fragment
>>
>>  (progn
>>(message "Executing %s" cmd)
>>(shell-command cmd))
>>(error "Abort"
>>
>> from `org-open-at-point' by
>>
>>  (progn
>>(message "Executing %s" cmd)
>>(shell-command cmd (generate-new-buffer "*org-shell-output")))
>>(error "Abort"
>
> I've implement this poor man's solution.  The new buffers are added to
> `clean-buffer-list-kill-buffer-names', and you can get rid of the
> buffers with M-x clean-buffer-list RET.

BTW: are you aware of  emacs-async at: 

  https://github.com/jwiegley/emacs-async

It mainly make sense with time-consuming processes, though.  I think
John is trying to push it to Emacs-core.

–Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers.





Re: [O] Reftex in Org-Mode exporting and recognizing figures or equations

2012-08-05 Thread Rasmus
Jeffrey Spencer  writes:

> When I use your setup and insert a citation then export to latex I get:
> [[cite:Paper]]
> turns into:
> \ref{cite-Paper}

You need to add them as link types:

See Worg.  Here's my setup

#+begin_src emacs-lisp

;; add latex:link-type [[latex:textsc][small caps]]
(org-add-link-type
 "latex" nil
 (lambda (path desc format)
   (cond
((eq format 'html)
 (format "%s" path desc))
((eq format 'latex)
 (format "\\%s{%s}" path desc)


(org-add-link-type
 "citepos" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citepos:" desc)))
 (format "\\posscite{%s}" path)
   (format "\\posscite[%s]{%s}" desc path)
   )


(org-add-link-type
 "citep" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citep:" desc)))
 (format "\\citep{%s}" path)
   (format "\\citep[%s]{%s}" desc path)
   )

(org-add-link-type
 "citet" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citet:" desc)))
 (format "\\citet{%s}" path)
   (format "\\citet[%s]{%s}" desc path)
   )


(org-add-link-type
 "citeauthor" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citeauthor:" desc)))
 (format "\\citeauthor{%s}" path)
   (format "\\citeauthor[%s]{%s}" desc path)
   )

(org-add-link-type
 "citeyear" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "citeyear:" desc)))
 (format "\\citeyear{%s}" path)
   (format "\\citeyear[%s]{%s}" desc path)
   )


(org-add-link-type
 "cite" 'ebib
 (lambda (path desc format)
   (cond
((eq format 'html)
 (format "(%s)" path))
((eq format 'latex)
 (if (or (not desc) (equal 0 (search "cite:" desc)))
 (format "\\textcite{%s}" path)
   (format "\\textcite[%s][%s]{%s}"
   (cadr (split-string desc ";"))
   (car (split-string desc ";"))  path))


  (org-add-link-type
   "parencite" 'ebib
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (format "(%s)" path))
  ((eq format 'latex)
   (if (or (not desc) (equal 0 (search "parencite:" desc)))
   (format "\\parencite{%s}" path)
 (format "\\parencite[%s][%s]{%s}"
 (cadr (split-string desc ";"))
 (car (split-string desc ";"))  path))
#+end_src

-- 
When the facts change, I change my mind. What do you do, sir?



[O] Perhaps BUG: Proper quotes around math in new exporter

2012-08-09 Thread Rasmus
Hi,

I can't seem to get the new exporter to export proper quotes around
single element math symbols.  Here's a test-string:

  'x' '\(x\)' '$x$' `$x$' `\(x\)'  "\(x\)" "x"

(first and last are always correct)

With the old exporter they all turn out correctly:
   http://ompldr.org/vZjFrcw/screenshot-20120809%40124834.png

With the new exporter none of the math-version turns out correctly:
   http://ompldr.org/vZjFrdA/screenshot-20120809%40124247.png

I can of course correct by brute force by putting it in a #+latex line.
But is there some way to get the org-export.el to treat the above
example correctly?

–Rasmus 

Version: Org-mode version 7.8.11 (release_7.8.11-382-g1276ab.dirty @ 
/usr/share/emacs/site-lisp/org/)

-- 
Don't panic!!!




Re: [O] [ANN] Editable HTML export of Org-mode files

2012-08-14 Thread Rasmus

Eric Schulte  writes:

> I've recently put together a web server which runs in Emacs and exports
> local Org-mode files to HTML in such a way that they may be edited from
> within a web browser with the edits saved to local files on disk.  The
> code is available from github.

That's very cool!  Good job!  This could be useful.  Would this be
something that could eventually be used in the Worg?

–Rasmus

-- 
Hooray!




[O] Activate/deactivate export of inlinetasks with #+OPTIONS

2012-08-14 Thread Rasmus

Hi list,

When writing documents, I think in terms of LaTeX.  There, a common
option in `draft'.  In orgmode inlinetasks is a draft-thingy to me.  I
want to easily remove inlinetasks before exporting a final (that merely
means `pretty') version.

To reach an Org-ish solution I wrote the following trivial advice+extra,
which allows #+OPTIONS: inline:t or #+OPTIONS: inline:nil.  It works
only with the new exporter (which is amazing!!!).

I'm hoping someone else could make use of it (although it is truly
trivial, but not being a programmer I appreciate finding `easy'
solutions on the internets).

#+BEGIN_SRC emacs-lisp
(add-to-list 'org-export-options-alist
 '(:with-inlinetasks nil "inline" org-export-with-inlinetasks))

(defcustom org-export-with-inlinetasks t
  "Non-nil means include INLINETASKS keywords in export.
When nil, remove all these keywords from the export."
  :group 'org-export-general
  :type 'boolean)

(defadvice org-e-latex-inlinetask (after org-e-export-inlinetask-p)
  "Return an inlinetask string if :with-inlinetasks is t otherwise
  return nothing"
  (if (not (plist-get info :with-inlinetasks))
  (setq ad-return-value "")))

(ad-activate 'org-e-latex-inlinetask)
#+END_SRC

If this is of high enough standards it could perhaps be added to the
worg. . .

–Rasmus

-- 
In theory, practice and theory are the same. In practice they are not




Re: [O] Activate/deactivate export of inlinetasks with #+OPTIONS

2012-08-14 Thread Rasmus
Rasmus  writes:

> To reach an Org-ish solution I wrote the following trivial
> advice+extra,
> which allows #+OPTIONS: inline:t or #+OPTIONS: inline:nil.  It works
> only with the new exporter (which is amazing!!!).

This solution is better as it's backend-agnostic: 

#+BEGIN_SRC emacs-lisp
  (add-to-list 'org-export-options-alist
   '(:with-inlinetasks nil "inline" org-export-with-inlinetasks))

  (defcustom org-export-with-inlinetasks t
"Non-nil means include INLINETASKS keywords in export.
  When nil, remove all these keywords from the export."
:group 'org-export-general
:type 'boolean)

  (defun org-e-inlinetask-p (inlinetask back-end info)
"Return an inlinetask string if :with-inlinetasks is t"
(if (plist-get info :with-inlinetasks)
inlinetask
""))

  (add-to-list 'org-export-filter-inlinetask-functions 'org-e-inlinetask-p)

  ;; (defadvice org-e-latex-inlinetask (after org-e-export-inlinetask-p)
  ;;   "Return an inlinetask string if :with-inlinetasks is t otherwise
  ;;   return nothing"
  ;;   (if (not (plist-get info :with-inlinetasks))
  ;;   (setq ad-return-value "")))

  ;; (ad-activate 'org-e-latex-inlinetask)

#+END_SRC

-- 
I almost cut my hair, it was happened just the other day




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

2012-08-15 Thread Rasmus
Eric Schulte  writes:

> I'm very excited to start using this merge driver.  I've put together an
> Arch Linux User Repository (aur) package, which can be used by Arch
> Linux users to install the org-merge-driver with pacman.  It is
> available at [1], if others find it useful and if Andrew doesn't object
> I'd be happy to push it into the official aur database.  It is very
> simple and installs directly from git.

you should add gnulib, it would seem (as a makedepends?).  At least
gnulib-tool isn't on my system. 

makedepends=('git' 'autoconf' 'gnulib')

Also, installing local is kind of non-default (IMO). . . 

$ pacman -Ql org-merge-driver 
  org-merge-driver /usr/
  org-merge-driver /usr/local/
  org-merge-driver /usr/local/bin/
  org-merge-driver /usr/local/bin/org-merge-driver
  org-merge-driver /usr/local/share/
  org-merge-driver /usr/local/share/doc/
  org-merge-driver /usr/local/share/doc/org-merge-driver/
  org-merge-driver /usr/local/share/doc/org-merge-driver/README

Thus, conditional on my taste I'd build like:

  ## Build
  msg "Building..."
  cd $_gitname
  gnulib-tool --add-import
  autoreconf -i
  ./configure --prefix=/usr ## added prefix
  make

It's also encouraged to use -git in the name, but I don't always
follow it. . .

I have a couple of local org `addons' that I never managed to push to
the AUR, but I encourage you to push the merge drive.

BTW: I would have never seen that I can use this for my hg had you not
published the package here!

–Rasmus

-- 
Don't panic!!!




[O] google-calendar.el blocked?

2012-08-19 Thread Rasmus
Hi,

For some time google-calendar.el hasn't been working for me.  I looked
into it, and it seems the user-agent has been blocked cf. the output
below: 

Has anyone else experienced this?  Or how to fix it?  (I.e. how to
change the user-agent of url-retrieve or something similar?)

Thanks,
Rasmus

#+NAME: Debugging 
#+BEGIN_SRC emacs-lisp
(defun my-url-retrieve (url)
  (with-current-buffer (url-retrieve-synchronously url)
(buffer-substring (point-min) (point-max

(my-url-retrieve "http://www.google.com/ig/api?weather=London";)
#+END_SRC

#+RESULTS: Debugging
#+begin_example
HTTP/1.1 403 Forbidden
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=UTF-8
Date: Sun, 19 Aug 2012 15:49:35 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
X-Content-Type-Options: nosniff
Server: igfe
Content-Length: 970
X-XSS-Protection: 1; mode=block



  
  
  Error 403 (Forbidden)!!1
  
*{margin:0;padding:0}html,code{font:15px/22px 
arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% 
auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > 
body{background:url(//www.google.com/images/errors/robot.png) 100% 5px 
no-repeat;padding-right:205px}p{margin:11px 0 
22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media 
screen and 
(max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
  
  
  403. That's an error.
  Your client does not have permission to get URL 
/ig/api?weather=London from this server.  That's all we 
know.
#+end_example






-- 
This space left intentionally blank




Re: [O] Org-mode release 7.9

2012-08-24 Thread Rasmus

Congrats to the Org-team!  Great work as always!

It seems doc.html on worg ins't up to date.  At least a couple of the
links weren't working for me (the anchor didn't exists).  E.g. orgtbl
to unicode.

BTW: It should technically be possible to run org-e-ascii
(unicode-version) on tables when sending mails via message-mode, no?
That would be need.

–Rasmus

-- 
Together we'll stand, divided we'll fall




Re: [O] any org[/beamer] experts in the ottawa area available for consulting?

2012-09-09 Thread Rasmus
"Robert P. J. Day"  writes:

> p.s.  i asked this on the org list hoping for someone who also knows
> beamer, of course.  if that doesn't work, i can ask on the beamer
> list, looking for someone who also knows org. :-)

I don't get the question, I'm afraid.  Could you reiterate questions
more concretely?

But do be aware that beamer article exists so that you can convert a
beamer slides into an a4 (or whatever) article from almost the same
source as the slides.  That's rather useful. 

The org-e exporter should be able to cope with this, as far as I
remeber. 

–Rasmus

BTW: For production with tex and friends perhaps Rivers Technology
will be of interest to you.  They provide document service to major
journals by e.g. Elsevir.  They use xml as backend and have some very
interesting videos out there.  'Household' production should be
possible via Org.  Perhaps org-publish can be extended to your needs?

-- 
May the Force be with you



Re: [O] New LaTeX exporter and superscripts

2012-10-14 Thread Rasmus
t...@tsdye.com (Thomas S. Dye) writes:

> Fifteen ^{14}C age determinations from 11 inland temples were reported
> by [[textcite:mccoy11:_strat_hawaii][Table 2;;ref]]. A single ^{14}C
> age
> determination on a piece of short-lived
>
> exports to LaTeX like this:
> Fifteen $^\mathrm{14}$C age determinations from 11 inland temples were
> reported by
> \textcite[][Table 2]{mccoy11:_strat_hawaii}. A single \^\{14\}C age
> determination on a piece of short-lived
>
> Note the different translations of ^{14}C.

I have observed this as well.

Another (bug?) is that

 1. $x$ 
 2. $y$ 

exports as 

\begin{enumerate}
\item \$x\$
\item \$y\$
\end{enumerate}
(also true for itemize). 

Also, [org] $x$'s is exported as [LaTeX] $x$`s, which is also wrong.

Cheers,
Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers.



Re: [O] nbsp and /italics/

2012-10-16 Thread Rasmus
t...@tsdye.com (Thomas S. Dye) writes:

> #+name: ngz-nbsp
> #+begin_src emacs-lisp
> (defun ngz-latex-filter-nobreaks (text backend info)
>   "Ensure \"_\" are properly handled in Beamer/LaTeX export."
>   (when (memq backend '(e-beamer e-latex))
> (replace-regexp-in-string " " "~" text)))
> (add-to-list 'org-export-filter-plain-text-functions
>  'ngz-latex-filter-nobreaks)
> #+end_src

Hmm, I'm intrigued by this and it could solve one of my long standing
issue with Org LaTeX export.

I write all new sentences with "  ", and for stuff like "fig. " I use
one space.  Pretty consistently.  I would love to modify the function
to recognize "point one space" as ".~" and "point double space" as
".  ".  (i.e. no translation).

Can anyone think of a clever regexp that recognizes the above pattern?
I tried, "\\.[ ]\{1\}" but it didn't work.  And without the \{1\} it's
too strong. . .

Thanks in advance,
Rasmus

-- 
I almost cut my hair, it was happened just the other day



Re: [O] org-anywhere

2012-10-18 Thread Rasmus

I use Org in similar manners, i.e. for writing stuff and as a
calendar.

> So, for the way my brain thinks, there are a few org-mode design
> features that get in the way.


> - scheduled and deadline dates cannot be stored in drawers

That would be nice, yes. 


> - I would like a org-remove-all-(flow)-guff option

That would be nice.  At the moment, I remove most stuff during export,
but having a zen file in Emacs would also be nice.  One of the reasons
why I use Org over plain LaTeX is that it contains less clutter.  And
clutter can often be 

Perhaps something like fold mode of AUCTex would be useful.  I.e. all
deadline markers would be replace by a [d] which folds out when the
cursor is on [d].  It might even be possible with the magic which
replaces \delta with δ in org buffers. . .

> Does anyone have similar issues?  I'd like to have a go at fixing
> some of this but would like to know if it would be generally useful
> to others, and what priorities may be.

Less clutter is always good.

In general, one of the big clutters in my files are big chucks of
LaTeX math, but I don't have any idea how to make it nicer than it is.

-- 
. . . The proofs are technical in nature and provides no real understanding.



[O] [babel] bug[?] when calling src_R from table?

2012-11-10 Thread Rasmus
Hi, 

I wanted to combine a table of text and a generated result (in org to
LaTaX using the new exporter).  It would seem src_R snips would be
perfect for this.  However, it does not seem to work.  I.e. src_R is
translated correctly in the text, but not in the table.

Is this a feature or a bug? 

Example below. 

Thanks,
Rasmus

Org-mode version 7.9.2 (release_7.9.2-556-g7cdfa6.dirty @ 
/usr/share/emacs/site-lisp/org/)

#+BEGIN_SRC org
#+PROPERTY: session *R*

#+BEGIN_SRC R :exports none
att <- c(1+1, 3)
#+END_SRC

it's length is src_R[:results raw]{length(att)}.

   | src_R[:results raw]{length(ate)} |
#+END_SRC

#+BEGIN_SRC latex
it's length is 2.

\begin{center}
\begin{tabular}{l}
\toprule
src$_\mathrm{R[}$:results raw]\{length(ate)\}\\
\bottomrule
\end{tabular}
\end{center}
#+END_SRC


-- 
Hooray!




[O] Export tables as matrices (change tbl-export function on the fly)

2012-11-14 Thread Rasmus
Hi,

I'm doing some stuff where the natural output of my tables are
matrices.  I found a decent translation  function here ¹.  However,
I'm not very successful in making org use it. 

I tried to add
#+begin_src org 
* heading
  :PROPERTIES:
  :TABLE_EXPORT_FORMAT: orgtbl-to-latex-matrix
  :END:
#+end src
to the relevant section of my document, but this does not seem to be
the correct usage. 

I also tried to radio tables.  The problem is that when I do

#+NAME: P
#+ORGTBL: SEND P orgtbl-to-latex-matrix
|1|

I cannot send P to R/Octave.  When I swap the ORGTBL and NAME around,
I can't send it to a radio table.  I also tried with TBLNAME. 

Anyway, the optimal would be to have Org just use a different
translation mechanism on the fly.  Is that possible?

Thanks,
Rasmus

Footnotes: 
 ¹   http://www.patokeefe.com/archives/742

#+begin_src emacs-lisp
(defun orgtbl-to-latex-matrix (table params)
  "Convert the Orgtbl mode TABLE to a LaTeX Matrix."
  (interactive)
  (let* ((params2
  (list
   :tstart (concat "\\[\n\\begin{bmatrix}")
   :tend "\\end{bmatrix}\n\\]"
   :lstart "" :lend " " :sep " & "
   :efmt "%s\\,(%s)" :hline "\\hline")))
(orgtbl-to-generic table (org-combine-plists params2 params



(defcustom orgtbl-latex-matrix-string  "% BEGIN RECEIVE ORGTBL %n
% END RECEIVE ORGTBL %n
\\begin{comment}
#+ORGTBL: SEND %n orgtbl-to-latex-matrix :splice nil :skip 0

\\end{comment}\n"
  "Template for the latex matrix orgtbl translator
All occurrences of %n in a template will be replaced with the name of the
table, obtained by prompting the user."
  :type 'string
  :group 'org-table)
#+end_src

-- 
C is for Cookie




Re: [O] Export tables as matrices (change tbl-export function on the fly)

2012-11-14 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> I'm doing some stuff where the natural output of my tables are
>> matrices.  I found a decent translation function here ¹.  However,
>> I'm not very successful in making org use it. 
>
> Using the new exporter, something like should replace any table using
> default environment (i.e. no special attribute) and without horizontal
> rules with bmatrix environment. It should also insert it in math mode
> automatically.

this one seems to work better for me, but might be more ugly . . .

#+begin_src emacs-lisp

(defun my-latex-table-to-matrix (table backend info)
  (when (and (memq backend '(e-latex e-beamer))
 (not (string-match "^[A-Za-z]+$"  table))
 (not (string-match "\\begin{\\(table*\\|sidewaystable\\)}" table)))
(let ((default-env (format "\\(begin\\|end\\){\\(%s\\)}.*"
   org-e-latex-default-table-environment)))
  (when (string-match default-env table)
(concat "\\[\n"
(org-trim
 (replace-regexp-in-string "\n\n" "\n"
 (replace-regexp-in-string
  
"\\(begin\\|end\\){\\(center\\|table\\)}\\|toprule\\|bottomrule\\|\[[htbH]+?\]"
 ""
  (replace-regexp-in-string
   default-env "\\1{bmatrix}" table
"\n\\]\n")
(add-to-list 'org-export-filter-table-functions 'my-latex-table-to-matrix)

#+end_src


-- 
Dung makes an excellent fertilizer



[O] [FR new exporter] NAME and label

2012-11-17 Thread Rasmus

Hi,

I rely on org-special-blocks.el to provide easy access to the LaTeX
proof environment and such.  Up till now I have been placing LaTeX
labels in them manually, but I would like to #+NAME them.

Here's an example
#+begin_src org
* section two
  #+NAME:p1
  #+BEGIN_PROPOSITION
  1+1=2
  #+END_PROPOSITION
  
  By [[p1]] ...
#+end_src

This results in 
#+begin_src latex
\section{section two}
\label{sec-1}
\label{p1}
\begin{proposition}
1+1=2
\end{proposition}

By \ref{p1} \ldots{}
#+end_src

Basically, I would like to have the label inside the proposition.
Also, I think it might be nicer to use \dots as oppose to \ldots, as
it is slightly more intelligent.

Thanks,
Rasmus

-- 
When in doubt, do it!




Re: [O] Export tables as matrices (change tbl-export function on the fly)

2012-11-17 Thread Rasmus
Nicolas Goaziou  writes:

>> I didn't manage to get your (Nicolas') or my own attempt working
>> correctly for exporting matrices.  I still think it would be nice.
> It's hard to fix this since you're not very explicit here.

Sorry; you posted a code first which didn't work at all for me; I
tried to fix it, and I posted a code which I though worked but in the
end it didn't.  Thus, I though it would be fair to post another
message stating this, if nothing else than for future viewers.

>> I tried to use the regexp 
>>(not (string-match "|[\\+-]+|"  table))
>> to identify tables without heading separators, but it didn't work
>> properly.
>
> It cannot work in filters. These are applied on back-end ouput, in
> this case LaTeX code, not on Org code.

Aha, that explains a lot.  At some point when I don't have so many
assignments I really need to get to know the details of your work.
It's has so many cool features. 

> There is no TBLOPTIONS affiliated keyword, but it could go in
> ATTR_LATEX

That a lot more clever.  I just made up TBLOPTIONS since I couldn't
think of anywhere better.  But you are of right.  Such an option would
fit perfectly into ATTR_LATEX.


> If you provide a full description of options and their effect, I
> might try to implement it.

Okay I'll try.  I don't know whether something like the below is what
you are thinking of.  I use matrices all of the time so it would be
nice for me.

 - PROPOSAL: New option(s)for ATTR_LATEX
   - :type :: options a lisp translation function or key words
  associated with a lisp list translation function.
 - Default keyword: table; other known keywords: matrix
   - table: current exporter
   - matrix: exports to LaTeX matrix determined by the variable
 org-export-latex-tables-matrix-default-type or :matrix-type.
 Default is: bmatrix or pmatrix (probably bmatrix).
 - in general array requires more configuration, but for me
   array need not be supported.

   - Matrix relevant keywords :: are the following
 - If the additional variable ALIGN is set to k ∈ {l,r,c} use
   the starred version of
   org-export-latex-tables-matrix-default-type or :matrix-type
 - If the additional keyword :bordered is t use the typeset
   the matrix as \borderedmatrix{&col1&
   ... &colN\\row1&...\\...\\rowN}.  A better example is
   here ¹.  Also, the default bordermatrix macro is determined
   via org-export-latex-tables-matrix-bordered-type s.t. one
   can specify kbordermatrix ² or qbordermatrix ³.  Perhaps
   Org automatically add the respective usepackage if this
   option is set to something different from bordermatrix
   (i.e. org-export-latex-tables-matrix-bordered-type is a
   list of lists where the first element of a list is the
   macro name and the second is the needed package).
 - If :matrix-pre "string" is set "string" is typeset before
   the matrix
 - If :matrix-post "string" is set then "string" is typeset
   after the matrix.
   - Alternatively, CAPTION could be used, but it seems weird.
 Are they written before or after the matrix?  I'd prefer
 CAPTIONs to be ignored typeset when matrices are typeset.
 - If the table has a name the matrix is typeset using
   equation and given an label.  If not it may be typeset
   using equation* or \[·\].
 - Potentially: an :inline exists s.t. if inline is t the
   matrix is typeset inline [i.e. with \(\)].  Perhaps, it
   should be smart and use the small verison of
   org-export-latex-tables-matrix-default-type.  I.e. if
   bmatrix use bsmallmatrix.  This could be set via
   org-export-latex-tables-matrix-inline-small.

Thanks,
Rasmus


Footnotes: 
 ¹   http://www.math.harvard.edu/texman/node25.html
 ²   https://www.hss.caltech.edu/~kcb/LaTeX.shtml
 ³   https://code.google.com/p/qbordermatrix/

-- 
When the facts change, I change my mind. What do you do, sir?



Re: [O] Export tables as matrices (change tbl-export function on the fly)

2012-11-18 Thread Rasmus

Nicolas,

Thanks for your reply.


> I meant: what is the exact problem with my code (with examples and
> expected output if possible)? It shouldn't be hard to fix.

They are not caught by the regexp.  And I wasn't able to find a regexp
which could correctly identify all cases.  I have a sample in the footnote ¹ 

> Forget the lisp translation function. At this level, the function
> operates on parsed data. It doesn't use any orgtbl-to-* function. Also,
> even if the ATTR_LATEX keyword applies on the table, it also affects how
> `table-row' elements and `table-cell' objects are transcoded.

OK, thanks for pointing out.

> I suggest to use a :math-mode t. With this mode, all cells are
> treated as raw math code (no transformation is made on any cell).

Sounds good to me.  However, should $'s be stripped?  Say I have an
org-table which I'm indecisive about.  In one sell I might have a
\frac{·}{·} in a cell; so in a normal table export I'd have to insert
$'s, but in :math-mode I wouldn't.  It could thus be expensive to go
from :math mode to nil math mode.  Hence, stripping $ might be
appropriate

> A global variable can also set it `org-export-latex-table-math-mode'
> (default to nil).

Nil by default for sure.


> Then, the :environment keyword can be set to "tabular", "longtable",
> "tabularx", "tabulary", "bmatrix", "pmatrix", "vmatrix", "kbordermatrix"
> or "qbordermatrix". "bordermatrix", "array"... It would default to
> `org-e-latex-default-table-environment' (default to "tabular").

and Bmatrix ({matrix}) and Vmatrix ( ||matrix||) and matrix (no
decoration).

Array needs per column configuration. 

> What is the variable ALIGN? You mean :align keyword? Do matrix
> environments accept alignment? Also I haven't heard about starred
> version of these. What do they do?

They allow you to align a matrix to [rlc] (and maybe others?)  They
are defined in mathtools.

Here's an example (unrelated to tables):

#+BEGIN_SRC latex
\documentclass{article}
\usepackage{amsmath,mathtools}
\begin{document}
$\max_{x}f(x)\quad\text{s.t. }\left\{\begin{matrix*}[r]g(x)\geq0\\h(x)+h(y)\geq
k\end{matrix*}\right.$
\end{document}
#+END_SRC


> From the syntax perspective, I see no difference between bordered
> matrices and the others: they just use a different environment, which
> can be provided through :environment keyword. Am I missing something?

No.  But they are typically macros.  Note the use of cr which
sometimes needs to be used in the bordermatrix (from TeX).  It's not
the case in kbordermatrix (which I use) and presumably qbordermatrix.

#+BEGIN_SRC latex
\documentclass{article}
\begin{document}
$\bordermatrix{&a&b&c\cr a&1&0&0\cr b&0&1&0\cr c&0&0&1}$
\end{document}
#+END_SRC


> The backend never adds any usepackage automatically. It is a can of
> worms (incompatibilities, order of packages...). It's the responsibility
> of the user to do so.

I agree.  

>>  - Potentially: an :inline exists s.t. if inline is t the
>>matrix is typeset inline [i.e. with \(\)].  Perhaps, it
>>should be smart and use the small verison of
>>org-export-latex-tables-matrix-default-type.  I.e. if
>>bmatrix use bsmallmatrix.  This could be set via
>>org-export-latex-tables-matrix-inline-small.
>
> Do all matrix environments accept a small counterpart?

 amsmath provides: 
smallmatrix from which all variants be generated using
appropriated \left "bracket" \right "bracket"
 mathtools provides:
 smallmatrix*
 psmallmatrix 
 psmallmatrix*
 bsmallmatrix 
 bsmallmatrix*
 Bsmallmatrix 
 Bsmallmatrix*
 vsmallmatrix 
 vsmallmatrix*
 Vsmallmatrix 
 Vsmallmatrix*
 smallmatrix*

so I think it covers all variants except "small bordermatrix" and
"small arrary".

Thanks,
Rasmus

Footnotes: 
 ¹   Adding the function function in the second post, the following
examples all translates to tables

#+BEGIN_SRC org
#+NAME: t1
| my table | with rows |
|--+---|
| a| 2 |
| 5| 3 |


matrix

| 1 | 2 |
| 3 | 4 |

#+NAME:t2
| 1 | 2 |
| 3 | 4 |
#+END_SRC

and output (note in dirty Emacs [not -q])

#+BEGIN_SRC LaTeX
\begin{table}[htb]
\label{t1}
\begin{center}
\begin{tabular}{lr}
\toprule
my table & with rows\\
\midrule
a & 2\\
5 & 3\\
\bottomrule
\end{tabular}
\end{center}
\end{table}


matrix

\begin{center}
\begin{tabular}{rr}
\toprule
1 & 2\\
3 & 4\\
\bottomrule
\end{tabular}
\end{center}

\begin{table}[htb]
\label{t2}
\begin{center}
\begin{tabular}{rr}
\toprule
1 & 2\\
3 & 4\\
\bottomrule
\end{tabular}
\end{center}
\end{table}
#+END_SRC

-- 
A page of history is worth a volume of logic



Re: [O] Export tables as matrices (change tbl-export function on the fly)

2012-11-18 Thread Rasmus

Nicolas,

> That's because you use "booktabs" by default. It creates horizontal
> rules, and the filter hence doesn't apply.

Aha.  Is this (again) a misunderstanding because I though of org
source?  I tried to identify org tables with rules.

> Since e-latex back-end doesn't strip anything in regular LaTeX
> snippets or environments, it should be the same here. Switching to
> math mode won't happen automatically, so the user can act
> appropriately.

I guess it's fine for most applications.


> :environment value is a string. It can be set to anything.

Probably the best approach. 

> That's not a problem, Org handles alignment per column already:
>
> |  |  |
> | a   | b   |
> | c   | d   |

I had no idea.  That's very cool.


> Then the backend can add the alignment as an optional argument in math
> mode only when the name of the environment ends with a star and the
> alignment string is one character long.

In the LATEX_ATTR or as in the example above?  The former I assume.


> To circumvent the problem, org-e-latex.el can use a defconst to store
> table/matrix environments requiring "\cr" instead of "\\" at the end of
> each row. It will, as a starter, only contain "bordermatrix".

OK.  How about just making a list of strings (with typical member
STRING) which are known to have the format
\STRING{matrix-like-output}?  Then one can add whichever crazy
environment that might be needed to this list.  And users can easily
add their favorite flavor of e.g. bordermatrix.  

A short experiment seems to suggest that \cr works in place of \\.


> Any name to suggest for it?

I prefer the approach where the exists a list of macro-matrices, maybe
with delimiter and/or line separator. Then the the value of
:environment can be checked against this list.
E.g. org-e-latex-matrix-macro-environments.  By default:

 '(("bordermatrix" "\cr"))

And I'd personally extend it to 

'(("bordermatrix" "\cr") ("kbordermatrix" "\\"))

NOTE: probably it's not nice to store line seperator and such here,
and indeed

  '("bordermatrix" "kbordermatix")

seems like a nicer (as in simpler) list.


> Ok. Then the sanest approach is to allow :math-mode to be set to nil,
> t or `inline'. When `inline', as you suggest, it replaces \[...\] with
> \(...\) and ignores any label. But it still uses whatever environment is
> provided in :environment, that is, it won't make any guess about which
> one to use.

Yeah, you're right.  Less guessing is better guessing.  'Display'
might be same t.


> Also, instead of using a single `org-e-latex-default-table-environment',
> its value can be a plist like the following:
>
>(:table-mode "tabular" :math-mode "bmatrix" :inline-math-mode 
> "smallmatrix")

Yeah, that would be nice.  Would it extend to the options in
ATTR_LATEX?  I.e. would it be nice (?) to be able to specify
   - environment
   - math-environment
   - inline-math-environment
in one option line s.t. I could easily switch from table to matrix to
inline matrix?  E.g.

#+ATTR_LATEX: :math-environment "Bmatrix" :math-mode t
prints a display matrix 
but 
#+ATTR_LATEX: :math-environment "Bmatrix" :math-mode nil
prints a table.

I don't know whether this is just making things more confusing or
whether it would be useful. . . 

Also, at least a prefix string would be very useful as that's how
matrices are usually named.  E.g. 

#+ATTR_LATEX: :math-mode t :prefix "P="
|1|2|
|3|4|

is translated to 
P=\begin{bmatrix}1&2\\3&4\end{bmatrix}


Thanks,
Rasmus

-- 
Dung makes an excellent fertilizer



[O] [new exporter] adhere org-export-date-timestamp-format?

2012-11-18 Thread Rasmus
Hi,

Would it be desirable if the new exporter took the variable
org-export-date-timestamp-format into consideration when formatting
dates?  Or is there another way of dealing with the formatting of
dates?

┏━━━┫  org-export-date-timestamp-format ~"%Y-%m-%d"~ ┃
┃ Type: string
┃ Since: Emacs version 24.1
┃ In file: org-exp.el 
┃ Time string format for Org timestamps in the #+DATE option.
┗━━━

Here's the relevant snip for org-exp. 

 ((string-equal key "DATE")
  ;; If date is an Org timestamp, convert it to a time
  ;; string using `org-export-date-timestamp-format'
  (when (string-match org-ts-regexp3 val)
(setq val (format-time-string
   org-export-date-timestamp-format
   (apply 'encode-time (org-parse-time-string
(match-string 0 val))
  (setq p (plist-put p :date val)))

Example:

#+BEGIN_SRC org
#+DATE: <2012-11-18 Sun>
* test
#+END_SRC

Date is exported as \date{<2012-11-18 Sun>} with the new exporter and
\date{2012-11-18} with the old exporter (using emacs -q).

Thanks,
Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!




Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-21 Thread Rasmus
Nicolas Goaziou  writes:

> I've changed the attribute syntax for tables, images and lists in
> e-latex back-end (new exporter). New this back-end conforms to the
> syntax used by Babel and every other back-end.

Super cool!  I eagerly looking forward to using this for real world
tasks! 

Thank you so much.  

BTW: on the lists:  very good idea.  I have often been bothered by
only having one type of (LaTeX) lists.  Can I set it per list type?
I.e. plain lists are inlined and enumerated are 'normal'?

Again, thanks for this improvement to the already very nice LaTeX
exporter!

–Rasmus

-- 
C is for Cookie



Re: [O] Extending org-koma-letter.el

2012-11-22 Thread Rasmus
Alan Schmitt  writes:


> The non-technical question: I understand this exporter is just a proof
> of concept, but it is working quite well for me, and I'm ready to help
> tweaking this. If I do further modifications, should I send them to the
> list?

YES!!  I want to use Org for my (KOMA) letters (which are all of my
letters).  Unfortunately, I ran into some limitations the last time I
used it ¹.  Indeed, improving/working with more with KOMA letter
exporter is on my TODO list; but at the moment I'm terribly occupied.

–Rasmus


Footnotes: 
 ¹   https://lists.gnu.org/archive/html/emacs-orgmode/2012-07/msg00703.htlm

-- 
When the facts change, I change my mind. What do you do, sir?



Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-25 Thread Rasmus
Nicolas Goaziou  writes:

> Rasmus  writes:
>
>> Nicolas Goaziou  writes:
>>
>>> I've changed the attribute syntax for tables, images and lists in
>>> e-latex back-end (new exporter). New this back-end conforms to the
>>> syntax used by Babel and every other back-end.
>>
>> Super cool!  I eagerly looking forward to using this for real world
>> tasks!
>
> I added another related feature that may come handy: math table
> clusters. Contiguous math tables sharing the same mode are enclosed
> within the same math environment. It allows to type, for example:

I actually needed that the other day, and 'defected' to pure LaTeX.
Thanks this will be very useful!

–Rasmus

-- 
A page of history is worth a volume of logic



Re: [O] Org Writer's room

2012-12-05 Thread Rasmus
Andrew Hyatt  writes:

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

I would also like to see this.  It sounds nice when I read your
description, but I still don't fully appreciate the idea.

–Rasmus

-- 
Vote for proprietary math!




Re: [O] The statement on what is orgmode.

2012-12-05 Thread Rasmus
Vikas Rawal  writes:

> I feel that the above statement does not adequately express that
> orgmode can do this and a lot more.
>
> Any comments/suggestions?

The text isn't that bad, but you are right.  Babel and exports is
perhaps underrepresented.  This one is slightly different, but perhaps
way to complicated.

"Orgmode is a Free/libre plain-text system for GNU Emacs for
organizing project, and maintaining TODO lists, keeping notes, doing
literate programming and exporting to many high quality formats."

Problems: many of the concepts are perhaps only intutive /after/ you
know Org-mode.

One remedy, to this, and a thing I think would be nice in any case,
would be if keywords in the presenting sentence would link to (worg?)
feature pages. 

For instance, export could link to a page briefly showing the many
exporters/features ¹ 

  - LaTeX
  - odt
  - plain text
  - html; blogs
  - beamer slides; html slides

For instance, such a page could show a simple org source file and the
exported version.

–Rasmus

Footnotes: 
 ¹   The org exporter is very impressive by now thanks to Nicolas,
Jambunathan, Luis and the rest of the gang.  Thanks.

-- 
If you can mix business and politics wonderful things can happen!


pgp7vuPN5ACpo.pgp
Description: PGP signature


Re: [O] The statement on what is orgmode.

2012-12-07 Thread Rasmus
> There have been great suggestions on how to explain what is org-mode.
> But if we want a catch phrase I'd also vote for this.
>
> Orgmode: your life, in plain text.

I like the idea of a catch phrase (your life, in plain text) and
perhaps a more detailed paragraph belows, potentially with links.

–Rasmus

-- 
C is for Cookie




Re: [O] [OFFTOPIC] The statement on what is orgmode.

2012-12-07 Thread Rasmus
Eric Schulte  writes:

> 1. A tiling window manager (I personally use xmonad [1]).  This lets you
>navigate all of your windows as if they were Emacs buffers, and
>allows one to go hours using multiple applications without having to
>use a mouse.

I use i3.  It's nice and can be configured to use the Windows key on
my laptop so that it is not intruding with Emacs.

> 2. Conkeror [2], a web browser built on the same code base as Firefox,
>which makes web browsing as Emacs-like as possible (e.g., tabs are
>buffers, and most of the main key chords are the same).

I use Keysnail ¹  which runs with normal Firefox and gives it more of an
Emacs feel.  Obviously, not as much as Conkeror, but it allows you to
follow Firefox bleeding edge and still have nice key bindings etc.

–Rasmus


Footnotes: 
 ¹   https://github.com/mooz/keysnail/wiki

-- 
C is for Cookie



Re: [O] org-pretty-entities and symbols like M_x^y

2012-12-13 Thread Rasmus
Bastien  writes:

> M_x ^y is the only (non fully satisfactory) solution I can think of.

In general org entities work wonders, and I'm a very happy user.

I have a couple of others things that could be made nicer (somehow).
'===>' indicates what would be nicer:

 - \frac{x}{y} ===> [(x)/(y)] or something similar. You'd need to be
   able to see that it was folded, somehow, e.g. '[' could have
   another color, or the background of (x)/(y) could be different.
 - \bar{x}, tilde{x}, underline{x}, ... ==> constructed using
   combining utf8 characters ¹ (or at least support of it; i couldn't
   get it working properly)
 - Being able to specify several white spaces (it seems not to work,
   e.g. below I would like to replace quad with " ␣ ", but this
   doesn't seem to work...).
 - perhaps overlay to indicate when something is folded/replaced with
   a utf8 character.

Here's my org-entities-user btw:

(setq org-entities-user '(("space" "\\ " " " " " " " " ")
  ("implies" "\\Rightarrow" t "⇒" "=>" "=>" "⇒")
  ("iff" "\\iff" t "⇔" "<=>" "<=>" "⇔")
  ("succcurlyeq" "\\succcurlyeq" t "≽" ">=" ">=" "≽")
  ("gimel" "\\gimel" t "ℷ" "gimel" "gimel" "ℷ")
  ("beth" "\\beth" t "ב" "bet" "bet" "ב")
  ("coloneqq" "\\coloneqq" t "≔" ":=" ":=" "≔")
  ("eqqcolon" "\\eqqcolon" t "≕" "=:" "=:" "≕")
  ("cdots" "\\cdots" t "…" "..." "..." "⋯")
  ("colon" "\\colon" t ":" ":" ":" ":")
  ("quad" " " nil " " " " " " "␣")
  ("geq" "\\ge" t "≥" ">=" ">=" "≥")
  ("suchthat" "\\suchthat" t "|" "|" "|" "|")
  ("leq" "\\leq" t "≤" "<=" "<=" "≤")))

All but suchthat are normal LaTeX characters.  


Perhaps, org entities could use the TeX input method as a souce of
symbols?  See:

 (describe-input-method "TeX") 

–Rasmus


Footnotes: 
 ¹   https://en.wikipedia.org/wiki/Combining_character

-- 
When the facts change, I change my mind. What do you do, sir?




[O] When facts change (was: org-pretty-entities and symbols like M_x^y)

2012-12-13 Thread Rasmus
Bastien  writes:

> Achim Gratz  writes:
>
>>> When the facts change, I change my mind. What do you do, sir?
>>
>> If the facts have been changing once, I can wait for them to change
>> again.  Or they may not even be facts after all. :-)

Perhaps that opinion is too dear for some practitioner, as Lord Keynes
was when he allegedly spoke those words.  What if the 'facts' only
converge back to your preferred state in the long run, when we are all
dead? :) 

–Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers.



Re: [O] org-caldav: New version with proper two-way sync

2013-01-14 Thread Rasmus
David Engster  writes:

> I just pushed a pretty big update to org-caldav. 
> [...]
> The short story: org-caldav now does proper two-way syncing. 

Wow, that's amazing.  I'm looking forward to trying this, although I
switched to an Org-only calendar now.  But it would be great with
smart phones, I guess!

–Rasmus

-- 
Don't panic!!!




Re: [O] Export a weekly calendar view from org-agenda

2013-01-17 Thread Rasmus

> Maybe I should say more specific, I am looking for a typical calendar view
> (sort of table) as you know them from paper-based organizers.
> If I understood your solution, I would get a plain list of all events.


Here's some options requiring little effort, but also somewhat
unsatisfactory:

1. export to ical and use some script to convert to pdf. This may of
   may not work for complex agenda
2. org2hpda in contrib and diary
3. import into Emacs calendar and use its export facilities.
   This may of may not work for complex agendas.

# run this makefile with 
#
#  make -f org2hpda
#
# The makfile will take the entries from your diary file and generate
# two PDFs containing nicely printed weekly and monthly calendars. One
# is done in the style of a pocketMod (http://www.pocketmod.com/) and
# the other is done in the style of the Hipster PDA
# (http://en.wikipedia.org/wiki/Hipster_PDA). 


-- 
And let me remind you also that moderation in the pursuit of justice
is no virtue




Re: [O] A manuscript on "reproducible research" introducing org-mode

2012-02-18 Thread Rasmus
t...@tsdye.com (Thomas S. Dye) writes:

> I just ran across this article on reproducible research that some of you
> might find interesting.
>
> http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Lundholm.pdf

On reproducible research, are you guys aware of the relatively recent
project Knitr?  Basically, it is a new Sweave which integrate (i)
Sweave, (ii) TiKZDevice, (iii) cacheSweave, and (iv) code highlight into
one very well-functioning package. 

It kind of works with Org, but not ideally¹.  It might be nice to
integrate it closer with Babel-R, as it just-worksᵀᴹ.

–Rasmus

Footnotes: 
¹  http://yihui.name/knitr/demo/org/

-- 
Enought with the bla bla!




  1   2   3   4   5   6   7   8   9   10   >