Re: [O] Actual eps picture size in beamer presentation

2012-11-28 Thread Johan Ekh
Ok, thanks!
I seem to get the right size with #+ATTR_LATEX: width=128mm.
But how can I make the lower left corner of my picture start exactly at the
lower left corner of my slide?

BR / Johan


On Tue, Nov 27, 2012 at 4:33 PM, Rainer M Krug r.m.k...@gmail.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 27/11/12 16:31, Rainer M Krug wrote:
  On 27/11/12 13:07, Johan Ekh wrote:
  Hi, I've created an eps picture with the exact width of a landscape A4
 to be used in a beamer
   presentation. However, the latex exporter shrinks it. I'd like to pass
 an option to the
  exporter to use the actual size of the picture, is that possible?
 
  I am sure it is, but beamer slides are not A4. they are actually (if I
 remember correctly)
  something around 7 by 9 cm. So A4 actual size would go beyond the beamer
 slide.

 Found it: 128mm by 96mm
 (
 http://tex.stackexchange.com/questions/14336/latex-beamer-presentation-package-169-aspect-ratio
 )


 
  Cheers,
 
  Rainer
 
 
  Best regards, Johan
 
 
 

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlC03UIACgkQoYgNqgF2ego7EACfRWt+auDeG+bUlq46h1d+katz
 Y7kAn0/Ls8Up5h51oWeq4Rx5KxDRAJ7M
 =ZAou
 -END PGP SIGNATURE-



Re: [O] Actual eps picture size in beamer presentation

2012-11-28 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 28/11/12 09:13, Johan Ekh wrote:
 Ok, thanks! I seem to get the right size with #+ATTR_LATEX: width=128mm. 
 But how can I make
 the lower left corner of my picture start exactly at the lower left corner of 
 my slide?

You have to set it as background and insert an empty slide - then you have it.

Cheers,

Rainer

 
 BR / Johan
 
 
 On Tue, Nov 27, 2012 at 4:33 PM, Rainer M Krug r.m.k...@gmail.com 
 mailto:r.m.k...@gmail.com
 wrote:
 
 On 27/11/12 16:31, Rainer M Krug wrote:
 On 27/11/12 13:07, Johan Ekh wrote:
 Hi, I've created an eps picture with the exact width of a landscape A4 to 
 be used in a
 beamer presentation. However, the latex exporter shrinks it. I'd like to 
 pass an option to
 the exporter to use the actual size of the picture, is that possible?
 
 I am sure it is, but beamer slides are not A4. they are actually (if I 
 remember correctly) 
 something around 7 by 9 cm. So A4 actual size would go beyond the beamer 
 slide.
 
 Found it: 128mm by 96mm 
 (http://tex.stackexchange.com/questions/14336/latex-beamer-presentation-package-169-aspect-ratio)

 
 
 
 Cheers,
 
 Rainer
 
 
 Best regards, Johan
 
 
 
 
 
 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlC1yH4ACgkQoYgNqgF2egpvHgCgiCl3AY8Vkz3M5JL4gPm3AXDX
bf0AniKO8s6G/ctyKRs9SxwgBEZgU2q4
=gwyl
-END PGP SIGNATURE-



[O] running the new exporter asynchronously?

2012-11-28 Thread Alan Schmitt
Hello,

I'm compiling a fairly large set of slides, that also contain quite a
bit of code that is executed (it's a course on JavaScript which shows
some of the language peculiarities). Thus exporting these slides takes a
while. Unfortunately, when it's compiling, it's completely locking my
emacs. Would there be a way for the export process to be asynchronous
and not lock emacs?

Thanks,

Alan

PS: mandatory comics about compilation time http://xkcd.com/303/



[O] Exporting to pdf Choosing Your Workflow Applications

2012-11-28 Thread davidam
Hello,

I'm trying export to pdf Choosing Your Workflow Applications
(https://github.com/kjhealy/workflow-paper/blob/master/workflow-apps.org)
and I'm having some troubles. I attach the log.

Thanks in advance.


article.log
Description: Binary data


Re: [O] [PATCH] Allow relative times in clocktable tstart and tend options

2012-11-28 Thread Nicolas Goaziou
Hello,

Ivan Vilata i Balaguer i...@selidor.net writes:

 * lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
 time strings through `org-matcher-time` to allow relative times besides
 absolute ones, convert result to encoded time.
 * doc/org.texi (The clock table): Document acceptance of relative times
 in tstart and tend, link to syntax description.

 Inspired in the original relative times proposal by Ilya Shlyakhter,
 this is less invasive and it doesn't modify core functions, thus it
 avoids the original's infinite recursion when hitting normal dates in
 other locations.

 TINYCHANGE

Thank you for your patch.

Would you mind providing a (couple) of simple test case(s) (or better,
a complete ert test) for that situation?


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Fix uncaught error when trying to open a link at point

2012-11-28 Thread Nicolas Goaziou
Hello,

Samuel Loury konubi...@gmail.com writes:

 From 0e31213fa486f7fcfe1c2b7037689df077a39fce Mon Sep 17 00:00:00 2001
 From: Samuel Loury samuel.lo...@cosmo-platform.org
 Date: Thu, 22 Nov 2012 09:31:15 +0100
 Subject: [PATCH] Fix the uncaught exception when doing opening a link from
  nowhere

 * lisp/org.el (org-open-at-point): Make sure point is on a
 org-plain-link-re before trying to go to its beginning

 In cases the custor at point did not match anything, the piece of
 code (goto-char (car (org-in-regexp org-plain-link-re))) threw an
 error.

 The inital intention of avoiding matching a org-plain-link-re when
 just after a org-bracket-link-regexp, from the commit originating
 the error (ad35e2ac6c6decae55dd987be738e07e7c87bd7d) was conserved.

 TINYCHANGE

Thank you for your patch.  A few comments below.

 (save-excursion
   (when (or (org-in-regexp org-angle-link-re)
 -   (and (goto-char (car (org-in-regexp org-plain-link-re)))
 -(save-match-data (not (looking-back \\[\\[)
 +   (let (
 + (match (org-in-regexp org-plain-link-re))
 + )

Please do not leave dangling parens in your code. This is quite
confusing.

 + (and
 +  ;; link at point is a plain link
 +  match
 +  ;; check that it is not of the form
 +  ;; [[http://orgmode.org][Org]]Mode. in that
 +  ;; case, if the cursor is on Mode, then the
 +  ;; string http://orgmode.org][Org]]Mode; is
 +  ;; recognized as a plain link while it should
 +  ;; not be
 +  (progn
 +;; go to the begining of the match, If we
 +;; were in the special case, we should now
 +;; be in a org-bracket-link-regexp
 +(goto-char (car match))
 +(not
 + (org-in-regexp org-bracket-link-regexp)
 + )
 +)
 +  )
 + ))

Ditto.

 When trying to open a link at point when no link is present, an
 error is thrown. Test for instance to call org-open-at-point (C-c C-o)
 while in an empty line.

 It is in fact a regression coming from
 ad35e2ac6c6decae55dd987be738e07e7c87bd7d that tries to go to the result
 of a org-in-regexp call without checking whether the result is empty.

 Here is a patch that keeps the idea from
 ad35e2ac6c6decae55dd987be738e07e7c87bd7d (avoiding matching an
 org-plain-link-re while it is in fact a org-bracket-link-regexp) and
 fixing the problem.

Would you mind providing some test cases for `org-open-at-point' (or ERT
tests)? This function will need to be rewritten at some point; it's
better if we can then avoid introducing regressions.


Regards,

-- 
Nicolas Goaziou



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

2012-11-28 Thread Nicolas Goaziou
Hello,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Wed, Nov 21, 2012 at 05:35:48PM +0100, Nicolas Goaziou wrote:
 
 Plain lists accept two optional attributes: `:environment' and
 `:options'.  The first one allows to use a non-standard environment
 (i.e. inparaenum).  The second one allows to specify optional
 arguments for that environment (square brackets are not mandatory).
 

 Are these available for org-e-beamer too?  I tried without success.  It
 would be a great addition (along with the options for images
 below).  :)

 Images accept `:float', `:placement' and `:options' as attributes.
 `:float' accepts a symbol among `wrap', `multicolumn', and
 `figure', which defines the float environment for the table (if
 unspecified, an image with a caption will be set in a figure
 environment).  `:placement' is a string that will be used as
 argument for the environment chosen.  `:options' is a string that
 will be used as the optional argument for includegraphics macro.
 

Since Beamer back-end doesn't redefine how images are handled, you can
use the same properties as above, within an attr_latex keyword.

About special environments for plain lists, I'm unsure if this is a good
idea. AFAIK many don't support overlay specifications so it would lead
to errors when one provides both a special environment and an overlay,
i.e.:

--8---cut here---start-8---
#+attr_beamer: :environment inparaenum :overlay +-
- item 1
- item 2
--8---cut here---end---8---

Also, Beamer has its own way to render standard lists (through themes)
and it could cause problems with foreign packages.

On the other hand, I can still make it easy for an user to shoot himself
in the foot: code-wise, it is cheap. What do you think?


Regards,

-- 
Nicolas Goaziou



[O] hiding footnotes

2012-11-28 Thread 42 147
Self-explanatory. I like how org-mode handles footnotes, but I want an
option to hide them while reading (for they are distracting).


Re: [O] FAILED test-org/end-of-line

2012-11-28 Thread Nicolas Goaziou
Hello,

Nick Dokos nicholas.do...@hp.com writes:

 Adding a \n at the end of the headline lets the test pass I think:

I've added \n at the end of headlines. Since I don't use pretest
version, can you confirm it does indeed fix the problem?

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] nested org-headlines

2012-11-28 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 If drawers are greater elements in org elements, perhaps they ought to
 be able to contain other drawers? Or is non-nesting drawers a design
 decision?

It is a design decision.

Note that greater element only means that the element can contain
other elements (i.e. a paragraph.). Also, according to org-element.el
comments:

With the exception of `headline' and `item' types, greater elements
cannot contain other greater elements of their own type.

A drawer is a way to hide some contents (and optionally remove them from
export) without adding any specific meaning to them. What would a drawer
within another drawer mean: hide stuff even more?

Also, adding recursive drawers has a cost (for parsing speed, with
visibility cycling features...) with no real benefit, which explains why
it wasn't implemented.


Regards,

-- 
Nicolas Goaziou



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

2012-11-28 Thread Suvayu Ali
On Wed, Nov 28, 2012 at 01:58:09PM +0100, Nicolas Goaziou wrote:
 Hello,
 
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  Images accept `:float', `:placement' and `:options' as attributes.
  `:float' accepts a symbol among `wrap', `multicolumn', and
  `figure', which defines the float environment for the table (if
  unspecified, an image with a caption will be set in a figure
  environment).  `:placement' is a string that will be used as
  argument for the environment chosen.  `:options' is a string that
  will be used as the optional argument for includegraphics macro.
  
 
 Since Beamer back-end doesn't redefine how images are handled, you can
 use the same properties as above, within an attr_latex keyword.
 

Okay thanks.  :)

 About special environments for plain lists, I'm unsure if this is a good
 idea. AFAIK many don't support overlay specifications so it would lead
 to errors when one provides both a special environment and an overlay,
 i.e.:
 
 --8---cut here---start-8---
 #+attr_beamer: :environment inparaenum :overlay +-
 - item 1
 - item 2
 --8---cut here---end---8---
 
 Also, Beamer has its own way to render standard lists (through themes)
 and it could cause problems with foreign packages.
 
 On the other hand, I can still make it easy for an user to shoot himself
 in the foot: code-wise, it is cheap. What do you think?
 

Personally I think having the option to shoot myself in the foot is
preferable over not being able to configure.  But then others may not
agree.  Is it possible to disallow :overlay when :environment is
provided?  If so you could generate a warning during export.

That said, the way I see it, most widely used list-like environments are
of the new item on a new line kind (which are supported by overlays).
I wanted to use inparaenum for ease of editing, in my slide I wanted an
inline list (where overlays aren't really needed).  So setting the two
attributes simultaneously is probably very unlikely.

I am quoting my use case below in case that helps the discussion.
Something like item (1) would have been nice, however I ended up using
(2).


  1) Asymmetries can be constructed that are,
 #+attr_beamer: :environment inparaenum :options i)
 1. CP-odd,
 2. CPT-odd and
 3. T-odd

  2) Asymmetries can be constructed that are, i) CP-odd, ii) CPT-odd and
 iii) T-odd.


Anyone else have any thoughts on this?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] running the new exporter asynchronously?

2012-11-28 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Would there be a way for the export process to be asynchronous and not
 lock emacs?

Not yet. 

Actually that's, in my roadmap, the single last feature to implement
before moving the new export engine into core.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporting to pdf Choosing Your Workflow Applications

2012-11-28 Thread Suvayu Ali
On Wed, Nov 28, 2012 at 10:27:50AM +0100, davi...@es.gnu.org wrote:
 Hello,
 
 I'm trying export to pdf Choosing Your Workflow Applications
 (https://github.com/kjhealy/workflow-paper/blob/master/workflow-apps.org)
 and I'm having some troubles. I attach the log.
 
 Thanks in advance.

I believe the export of that document is dependent on the authors emacs
setup.  It seems the abstract block before the first headline is the
main culprit.  Try commenting it out and trying again.  A few usepackage
directives also seem to be missing.  On top of that I see the original
author intended to export with xelatex whereas you are using pdflatex.

Hope my comments help,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] running the new exporter asynchronously?

2012-11-28 Thread Eric Schulte
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Would there be a way for the export process to be asynchronous and not
 lock emacs?

 Not yet. 

 Actually that's, in my roadmap, the single last feature to implement
 before moving the new export engine into core.


 Regards,

In the interim it, one solution which I personally like for large
projects is to offload compilation into an external batch Emacs process.
I find this not only useful for compilation while working, but if you
place all relevant config into an init.el file loaded by the batch
Emacs, this also makes it possible to share and compile the project
separate of your personal Emacs config.

Attached is a bare-bones Makefile supporting this sort of work-flow.

Hope this helps,

EMACS=emacs
BATCH_EMACS=$(EMACS) --batch -Q -l init.el

%.html: %.org
$(BATCH_EMACS) $*.org -f org-export-as-html

%.tex: %.org
$(BATCH_EMACS) $*.org -f org-export-as-latex

%.txt: %.org init.el
$(BATCH_EMACS) $*.org -f org-export-as-utf8

%.pdf: %.tex
if pdflatex $*.tex /dev/null; then \
true; \
else \
stat=$$?; touch $*.pdf; exit $$stat; \
fi
bibtex $*
while grep Rerun to get $*.log; do \
if pdflatex $*.tex /dev/null; then \
true; \
else \
stat=$$?; touch $*.pdf; exit $$stat; \
fi; \
done

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


Re: [O] nested org-headlines

2012-11-28 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 If drawers are greater elements in org elements, perhaps they ought to
 be able to contain other drawers? Or is non-nesting drawers a design
 decision?

 It is a design decision.

 Note that greater element only means that the element can contain
 other elements (i.e. a paragraph.). Also, according to org-element.el
 comments:

 With the exception of `headline' and `item' types, greater elements
 cannot contain other greater elements of their own type.

That's a good thing to know.

 A drawer is a way to hide some contents (and optionally remove them from
 export) without adding any specific meaning to them. What would a drawer
 within another drawer mean: hide stuff even more?

Makes plenty of sense to me. But it's not the first time someone's asked
about ways of descending from one text level into a sub-hierarchy, and
then popping back out to the previous textual level. When the will is
there, tools will be abused...




Re: [O] hiding footnotes

2012-11-28 Thread John Hendy
On Wed, Nov 28, 2012 at 7:03 AM, 42 147 aeus...@gmail.com wrote:

 Self-explanatory. I like how org-mode handles footnotes, but I want an
 option to hide them while reading (for they are distracting).



Reading what? The org file or resultant PDF? If you're talking about the
org file, I don't think there's going to be a way, but I could be wrong. If
you can give more specifics, that would be helpful -- is it the [fn:1] you
find distracting?


John


Re: [O] running the new exporter asynchronously?

2012-11-28 Thread Alan Schmitt
Eric Schulte schulte.e...@gmail.com writes:

 In the interim it, one solution which I personally like for large
 projects is to offload compilation into an external batch Emacs process.
 I find this not only useful for compilation while working, but if you
 place all relevant config into an init.el file loaded by the batch
 Emacs, this also makes it possible to share and compile the project
 separate of your personal Emacs config.

 Attached is a bare-bones Makefile supporting this sort of work-flow.

This is really neat, thanks a lot! I'll definitely use this for my next
course.

Do you use a shell to run make or do you call it directly from emacs?

Alan



Re: [O] New exporter (org-e-odt) not creating content.xml

2012-11-28 Thread Giovanni Ridolfi
Da: Ista Zahn istaz...@gmail.com
Inviato: Martedì 27 Novembre 2012 15:55

 I can't seem to get the new odt exporter working on my Windows machine
 at work (it works fine on Linux at home).
 [...]

 So it seems that the new exporter is not creating content.xml, or
 META-INF/manifest.xml. Again this only happens on Windows. It is
 reproducible every time, and is reproducible starting with emacs -q
 and then loading only org and org-e-odt.


 Specifically, when I call
 'M-x export-dispatch o o'  I get an odt archive with the following
 contents.

 M Filemode      Length  Date         Time      File
- --    ---    --
  -rw-rw-rw-        39  26-Nov-2012  17:31:16  mimetype
  drwxrwxrwx         0  26-Nov-2012  17:31:16  meta-inf/
  -rw-rw-rw-       782  26-Nov-2012  17:31:16  meta.xml
  -rw-rw-rw-     66559  26-Nov-2012  17:31:16  styles.xml
- --    ---    --
                 67380                         4 files

 Like Rainer I cannot reproduce.

 what is
 -  your org-version ?
'M-org-version' produces

 Org-mode version N/A (N/A @ c:/Documents and
 Settings/IZAHN/.emacs.d/izahn/org-mode/lisp/)

 but this is orgmode from git, updated yesterday.
well I cannot trust you ;-)

I think you did not configure/build org properly (Achim may confirm here).

Please read the documentation (M-x org-info) and the worg page here:

http://orgmode.org/worg/org-hacks.html

and please, configure org properly. Then we can investigate if this behaviour 
is 
really a bug or is it due to misconfiguration.

 -  emacs version?
GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-28 on MARVIN
  emacs is the windows version fromhttp://ftp.gnu.org/gnu/emacs/windows/

The OS is Windows XP professional with service pack 3.

 Here:
 Org-mode version 7.9.2 (d344fda @
 GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN
 Windows 7

Same as me. 
Please check your configuration/activation.

 I started emacs with emacs -q and evaluated the following lines with 'C-x-e':
Is is not useful if you have not configured/activated org.


cheers,
Giovanni



Re: [O] hiding footnotes

2012-11-28 Thread 42 147
Reading an org-file. I should note, it is the highlighting that is the
problem, not the footnote itself. If I could somehow toggle it to the color
of the text, that would solve my problem.

For example, the [16] here is a distraction:

* Chomsky
** Books
*** Deterring Democracy
 Chapter 1. Cold War: Fact and Fancy
** (1) The Cold War as Ideological Construct
** Overview
** The Orthodox Version
*** No Justification Provided
 Worship Of The State As Secular Religion

Though the sophistication of traditional theology is lacking, the
similarity of themes and style is striking. It reveals the extent to
which worship of the state has become a secular religion for which the
intellectuals serve as priesthood. The more primitive sectors of
Western culture go further, fostering forms of idolatry in which such
sacred symbols as the flag become an object of forced veneration, and
the state is called upon to punish any insult to them and to compel
children to pledge their devotion daily, while God and State are
almost indissolubly linked in public ceremony and discourse, as in
James Reston's musings on our devotion to the will of the Creator. It
is perhaps not surprising that such crude fanaticism rises to such an
extreme in the United States, as an antidote for the unique freedom
from state coercion that has been achieved by popular struggle. [16]

On Wed, Nov 28, 2012 at 9:17 AM, John Hendy jw.he...@gmail.com wrote:


 On Wed, Nov 28, 2012 at 7:03 AM, 42 147 aeus...@gmail.com wrote:

 Self-explanatory. I like how org-mode handles footnotes, but I want an
 option to hide them while reading (for they are distracting).



 Reading what? The org file or resultant PDF? If you're talking about the
 org file, I don't think there's going to be a way, but I could be wrong. If
 you can give more specifics, that would be helpful -- is it the [fn:1] you
 find distracting?


 John



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

2012-11-28 Thread Nicolas Goaziou
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Personally I think having the option to shoot myself in the foot is
 preferable over not being able to configure.  But then others may not
 agree.  Is it possible to disallow :overlay when :environment is
 provided?  If so you could generate a warning during export.

 That said, the way I see it, most widely used list-like environments are
 of the new item on a new line kind (which are supported by overlays).
 I wanted to use inparaenum for ease of editing, in my slide I wanted an
 inline list (where overlays aren't really needed).  So setting the two
 attributes simultaneously is probably very unlikely.

 I am quoting my use case below in case that helps the discussion.
 Something like item (1) would have been nice, however I ended up using
 (2).


   1) Asymmetries can be constructed that are,
  #+attr_beamer: :environment inparaenum :options i)
  1. CP-odd,
  2. CPT-odd and
  3. T-odd

   2) Asymmetries can be constructed that are, i) CP-odd, ii) CPT-odd and
  iii) T-odd.

Case 1 should now be supported.


Regards,

-- 
Nicolas Goaziou



Re: [O] FAILED test-org/end-of-line

2012-11-28 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,
 
 Nick Dokos nicholas.do...@hp.com writes:
 
  Adding a \n at the end of the headline lets the test pass I think:
 
 I've added \n at the end of headlines. Since I don't use pretest
 version, can you confirm it does indeed fix the problem?
 

I don't use the pretest version either, but the version I do use

 GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 
2012-09-21

exhibited the failure before. With the change above, it no longer fails
for me.

Can you also disambiguate the headlines in the three cases? That would
make obvious *which* of the three subtests failed (for the record, it
was the second one, i.e. org-special-ctrl-a/e nil - the other two were
OK for some reason).

Nick





Re: [O] FAILED test-org/end-of-line

2012-11-28 Thread Nicolas Goaziou
Nick Dokos nicholas.do...@hp.com writes:

 Can you also disambiguate the headlines in the three cases? That would
 make obvious *which* of the three subtests failed (for the record, it
 was the second one, i.e. org-special-ctrl-a/e nil - the other two were
 OK for some reason).

Done.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Allow relative times in clocktable tstart and tend options

2012-11-28 Thread Ivan Vilata i Balaguer
Nicolas Goaziou (2012-11-28 13:47:32 +0100) wrote:

 Ivan Vilata i Balaguer i...@selidor.net writes:

 * lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
 time strings through `org-matcher-time` to allow relative times besides
 absolute ones, convert result to encoded time.
 * doc/org.texi (The clock table): Document acceptance of relative times
 in tstart and tend, link to syntax description.

 Inspired in the original relative times proposal by Ilya Shlyakhter,
 this is less invasive and it doesn't modify core functions, thus it
 avoids the original's infinite recursion when hitting normal dates in
 other locations.

 TINYCHANGE

 Thank you for your patch.

 Would you mind providing a (couple) of simple test case(s) (or better,
 a complete ert test) for that situation?

Of course, I will do it ASAP.  Thanks for considering the patch!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/




Re: [O] New exporter (org-e-odt) not creating content.xml

2012-11-28 Thread Ista Zahn
On Wed, Nov 28, 2012 at 10:15 AM, Giovanni Ridolfi
giovanni.rido...@yahoo.it wrote:
 Da: Ista Zahn istaz...@gmail.com
 Inviato: Martedì 27 Novembre 2012 15:55

 I can't seem to get the new odt exporter working on my Windows machine
 at work (it works fine on Linux at home).
 [...]

 So it seems that the new exporter is not creating content.xml, or
 META-INF/manifest.xml. Again this only happens on Windows. It is
 reproducible every time, and is reproducible starting with emacs -q
 and then loading only org and org-e-odt.


 Specifically, when I call
 'M-x export-dispatch o o'  I get an odt archive with the following
 contents.

 M Filemode  Length  Date Time  File
- --    ---    --
  -rw-rw-rw-39  26-Nov-2012  17:31:16  mimetype
  drwxrwxrwx 0  26-Nov-2012  17:31:16  meta-inf/
  -rw-rw-rw-   782  26-Nov-2012  17:31:16  meta.xml
  -rw-rw-rw- 66559  26-Nov-2012  17:31:16  styles.xml
- --    ---    --
 67380 4 files

 Like Rainer I cannot reproduce.

 what is
 -  your org-version ?
 'M-org-version' produces

 Org-mode version N/A (N/A @ c:/Documents and
 Settings/IZAHN/.emacs.d/izahn/org-mode/lisp/)

 but this is orgmode from git, updated yesterday.
 well I cannot trust you ;-)

 I think you did not configure/build org properly (Achim may confirm here).

 Please read the documentation (M-x org-info)

Yes, I've read the documentation.

 and the worg page here:

 http://orgmode.org/worg/org-hacks.html

Is that really necessary? I keep org updated using the instructions at
http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development.
ad hoc code, quick hacks and workarounds does not sound like what I
want...


 and please, configure org properly.

The only thing I see that I missed is make autoloads, and indeed
after running this I get a sensible org-version:

Org-mode version 7.9.2 (release_7.9.2-638-g09cfdb @
/Users/izahn/.emacs.d/izahn/org-mode/lisp/)

Then we can investigate if this behaviour is
 really a bug or is it due to misconfiguration.

Fair enough. Unfortunately I'm not at my Windows machine today, so I
can't test to see if 'make autoloads' changed anything.

Best,
Ista


 -  emacs version?
 GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-28 on MARVIN
  emacs is the windows version fromhttp://ftp.gnu.org/gnu/emacs/windows/

 The OS is Windows XP professional with service pack 3.

 Here:
 Org-mode version 7.9.2 (d344fda @
 GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-29 on MARVIN
 Windows 7

 Same as me.
 Please check your configuration/activation.

 I started emacs with emacs -q and evaluated the following lines with 'C-x-e':
 Is is not useful if you have not configured/activated org.


 cheers,
 Giovanni



Re: [O] running the new exporter asynchronously?

2012-11-28 Thread Eric Schulte
Alan Schmitt alan.schm...@polytechnique.org writes:

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

 In the interim it, one solution which I personally like for large
 projects is to offload compilation into an external batch Emacs process.
 I find this not only useful for compilation while working, but if you
 place all relevant config into an init.el file loaded by the batch
 Emacs, this also makes it possible to share and compile the project
 separate of your personal Emacs config.

 Attached is a bare-bones Makefile supporting this sort of work-flow.

 This is really neat, thanks a lot! I'll definitely use this for my next
 course.


Good to hear.


 Do you use a shell to run make or do you call it directly from emacs?


I always have a shell open, so I generally prefer to run from there.
You could also just run M-x compile, which runs make asynchronously
and presents the output in a useful format.

Cheers,


 Alan

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



Re: [O] hiding footnotes

2012-11-28 Thread Jambunathan K

 Reading an org-file. I should note, it is the highlighting that is the
 problem, not the footnote itself. If I could somehow toggle it to the
 color of the text, that would solve my problem.

Put your cursor on the footnote.  Then do

C-u C-x =

In the resulting buffer, toward the end, you will see something like
this.

,
| There are text properties here:
|   face org-footnote
|   font-lock-fontified  t
|   font-lock-multiline  t
|   fontifiedt
|   help-echoFootnote reference
|   keymap   [Show]
|   mouse-face   highlight
|   org-category test-new
|   org-no-flyspell  t
`

Click on the face property (which is `org-footnote').  Click on
customize this face link.  Change the face foreground color to
whatever you want.

Or 

A fast way to do that would be 
M-x customize-face RET org-footnote RET

You can also try
M-x customize-group RET org-faces RET
-- 



Re: [O] FAILED test-org/end-of-line

2012-11-28 Thread Achim Gratz
Nicolas Goaziou writes:
 Done.

I confirm that the test failed before those two changes, but passes
after.  I am however unable at the moment to test it on any 23.x version
of Emacs, so I don't know if that might present a regression there.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] FAILED test-org/end-of-line

2012-11-28 Thread Nick Dokos
Achim Gratz strom...@nexgo.de wrote:

 Nicolas Goaziou writes:
  Done.
 
 I confirm that the test failed before those two changes, but passes
 after.  I am however unable at the moment to test it on any 23.x version
 of Emacs, so I don't know if that might present a regression there.
 
 

Given the previous problems on Windows, it would be good if somebody tested it
there as well.

Nick



Re: [O] [BUG] org-export-with-current-buffer-copy drops local variable WAS:Re: new exporter - noweb substitution issues

2012-11-28 Thread cberry
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 cbe...@tajo.ucsd.edu writes:

 Thank you for all the debugging.

 org-export-with-current-buffer-copy calls org-clone-local-variables
 which uses a regexp to detect buffer-local variables, but
 *org-babel-use-quick-and-dirty-noweb-expansion* is not detected, so it
 gets dropped.

 Solution add \\*org-babel-use-.*dirty.*\\*\\| or something like that
 to the regexp.

 Before doing that, I'd like to know if there's a particular reason for
 this variable to not belong to the regular namespace.

 I think this is confusing and error-prone. Thus, I'd rather have the
 variable renamed instead.

Fair enough.


 Eric, is that ok with you?

No reply so far, I think.

Anything more I can do to help with this?

Chuck





Re: [O] hiding footnotes

2012-11-28 Thread Alan L Tyree

SNIP

Hiding footnotes would be a great enhancement as far as I am concerned. 
I mean hiding in the same way that entities can be hidden in Auctec.


Auctec allows a fold mode that replaces various entities with user 
defined symbols. For example, \label{xxx} becomes [l]; \footnote{} 
becomes [f]. The folded symbols are in a different face (customisable).


Entities to be hidden can be user defined, so that new latex macros may 
be hidden.


Folded objects expand when the cursor is put over them.

The fold mode dramatically increases readability of the raw manuscript, 
particularly when there are long footnotes.


#+BEGIN_EXAMPLE

Documentary letters of credit are used primarily to facilitate
international trade.[fn:2: Kerr J famously called the documentary
letter of credit the crankshaft of modern trade and the lifeblood
of international commerce: RD Harbottle (Mercantile) Ltd v National
Westminster Bank Ltd 1978 QB 146 at 155.] The credit will ordinarily
be issued at the instigation of the purchaser of goods and the
beneficiary will be the seller. The credit will call for the
presentation of shipping documents, insurance policies and commercial
invoices along with other more specific documents.

#+END_EXAMPLE

becomes

#+BEGIN_EXAMPLE

Documentary letters of credit are used primarily to facilitate
international trade.[f] The credit will ordinarily
be issued at the instigation of the purchaser of goods and the
beneficiary will be the seller. The credit will call for the
presentation of shipping documents, insurance policies and commercial
invoices along with other more specific documents.

#+END_EXAMPLE

Cheers,
Alan




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




Re: [O] running the new exporter asynchronously?

2012-11-28 Thread Myles English

Hi,

Eric Schulte writes:

 In the interim it, one solution which I personally like for large
 projects is to offload compilation into an external batch Emacs process.
 I find this not only useful for compilation while working, but if you
 place all relevant config into an init.el file loaded by the batch
 Emacs, this also makes it possible to share and compile the project
 separate of your personal Emacs config.

 Attached is a bare-bones Makefile supporting this sort of work-flow.

This is probably too complicated for your immediate requirements but it
is a good opportunity to share my solution using CMake.  It does add
more complexity though.  It is for pdf production and uses something
called UseLATEX.cmake.  The main advantages are that:

- it can also regenerate all my plots from standalone (e.g.) R scripts,
  so I don't have to do everything in org if I don't want to
- it does 'out of source' builds
- I don't know the make syntax
- it would probably work on different OS

Here is the non-barebones example:

#+BEGIN_SRC sh :tangle CMakeLists.txt
cmake_minimum_required(VERSION 2.8)

project(thesis NONE)
  
include(/usr/share/cmake-2.8/Modules/UseLATEX.cmake)

# Set R executable
set(R_COMPILE /usr/bin/Rscript)
  # Set the location of data files
  ##set(DATA_DIR data)
  # Set the location of the directory for image files
set(IMAGE_DIR graphicsauto)

  # Get a list of R files
file(GLOB_RECURSE R_FILES R/*.R)

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/R DESTINATION 
${CMAKE_CURRENT_BINARY_DIR})
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR})

foreach(file ${R_FILES})
message(proceessing ${file})
get_filename_component(basename ${file} NAME_WE)

  # Command to run R
if(R_COMPILE)
message(Adding ... 
${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R)
  
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R
#  ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${DATA_DIR}
COMMAND
${R_COMPILE}
ARGS
${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R
${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps
)
message(Running ${R_COMPILE} 
${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R 
${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps)
  
endif(R_COMPILE)
  
  # Make a list of all R files (for ADD_LATEX_DOCUMENT depend)
set(ALL_R_FILES ${ALL_R_FILES}
${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps
)
endforeach(file)
  
  # --- export mainThesis.org ---
latex_get_output_path(OUTPUT_DIR)  
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mainThesis.org DESTINATION 
${OUTPUT_DIR}/ )
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/thesis.el DESTINATION 
${OUTPUT_DIR}/ )

add_custom_target( orgfile ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mainThesis.org )

add_custom_target( elfile ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/thesis.el )

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mainThesis.tex
COMMAND emacs -Q --batch --eval \(progn
(add-to-list 'load-path
   (expand-file-name 
\\~/.emacs.d/plugins/org-mode/lisp/\\))
 (add-to-list 'load-path
(expand-file-name 
\\~/.emacs.d/plugins/org-mode/contrib/lisp/\\ t))
(require 'org)
 (require 'org-export)
(require 'org-exp)
 (require 'org-inlinetask)
(require 'ob-plantuml)
 (setq org-plantuml-jar-path 
\\/home/myles/Downloads/plantuml.jar\\)
 (org-babel-do-load-languages
  'org-babel-load-languages
'((emacs-lisp . t)
(sh . t)
(plantuml . t)))
 (setq org-confirm-babel-evaluate nil)
   (setq org-export-with-todo-keywords nil)
   (load-library \\/home/myles/lib/lisp/my-export.el\\)
   (add-to-list 'org-export-before-processing-hook 
'my-export-delete-headlines-tagged-noheading)
(load-file \\thesis.el\\)
(find-file \\${CMAKE_CURRENT_BINARY_DIR}/mainThesis.org\\)
(org-e-latex-export-to-latex))\
DEPENDS orgfile elfile
COMMENT Exporting orgmode file to LaTeX using emacs)

add_custom_target( mainfile ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mainThesis.tex )

add_latex_document(master.tex
BIBFILES texlib/mybiblatex.bib
  

Re: [O] Using org-mode for laboratory notes.

2012-11-28 Thread Nick Dokos
Eric Lubeck eric.lub...@gmail.com wrote:


 On the broader point of organizing the notebook, I am still having a
 bit of a dilemma coming up with an effective system.  My first thought
 was to just place all my work in a dated hierarchy, such as with
 org-datetree.  This would be simple and mirror a conventional
 notebook, but would loose a lot of the logical hierarchy possible with
 digital tools.

This is off-topic for the group but it may be of some interest to the
participants of this thread, if only as a comparison point:

   http://packages.python.org/Sumatra/

Nick





[O] boxquote in plain lists

2012-11-28 Thread Julien Cubizolles
I very often use boxquoted text in my org files to insert excerpts of
config files but I have trouble using it in plain lists : the boxquoted
text won't be folded by TAB, you have to manually indent each line of
the boxquote for the folding to work.

Julien.




Re: [O] [PATCH] Allow relative times in clocktable tstart and tend options

2012-11-28 Thread Ivan Vilata i Balaguer
Ivan Vilata i Balaguer (2012-11-28 17:11:46 +0100) wrote:

 Nicolas Goaziou (2012-11-28 13:47:32 +0100) wrote:

 Ivan Vilata i Balaguer i...@selidor.net writes:

 * lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
 time strings through `org-matcher-time` to allow relative times besides
 absolute ones, convert result to encoded time.
 * doc/org.texi (The clock table): Document acceptance of relative times
 in tstart and tend, link to syntax description.

 Inspired in the original relative times proposal by Ilya Shlyakhter,
 this is less invasive and it doesn't modify core functions, thus it
 avoids the original's infinite recursion when hitting normal dates in
 other locations.

 TINYCHANGE

 Thank you for your patch.

 Would you mind providing a (couple) of simple test case(s) (or
 better, a complete ert test) for that situation?

 Of course, I will do it ASAP.  Thanks for considering the patch!

I expected to find some existing clocktable test I could base mine upon,
but it seems that there's none yet, and my elisp skills are insufficient
to write a completely new test mysef.  So I wrote a simple example file
(attached) in case it can be useful for a test.

Then I realised that using it for a test can be difficult since relative
times depend on the moment that functions are invoked, so no luck. :(

I'm really sorry that I can provide nothing more than this.  However it
seems to work from my live tests, and I confined the changes as much as
possible to avoid other failures.

I'm also attaching a small update to patch that adds a trivial example
to the info file.

Thanks anyway!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/
#+TITLE: Testing relative times in a clocktable

* Relative times in clocktable   :ATTACH:
  :PROPERTIES:
  :ID:   af259fdb-b7b7-4307-81b0-0a4439fd944d
  :END:

Previous two days:
#+BEGIN: clocktable :tstart today-2 :tend today :link nil :indent nil
Clock summary at [2012-11-28 dc 22:28]

| Headline | Time  |   |
|--+---+---|
| *Total time*   | *16:00* |   |
|--+---+---|
| Relative times in clocktable | 16:00 |   |
| Foo  |   |  5:00 |
| Bar  |   | 11:00 |
#+END: clocktable

From yesterday until now:
#+BEGIN: clocktable :tstart yesterday :tend now :link nil :indent nil
Clock summary at [2012-11-28 dc 22:28]

| Headline | Time  |  |
|--+---+--|
| *Total time*   | *13:00* |  |
|--+---+--|
| Relative times in clocktable | 13:00 |  |
| Foo  |   | 5:00 |
| Bar  |   | 8:00 |
#+END: clocktable

** Foo
   CLOCK: [2012-11-26 dl 08:00]--[2012-11-26 dl 13:00] =  5:00
   CLOCK: [2012-11-28 dc 08:00]--[2012-11-28 dc 13:00] =  5:00
** Bar
   CLOCK: [2012-11-26 dl 15:00]--[2012-11-26 dl 18:00] =  3:00
   CLOCK: [2012-11-27 dt 08:00]--[2012-11-27 dt 13:00] =  5:00
   CLOCK: [2012-11-27 dt 15:00]--[2012-11-27 dt 18:00] =  3:00
   CLOCK: [2012-11-28 dc 15:00]
From e85bd48ee3ba39c2bd365cabddd695a32a0184fa Mon Sep 17 00:00:00 2001
From: Ivan Vilata i Balaguer i...@selidor.net
Date: Wed, 28 Nov 2012 20:57:55 +0100
Subject: [PATCH] Allow relative times in clocktable tstart and tend options

* lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
time strings through `org-matcher-time' to allow relative times besides
absolute ones, convert result to encoded time.
* doc/org.texi (The clock table): Document acceptance of relative times
in tstart and tend, link to syntax description and provide example.

Inspired in the original relative times proposal by Ilya Shlyakhter,
this is less invasive and it doesn't modify core functions, thus it
avoids the original's infinite recursion when hitting normal dates in
other locations.

TINYCHANGE
---
 doc/org.texi  |9 +
 lisp/org-clock.el |4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index bf67876..e3a40ec 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6263,7 +6263,11 @@ be selected:
  thisyear, lastyear, thisyear-@var{N} @r{a relative year}
  @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.}
 :tstart  @r{A time string specifying when to start considering times.}
+ @r{Relative times like @code{-2w} can also be used.  See}
+ @r{@ref{Matching tags and properties} for relative time syntax.}
 :tend@r{A time string specifying when to stop considering times.}
+ @r{Relative times like @code{now} can also be used.  See}
+ @r{@ref{Matching tags and properties} for relative time syntax.}
 :step@r{@code{week} or @code{day}, to split the table into chunks.}
  

[O] Table sorting hack

2012-11-28 Thread William R. Greene
I recently wrote a blog post concerning sorting of org-mode tables.

   -- Bill Greene




Re: [O] hiding footnotes

2012-11-28 Thread 42 147
Very nice.

However, I'd like to write a function that toggles the color value (without
recourse to the customize menu), since it would be useful to highlight the
footnotes from time to time.

After some tests, it is clear I also disliked the underlining.

On Wed, Nov 28, 2012 at 12:26 PM, Jambunathan K kjambunat...@gmail.comwrote:


  Reading an org-file. I should note, it is the highlighting that is the
  problem, not the footnote itself. If I could somehow toggle it to the
  color of the text, that would solve my problem.

 Put your cursor on the footnote.  Then do

 C-u C-x =

 In the resulting buffer, toward the end, you will see something like
 this.

 ,
 | There are text properties here:
 |   face org-footnote
 |   font-lock-fontified  t
 |   font-lock-multiline  t
 |   fontifiedt
 |   help-echoFootnote reference
 |   keymap   [Show]
 |   mouse-face   highlight
 |   org-category test-new
 |   org-no-flyspell  t
 `

 Click on the face property (which is `org-footnote').  Click on
 customize this face link.  Change the face foreground color to
 whatever you want.

 Or

 A fast way to do that would be
 M-x customize-face RET org-footnote RET

 You can also try
 M-x customize-group RET org-faces RET
 --



Re: [O] hiding footnotes

2012-11-28 Thread 42 147
I should add that Tyree's idea is what I was looking for originally
(changing the face to the text font at least fixed readability).

Ideally, instead of jumping to the footnote section, it would be
collapsible / expandable, much like headings.

Right now having a dedicated footnote section is better than having the
footnote embedded in the body of the text as a giant distracting
parenthesis. That is the worst functionality among the options here.

On Wed, Nov 28, 2012 at 10:24 PM, 42 147 aeus...@gmail.com wrote:

 Very nice.

 However, I'd like to write a function that toggles the color value (without
 recourse to the customize menu), since it would be useful to highlight the
 footnotes from time to time.

 After some tests, it is clear I also disliked the underlining.


 On Wed, Nov 28, 2012 at 12:26 PM, Jambunathan K kjambunat...@gmail.comwrote:


  Reading an org-file. I should note, it is the highlighting that is the
  problem, not the footnote itself. If I could somehow toggle it to the
  color of the text, that would solve my problem.

 Put your cursor on the footnote.  Then do

 C-u C-x =

 In the resulting buffer, toward the end, you will see something like
 this.

 ,
 | There are text properties here:
 |   face org-footnote
 |   font-lock-fontified  t
 |   font-lock-multiline  t
 |   fontifiedt
 |   help-echoFootnote reference
 |   keymap   [Show]
 |   mouse-face   highlight
 |   org-category test-new
 |   org-no-flyspell  t
 `

 Click on the face property (which is `org-footnote').  Click on
 customize this face link.  Change the face foreground color to
 whatever you want.

 Or

 A fast way to do that would be
 M-x customize-face RET org-footnote RET

 You can also try
 M-x customize-group RET org-faces RET
 --





Re: [O] hiding footnotes

2012-11-28 Thread Alan L Tyree

On 29/11/12 14:35, 42 147 wrote:

I should add that Tyree's idea is what I was looking for originally
(changing the face to the text font at least fixed readability).

Ideally, instead of jumping to the footnote section, it would be
collapsible / expandable, much like headings.

Right now having a dedicated footnote section is better than having the
footnote embedded in the body of the text as a giant distracting
parenthesis. That is the worst functionality among the options here.

I admit that I didn't know about the org-footnote-section variable. That 
helps a lot since many of my footnotes are long (awful legal tradition!).


But I still like the in-line footnote with the ability to hide a la 
Auctex. I've got no idea how hard it would be to implement, and I 
certainly don't have the skills.


I'm not complaining: org is the greatest thing since sliced bread! 
Thanks to everyone involved.


Cheers,
Alan

SNIP

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




Re: [O] hiding footnotes

2012-11-28 Thread Nick Dokos
42 147 aeus...@gmail.com wrote:

 Very nice.
 
 However, I'd like to write a function that toggles the color value (without
 recourse to the customize menu), since it would be useful to highlight the
 footnotes from time to time.
 

Anything that can be done interactively can also be done
programatically. You know what face you are dealing with, you can get
its foreground color with face-foreground, and you can set it with
set-face-attribute. A crude implementation to show the basic outline:

--8---cut here---start-8---
(setq org-footnote-fg-color (face-foreground 'org-footnote))

(setq org-text-fg-color (face-foreground 'default))

(defun my-toggle-footnote-fg-color ()
  Toggle the org-footnote face foreground color.
  (interactive)
  (let ((fg (face-foreground 'org-footnote)))
(if (string-equal fg org-footnote-fg-color)
(set-face-attribute 'org-footnote nil :foreground org-text-fg-color)
  (set-face-attribute 'org-footnote nil :foreground 
org-footnote-fg-color
--8---cut here---end---8---

The difficulties start (but do not end) with footnotes in all sorts of
weird places (e.g. headlines) with all sorts of different
fontifications. You'd want to blend the footnote with its immediate
surroundings.

Taking care of such situations (and various others that the above code
mishandles) is left as an exercise...

Nick



Re: [O] hiding footnotes

2012-11-28 Thread Jambunathan K
Nick Dokos nicholas.do...@hp.com writes:

 42 147 aeus...@gmail.com wrote:

 Very nice.
 
 However, I'd like to write a function that toggles the color value (without
 recourse to the customize menu), since it would be useful to highlight the
 footnotes from time to time.
 

 Anything that can be done interactively can also be done
 programatically. You know what face you are dealing with, you can get
 its foreground color with face-foreground, and you can set it with
 set-face-attribute. A crude implementation to show the basic outline:


 (setq org-footnote-fg-color (face-foreground 'org-footnote))

 (setq org-text-fg-color (face-foreground 'default))

 (defun my-toggle-footnote-fg-color ()
   Toggle the org-footnote face foreground color.
   (interactive)
   (let ((fg (face-foreground 'org-footnote)))
 (if (string-equal fg org-footnote-fg-color)
   (set-face-attribute 'org-footnote nil :foreground org-text-fg-color)
   (set-face-attribute 'org-footnote nil :foreground 
 org-footnote-fg-color


 The difficulties start (but do not end) with footnotes in all sorts of
 weird places (e.g. headlines) with all sorts of different
 fontifications. You'd want to blend the footnote with its immediate
 surroundings.

 Taking care of such situations (and various others that the above code
 mishandles) is left as an exercise...

Install the following defun, put the cursor on fontified text and do M-x
toggle-face.

(defun toggle-face (optional face-from)
  (interactive (list (read-face-name Face (face-at-point
  (let ((f (assq face-from face-remapping-alist))
(face-to 'default)) 
(if f (setq face-remapping-alist (delq f face-remapping-alist))
  (push (cons face-from face-to) face-remapping-alist

See also (info (elisp) Face Remapping)



 Nick



-- 



Re: [O] hiding footnotes

2012-11-28 Thread Jambunathan K
Jambunathan K kjambunat...@gmail.com writes:

 Install the following defun, put the cursor on fontified text and do M-x
 toggle-face.

 (defun toggle-face (optional face-from)
   (interactive (list (read-face-name Face (face-at-point
   (let ((f (assq face-from face-remapping-alist))
 (face-to 'default)) 
 (if f (setq face-remapping-alist (delq f face-remapping-alist))
   (push (cons face-from face-to) face-remapping-alist

 See also (info (elisp) Face Remapping)

For the benefit of novice readers, you need to try M-x toggle-face RET
and M-x toggle-face RET twice in succession.



Re: [O] hiding footnotes

2012-11-28 Thread 42 147
I added this to my .emacs:

(defun t-face ()
to pass org-footnote automatically to toggle-face
  (interactive)
(toggle-face 'org-footnote))

(defun toggle-face (optional face-from)
  (interactive (list (read-face-name Face (face-at-point
  (let ((f (assq face-from face-remapping-alist))
(face-to 'default))
(if f (setq face-remapping-alist (delq f face-remapping-alist))
  (push (cons face-from face-to) face-remapping-alist


On Thu, Nov 29, 2012 at 1:20 AM, Jambunathan K kjambunat...@gmail.comwrote:

 Nick Dokos nicholas.do...@hp.com writes:

  42 147 aeus...@gmail.com wrote:
 
  Very nice.
 
  However, I'd like to write a function that toggles the color value
 (without
  recourse to the customize menu), since it would be useful to highlight
 the
  footnotes from time to time.
 
 
  Anything that can be done interactively can also be done
  programatically. You know what face you are dealing with, you can get
  its foreground color with face-foreground, and you can set it with
  set-face-attribute. A crude implementation to show the basic outline:
 
 
  (setq org-footnote-fg-color (face-foreground 'org-footnote))
 
  (setq org-text-fg-color (face-foreground 'default))
 
  (defun my-toggle-footnote-fg-color ()
Toggle the org-footnote face foreground color.
(interactive)
(let ((fg (face-foreground 'org-footnote)))
  (if (string-equal fg org-footnote-fg-color)
(set-face-attribute 'org-footnote nil :foreground
 org-text-fg-color)
(set-face-attribute 'org-footnote nil :foreground
 org-footnote-fg-color
 
 
  The difficulties start (but do not end) with footnotes in all sorts of
  weird places (e.g. headlines) with all sorts of different
  fontifications. You'd want to blend the footnote with its immediate
  surroundings.
 
  Taking care of such situations (and various others that the above code
  mishandles) is left as an exercise...

 Install the following defun, put the cursor on fontified text and do M-x
 toggle-face.

 (defun toggle-face (optional face-from)
   (interactive (list (read-face-name Face (face-at-point
   (let ((f (assq face-from face-remapping-alist))
 (face-to 'default))
 (if f (setq face-remapping-alist (delq f face-remapping-alist))
   (push (cons face-from face-to) face-remapping-alist

 See also (info (elisp) Face Remapping)



  Nick
 
 

 --