Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Alan L Tyree

On 03/06/13 15:40, Samuel Wales wrote:

I don't recall whether I said I had a filling problem.

Filling is a red herring for my use case.

My point is that regardless of filling, it would be a good idea to be
stricter about what a list is, for the reasons I listed.  In my use
case.

Samuel


You're right - you said filling and yanking in your first post.

As I said to Nick, I don't know if my problems stem from filling or not. 
Just know there are problems and I will track them down when I have a 
little time.


Cheers,
Alan

--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:172...@iptel.org




Re: [O] Tag groups: thanks

2013-06-03 Thread Karl Voit
* John Tait johngt...@gmail.com wrote:

 Just a quick belated note to say thank-you very much for the tag groups
 feature in org-mode 8.

 It's very similar to a tag hierarchy request I made on the list a while
 ago, so I'm delighted to see something similar in the new version.

I am not sure how the situation is with the official releases.
However, I am using these tag groups since I started with Org-mode
in 2011.

Nevertheless it's always very nice to say thank you and you're
absolutely right: this *is* quite handy :-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-03 Thread Sebastien Vauban
Hello Rasmus,

Rasmus wrote:
 1.  As far as I remember, if more than one language is loaded the
 order is not neutral one one should issue a \selectlanguage{LANG}.

If there are multiple languages, the main language is the latest loaded; that
is `english' in the following example:

\RequirePackage[frenchb,english]{babel}

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] A simple way to search only headlines

2013-06-03 Thread Sebastien Vauban
Tassilo Horn wrote:
 Xebar Saram zelt...@gmail.com writes:

 i was wondering if anyone knew of a way to search for text only in
 headlines and not the whole document? if not is it something one can
 put a feature request for?

 Use regular expression search or isearch.  The latter would be:

   C-u C-s \*+.*your-search-prase

Or, for a pure Org solution:

  C-c a  s *salsa dance

searches for terms appearing only *in the headline* (including tags).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Carsten Dominik
Hi everyone.

As far as I can see, the filling code is already pretty smart about this issue. 
  The question is then:  What else can we do about it.

Possibilities:
1. We could change the parser to ignore lists where the first
   item does not start with `1.' or `a)'.  But this would
   be a pretty serious change.

2. We could implement a good function that could find problematic
   cases, so that they can be fixed by hand.  This is basically
   what Nick proposed - only it would be implemented in Lisp.

3. We could implement a function that finds and fixes such issues.
   It would basically scan the buffer and find lists that have
   only a single item, not starting with 1, and change the wrapping
   to fix it.

In any case, some hand work would be involved.
I think we cannot fix this problem in full generality.  The reason
is simply that Org is a plain text format and has to be heuristic about
parsing.  There will always be edge cases like this.

Anyone volunteering to write a command that will
check the buffer and warn about it?  Maybe it could be
implemented as org-find-next-funny-list-start, so that
it could be used to search through the whole buffer.

- Carsten


On 3 jun. 2013, at 07:45, Alan L Tyree alanty...@gmail.com wrote:

 On 03/06/13 15:40, Samuel Wales wrote:
 I don't recall whether I said I had a filling problem.
 
 Filling is a red herring for my use case.
 
 My point is that regardless of filling, it would be a good idea to be
 stricter about what a list is, for the reasons I listed.  In my use
 case.
 
 Samuel
 
 You're right - you said filling and yanking in your first post.
 
 As I said to Nick, I don't know if my problems stem from filling or not. Just 
 know there are problems and I will track them down when I have a little time.
 
 Cheers,
 Alan
 
 -- 
 Alan L Tyreehttp://www2.austlii.edu.au/~alan
 Tel:  04 2748 6206sip:172...@iptel.org
 
 




Re: [O] refine org-babel-tangle-jump-to-org?

2013-06-03 Thread Rainer M Krug

Eric Schulte schulte.e...@gmail.com writes:

 rai...@krugs.de (Rainer M. Krug) writes:

 Eric Schulte schulte.e...@gmail.com writes:

 rai...@krugs.de (Rainer M. Krug) writes:

 Hi

 I am using  org-babel-tangle-jump-to-org when debugging code written in
 org and tangled. I have some longisch code blocks and it is always
 irritating, as it only jumps to the codde block. Would it be possible to
 extend the function, that it jumps to the line of the code?
 That would make this funktion much more user friendly.


 I've just pushed up a change which should make this change.  I tested
 this against the example.C file tangled from the attached Org-mode file.

 Thanks - works much better now.
 Very nice - it jumps even to the location in an indirect buffer -
 perfect.

 Without trying to be a perfectionist, it is in most cases between one
 and three lines off.

 Is this only in y case? If yes, please let me know and I can send you an
 org file privately.


 Please do send me a minimal example.  In my simple tests it was landing
 on the same character as in the source code file.

OK - here it is:

,
| :BABEL:
| #+PROPERTY: exports code
| #+PROPERTY: comments yes
| #+PROPERTY: padline yes
| :END:
| * newASM (./newASM.R)
| :PROPERTIES:
| :tangle:   ./newASM.R
| :END:
| #+begin_src R
| 
logList(##)
| 
logList(##)
| logList()
| logList( Simulation object ASM created.)
| logList()
| logList( It has been undergone basic initialisation and will)
| logList( be initialised for usage when simulated by running)
| logList()
| logList(  sim(ASM))
| logList()
| logList( or manually, without simulating, by running)
| logList(  ASM - initialize(ASM))
| logList()
| 
logList(##)
| logList()
| logList( paste( GISDBASE : , parms(ASM)$baseDir) )
| logList( paste( LOCATION : , parms(ASM)$grassLocation) )
| logList( paste( MAPSET   : , parms(ASM)$grassMapset) )
| logList()
| 
logList(##)
| 
logList(##)
| logEnd()
| return(ASM)
|   }
| #+end_src
`

where the tangled file looks as follow, including the empty lines at
beginning and end:

,
| 
| ## [[file:~/tmp/jumpBack.org::*newASM%20(./newASM.R)][newASM\ 
\(\./newASM\.R\):1]]
| 
| 
logList(##)
|   
logList(##)
|   logList()
|   logList( Simulation object ASM created.)
|   logList()
|   logList( It has been undergone basic initialisation and will)
|   logList( be initialised for usage when simulated by running)
|   logList()
|   logList(  sim(ASM))
|   logList()
|   logList( or manually, without simulating, by running)
|   logList(  ASM - initialize(ASM))
|   logList()
|   
logList(##)
|   logList()
|   logList( paste( GISDBASE : , parms(ASM)$baseDir) )
|   logList( paste( LOCATION : , parms(ASM)$grassLocation) )
|   logList( paste( MAPSET   : , parms(ASM)$grassMapset) )
|   logList()
|   
logList(##)
|   
logList(##)
|   logEnd()
|   return(ASM)
| }
| 
| ## newASM\ \(\./newASM\.R\):1 ends here
| 
`

This one works, although the cursor is consistently two characters to the left 
then
where it should be.

If I change

,
| #+PROPERTY: padline yes
`

to

,
| #+PROPERTY: padline no
`

the padlines are gone, ant the jumping back is completely off (from
first r in return() it jumps to the third # in the last logList()).

Hope this helps,

Rainer




 It would be really nice, if it would be possible to put the cursor on
 the same line, preferably same character? But it is definitely usable
 like this for debugging.


 * example
   :PROPERTIES:
   :tangle:   yes
   :comments: link
   :END:

 The required headers.
 #+name: header
 #+begin_src C
   #include stdio.h
 #+end_src

 Here is the auxiliary function.
 #+name: auxiliary
 #+begin_src C
   void aux(char* arg){
 printf(first argument: %s\n, arg);
   }
 #+end_src

 Here is the main function.
 #+name: main
 #+begin_src C
   int main(int argc, char *argv[])
   {
 aux(argv[1]);
 return 0;
   }
 #+end_src


 While implementing this change I did notice that this jumping
 functionality only appears to work with linked code blocks, 

 linked code blocks? Do you mean the header argument 

Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Michael Strey
Hi everyone,

Just for completeness

Carsten Dominik carsten.domi...@gmail.com writes:

[...]

 Possibilities:
 1. We could change the parser to ignore lists where the first
item does not start with `1.' or `a)'.  But this would
be a pretty serious change.

 2. We could implement a good function that could find problematic
cases, so that they can be fixed by hand.  This is basically
what Nick proposed - only it would be implemented in Lisp.

 3. We could implement a function that finds and fixes such issues.
It would basically scan the buffer and find lists that have
only a single item, not starting with 1, and change the wrapping
to fix it.

4. Define that lists alway have to have a newline in front of them.

5. Define that lists always have to be indented.


My favourite would be 4.


Michael Strey
-- 
mailto:mst...@strey.biz
http://www.strey.biz



Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Carsten Dominik

On 3 jun. 2013, at 11:54, Michael Strey mst...@strey.biz wrote:

 Hi everyone,
 
 Just for completeness
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 [...]
 
 Possibilities:
 1. We could change the parser to ignore lists where the first
   item does not start with `1.' or `a)'.  But this would
   be a pretty serious change.
 
 2. We could implement a good function that could find problematic
   cases, so that they can be fixed by hand.  This is basically
   what Nick proposed - only it would be implemented in Lisp.
 
 3. We could implement a function that finds and fixes such issues.
   It would basically scan the buffer and find lists that have
   only a single item, not starting with 1, and change the wrapping
   to fix it.
 
 4. Define that lists alway have to have a newline in front of them.
 
 5. Define that lists always have to be indented.


Hi Michael,

I think this would break too many legacy Org files.  It would
also cause problems for sublist, so you could no longer
make compact deep lists.

But thanks for the input.

- Carsten

 
 
 My favourite would be 4.
 
 
 Michael Strey
 -- 
 mailto:mst...@strey.biz
 http://www.strey.biz




Re: [O] XeLaTeX and the new exporter

2013-06-03 Thread Christopher Witte
Sure, I'll give it a try, but I might not get around to it for a few days.

Cheers,
Chris.


On 1 June 2013 08:43, Carsten Dominik carsten.domi...@gmail.com wrote:

 Hi Christopher,

 Would you like to provide a patch?

 - Carsten

 On 31.5.2013, at 09:58, Christopher Witte ch...@witte.net.au wrote:

 Sorry for the late reply.

 I'm not entirely sure either, I pretty much just blindly followed the
 instructions on the FAQ.  I don't think this is at all the minimum you need
 to get xelatex working, it also sets up a few other things.  For instance
 it used latexmk instead of just recompiling a few times.  Perhaps the FAQ
 should be split up into a few different questions:
 1. minimum setup for XeLaTeX, something similar to your setup
 2. how to use latexmk

 Cheers,
 Chris



 On 22 May 2013 19:07, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:

 Hi Christopher,

 On Tue, May 07, 2013 at 05:42:04PM +0200, Christopher Witte wrote:
 
  I had export working using XeLaTeX using the instructions from the
  FAQhttp://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export
 (with
  some slight modifications), but after upgrading to the new export it
  isn't working.  It appears the hook
  org-export-latex-after-initial-vars-hook isn't defined anymore.
 
  Any advice on what I need to change to get it to work?

 I have noticed discussions on this before and I fail to understand the
 need for all the setup mentioned in the above Worg entry.  I use XeLaTeX
 almost exclusively, and all I have is something like this:

   ;;; XeLaTeX customisations
   ;; remove inputenc from default packages as it clashes with xelatex
   (setf org-latex-default-packages-alist
 (remove '(AUTO inputenc t) org-latex-default-packages-alist))

   (add-to-list 'org-latex-packages-alist '( xltxtra t))
   ;; choose Linux Libertine O as serif and Linux Biolinum O as sans-serif
 fonts
   (add-to-list 'org-latex-packages-alist '( libertineotf t))

   ;; org to latex customisations, -shell-escape needed for minted
   (setq org-export-dispatch-use-expert-ui t ; non-intrusive export
 dispatch
 org-latex-pdf-process   ; for regular export
 '(xelatex -shell-escape -interaction nonstopmode
 -output-directory %o %f
   xelatex -shell-escape -interaction nonstopmode
 -output-directory %o %f
   xelatex -shell-escape -interaction nonstopmode
 -output-directory %o %f))

 For beamer export I add this line:

   #+LaTeX_HEADER: \setsansfont{Linux Biolinum O}

 So far I have not encountered any problems.  Although I have to say, I
 do not use unicode in mathmode.

 I am curious to know why others need all this elaborate setup to use
 XeLaTeX.

 Cheers,

 --
 Suvayu

 Open source is the future. It sets us free.






[O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Marcin Borkowski
Hi list,

basically the subject has it.  While :=string(asdf)
works, :=string(Σ) does not.  I suspect the reason is that this is
not an ASCII symbol.  Is there a way to get around this problem?

(My use case is a row which should show the sum the columns, and I
wanted the sigma in the first column.  I don't *need* it very badly,
and I could get away with TeX-like \Sigma, but maybe there's some neat
trick to get the Unicode one?)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Jambunathan K
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 I could get away with TeX-like \Sigma, but maybe there's some neat
 trick to get the Unicode one?)

Use TeX as an input method and enter \Sigma.  That's it.

http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00022.html



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Michael Brand
Hi Marcin

On Mon, Jun 3, 2013 at 12:53 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:
 basically the subject has it.  While :=string(asdf)
 works, :=string(Σ) does not.  I suspect the reason is that this is
 not an ASCII symbol.  Is there a way to get around this problem?

The function string of Calc does not support characters above 127,
see towards the end of
(info (calc) Strings)
or
http://www.gnu.org/software/emacs/manual/html_node/calc/Strings.html

If I understand your example you can use just

| item | value |
|--+---|
| a| 1 |
| b| 2 |
|--+---|
| ∑| 3 |
#+TBLFM: @$2 = vsum(@I..@)

or

| item | value |
|--+---|
| a| 1 |
| b| 2 |
|--+---|
|  | ∑ = 3 |
#+TBLFM: @$2 = vsum(@I..@); ∑ = %d

Michael



Re: [O] A simple way to search only headlines

2013-06-03 Thread Xebar Saram
Thx Seb and Tassilo

That's great ,i appreciate it!

Seb, is there a way to quick bind a key to the above series of commands?

best

Z


On Mon, Jun 3, 2013 at 3:48 AM, Sebastien Vauban sva-n...@mygooglest.comwrote:

 Tassilo Horn wrote:
  Xebar Saram zelt...@gmail.com writes:
 
  i was wondering if anyone knew of a way to search for text only in
  headlines and not the whole document? if not is it something one can
  put a feature request for?
 
  Use regular expression search or isearch.  The latter would be:
 
C-u C-s \*+.*your-search-prase

 Or, for a pure Org solution:

   C-c a  s *salsa dance

 searches for terms appearing only *in the headline* (including tags).

 Best regards,
   Seb

 --
 Sebastien Vauban





Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Marcin Borkowski
Dnia 2013-06-03, o godz. 14:18:33
Michael Brand michael.ch.br...@gmail.com napisał(a):

 Hi Marcin
 
 On Mon, Jun 3, 2013 at 12:53 PM, Marcin Borkowski
 mb...@wmi.amu.edu.pl wrote:
  basically the subject has it.  While :=string(asdf)
  works, :=string(Σ) does not.  I suspect the reason is that this is
  not an ASCII symbol.  Is there a way to get around this problem?
 
 The function string of Calc does not support characters above 127,
 see towards the end of
 (info (calc) Strings)
 or
 http://www.gnu.org/software/emacs/manual/html_node/calc/Strings.html
 
 If I understand your example you can use just
 
 | item | value |
 |--+---|
 | a| 1 |
 | b| 2 |
 |--+---|
 | ∑| 3 |
 #+TBLFM: @$2 = vsum(@I..@)

Well, I forgot to mention that the first column has a column formula
(something like =@-1+1, so that I get row numbering).  I should
probably use a range formula instead.

 
 or
 
 | item | value |
 |--+---|
 | a| 1 |
 | b| 2 |
 |--+---|
 |  | ∑ = 3 |
 #+TBLFM: @$2 = vsum(@I..@); ∑ = %d

That's interesting, thanks!

 
 Michael

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Marcin Borkowski
Dnia 2013-06-03, o godz. 17:31:17
Jambunathan K kjambunat...@gmail.com napisał(a):

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:
 
  I could get away with TeX-like \Sigma, but maybe there's some neat
  trick to get the Unicode one?)
 
 Use TeX as an input method and enter \Sigma.  That's it.
 
 http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00022.html
 

The point is, I do not want to export the table, just use/display it in
Org.  So \Sigma doesn't look very cool (though, as I said, I could
live with it.)

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Marcin Borkowski
Dnia 2013-06-03, o godz. 14:29:22
Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a):

 Dnia 2013-06-03, o godz. 17:31:17
 Jambunathan K kjambunat...@gmail.com napisał(a):
 
  Marcin Borkowski mb...@wmi.amu.edu.pl writes:
  
   I could get away with TeX-like \Sigma, but maybe there's some neat
   trick to get the Unicode one?)
  
  Use TeX as an input method and enter \Sigma.  That's it.
  
  http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00022.html
  
 
 The point is, I do not want to export the table, just use/display it
 in Org.  So \Sigma doesn't look very cool (though, as I said, I
 could live with it.)
 

Sorry, I misread your answer.  My problem is not in *entering* sigma (I
used C-x 8 RET and the unicode name, though the TeX input method is
also a viable solution); the problem was connected with my column
formula messing up with my sigma, and I wanted it to be entered by a
field formula.

Thanks anyway,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Bastien
Hi Marcin,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 The point is, I do not want to export the table, just use/display it in
 Org.  So \Sigma doesn't look very cool (though, as I said, I could
 live with it.)

Use C-x RET C-\ TeX RET to select TeX as the input method, then
type \Sigma to insert the character.

-- 
 Bastien



Re: [O] How to put a Greek sigma into the spreadsheet?

2013-06-03 Thread Michael Brand
Hi Marcin

On Mon, Jun 3, 2013 at 2:28 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:
 Well, I forgot to mention that the first column has a column formula
 (something like =@-1+1, so that I get row numbering).  I should
 probably use a range formula instead.

Yes, exactly.

Michael



[O] Properties automatic visibility

2013-06-03 Thread Marcin Borkowski
Hi list,

I'm still struggling with Org spreadsheet; it's quite awesome, but I'm
not (yet) used to it.  My question is: I want my table to compute
something using a few numbers as data.  I enter these numbers as
properties in the table's entry; however, I'd prefer them to be visible
when I press TAB on the entry's headline; currently, I have to press
TAB also on the :PROPERTIES: drawer.  Is it possible?  Maybe
the :VISIBILITY: property might get another possible value, like
allsodrawers or something?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] Variable table length

2013-06-03 Thread Marcin Borkowski
Hello again,

and one more question.  I'd like to use Org's spreadsheet to create an
amortization schedule for a loan.  It would be best if the number of
rows (excluding the header and footer row) could be variable ande.g.
derived from some property.  Is it possible in Org?  If so, how?

Regards,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] Other question concerning org-babel-tangle-jump-to-org

2013-06-03 Thread Rainer M Krug

Would it be possible, that the function does not open a new window when
executed, but uses the same window the tangled file is in? I am using
org for literate programming in R (ESS): 
- R console left window 
- when there is an error, I jump to the R file in the right window and
call there org-babel-tangle-jump-to-org and the org file is opened in
the left window. It would be easier for debugging, if it would open in
the right window, where the R file is already open.

Would that be possible?

Thanks,

Rainer


-- 
Rainer M. Krug

email: RMKrugatgmaildotcom


pgpbenBzb5w6y.pgp
Description: PGP signature


Re: [O] Variable table length

2013-06-03 Thread Michael Brand
Hi Marcin

On Mon, Jun 3, 2013 at 2:54 PM, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:
 and one more question.  I'd like to use Org's spreadsheet to create an
 amortization schedule for a loan.  It would be best if the number of
 rows (excluding the header and footer row) could be variable ande.g.
 derived from some property.  Is it possible in Org?  If so, how?

This is not possible. At least checking the number of rows is possible
with vlen(@I..@) or similar.

I would use one row per payback and manually add/remove rows until the
last row is the only one with a different sign for the floating loan.

Michael



Re: [O] [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-03 Thread Rasmus
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Hello Rasmus,

 Rasmus wrote:
 1.  As far as I remember, if more than one language is loaded the
 order is not neutral one one should issue a \selectlanguage{LANG}.

 If there are multiple languages, the main language is the latest loaded; that
 is `english' in the following example:

 \RequirePackage[frenchb,english]{babel}

So if a #+LANGUAGE: LANG cookie is present I guess it should be loaded
last.  Or a \selectlanguage{LANG} should be issued.

Non-rigorous testing suggests that it will do the former now on master
and thus presumably also in the patch.

–Rasmus

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




Re: [O] [patch][ox-koma-letter] Support for to and from headings

2013-06-03 Thread Rasmus
Rasmus ras...@gmx.us writes:

 Hi,

 Some more patches that should work against the master branch.

 Patch 1: bug fixes.  Most notably use symbols some places rather than
 strings.

 Patch 2 adds support for TO and FROM headings.  If you've got time for
 testing I would appreciate feedback.  It's explained in the top of the
 patch.

Patch 1 and 2 are updated.  Patch three adds support for an
`org-koma-letter-default-class' and a plug-in function to make it
easier to use letters.  They should apply against master.

–Rasmus

--
If you can mix business and politics wonderful things can happen!
From 4c993600fb032e91a0122520a1e41c0f8d1caade Mon Sep 17 00:00:00 2001
From: rasmus.pank rasmus.p...@gmail.com
Date: Mon, 27 May 2013 17:29:14 +0200
Subject: [PATCH 1/3] Bug fixes for ox-koma-letter.el

* ox-koma-letter.el: If tag wasn't given a headline could cause
  trouble.
* ox-koma-letter.el: bug in subject-format defcustom.
* ox-koma-letter.el: some newline changes
* ox-koma-letter.el: changed varioues quoted things to symbols.
* ox-koma-letter.el: updated documentation in the top of the file.
---
 contrib/lisp/ox-koma-letter.el | 106 +++--
 1 file changed, 71 insertions(+), 35 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 4af0ba7..f1b18bf 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -33,12 +33,37 @@
 ;;
 ;; On top of buffer keywords supported by `latex' back-end (see
 ;; `org-latex-options-alist'), this back-end introduces the following
-;; keywords: CLOSING (see `org-koma-letter-closing'), FROM_ADDRESS
-;; (see `org-koma-letter-from-address'), LCO (see
-;; `org-koma-letter-class-option-file'), OPENING (see
-;; `org-koma-letter-opening'), PHONE_NUMBER (see
-;; `org-koma-letter-phone-number'), SIGNATURE (see
-;; `org-koma-letter-signature') and TO_ADDRESS.
+;; keywords:
+;;   - CLOSING (see `org-koma-letter-closing'),
+;;   - FROM_ADDRESS (see `org-koma-letter-from-address'),
+;;   - LCO (see `org-koma-letter-class-option-file'),
+;;   - OPENING (see `org-koma-letter-opening'),
+;;   - PHONE_NUMBER (see `org-koma-letter-phone-number'),
+;;   - SIGNATURE (see `org-koma-letter-signature')
+;;   - PLACE (see `org-koma-letter-place')
+;;   - and TO_ADDRESS.
+;;
+;; A number of OPTIONS settings can be set to change which contents is exported.
+;;   - backaddress (see `org-koma-letter-use-backaddress')
+;;   - foldmarks (see `org-koma-letter-use-foldmarks')
+;;   - phone (see `org-koma-letter-use-phone')
+;;   - email (see `org-koma-letter-use-email')
+;;   - place (see `org-koma-letter-use-place')
+;;   - subject, a list of format options
+;; (see `org-koma-letter-subject-format')
+;;   - after-closing-order, a list of ordering after letter
+;; (see `org-koma-letter-special-tags-after-closing')
+;;   - after-letter-order, as above
+;; (see `org-koma-letter-special-tags-after-letter').
+;;
+;; The following variables works differently from the main LaTeX class
+;;   - AUTHOR: default to user-full-name but may be disabled.  (see org-koma-letter-author),
+;;   - EMAIL: same as AUTHOR, (see org-koma-letter-email),
+;;
+;; Headlines are in general ignored.  However, headlines with special
+;; tags can be used for specified contents like postscript (ps), carbon
+;; copy (cc), commencements (encl) and code to be inserted after
+;; \end{letter} (after_letter).
 ;;
 ;; You will need to add an appropriate association in
 ;; `org-latex-classes' in order to use the KOMA Scrlttr2 class.  For
@@ -93,7 +118,7 @@ string.
   :type '(radio (function-item user-full-name)
 		(string)
 		(function)
-		(const nil)))
+		(const :tag Do not export author nil)))
 
 (defcustom org-koma-letter-email 'org-koma-letter-email
   The sender's email address.
@@ -105,7 +130,7 @@ function may be given.  Functions must return a string.
   :type '(radio (function-item org-koma-letter-email)
 		(string)
 		(function)
-		(const nil)))
+		(const :tag Do not export email nil)))
 
 (defcustom org-koma-letter-from-address nil
   Sender's address, as a string.
@@ -153,17 +178,19 @@ writing the following values are allowed:
 
 Please refer to the KOMA-script manual (Table 4.16. in the
 English manual of 2012-07-22)
-  :type '(set   (const  afteropening)
-		(const  beforeopening)
-		(const  centered)
-		(const  left)
-		(const  right)
-		(const  underlined)
-		(const  titled)
-		(const  untitled)
-		(const :tag No export nil)
-		(const :tag Default options t)
-		(string))
+  :type '(radio
+	  (const :tag No export nil)
+	  (const :tag Default options t)
+	  (set :tag selection
+	   (const  'afteropening)
+	   (const  'beforeopening)
+	   (const  'centered)
+	   (const  'left)
+	   (const  'right)
+	   (const  'underlined)
+	   (const  'titled)
+	   (const  'untitled))
+	  (string))
   :group 'org-export-koma-letter)
 
 
@@ -198,15 +225,16 @@ Use `foldmarks:true' to activate default fold marks or
   :group 'org-export-koma-letter

Re: [O] [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-03 Thread Sebastien Vauban
Rasmus wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 Rasmus wrote:
 1.  As far as I remember, if more than one language is loaded the
 order is not neutral one one should issue a \selectlanguage{LANG}.

 If there are multiple languages, the main language is the latest loaded; that
 is `english' in the following example:

 \RequirePackage[frenchb,english]{babel}

 So if a #+LANGUAGE: LANG cookie is present I guess it should be loaded
 last.  Or a \selectlanguage{LANG} should be issued.

 Non-rigorous testing suggests that it will do the former now on master
 and thus presumably also in the patch.

AFAICT, this is so since a while. Nicolas implemented the above described
behavior months ago...

See http://lists.gnu.org/archive/html/emacs-orgmode/2012-06/msg00387.html.

Doesn't that work for you already in Org core as it is?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Variable table length

2013-06-03 Thread Michael Brand
Hi Marcin

On Mon, Jun 3, 2013 at 3:38 PM, Michael Brand
michael.ch.br...@gmail.com wrote:
 I would use one row per payback and manually add/remove rows until the
 last row is the only one with a different sign for the floating loan.

Forgot to mention that if you don't need all the intermediate steps
per payback rate then you can of course simply use the annuity
functions from Emacs Calc:
(info (calc) Related Financial Functions)
or
http://www.gnu.org/software/emacs/manual/html_node/calc/Related-Financial-Functions.html

Michael



Re: [O] [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-03 Thread Rasmus
Dear Sebastien,

 1.  As far as I remember, if more than one language is loaded the
 order is not neutral one one should issue a \selectlanguage{LANG}.

 If there are multiple languages, the main language is the latest loaded; 
 that
 is `english' in the following example:

 \RequirePackage[frenchb,english]{babel}

 So if a #+LANGUAGE: LANG cookie is present I guess it should be loaded
 last.  Or a \selectlanguage{LANG} should be issued.

 Non-rigorous testing suggests that it will do the former now on master
 and thus presumably also in the patch.

 AFAICT, this is so since a while. Nicolas implemented the above described
 behavior months ago...

 See http://lists.gnu.org/archive/html/emacs-orgmode/2012-06/msg00387.html.

 Doesn't that work for you already in Org core as it is?

I'm sorry, I guess the changelog is too sparse or too unclear.  Let me
try to annotate it.

** Goal: make  bable work similar to inputenc (and try to be less 'smart') ** 

 * ox-latex.el (org-latex-guess-babel-language): ignore AUTO
 if argument.

I can now add (AUTO babel t) to
org-latex-default-packages-alist—you'll recognize this syntax from
inputenc (see org-latex-default-packages-alist).

This means allows me to load babel every time I export a LaTeX
document.  Babel is important enough that I want I always want to load
it.

Due to the exists of org-export-default-language there is's always a
replacement for AUTO.

Let's consider an example: 

1. Say, org-export-default-language is en.

2. In my document #+LANGUAGE: fr.  Using this patch AUTO is replaced
   by 'french' when I have a LANGUAGE-cookie.  When no LANGUAGE is
   present, it defaults to org-export-default-language.  Thus, I only
   load one language and I can have a more general
   org-latex-default-packages-alist.

 * ox-latex.el (org-lat ex-guess-babel-language): use language
 if is not in =`org-latex-inputenc-alist'=.

Let's just continue the example above, but suppose I now want to write
a German document.

For instance with German there is both german and ngerman, and
apparently a germanb.  Through the LANGUAGE-cookie I can only get
ngerman (de-de) and germanb (de).  But I might want to get german for
whatever reason.  So I might try

#+LANGUAGE: german

Currently it's discarded.  But why not just pass it along when the
value of LANGUAGE is not in org-latex-babel-language-alist and assume
I know what I am doing?

 * ox-latex.el (org-latex-guess-babel-language): retain case in final
 regexp of function.

Needed for AUTO to replacing everything with uppercase.


I hope the above makes the purpose of the patch clear.  I'll try to
write better change logs in the future.

 Behavior changes:
 1.  =(AUTO babel t)= works like (AUTO inputenc t) in
   =`org-latex-default-packages-alist'=. I.e. the default
   language is choosen (sic).
 2. if #+LANGUAGE: mylang then then \usepackage[mylang]{babel} in
   outpu (sic). 

This message in five line. . .  

Cheers,
Rasmus

-- 
m-mm-mmm- bacon!




[O] [patch] Add functions, which can quickly insert org-contacts template(s) in current buffer

2013-06-03 Thread Feng Shu
From 6080af9fa0183bde6946cd7036d4b30937a10a39 Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Mon, 3 Jun 2013 23:17:57 +0800
Subject: [PATCH] Quickly insert (a) template(s) in current buffer

* contrib/lisp/org-contacts.el (org-contacts-build-template-with-exist-contact):Build
a contact template with exist contact, It is useful when you want to update exist contact(s).
(org-contacts-build-template-with-string): Build contact template with
a string, It is useful when you want to add a new contact.
(org-contacts-insert-template): Insert contact template(s) at point,
the template(s) will be built with the input string and exist contacts
informations.

Add a new function, which can quickly insert (a) contact templete(s),
the templete(s) are built using user's input and the exist contacts information.
---
 contrib/lisp/org-contacts.el |   49 ++
 1 个文件被修改,插入 49 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index ffd17a1..84c4473 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -951,6 +951,55 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-build-template-with-exist-contact (contact)
+  Build a contact template with exist contact, It is useful
+when you want to update exist contact(s).
+  (let* ((properties (caddr contact))
+	 (name (org-contacts-vcard-escape (car contact)))
+	 (n (org-contacts-vcard-encode-name name))
+	 (alias (cdr (assoc-string org-contacts-alias-property properties
+(concat **  name \n
+	:PROPERTIES:\n
+	: org-contacts-alias-property :  alias \n
+	: org-contacts-note-property :\n
+	: org-contacts-email-property :\n
+	: org-contacts-tel-property :\n
+	: org-contacts-ignore-property :\n
+	:END:\n\n)))
+
+(defun org-contacts-build-template-with-string (string)
+  Build contact template with a string, It is useful
+when you want to add a new contact.
+  (concat **  string \n
+	  :PROPERTIES:\n
+	  : org-contacts-alias-property :  string \n
+	  : org-contacts-note-property :\n
+	  : org-contacts-email-property :\n
+	  : org-contacts-tel-property :\n
+	  : org-contacts-ignore-property :\n
+	  :END:\n\n))
+
+(defun org-contacts-insert-template (string)
+  Insert contact template(s) at point, the template(s) will be built
+with the input string and exist contacts informations.
+  (interactive (list (read-string Name or Alias: )))
+  (let ((point (point))
+(contact-list
+	 (delete-dups (nconc
+		   (org-contacts-filter
+			nil nil
+			(cons org-contacts-alias-property string))
+		   (org-contacts-filter string)
+(current-buffer)
+(let ((inhibit-read-only t)))
+(fundamental-mode)
+(when (fboundp 'set-buffer-file-coding-system)
+  (set-buffer-file-coding-system coding-system-for-write))
+(loop for contact in contact-list
+	  do (insert (org-contacts-build-template-with-exist-contact contact)))
+(if contact-list nil (insert (org-contacts-build-template-with-string string)))
+(goto-char point)))
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4



-- 


[O] bug in new exporter

2013-06-03 Thread Marvin Doyley
Hi there, 

When I include the following in my org file

#+attr_latex: scale=1.5, placement =[htb!]
[[file:img/figure2.eps]]

This was exported as


\begin{figure}[htb]
\centering
\includegraphcis[width=0.9\linewidth]{img/figure2.eps}
\end{figure}

rather than


\begin{figure}[htb!]
\centering
\includegraphcis[scale=1.5]{img/figure2.eps}
\end{figure}

I think there is a bug.

Thanks,
M




Re: [O] [PATCH] Respect org-export-babel-evaluate on export

2013-06-03 Thread Eric Schulte
Christopher Allan Webber cweb...@dustycloud.org writes:

 Hiya,

 I was running into troubles where regardless of my setting on
 org-export-babel-evaluate, it was evaluating babel code anyway.  Here's
 a patch that seems to fix this.

 For convenience: I've signed the emacs/orgmode papers already.


Can you send an minimal example in which evaluation takes place on
export?

Thanks,

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



Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Samuel Wales
Hi Carsten,

On 6/3/13, Carsten Dominik carsten.domi...@gmail.com wrote:
 4. Define that lists alway have to have a newline in front of them.

I presume Michael means blank line.  I like this.

 5. Define that lists always have to be indented.

I like this also, and have long wanted c-c - on a region to indent the
resulting list, but have not figured out how to implement it.

 Hi Michael,

 I think this would break too many legacy Org files.  It would

How about making it optional?  Was there a time when it was already
optional?  ISTR regexps for lists.

 also cause problems for sublist, so you could no longer
 make compact deep lists.

  - do you
 mean
 - like this?

That is already in a list context?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.



Re: [O] bug in new exporter

2013-06-03 Thread Rasmus

Hi Marvin,

Marvin Doyley m.doy...@rochester.edu writes:

 Hi there, 

 When I include the following in my org file

 #+attr_latex: scale=1.5, placement =[htb!]
 [[file:img/figure2.eps]]

The syntax changes.  Something like this might give you what you want.

#+ATTR_LATEX: :placement [htb!] :options scale=1.5 
#+CAPTION: a float needs a caption
[[file:fig.pdf]]

do check out:

  http://orgmode.org/org.html#LaTeX-specific-attributes

From the source code, ox-latex.el, you should be able to get it to
accept placement without square brackets.  It should also be possible
to set something like htb! as the default value of floats, if you so
desire.  Check the variable org-latex-default-figure-position.

–Rasmus


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




[O] [patch] [2update] Add functions, which can quickly insert org-contacts template(s) in current buffer

2013-06-03 Thread Feng Shu
From 938c2d0e3eb04faf2fd9708a382da9bac43d0bf9 Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Mon, 3 Jun 2013 23:17:57 +0800
Subject: [PATCH] Quickly insert (a) template(s) in current buffer

* contrib/lisp/org-contacts.el (org-contacts-build-template-with-exist-contact):Build
a contact template with exist contact, It is useful when you want to update exist contact(s).
(org-contacts-build-template-with-string): Build contact template with
a string, It is useful when you want to add a new contact.
(org-contacts-insert-template): Insert contact template(s) at point,
the template(s) will be built with the input string and exist contacts
informations.

Add a new function, which can quickly insert (a) contact templete(s),
the templete(s) are built using user's input and the exist contacts information.
---
 contrib/lisp/org-contacts.el |   48 ++
 1 个文件被修改,插入 48 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index ffd17a1..78e7fef 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -951,6 +951,54 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-build-template-with-exist-contact (contact)
+  Build a contact template with exist contact, It is useful
+when you want to update exist contact(s).
+  (let* ((properties (caddr contact))
+	 (name (org-contacts-vcard-escape (car contact)))
+	 (n (org-contacts-vcard-encode-name name))
+	 (alias (cdr (assoc-string org-contacts-alias-property properties
+(concat **  name \n
+	:PROPERTIES:\n
+	: org-contacts-alias-property :  alias \n
+	: org-contacts-note-property :\n
+	: org-contacts-email-property :\n
+	: org-contacts-tel-property :\n
+	: org-contacts-ignore-property :\n
+	:END:\n\n)))
+
+(defun org-contacts-build-template-with-string (string)
+  Build contact template with a string, It is useful
+when you want to add a new contact.
+  (concat **  string \n
+	  :PROPERTIES:\n
+	  : org-contacts-alias-property :  string \n
+	  : org-contacts-note-property :\n
+	  : org-contacts-email-property :\n
+	  : org-contacts-tel-property :\n
+	  : org-contacts-ignore-property :\n
+	  :END:\n\n))
+
+(defun org-contacts-insert-template (string)
+  Insert contact template(s) at point, the template(s) will be built
+with the input string and exist contacts informations.
+  (interactive (list (read-string Name or Alias: )))
+  (let ((point (point))
+(contact-list
+	 (delete-dups (nconc
+		   (org-contacts-filter
+			nil nil
+			(cons org-contacts-alias-property string))
+		   (org-contacts-filter string)
+(current-buffer)
+(let ((inhibit-read-only t)))
+(when (fboundp 'set-buffer-file-coding-system)
+  (set-buffer-file-coding-system coding-system-for-write))
+(loop for contact in contact-list
+	  do (insert (org-contacts-build-template-with-exist-contact contact)))
+(if contact-list nil (insert (org-contacts-build-template-with-string string)))
+(goto-char point)))
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4


-- 


Re: [O] [PATCH] Respect org-export-babel-evaluate on export

2013-06-03 Thread Christopher Allan Webber
Here's such a file.  The exact contents of it don't really matter.

What's significant is you should see a lol appear in your *Messages*
buffer... which shouldn't happen when exporting to anything while
  (setq org-export-babel-evaluate nil)

* Statistics

*** Last month's graph

#+name: org-diet-graph-month
#+headers: :var data=org-diet-info()
#+begin_src gnuplot :file /tmp/weight_month.png
  reset
  set xdata time
  set ylabel weight (in pounds)
  set timefmt %Y-%m-%d
  set term pngcairo font Sans,10 dashed
  plot data using 1:2 with lines lt 3 title weight,\
   data using 1:3 with lines lw 3 lt 1 title average weight
#+end_src

#+results: org-diet-graph-month
[[file:/tmp/weight_month.png]]

** Support funcs

#+name: org-diet-info
#+begin_src emacs-lisp
  (message lol)
  '((2013-05-17 216.4 217.23 80%)
(2013-05-19 217.4 217.03 80%)
(2013-05-20 218.0 217.13 90%)
(2013-05-21 218.0 217.36 90%)
(2013-05-22 217.0 217.24 90%)
(2013-05-23 217.0 217.13 90%)
(2013-05-24 217.0 217.33 90%)
(2013-05-25 215.0 217.09 90%)
(2013-05-26 213.8 216.62 90%)
(2013-05-27 216.4 216.62 90%)
(2013-05-28 216.4 216.60 100%)
(2013-05-29 215.8 216.44 100%)
(2013-05-30 215.8 216.22 100%)
(2013-06-03 215.6 215.54 70%))
#+end_src

#+RESULTS: org-diet-info
| 2013-05-17 | 216.4 | 217.23 |  80% |
| 2013-05-19 | 217.4 | 217.03 |  80% |
| 2013-05-20 | 218.0 | 217.13 |  90% |
| 2013-05-21 | 218.0 | 217.36 |  90% |
| 2013-05-22 | 217.0 | 217.24 |  90% |
| 2013-05-23 | 217.0 | 217.13 |  90% |
| 2013-05-24 | 217.0 | 217.33 |  90% |
| 2013-05-25 | 215.0 | 217.09 |  90% |
| 2013-05-26 | 213.8 | 216.62 |  90% |
| 2013-05-27 | 216.4 | 216.62 |  90% |
| 2013-05-28 | 216.4 | 216.60 | 100% |
| 2013-05-29 | 215.8 | 216.44 | 100% |
| 2013-05-30 | 215.8 | 216.22 | 100% |
| 2013-06-03 | 215.6 | 215.54 |  70% |

Eric Schulte writes:

 Christopher Allan Webber cweb...@dustycloud.org writes:

 Hiya,

 I was running into troubles where regardless of my setting on
 org-export-babel-evaluate, it was evaluating babel code anyway.  Here's
 a patch that seems to fix this.

 For convenience: I've signed the emacs/orgmode papers already.


 Can you send an minimal example in which evaluation takes place on
 export?

 Thanks,



[O] How to omit h1 title heading in HTML export?

2013-06-03 Thread *
Dear list

When exporting an Org-mode file to HTML, I have noticed the following:
the first child of the div with id=content is an h1 heading enclosing
the filename (minus extension), or the value of TITLE keyword.

How can I keep HTML export from producing this h1 heading?

For instance say I have a homepage.org file, and that I export this
file to HTML with default settings. In the exported HTML file, I would
find the following snippet:

body
div id=content
h1 class=titlehomepage/h1
div id=table-of-contents

For what I'm doing, it would be better if the exported file didn't
include the line
h1 class=titlehomepage/h1

How can I tell HTML export to not put this line in the file that it produces?

At the moment my fix is some CSS...
div#content  h1:first-child { display: none; }

I'm using Org-mode version 8.0.3, Emacs 24.3.1

Best...



Re: [O] bug in new exporter

2013-06-03 Thread Marvin Doyley
Hi Rasmus,

It is still not behaving properly

#+ATTR_LATEX: :options scale=2

[[file:fig.pdf]]

yields

\begin{figure}[htb]
\centering
\includegraphics[scale=2,width=.9\linewidth]{fig.pdf}
\end{figure}


which is still not quite right, including option, this still doesn't remove the 
extra width =0.9\linewidth :(

cheers
M


[O] cached tangling

2013-06-03 Thread Jeffrey Brent McBeth
I have not been able to find a way to cache the results of a tangle.
I typically have a date+tree with lots of code snippets for ledger.  I'm 
giving an example code snippet below

* 2013 :noexport:
** 2013-05 May
*** 2013-05-23 Thursday
#+name: foo
#+begin_src ledger
2013-05-23 * Silly Stuff
 Expenses:Time Waster  $42
 Assets:Bank
#+end_src
*** 2013-05-24 Friday
#+name: foo
#+begin_src ledger
2013-05-24 * More Dumb Spending
 Expenses:Time Waster  $69
 Assets:Cash
#+end_src
#+name: bar
#+begin_src ledger
2013-05-24 * Business Stuff
 Expenses:BB Stacking  $11.38
 Assets:Business:Checking
#+end_src

* Results
** Nothing :noexport:
#+name: everything
#+begin_src ledger
foo
bar
#+end_src
** Balance
#+name: exampleBalance
#+begin_src ledger :cmdline balance :noweb yes :exports results
everything
#+end_src 
** Register
#+name: exampleRegister
#+begin_src ledger :cmdline reg :noweb yes :exports results
everything
#+end_src
** Just Bank
#+name: exampleBalanceBank
#+begin_src ledger :cmdline balance Bank :noweb yes :exports results
everything
#+end_src

What I'm wondering is if there is a way to get babel to tangle the named block 
everything once, and then run all the ledger commands on that one file.  
Maybe it already does it, and I'm a fool, but it from a visceral timing 
perspective it feels like it is in serial tangling, running ledger, inserting 
the text, deleting the results of the tangle, then rinsing and repeating.

If the secret is to rearrange how I do things, I'm happy to do that a little 
bit.
-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] bug in new exporter

2013-06-03 Thread Nick Dokos
Rasmus ras...@gmx.us writes:

 Hi Marvin,

 Marvin Doyley m.doy...@rochester.edu writes:

 Hi there, 

 When I include the following in my org file

 #+attr_latex: scale=1.5, placement =[htb!]
 [[file:img/figure2.eps]]

 The syntax changes.  Something like this might give you what you want.

 #+ATTR_LATEX: :placement [htb!] :options scale=1.5 
 #+CAPTION: a float needs a caption
 [[file:fig.pdf]]


One thing that I couldn't figure out is how to get rid of the width
specification altogether. I can change the default
[...,width=0.9\textwidth] with something like

  :width 10cm

but if I scale the image (presumably by trial and error until
it looks good to my eye), then I want to turn off the width
option altogether (afaict, latex treats [scale=1.5,width=10cm]
as [width=10cm] - scale is not considered at all, hence my desire
to turn off width.)

I tried

  :width nil

and

  :width

In these cases, I get the default. The code looks like this

--8---cut here---start-8---
 (width (cond ((plist-get attr :width))
  ((plist-get attr :height) )
  ((eq float 'wrap) 0.48\\textwidth)
  (t org-latex-image-default-width)))
--8---cut here---end---8---

and in these cases the plist-get returns nil, so the t clause
triggers.

I also tried 

  :width 

which fails with a

Wrong type argument: stringp, nil

in this call (and I haven't chased it further):

--8---cut here---start-8---
 (attr (org-export-read-attribute :attr_latex parent))
--8---cut here---end---8---


Is it possible to eliminate ``width'' from the options?

 do check out:

   http://orgmode.org/org.html#LaTeX-specific-attributes

 From the source code, ox-latex.el, you should be able to get it to
 accept placement without square brackets. 

I don't understand: what do you mean? AFAICT, you *have* to say 

 :placement [htb!]

*including* the square brackets, because the first clause of the cond
triggers and that does not include the square brackets:

--8---cut here---start-8---
(cond (place (format %s place))
  ((eq float 'wrap) {l}{0.5\\textwidth})
  ((eq float 'figure)
   (format [%s] org-latex-default-figure-position))
  (t 
--8---cut here---end---8---


 It should also be possible
 to set something like htb! as the default value of floats, if you so
 desire.  Check the variable org-latex-default-figure-position.


OTOH, here you don't want to include the square brackets because the
format *does* add them. That seems to be a slight inconsistency.

Org-mode version 8.0.3 (release_8.0.3-173-gd200d0 @ 
/home/nick/elisp/org-mode/lisp/)
-- 
Nick




Re: [O] Variable table length

2013-06-03 Thread Marcin Borkowski
Dnia 2013-06-03, o godz. 16:32:20
Michael Brand michael.ch.br...@gmail.com napisał(a):

 Hi Marcin
 
 On Mon, Jun 3, 2013 at 3:38 PM, Michael Brand
 michael.ch.br...@gmail.com wrote:
  I would use one row per payback and manually add/remove rows until
  the last row is the only one with a different sign for the floating
  loan.
 
 Forgot to mention that if you don't need all the intermediate steps
 per payback rate then you can of course simply use the annuity
 functions from Emacs Calc:
 (info (calc) Related Financial Functions)
 or
 http://www.gnu.org/software/emacs/manual/html_node/calc/Related-Financial-Functions.html

Thanks, I am aware of that - but what I want is actually a table (I'm
teaching an introductory course in financial mathematics).

 Michael

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] packing all files linked in a subtree

2013-06-03 Thread Andreas Leha
Hi all,

how would a write a function/source-block, that make a zip file from all
files that are linked from a specific subtree of my orgfile?

I am writing some document in a subtree, that I export to pdf and pass
on.  Additionally, I would like to pass all figures in a separate
subtree.  Now, if I could avoid to list the figures manually, but
extract them dynamically, that would be really helpful.

Regards,
Andreas




Re: [O] Variable table length

2013-06-03 Thread Nick Dokos
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Dnia 2013-06-03, o godz. 16:32:20
 Michael Brand michael.ch.br...@gmail.com napisał(a):

 Hi Marcin
 
 On Mon, Jun 3, 2013 at 3:38 PM, Michael Brand
 michael.ch.br...@gmail.com wrote:
  I would use one row per payback and manually add/remove rows until
  the last row is the only one with a different sign for the floating
  loan.
 
 Forgot to mention that if you don't need all the intermediate steps
 per payback rate then you can of course simply use the annuity
 functions from Emacs Calc:
 (info (calc) Related Financial Functions)
 or
 http://www.gnu.org/software/emacs/manual/html_node/calc/Related-Financial-Functions.html

 Thanks, I am aware of that - but what I want is actually a table (I'm
 teaching an introductory course in financial mathematics).


Use babel perhaps? Not sure what your inputs are and what your table
should look like but you could use something like this to produce a
skeleton table of the right length and a set of column formulas (nb:
fake ones used below), then C-C C-c on the #+tblfm: line to calculate
the rest of the table:

--8---cut here---start-8---
#+begin_src sh :results raw :var n=20
echo #+name: amorttable
echo |month | interest | principal | balance |
for i in $(seq 1 $n)
do
   echo | $i 
done
echo '#+tblfm: $2 = 2 * $1 :: $3 = 3 * $1 :: $4 = 4 * $1'
#+end_src
--8---cut here---end---8---

-- 
Nick




Re: [O] [html] non-lists showing up as lists

2013-06-03 Thread Alan L Tyree

Carsten Dominik writes:

 Hi everyone.

 As far as I can see, the filling code is already pretty smart about this 
 issue.   The question is then:  What else can we do about it.

After doing some analysis of my problems last night, I agree that
filling is not the issue. All of the instances that I have found in my
own files are the result of pasting in from another file (case law plain
text database or a web page).

 Possibilities:
 1. We could change the parser to ignore lists where the first
item does not start with `1.' or `a)'.  But this would
be a pretty serious change.

 2. We could implement a good function that could find problematic
cases, so that they can be fixed by hand.  This is basically
what Nick proposed - only it would be implemented in Lisp.

 3. We could implement a function that finds and fixes such issues.
It would basically scan the buffer and find lists that have
only a single item, not starting with 1, and change the wrapping
to fix it.

 In any case, some hand work would be involved.
 I think we cannot fix this problem in full generality.  The reason
 is simply that Org is a plain text format and has to be heuristic about
 parsing.  There will always be edge cases like this.

I agree with this, Carsten.  As to the choices, it seems to me that the
only real choices here are between 2 or 3.

I can't imagine ever needing a list with a single item, but there might
be a single list item in a partially completed manuscript, so I guess an
automatic fix should offer the user the option to leave each instance
alone.

For my purposes, either 2 or 3 would be more than satisfactory.

Cheers,
Alan

 Anyone volunteering to write a command that will
 check the buffer and warn about it?  Maybe it could be
 implemented as org-find-next-funny-list-start, so that
 it could be used to search through the whole buffer.

 - Carsten


 On 3 jun. 2013, at 07:45, Alan L Tyree alanty...@gmail.com wrote:

 On 03/06/13 15:40, Samuel Wales wrote:
 I don't recall whether I said I had a filling problem.
 
 Filling is a red herring for my use case.
 
 My point is that regardless of filling, it would be a good idea to be
 stricter about what a list is, for the reasons I listed.  In my use
 case.
 
 Samuel
 
 You're right - you said filling and yanking in your first post.
 
 As I said to Nick, I don't know if my problems stem from filling or not. 
 Just know there are problems and I will track them down when I have a little 
 time.
 
 Cheers,
 Alan
 
 -- 
 Alan L Tyreehttp://www2.austlii.edu.au/~alan
 Tel:  04 2748 6206   sip:172...@iptel.org
 
 


-- 
Alan L Tyree   http://www2.austlii.edu.au/~alan
Tel:  04 2748 6206 sip:172...@iptel.org



Re: [O] bug in new exporter

2013-06-03 Thread Rasmus

 When I include the following in my org file

 #+attr_latex: scale=1.5, placement =[htb!]
 [[file:img/figure2.eps]]

 The syntax changes.  Something like this might give you what you want.

 #+ATTR_LATEX: :placement [htb!] :options scale=1.5 
 #+CAPTION: a float needs a caption
 [[file:fig.pdf]]


 One thing that I couldn't figure out is how to get rid of the width
 specification altogether. 

It's a feature.  We had a lengthy discussion about it a while ago
(myself, Nicholas and Aaron, I believe) 

You can turn it permanently off by issuing

(setq org-latex-image-default-width nil)

I tested the code in my own Emacs and not emacs -q.  To get no width
I do

#+NAME: name
#+ATTR_LATEX: :placement [htb!] :options scale=1.5  :width 
#+CAPTION: a float needs a caption
[[file:signature.pdf]]

becomes:

\begin{figure}[htb!]
\centering
\includegraphics[scale=1.5]{signature.pdf}
\caption{\label{name}a float needs a caption}
\end{figure}

Org-mode version 8.0.3 (release_8.0.3-183-gca9937 @
/usr/share/emacs/site-lisp/org/).



 I also tried 

   :width 

 which fails with a

This should work, though, also given the earlier discussion.  At least
it does for me using the version above and emacs -q.  

 From the source code, ox-latex.el, you should be able to get it to
 accept placement without square brackets. 

 I don't understand: what do you mean? AFAICT, you *have* to say 

  :placement [htb!]

 *including* the square brackets, because the first clause of the cond
 triggers and that does not include the square brackets:

 OTOH, here you don't want to include the square brackets because the
 format *does* add them. That seems to be a slight inconsistency.

Right; thanks I missed that.  Thanks!  This is inconsistent.  It also
seems wrapfig needs {} tho I've never used it. 

Perhaps it could be made more consistent?  At least the variable and
the local arguments should be similar. . . 

–Rasmus

-- 
Need more coffee. . .




Re: [O] bug in new exporter

2013-06-03 Thread Nick Dokos
Rasmus ras...@gmx.us writes:

 One thing that I couldn't figure out is how to get rid of the width
 specification altogether. 

 It's a feature.  We had a lengthy discussion about it a while ago
 (myself, Nicholas and Aaron, I believe) 


Count me confused again: what's the feature? I'll go looking for the
discussion I guess.

 You can turn it permanently off by issuing

 (setq org-latex-image-default-width nil)

 I tested the code in my own Emacs and not emacs -q.  To get no width
 I do

 #+NAME: name
 #+ATTR_LATEX: :placement [htb!] :options scale=1.5  :width 
 #+CAPTION: a float needs a caption
 [[file:signature.pdf]]


OK, I just did an update, did emacs -q with a minimal .emacs and the
ATTR_LATEX line above works. Presumably it would also work with my
previous org-version, but I was trying things in a different order:
if I rearrange the line to

 #+ATTR_LATEX: :width  :placement [htb!] :options scale=1.5  

I get the Wrong argument type error in the current version as well. So
I guess :width has to be after the :options ?!? I don't quite understand the
rules I guess.

Org-mode version 8.0.3 (release_8.0.3-193-g334581 @ 
/home/nick/elisp/org-mode/lisp/)

 I also tried 

   :width 

 which fails with a

 This should work, though, also given the earlier discussion.  At least
 it does for me using the version above and emacs -q.  


Very helpful: thanks for the elucidation!
-- 
Nick




[O] the buffer jumps when save a source code block

2013-06-03 Thread Not To Miss
Hi all,

after opening a source code block in a separate window with C-c ', it's
nice that users can save the original org-mode file buffer when saving the
code buffer. However, sometimes the buffer jumps when saving it. For
example, this snapshot is before saving:
https://www.dropbox.com/s/483ulfb34v3brnh/Screen%20Shot%202013-06-03%20at%203.02.17%20PM.png;
and this buffer scrolls down automatically after saving:
https://www.dropbox.com/s/63tzyki3nejxwmb/Screen%20Shot%202013-06-03%20at%203.02.41%20PM.png

Is this a intended feature? It is kind of annoying to me. how can disable
it?

Thanks,
Zhenjiang


Re: [O] bug in new exporter

2013-06-03 Thread Rasmus
Nick Dokos ndo...@gmail.com writes:

 One thing that I couldn't figure out is how to get rid of the width
 specification altogether. 

 It's a feature.  We had a lengthy discussion about it a while ago
 (myself, Nicholas and Aaron, I believe) 


 Count me confused again: what's the feature? I'll go looking for the
 discussion I guess.

including .9\textwidth when you least expect it is a feature.

See this thread 

http://comments.gmane.org/gmane.emacs.orgmode/69963


 if I rearrange the line to

  #+ATTR_LATEX: :width  :placement [htb!] :options scale=1.5  

 I get the Wrong argument type error in the current version as
 well. 

I can reproduce this here.

 I guess :width has to be after the :options ?!? I don't quite
 understand the rules I guess.

Neither do I in this case.  I'm guessing it has do with the escaping
of  'cause it also fails if you :placement behind width.  

With 

   #+ATTR_LATEX:  :options scale=1.5:width  :placement [htb!]
it fails here
   (attr (org-export-read-attribute :attr_latex parent))
 
which evalues to something like

Result: (:options scale=1.5 :placement [htb!] :width )

when it doesn't crash.

Perhaps, I'll have time to look at it later, but probably Nicolas is
the right guy for the job.

 Very helpful: thanks for the elucidation!

Thanks you to you too!

–Rasmus

-- 
Enough with the bla bla!




Re: [O] [patch] Add a complex org-contacts template to the file header

2013-06-03 Thread Daimrod
Feng Shu tuma...@gmail.com writes:

Thanks for the patch!

It's merged, I've taken the liberty to fix some typos.

Regards,

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


Re: [O] [patch] [2update] Add functions, which can quickly insert org-contacts template(s) in current buffer

2013-06-03 Thread Feng Shu
Feng Shu tuma...@gmail.com writes:

I will change this patch again, hard coding a templates in functions
is not a good way , maybe it is a complex method to  solve a simpe things.

 From 938c2d0e3eb04faf2fd9708a382da9bac43d0bf9 Mon Sep 17 00:00:00 2001
 From: Feng Shu tuma...@gmail.com
 Date: Mon, 3 Jun 2013 23:17:57 +0800
 Subject: [PATCH] Quickly insert (a) template(s) in current buffer

 * contrib/lisp/org-contacts.el 
 (org-contacts-build-template-with-exist-contact):Build
 a contact template with exist contact, It is useful when you want to update 
 exist contact(s).
 (org-contacts-build-template-with-string): Build contact template with
 a string, It is useful when you want to add a new contact.
 (org-contacts-insert-template): Insert contact template(s) at point,
 the template(s) will be built with the input string and exist contacts
 informations.

 Add a new function, which can quickly insert (a) contact templete(s),
 the templete(s) are built using user's input and the exist contacts 
 information.
 ---
  contrib/lisp/org-contacts.el |   48 
 ++
  1 个文件被修改,插入 48 行(+)

 diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
 index ffd17a1..78e7fef 100644
 --- a/contrib/lisp/org-contacts.el
 +++ b/contrib/lisp/org-contacts.el
 @@ -951,6 +951,54 @@ is created and the VCard is written into that buffer.
   (current-buffer)
(progn (save-buffer) (kill-buffer)
  
 +(defun org-contacts-build-template-with-exist-contact (contact)
 +  Build a contact template with exist contact, It is useful
 +when you want to update exist contact(s).
 +  (let* ((properties (caddr contact))
 +  (name (org-contacts-vcard-escape (car contact)))
 +  (n (org-contacts-vcard-encode-name name))
 +  (alias (cdr (assoc-string org-contacts-alias-property properties
 +(concat **  name \n
 + :PROPERTIES:\n
 + : org-contacts-alias-property :  alias \n
 + : org-contacts-note-property :\n
 + : org-contacts-email-property :\n
 + : org-contacts-tel-property :\n
 + : org-contacts-ignore-property :\n
 + :END:\n\n)))
 +
 +(defun org-contacts-build-template-with-string (string)
 +  Build contact template with a string, It is useful
 +when you want to add a new contact.
 +  (concat **  string \n
 +   :PROPERTIES:\n
 +   : org-contacts-alias-property :  string \n
 +   : org-contacts-note-property :\n
 +   : org-contacts-email-property :\n
 +   : org-contacts-tel-property :\n
 +   : org-contacts-ignore-property :\n
 +   :END:\n\n))
 +
 +(defun org-contacts-insert-template (string)
 +  Insert contact template(s) at point, the template(s) will be built
 +with the input string and exist contacts informations.
 +  (interactive (list (read-string Name or Alias: )))
 +  (let ((point (point))
 +(contact-list
 +  (delete-dups (nconc
 +(org-contacts-filter
 + nil nil
 + (cons org-contacts-alias-property string))
 +(org-contacts-filter string)
 +(current-buffer)
 +(let ((inhibit-read-only t)))
 +(when (fboundp 'set-buffer-file-coding-system)
 +  (set-buffer-file-coding-system coding-system-for-write))
 +(loop for contact in contact-list
 +   do (insert (org-contacts-build-template-with-exist-contact contact)))
 +(if contact-list nil (insert (org-contacts-build-template-with-string 
 string)))
 +(goto-char point)))
 +
  (defun org-contacts-show-map (optional name)
Show contacts on a map.
  Requires google-maps-el.
 -- 
 1.7.10.4

-- 



[O] [Help] Look for a exist function to car a contact, Urgent!!!

2013-06-03 Thread Feng Shu

How to get the information test from:

((#(test 0 2 (fontified nil org-category i-contacts))

Thanks!


-- 



Re: [O] mydisk.com down?

2013-06-03 Thread Rasmus
Guido Van Hoecke guivho at gmail.com writes:

  Could it be that mydisk.com is down?

Check isup.me.

 Or about other free WebDAV servers?
 (My Dropbox account is not an option)

OpenShift should do unless you need more than one gb minus installation of
whatever (try OpenCloud).

--Rasmus





Re: [O] [Help] Look for a exist function to car a contact, Urgent!!!

2013-06-03 Thread Nick Dokos
Feng Shu tuma...@gmail.com writes:

 How to get the information test from:

 ((#(test 0 2 (fontified nil org-category i-contacts))

 Thanks!

It's missing a couple of closing parens, but assuming that the opening
parens describe the situation correctly, the following should work:

--8---cut here---start-8---
(setq s '((#(test 0 2 (fontified nil org-category i-contacts)
(substring-no-properties (caar s))
--8---cut here---end---8---

The caar gets to the string-with-properties and the
substring-no-properties gets the string, discarding the properties.

-- 
Nick




Re: [O] [Help] Look for a exist function to car a contact, Urgent!!!

2013-06-03 Thread Feng Shu
Nick Dokos ndo...@gmail.com writes:

 Feng Shu tuma...@gmail.com writes:

 How to get the information test from:

 ((#(test 0 2 (fontified nil org-category i-contacts))

 Thanks!

 It's missing a couple of closing parens, but assuming that the opening
 parens describe the situation correctly, the following should work:
 --8---cut here---start-8---
 (setq s '((#(test 0 2 (fontified nil org-category i-contacts)
 (substring-no-properties (caar s))
 --8---cut here---end---8---

Thanks!

 The caar gets to the string-with-properties and the
 substring-no-properties gets the string, discarding the properties.

-- 



Re: [O] [patch] [3update] Add functions, Insert a exist contact name at point

2013-06-03 Thread Feng Shu
Feng Shu tuma...@gmail.com writes:

 Feng Shu tuma...@gmail.com writes:

 I will change this patch again, hard coding a templates in functions
 is not a good way , maybe it is a complex method to  solve a simpe things.

This is the 3rd patch, which has been changed significantly, 
The function will be useful when used in  org-capture, 

I want it can be included into master when it mature!

But there are some problems, I think it's org-capture's bug or limit:

1. works:
#+begin_example
(c Contacts entry (file ~/org/i-contacts.org)
   * %(org-contacts-get-exist-contact-name-string fengshu))
#+end_example

2. doesn't work
#+begin_example
(c Contacts entry (file ~/org/i-contacts.org)
   * %(org-contacts-get-exist-contact-name-string %^{prompt))
#+end_example


From 06055532dbadbfbcb620378eeec0c5e3c8ee8c0d Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Mon, 3 Jun 2013 23:17:57 +0800
Subject: [PATCH] Insert (a) exist contact name(s) at point

* org-contacts.el (org-contacts-get-exist-contact-name-list): New
function, which can get exist contact name(s) matched 'string, return
a list.
(org-contacts-get-exist-contact-name-string): New macro, get exist
contact name(s) matched 'string, return names string.
(org-contacts-insert-contact-name): New function, which can insert (a)
exist contact name(s) matched user's input at point.

Add new functions, which can insert (a) exist contact name(s) at point,
which is matched user's input.
---
 contrib/lisp/org-contacts.el |   36 
 1 个文件被修改,插入 36 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 5d63fcc..e3f0729 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -967,6 +967,42 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-get-exist-contact-name-list (string)
+  Get exist contact name(s) matched 'string, return a list.
+  (let ((contact-list (nconc
+		   (org-contacts-filter
+			nil nil
+			(cons org-contacts-alias-property string))
+		   (org-contacts-filter string
+(setq result-name-list
+	  (delete-dups
+	   (loop for contact in contact-list
+		 collect
+		 (substring-no-properties
+		  ((lambda (contact)
+		 (let* ((name
+			 (org-contacts-vcard-escape (car contact name))
+		   contact))
+  (if result-name-list result-name-list (list string)))
+
+(defmacro org-contacts-get-exist-contact-name-string (string)
+  Get exist contact name(s) matched 'string, return names string.
+ (if (stringp string)
+ `(mapconcat 'identity (org-contacts-get-exist-contact-name-list ,string)  )
+   `(mapconcat 'identity (org-contacts-get-exist-contact-name-list ,(format %s string))  )))
+
+(defun org-contacts-insert-contact-name (string)
+  At point insert (a) exist contact name(s) matched 'input.
+  (interactive (list (read-string Contact Alias or Name: )))
+  (current-buffer)
+  (let ((inhibit-read-only t)))
+  (when (fboundp 'set-buffer-file-coding-system)
+(set-buffer-file-coding-system coding-system-for-write))
+  (let ((name-list (org-contacts-get-exist-contact-name-list string)))
+(while name-list
+  (insert (concat (car name-list)  ))
+(setq name-list (cdr name-list)
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4



-- 


Re: [O] the buffer jumps when save a source code block

2013-06-03 Thread Carsten Dominik
Hi Zhenjiang,

do you mean that the view changes, or that also the cursor position changes?  I 
cannot find the cursor in the second shot.

- Carsten

On 3.6.2013, at 23:10, Not To Miss not.to.m...@gmail.com wrote:

 Hi all,
 
 after opening a source code block in a separate window with C-c ', it's nice 
 that users can save the original org-mode file buffer when saving the code 
 buffer. However, sometimes the buffer jumps when saving it. For example, this 
 snapshot is before saving: 
 https://www.dropbox.com/s/483ulfb34v3brnh/Screen%20Shot%202013-06-03%20at%203.02.17%20PM.png;
  and this buffer scrolls down automatically after saving: 
 https://www.dropbox.com/s/63tzyki3nejxwmb/Screen%20Shot%202013-06-03%20at%203.02.41%20PM.png
 
 Is this a intended feature? It is kind of annoying to me. how can disable it?
 
 Thanks,
 Zhenjiang



Re: [O] the buffer jumps when save a source code block

2013-06-03 Thread Not To Miss
Hi Carsten, I mean the view changed, not the cursor position - the cursor
is in the same position.


On Mon, Jun 3, 2013 at 10:17 PM, Carsten Dominik
carsten.domi...@gmail.comwrote:

 Hi Zhenjiang,

 do you mean that the view changes, or that also the cursor position
 changes?  I cannot find the cursor in the second shot.

 - Carsten

 On 3.6.2013, at 23:10, Not To Miss not.to.m...@gmail.com wrote:

 Hi all,

 after opening a source code block in a separate window with C-c ', it's
 nice that users can save the original org-mode file buffer when saving the
 code buffer. However, sometimes the buffer jumps when saving it. For
 example, this snapshot is before saving:
 https://www.dropbox.com/s/483ulfb34v3brnh/Screen%20Shot%202013-06-03%20at%203.02.17%20PM.png;
 and this buffer scrolls down automatically after saving:
 https://www.dropbox.com/s/63tzyki3nejxwmb/Screen%20Shot%202013-06-03%20at%203.02.41%20PM.png

 Is this a intended feature? It is kind of annoying to me. how can disable
 it?

 Thanks,
 Zhenjiang





Re: [O] [PATCH] ob-fortran.el, add matrix as input

2013-06-03 Thread Eric Schulte
Applied, Thanks!

Litvinov Sergey slitvi...@gmail.com writes:

 I would like to propose a tiny patch which adds matrix as an input for
 ob-fortran.el. See changes in testing/examples/ob-fortran-test.org for
 the examples.


 From 4115610e692e5056fa4c0f9d498c12912d374646 Mon Sep 17 00:00:00 2001
 From: Litvinov Sergey slitvi...@gmail.com
 Date: Sat, 1 Jun 2013 19:20:06 +0200
 Subject: [PATCH] Add a matrix input to ob-fortran.el

 * lisp/ob-fortran.el: add a branch which handles nested lists
 * testing/examples/ob-fortran-test.org: add a test for matrix input
 * testing/lisp/test-ob-fortran.el: add a test for matrix input
 ---
  lisp/ob-fortran.el   |  6 ++
  testing/examples/ob-fortran-test.org | 22 ++
  testing/lisp/test-ob-fortran.el  | 12 
  3 files changed, 40 insertions(+)

 diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el
 index 1eab03e..a379273 100644
 --- a/lisp/ob-fortran.el
 +++ b/lisp/ob-fortran.el
 @@ -143,6 +143,12 @@ of the same value.
   ((stringp val)
(format character(len=%d), parameter ::  %S = '%s'\n
(length val) var val))
 + ;; val is a matrix
 + ((and (listp val) (listp (car val)))
 +  (format real, parameter :: %S(%d,%d) = transpose( reshape( %s , (/ 
 %d, %d /) ) )\n
 +   var (length val) (length (car val)) 
 +   (org-babel-fortran-transform-list val)
 +   (length (car val)) (length val)))
   ((listp val)
(format real, parameter :: %S(%d) = %s\n
 var (length val) (org-babel-fortran-transform-list val)))
 diff --git a/testing/examples/ob-fortran-test.org 
 b/testing/examples/ob-fortran-test.org
 index 47931bf..530d15e 100644
 --- a/testing/examples/ob-fortran-test.org
 +++ b/testing/examples/ob-fortran-test.org
 @@ -50,6 +50,28 @@ write (*, '(3f5.2)'), s
  write (*, '(2f5.2)'), s
  #+end_src
  
 +* matrix
 +  :PROPERTIES:
 +  :ID:   3f73ab19-d25a-428d-8c26-e8c6aa933976
 +  :END:
 +Real matrix as input
 +#+name: fortran-input-matrix1
 +| 0.0 | 42.0 |
 +| 0.0 |  0.0 |
 +| 0.0 |  0.0 |
 +
 +#+name: fortran-input-matrix2
 +| 0.0 | 0.0 | 0.0 |
 +| 0.0 | 0.0 | 42.0 |
 +
 +#+begin_src fortran :var s=fortran-input-matrix1 :results silent
 +write (*, '(i2)'), nint(s(1,2))
 +#+end_src
 +
 +#+begin_src fortran :var s=fortran-input-matrix2 :results silent
 +write (*, '(i2)'), nint(s(2,3))
 +#+end_src
 +
  * failing
:PROPERTIES:
:ID:   891ead4a-f87a-473c-9ae0-1cf348bcd04f
 diff --git a/testing/lisp/test-ob-fortran.el b/testing/lisp/test-ob-fortran.el
 index c355996..7754c64 100644
 --- a/testing/lisp/test-ob-fortran.el
 +++ b/testing/lisp/test-ob-fortran.el
 @@ -68,6 +68,18 @@
  (org-babel-next-src-block 2)
  (should (equal 1.00 2.00 (org-babel-execute-src-block)
  
 +(ert-deftest ob-fortran/list-matrix-from-table1 ()
 +  Test real matrix from a table
 +  (org-test-at-id 3f73ab19-d25a-428d-8c26-e8c6aa933976
 +(org-babel-next-src-block 1)
 +(should (= 42 (org-babel-execute-src-block)
 +
 +(ert-deftest ob-fortran/list-matrix-from-table2 ()
 +  Test real matrix from a table
 +  (org-test-at-id 3f73ab19-d25a-428d-8c26-e8c6aa933976
 +(org-babel-next-src-block 2)
 +(should (= 42 (org-babel-execute-src-block)
 +
  (ert-deftest ob-fortran/no-variables-with-main ()
Test :var with explicit 'program'
(org-test-at-id 891ead4a-f87a-473c-9ae0-1cf348bcd04f

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