Re: [O] odt export version conflict on emacs for mac os x

2013-08-20 Thread Christian Moe

Hi,

I confirm that I see the same behavior, i.e. after ODT export old
variable names show up in the customize group, similar to what you show
below. 

This is on GNU Emacs 24.3.1 on a Mac, installed with homebrew, with
Org-mode 8.0.7 installed via `make update2'.

This probably accounts for my problems with using a styles file. I had
thought it a problem with my installation or setup that I never got to
the bottom of.

Yours,
Christian



Skip Collins writes:

 I think this is a bug. Can someone confirm? After I do an ODT export,
 many ox-odt variables are duplicated with old variable names:
 | [-]-\ Group Org Export ODT
 |  |  |--- Option Org Odt Prettify Xml
 |  |  |--- Option Org Odt Schema Dir
 |  |  |--- Option Org Odt Content Template File
 |  |  |--- Option Org Odt Styles File
 |  |  |--- Option Org Odt Display Outline Level
 |  |  |--- Option Org Odt Convert Processes
 |  |  |--- Option Org Odt Convert Process
 |  |  |--- Option Org Odt Convert Capabilities
 |  |  |--- Option Org Odt Preferred Output Format
 |  |  |--- Option Org Odt Format Drawer Function
 |  |  |--- Option Org Odt Format Headline Function
 |  |  |--- Option Org Odt Format Inlinetask Function
 |  |  |--- Option Org Odt With Latex
 |  |  |--- Option Org Odt Inline Formula Rules
 |  |  |--- Option Org Odt Inline Image Rules
 |  |  |--- Option Org Odt Pixels Per Inch
 |  |  |--- Option Org Odt Create Custom Styles For Srcblocks
 |  |  |--- Option Org Odt Fontify Srcblocks
 |  |  |--- Option Org Odt Table Styles
 |  |  |--- Option Org Odt Use Date Fields
 |  |  |--- Option Org Export Odt Schema Dir
 |  |  |--- Option Org Export Odt Content Template File
 |  |  |--- Option Org Export Odt Styles File
 |  |  |--- Option Org Export Odt Inline Image Extensions
 |  |  |--- Option Org Export Odt Pixels Per Inch
 |  |  |--- Option Org Export Odt Create Custom Styles For Srcblocks
 |  |  |--- Option Org Export Odt Preferred Output Format
 |  |  |--- Option Org Export Odt Table Styles
 |  |  |--- Option Org Export Odt Fontify Srcblocks
 |  |  |--- Option Org Export Odt Category Strings
 |  |  |--- Option Org Export Odt Prettify Xml
 |  |  |--- Option Org Export Odt Convert Processes
 |  |  |--- Option Org Export Odt Convert Process
 |  |  `--- Option Org Export Odt Convert Capabilities

 This is apparently caused by interference from an old version of
 org-mode that is bundled inside my OS X Emacs.app. How can I
 completely disable the old version?




Re: [O] invalid byte-code error when publishing

2013-08-20 Thread Sebastien Vauban
Mehul Sanghvi,

Mehul Sanghvi wrote:
 Mehul Sanghvi wrote:
  The error only occurs if I'm using org-babl.  The offending piece of code
  I've got is:
 
  #+BEGIN_SRC emacs-lisp
  (setq tramp-default-method ssh)
  #+END_SRC
 
  If I remove the #+BEGIN_SRC and #+END_SRC than everything works fine and
  I'm able to publish.

 Would this fix it?

   #+BEGIN_SRC emacs-lisp :eval no
   (setq tramp-default-method ssh)
   #+END_SRC

Thanks for the suggestion.  That does not fix the problem.  I still
 get the same error as before.

Check out the value of:

- `org-babel-default-header-args', and
- `org-babel-default-header-args:emacs-lisp'.

And try whether `:eval query' makes a difference (when answering yes, and when
answering no)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Export attached image files

2013-08-20 Thread Johan Ekh
Thanks for your answer Suvayu!

Sorry for being unclear. What I mean is that when I write reports or papers
using org-mode and latex exporter it is natural
to take care in storing my image files in a structured way on my disk and
use links in org-mode to incorporate the images
in my latex document. These image files will live on my disk more or less
forever.

But if I write a note or some guide for myself regarding usage of some
software, or the settings in my router, I would like
to take a series of screenshots, quickly incorporate them into an org file
together with some text without having to rename
the screenshots with suitable names and organize them on my disk etc. I'd
like org-mode to store the images somewhere
in a data directory as an attachment, but of course I'd like the
screenshots to be incorporated in the pdf-file when I export it.

Is this possible?

BR / Johan


On Mon, Aug 19, 2013 at 1:03 PM, Suvayu Ali fatkasuvayu+li...@gmail.comwrote:

 Hi Johan,

 On Mon, Aug 19, 2013 at 12:05:53PM +0200, Johan Ekh wrote:
  Hi all,
  How can I include attached image files in my pdf-file which is generated
 by
  the latex exporter.

 Short answer: not possible.

  I know how to work with links but what if I want to
  quickly attach files and then delete the files from my hard disk and only
  have them as attachments in my org-file?

 If you delete a file from the disk, attaching it won't help either.  Org
 files are plain text, attachments are also stored as references.  It
 would help us understand better if you could elaborate a bit on what is
 your eventual goal?

 Cheers,

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Emacs Barcamp

2013-08-20 Thread Bastien
joa...@verona.se writes:

 Ivan Kanis i...@kanis.fr writes:

 Le 14 Août à 16h38, joa...@verona.se a écrit :

 BTW with only 12 people it would be fun to do stuff like hands-on
 sessions and hacker sessions, WDYT?

 That's the spirit of a barcamp! Let's wait on Bastien's reply.

 BTW Me and Daimrod will attend
 http://www.gnu.org/ghm/2013/paris/
 so at least two Emacs hackers will be there.

I will be there two, so that's at least three now!

I will attend friday and saturday afternoon.

Sylvestre just confirmed me we can sit at IRILL on sunday,
so if people are interested in doing their Emacs homework
then, that will be one possibility.

-- 
 Bastien



Re: [O] Export attached image files

2013-08-20 Thread Suvayu Ali
Hi Johan,

On Tue, Aug 20, 2013 at 10:34:06AM +0200, Johan Ekh wrote:
 Thanks for your answer Suvayu!
 
 Sorry for being unclear. What I mean is that when I write reports or papers
 using org-mode and latex exporter it is natural
 to take care in storing my image files in a structured way on my disk and
 use links in org-mode to incorporate the images
 in my latex document. These image files will live on my disk more or less
 forever.
 
 But if I write a note or some guide for myself regarding usage of some
 software, or the settings in my router, I would like
 to take a series of screenshots, quickly incorporate them into an org file
 together with some text without having to rename
 the screenshots with suitable names and organize them on my disk etc. I'd
 like org-mode to store the images somewhere
 in a data directory as an attachment, but of course I'd like the
 screenshots to be incorporated in the pdf-file when I export it.

That is a valid use case, but I do not think that is possible.
Attachments are an Org only feature, meaning it is not meant for export.
That said, it should be possible to use a custom function to get the
attachments and add it to the end of the exported document using a hook;
try this one: `org-export-before-parsing-hook'.

To get an idea how to get the files, take a look at org-attach-open in
org-attach.el.  Once you have the filenames, just insert inline links at
the end of the buffer:

* Attachments
[[./path/to/attachment1]]
[[./path/to/attachment2]]

This should solve your request.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



[O] Buffer-specific export filter?

2013-08-20 Thread James Harkins
Is it possible to apply a specific filter during export for one org document, 
but not others?

Basically, a buffer-specific export filter.

It appears in the org manual that the hook needs to be added into e.g. 
org-export-filter-plain-text-functions, where it remains globally for the 
duration of the session. But I have a case here where I need a filter to work 
around a specific problem I'm having in one document, which isn't a problem in 
other documents, and I don't want the filter to interfere with the other 
documents.

Possible? I don't see any mention of it in the manual.

hjh



Re: [O] Export attached image files

2013-08-20 Thread Dieter Wilhelm
Johan Ekh ekh.jo...@gmail.com writes:

 Thanks for your answer Suvayu!

 Sorry for being unclear. What I mean is that when I write reports or
 papers using org-mode and latex exporter it is natural 
 to take care in storing my image files in a structured way on my disk
 and use links in org-mode to incorporate the images
 in my latex document. These image files will live on my disk more or
 less forever.

 But if I write a note or some guide for myself regarding usage of some
 software, or the settings in my router, I would like
 to take a series of screenshots, quickly incorporate them into an org
 file together with some text without having to rename
 the screenshots with suitable names and organize them on my disk etc.
 I'd like org-mode to store the images somewhere
 in a data directory as an attachment, but of course I'd like the
 screenshots to be incorporated in the pdf-file when I export it. 

I don't understand why org-attachments are not good enough for your use
case? (info (org)Attachments)

Especially if you're using

(setq org-link-abbrev-alist '((att . org-attach-expand-link)))

for conveniently accessing your data...

Dieter

 Is this possible?

 BR / Johan

 On Mon, Aug 19, 2013 at 1:03 PM, Suvayu Ali
 fatkasuvayu+li...@gmail.com wrote:

 Hi Johan,
 
 
 On Mon, Aug 19, 2013 at 12:05:53PM +0200, Johan Ekh wrote:
  Hi all,
  How can I include attached image files in my pdf-file which is
 generated by
  the latex exporter.
 
 
 Short answer: not possible.
 
 
  I know how to work with links but what if I want to
  quickly attach files and then delete the files from my hard disk
 and only
  have them as attachments in my org-file?
 
 
 If you delete a file from the disk, attaching it won't help
 either. Org
 files are plain text, attachments are also stored as references.
 It
 would help us understand better if you could elaborate a bit on
 what is
 your eventual goal?
 
 Cheers,
 
 --
 Suvayu
 
 Open source is the future. It sets us free.
 



-- 
Best wishes

H. Dieter Wilhelm
Darmstadt
Germany



Re: [O] invalid byte-code error when publishing

2013-08-20 Thread Mehul Sanghvi
On Tue, Aug 20, 2013 at 4:20 AM, Sebastien Vauban
sva-n...@mygooglest.comwrote:

 Mehul Sanghvi,

 Mehul Sanghvi wrote:
  Mehul Sanghvi wrote:
   The error only occurs if I'm using org-babl.  The offending piece of
 code
   I've got is:
  
   #+BEGIN_SRC emacs-lisp
   (setq tramp-default-method ssh)
   #+END_SRC
  
   If I remove the #+BEGIN_SRC and #+END_SRC than everything works fine
 and
   I'm able to publish.
 
  Would this fix it?
 
#+BEGIN_SRC emacs-lisp :eval no
(setq tramp-default-method ssh)
#+END_SRC
 
 Thanks for the suggestion.  That does not fix the problem.  I
 still
  get the same error as before.

 Check out the value of:

 - `org-babel-default-header-args', and
 - `org-babel-default-header-args:emacs-lisp'.

 And try whether `:eval query' makes a difference (when answering yes, and
 when
 answering no)?


Using 'C-h v' I get the following:

org-babel-default-header-args is a variable defined in `ob-core.el'.


Its value is ((:session . none)


 (:results . replace)


 (:exports . code)


 (:cache . no)


 (:noweb . no)


 (:hlines . no)


 (:tangle . no)


 (:padnewline . yes))


org-babel-default-header-args:emacs-lisp is a variable defined in
`ob-emacs-lisp.el'.

Its value is ((:hlines . yes)


 (:colnames . no))




Using ':eval query' does not make a difference.   It does not prompt for
yes or no.

cheers,

 mehul

-- 
Mehul N. Sanghvi
email: mehul.sang...@gmail.com


Re: [O] Buffer-specific export filter?

2013-08-20 Thread Suvayu Ali
On Tue, Aug 20, 2013 at 07:45:11PM +0800, James Harkins wrote:
 Is it possible to apply a specific filter during export for one org document, 
 but not others?
 
 Basically, a buffer-specific export filter.
 
 It appears in the org manual that the hook needs to be added into e.g. 
 org-export-filter-plain-text-functions, where it remains globally for the 
 duration of the session. But I have a case here where I need a filter to work 
 around a specific problem I'm having in one document, which isn't a problem 
 in other documents, and I don't want the filter to interfere with the other 
 documents.
 
 Possible? I don't see any mention of it in the manual.

Some thoughts:

1. Is it possible to set filters as buffer local?  Okay the help string
   says: This variable may be risky if used as a file-local variable.,
   so I guess the answer is no.

2. Otherwise you could have used a lisp source block in the buffer.  You
   could still do that, just add a conditional that checks for the
   buffer name.  This way modifying a global filter would still affect
   current buffer export.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] invalid byte-code error when publishing

2013-08-20 Thread Sebastien Vauban
Mehul Sanghvi wrote:
 Sebastien Vauban wrote:
 Mehul Sanghvi wrote:
 Mehul Sanghvi wrote:
 The error only occurs if I'm using org-babl. The offending piece of code
 I've got is:

 #+BEGIN_SRC emacs-lisp
 (setq tramp-default-method ssh)
 #+END_SRC

 If I remove the #+BEGIN_SRC and #+END_SRC than everything works fine and
 I'm able to publish.

 Would this fix it?

   #+BEGIN_SRC emacs-lisp :eval no
   (setq tramp-default-method ssh)
   #+END_SRC

 Thanks for the suggestion. That does not fix the problem. I still get the
 same error as before.

 Check out the value of:

 - `org-babel-default-header-args', and
 - `org-babel-default-header-args:emacs-lisp'.

 And try whether `:eval query' makes a difference (when answering yes, and
 when answering no)?

 Using ':eval query' does not make a difference. It does not prompt for yes
 or no.

Then, there are now 2 things I don't understand:

- why it does not query you for eval?
- why that code gets you in troubles?

I'm out of ideas here...

Try with an ECM, or with emacs -Q?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Buffer-specific export filter?

2013-08-20 Thread Eric Abrahamsen
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Tue, Aug 20, 2013 at 07:45:11PM +0800, James Harkins wrote:
 Is it possible to apply a specific filter during export for one org 
 document, but not others?
 
 Basically, a buffer-specific export filter.
 
 It appears in the org manual that the hook needs to be added into
 e.g. org-export-filter-plain-text-functions, where it remains
 globally for the duration of the session. But I have a case here
 where I need a filter to work around a specific problem I'm having
 in one document, which isn't a problem in other documents, and I
 don't want the filter to interfere with the other documents.
 
 Possible? I don't see any mention of it in the manual.

 Some thoughts:

 1. Is it possible to set filters as buffer local?  Okay the help string
says: This variable may be risky if used as a file-local variable.,
so I guess the answer is no.

 2. Otherwise you could have used a lisp source block in the buffer.  You
could still do that, just add a conditional that checks for the
buffer name.  This way modifying a global filter would still affect
current buffer export.

 Hope this helps,

Two related thoughts I've had: 1) at some point it might be nice to
allow customization of the export options at the top of the export menu
(what currently allows for Body only/Visible only/etc), so that you
could add hooks or perhaps filters on a per-export basis. Also 2), it
could be nice to show, in the export dispatcher, which export hooks are
currently active. Filters, too, if that didn't turn out to be too much
real estate...




[O] LaTeX export question

2013-08-20 Thread Scott Randby
Whenever I export an org file to LaTeX, the LaTeX file always gives me
these lines in the preamble right before \begin{document} (name these
lines Block 1):

\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={}}

I'd like Block 1 to not appear when I export because I give values to
its options in my org file as follows:

#+LATEX_HEADER: \hypersetup{pdfauthor={Scott}, pdftitle={Title},
 pdfsubject={Subject}, pdfkeywords={Key}, pdfproducer={Emacs Org},
 pdfcreator={Creator}}

The above header is exported properly, but it appears before Block 1 in
the preamble of the LaTeX file which means its values are overridden by
the values of Block 1. Hence no keywords, subject, or creator in the
resulting PDF unless I edit the LaTeX file and delete Block 1.

How do I stop the appearance of Block 1 when I export an org file to
LaTeX? I'd rather not be forced to edit the LaTeX file before I make a
PDF.

Scott Randby



Re: [O] LaTeX export question

2013-08-20 Thread Thomas S. Dye
Aloha Scott,

Scott Randby sran...@gmail.com writes:

 Whenever I export an org file to LaTeX, the LaTeX file always gives me
 these lines in the preamble right before \begin{document} (name these
 lines Block 1):

 \hypersetup{
   pdfkeywords={},
   pdfsubject={},
   pdfcreator={}}

 I'd like Block 1 to not appear when I export because I give values to
 its options in my org file as follows:

  (setq org-latex-with-hyperref nil)

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] LaTeX export question

2013-08-20 Thread Scott Randby
On 08/20/2013 12:02 PM, Thomas S. Dye wrote:
 Aloha Scott,
 
 Scott Randby sran...@gmail.com writes:
 
 Whenever I export an org file to LaTeX, the LaTeX file always gives me
 these lines in the preamble right before \begin{document} (name these
 lines Block 1):

 \hypersetup{
   pdfkeywords={},
   pdfsubject={},
   pdfcreator={}}

 I'd like Block 1 to not appear when I export because I give values to
 its options in my org file as follows:
 
   (setq org-latex-with-hyperref nil)
 
 hth,
 Tom
 

Thanks.

Scott



Re: [O] odt export version conflict on emacs for mac os x

2013-08-20 Thread Skip Collins
Thanks Christian. That this behavior shows up in homebrew leads me to
suspect it might be happening on all platforms with recent Emacs,
unless steps are taken to eradicate the bundled org-mode. Exactly what
those steps should be is not clear to me. I suppose I could just
delete files inside Emacs.app. But this seems undesirable for many
reasons. Are there any suggestions for handling this more elegantly?


On Tue, Aug 20, 2013 at 3:53 AM, Christian Moe m...@christianmoe.com wrote:

 Hi,

 I confirm that I see the same behavior, i.e. after ODT export old
 variable names show up in the customize group, similar to what you show
 below.

 This is on GNU Emacs 24.3.1 on a Mac, installed with homebrew, with
 Org-mode 8.0.7 installed via `make update2'.

 This probably accounts for my problems with using a styles file. I had
 thought it a problem with my installation or setup that I never got to
 the bottom of.

 Yours,
 Christian



 Skip Collins writes:

 I think this is a bug. Can someone confirm? After I do an ODT export,
 many ox-odt variables are duplicated with old variable names:
 | [-]-\ Group Org Export ODT
 |  |  |--- Option Org Odt Prettify Xml
 |  |  |--- Option Org Odt Schema Dir
 |  |  |--- Option Org Odt Content Template File
 |  |  |--- Option Org Odt Styles File
 |  |  |--- Option Org Odt Display Outline Level
 |  |  |--- Option Org Odt Convert Processes
 |  |  |--- Option Org Odt Convert Process
 |  |  |--- Option Org Odt Convert Capabilities
 |  |  |--- Option Org Odt Preferred Output Format
 |  |  |--- Option Org Odt Format Drawer Function
 |  |  |--- Option Org Odt Format Headline Function
 |  |  |--- Option Org Odt Format Inlinetask Function
 |  |  |--- Option Org Odt With Latex
 |  |  |--- Option Org Odt Inline Formula Rules
 |  |  |--- Option Org Odt Inline Image Rules
 |  |  |--- Option Org Odt Pixels Per Inch
 |  |  |--- Option Org Odt Create Custom Styles For Srcblocks
 |  |  |--- Option Org Odt Fontify Srcblocks
 |  |  |--- Option Org Odt Table Styles
 |  |  |--- Option Org Odt Use Date Fields
 |  |  |--- Option Org Export Odt Schema Dir
 |  |  |--- Option Org Export Odt Content Template File
 |  |  |--- Option Org Export Odt Styles File
 |  |  |--- Option Org Export Odt Inline Image Extensions
 |  |  |--- Option Org Export Odt Pixels Per Inch
 |  |  |--- Option Org Export Odt Create Custom Styles For Srcblocks
 |  |  |--- Option Org Export Odt Preferred Output Format
 |  |  |--- Option Org Export Odt Table Styles
 |  |  |--- Option Org Export Odt Fontify Srcblocks
 |  |  |--- Option Org Export Odt Category Strings
 |  |  |--- Option Org Export Odt Prettify Xml
 |  |  |--- Option Org Export Odt Convert Processes
 |  |  |--- Option Org Export Odt Convert Process
 |  |  `--- Option Org Export Odt Convert Capabilities

 This is apparently caused by interference from an old version of
 org-mode that is bundled inside my OS X Emacs.app. How can I
 completely disable the old version?




Re: [O] Export attached image files

2013-08-20 Thread Rick Frankel

On 2013-08-20 11:41, Charles Berry wrote:

Johan Ekh ekh.johan at gmail.com writes:

[snip]

I would like
to take a series of screenshots, quickly incorporate them into an org
file together with some text without having to rename
the screenshots with suitable names and organize them on my disk etc. 
I'd

like org-mode to store the images somewhere
in a data directory as an attachment, but of course I'd like the
screenshots to be incorporated in the pdf-file when I export it.
Is this possible?



It's a bit less automated than you might like, but if you define this
library of babel method:

#+name: insert-attached-images
#+BEGIN_SRC emacs-lisp :var where=(point)
(save-excursion
(goto-char where)
(mapcar
(lambda (file)
(format [[%s]] (org-attach-expand file)))
(org-entry-get-multivalued-property
where org-attach-file-list-property)))
#+END_SRC


use it like:

#+call: insert-attached-images() :results list

e.g:

#+BEGIN_ORG

** Heading with attachments   :ATTACH:
:PROPERTIES:
:Attachments: t.png t2.png
:ID:   528b68ed-c896-4a4b-aa3f-b3d292b693bf
:END:
#+RESULTS:

#+call: insert-attached-images() :results list

#+RESULTS:
- 
[[/export/home/ut0598/tmp/data/52/8b68ed-c896-4a4b-aa3f-b3d292b693bf/t.png]]
- 
[[/export/home/ut0598/tmp/data/52/8b68ed-c896-4a4b-aa3f-b3d292b693bf/t2.png]]


#+END_ORG

in a heading with ad-hoc attachments, it will do what you want...

rick




Re: [O] WISH: SQL on org-mode tables

2013-08-20 Thread Marc Ihm

Yes, would like this too !
(But do not know, how to achieve this ...)

I think that simplifying the task of storing data in org-tables would allow
many interesting org-applications to be implemented more easily.

And thanks for pointing at cvsql;
will have a look.

best regards,
Marc

Am 18.08.2013 16:06, schrieb Johan W. Klüwer:

I wish it were possible to execute SQL on tables in org-mode buffers. Filtering 
rows and columns, joining values across named tables, and so forth could be 
done with SQL in the org-table SEND clauses.

There's a script called csvsql that allows for executing SQL on comma- or 
tab-separated files from the command-line (using the H2 database engine): 
https://github.com/jdurbin/durbinlib/wiki/csvsql. I'm thinking csvsql or 
similar could provide the query capability, and org-mode would take care of 
sending it org tables in tab separated format.

That's my wish.

Cheers

Johan







[O] quote, quotation environments in org beamer export just comment text out.

2013-08-20 Thread Ratish Punnoose
Is there a reason that quote, quotation, verse, environments during export 
to tex just comment their contents.

As you can see, they precede the text with %%  which causes latex to 
ignore their contents.

This is an extract from ox-beamer.el

Thanks
Ratish

From ox-beamer.el
--
(defconst org-beamer-environments-default
  '((block  b \\begin{block}%a{%h}  \\end{block})
(alertblock a \\begin{alertblock}%a{%h} 
\\end{alertblock})
(verse  v \\begin{verse}%a %% %h\\end{verse})
(quotation  q \\begin{quotation}%a %% %h
\\end{quotation})
(quote  Q \\begin{quote}%a %% %h\\end{quote})
(structureenv   s \\begin{structureenv}%a %% %h 
\\end{structureenv})
(theoremt \\begin{theorem}%a%U  \\end{theorem})
(definition d \\begin{definition}%a%U   
\\end{definition})
(examplee \\begin{example}%a%U  \\end{example})
(exampleblock   E \\begin{exampleblock}%a{%h}   
\\end{exampleblock})
(proof  p \\begin{proof}%a%U\\end{proof})
(beamercolorbox o \\begin{beamercolorbox}%o{%h} 
\\end{beamercolorbox}))  Environments triggered by properties in Beamer 
export.
-




[O] Org-protocol/org-capture and new emacsclient frames

2013-08-20 Thread Josiah Schwab
Hi All,

I am in the process of setting up org-protocol to allow me to capture
links from chromium into my TODOs.

After reading this worg article
http://orgmode.org/worg/org-contrib/org-protocol.html
I have the chrome - org portion working.

When I click my bookmark, which is
  
javascript:location.href='org-protocol://capture://W/'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title)+'/'+encodeURIComponent(window.getSelection())
the org-protocol link is handled correctly, spawning the command
  /usr/bin/emacsclient -c -n 
org-protocol://capture://W/https%3A%2F%2Fwww.google.com%2F/Google/
and that interacts with my capture template
  (W Web TODO entry (file org-default-notes-file) * TODO %?\n%U\n%a\n)
to open up a capture buffer that looks like what I want.

All is good except for two undesired behaviors:
  1) I get a new emacs frame which is split, with the capture buffer
  only occupying one half.
  2) When I finish capture with C-c C-c the frame sticks around.

I suppose this is more of an emacs question (org has done its thing),
but a similar question has been discussed on this list before:
http://comments.gmane.org/gmane.emacs.orgmode/33650 

Because that discussion was not making use of org-protocol, I was not
able to generalize its conclusions to my circumstance.

Suggestions or pointers to other resources would be welcome.

Best,
Josiah



Re: [O] WISH: SQL on org-mode tables

2013-08-20 Thread Eric Abrahamsen
Marc Ihm m...@ihm.name writes:

 Yes, would like this too !
 (But do not know, how to achieve this ...)

 I think that simplifying the task of storing data in org-tables would allow
 many interesting org-applications to be implemented more easily.

 And thanks for pointing at cvsql;
 will have a look.

 best regards,
 Marc

 Am 18.08.2013 16:06, schrieb Johan W. Klüwer:
 I wish it were possible to execute SQL on tables in org-mode
 buffers. Filtering rows and columns, joining values across named
 tables, and so forth could be done with SQL in the org-table SEND
 clauses.

I tend to think that the solution here involves using the right tools
for the right job. Not everything has to be in Org mode! (Though I feel
a little hypocritical claiming that.) It works so well with external
tools, why not use them?

My rule of thumb is that once a table becomes more about _data storage_
than it does about _data display_ -- ie I'm unlikely to actually examine
or export the table contents -- I try to put it in an external database,
sqlite works just fine. Between orgtable-sqlinsert to go from org table
to database, and babel to query the database, all the tools are there.
Org is just glue, which is something it does very well.

Eric




Re: [O] Buffer-specific export filter?

2013-08-20 Thread James Harkins
Suvayu Ali fatkasuvayu+linux at gmail.com writes:

 1. Is it possible to set filters as buffer local?  Okay the help string
says: This variable may be risky if used as a file-local variable.,
so I guess the answer is no.
 
 2. Otherwise you could have used a lisp source block in the buffer.  You
could still do that, just add a conditional that checks for the
buffer name.  This way modifying a global filter would still affect
current buffer export.

I see... that seems awkward. Maybe a valid feature request.

But maybe there's a better solution for my specific case. The problem is
that I'm using the colloquial 'em for them. The preceding space causes
org to export this as `em. Normally a single quote after a space would
correctly be an opening single quote, but here it's for a contraction and
should be an apostrophe.

Possible solutions:

- Use a LaTeX \specialCharName, if it exists. I couldn't find anything like
this. All the LaTeX documentation says to use '.

- Hacky approach which I tried last night: Define a filter to turn  into
a non-breaking space ~; then org doesn't treat it as an opening single quote.

- Better approach which I just thought of: Define a filter recognizing
'em as a special case, which I could also extend for other special cases
later.

Related question: If I wanted to force a non-breaking space in LaTeX export,
how would I do that without a filter? ~ exports, reasonably, as \textasciitilde.

hjh




[O] Problem writing my first export filter

2013-08-20 Thread James Harkins
Referring to [1]:

I just tried the following, so that I could maintain a list of special cases 
where org's default latex export doesn't do what I want.

(setq hjh-org-latex-macros '((`em 'em)))

(defun hjh-latex-filter-macros (text backend info)
  hjh: Replace special cases listed in hjh-org-latex-macros.
  (when (org-export-derived-backend-p backend 'latex)
(dolist (element hjh-org-latex-macros)
  (replace-regexp-in-string (car element) (car (cdr element)) text

First I tried

(setq org-export-filter-plain-text-functions '(hjh-latex-filter-macros))

-- no result: `em passes through unchanged. So then I tried clearing 
plain-text-functions and using final-output-functions instead. Same thing: the 
filter didn't do anything.

I suppose I'm missing something simple.

Thanks in advance for advice,
hjh

[1] http://article.gmane.org/gmane.emacs.orgmode/75607



Re: [O] WISH: SQL on org-mode tables

2013-08-20 Thread SAKURAI Masashi
Hi,

I wrote a full DB browser in Emacs, EDBI https://github.com/kiwanami/emacs-edbi.

This program provides DB Query API (like Perl's DBI) and table layout framework.
One can query any SQL and layout the results into a rigid table format.
There is no document for API, please see the demo code.
https://github.com/kiwanami/emacs-edbi/blob/master/edbi-demo.el

I don't have a time to integrate it into org-mode,
if someone would write the code, I think I can help a little.


Regards
--
SAKURAI, Masashi (family, given)
m.saku...@kiwanami.net


At Sun, 18 Aug 2013 16:06:43 +0200,
Johan W. Kl$(D+d(Bwer wrote:
 
 [1  text/plain; ISO-8859-1 (7bit)]
 
 [2  text/html; ISO-8859-1 (quoted-printable)]
 I wish it were possible to execute SQL on tables in org-mode buffers. 
 Filtering rows and columns,
 joining values across named tables, and so forth could be done with SQL in 
 the org-table SEND
 clauses.
 
 There's a script called csvsql that allows for executing SQL on comma- or 
 tab-separated files from
 the command-line (using the H2 database engine): 
 https://github.com/jdurbin/durbinlib/wiki/csvsql.
 I'm thinking csvsql or similar could provide the query capability, and 
 org-mode would take care of
 sending it org tables in tab separated format.
 
 That's my wish.
 
 Cheers
 
 Johan