Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Suvayu Ali
On Thu, Sep 19, 2013 at 08:24:51AM +0200, Carsten Dominik wrote:
> 
> On 19.9.2013, at 06:34, Nick Dokos  wrote:
> 
> > Carsten Dominik  writes:
> > 
> >> On 18.9.2013, at 14:14, Suvayu Ali  wrote:
> >> ...
> >>> I think that is expected.  The bug is in the desktop specific open
> >>> commands.  Since you use none, generic open is used.  That is simply a
> >>> shell function, and does the right thing.
> >> 
> >> Is there a generic open command in Linux?  Why don't we use this instead?
> >> 
> > 
> > Not really. There is a shell function called open_generic inside of
> > xdg-open. I believe that's what Suvayu was referring to. But there is
> > no clean way of calling it, short of pulling it out of the xdg-open
> > script into a new script: as a general solution, that's hopeless.
> 
> All right.  Too bad.  Thank you.

Nick said it accurately.  It is part of the xdg-open script.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Carsten Dominik

On 19.9.2013, at 06:34, Nick Dokos  wrote:

> Carsten Dominik  writes:
> 
>> On 18.9.2013, at 14:14, Suvayu Ali  wrote:
>> ...
>>> I think that is expected.  The bug is in the desktop specific open
>>> commands.  Since you use none, generic open is used.  That is simply a
>>> shell function, and does the right thing.
>> 
>> Is there a generic open command in Linux?  Why don't we use this instead?
>> 
> 
> Not really. There is a shell function called open_generic inside of
> xdg-open. I believe that's what Suvayu was referring to. But there is
> no clean way of calling it, short of pulling it out of the xdg-open
> script into a new script: as a general solution, that's hopeless.

All right.  Too bad.  Thank you.

- Carsten


> 
> -- 
> Nick
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Nick Dokos
Carsten Dominik  writes:

> On 18.9.2013, at 14:14, Suvayu Ali  wrote:
> ...
>> I think that is expected.  The bug is in the desktop specific open
>> commands.  Since you use none, generic open is used.  That is simply a
>> shell function, and does the right thing.
>
> Is there a generic open command in Linux?  Why don't we use this instead?
>

Not really. There is a shell function called open_generic inside of
xdg-open. I believe that's what Suvayu was referring to. But there is
no clean way of calling it, short of pulling it out of the xdg-open
script into a new script: as a general solution, that's hopeless.

-- 
Nick




Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Carsten Dominik

On 18.9.2013, at 14:14, Suvayu Ali  wrote:

> Hi Eric,
> 
> On Wed, Sep 18, 2013 at 10:07:17AM +0100, Eric S Fraga wrote:
>> Suvayu Ali  writes:
>> 
>> [...]
>> 
>>> I need some feedback from users using different desktop environments.
>> 
>> [...]
>> 
>>> I would like to know if other desktop environments has the same issue:
>>> kde-open (KDE) and gvfs-open (Gnome, Mate, etc).  So to test, just open
>>> a directory with pdf/odt/html files in dired and run either of them
>>> asynchronously with &.
>>> 
>>> Cheers,
>> 
>> One more data point.  I don't use a desktop environment as such.  I use
>> /ratpoison/ as my window manager.  In my use case, on a system running
>> Ubuntu 13.04, xdg-open works perfectly fine, both synchronously (!) and
>> asynchronously (&), for all three file types listed above, bringing up
>> evince, libreoffice and firefox respectively.
> 
> I think that is expected.  The bug is in the desktop specific open
> commands.  Since you use none, generic open is used.  That is simply a
> shell function, and does the right thing.

Hi,

Is there a generic open command in Linux?  Why don't we use this instead?

- Carsten

> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Carsten Dominik

On 19.9.2013, at 00:21, Rasmus  wrote:

> Carsten Dominik  writes:
> 
>>> [...]
>>> The output tex file looks something like this:
>>> 
>>> \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>>> \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
>> 
>> this looks excellent.  I think we will implement this as the default
>> behavior, but only after 8.2.
>> Does this capture all the possible cases, or are there more cases to 
>> consider?
> 
> I'm not sure what you mean by all cases.  It depends on the the iftex
> package, so everything will break down if it ain't loaded or if it
> ain't loaded before it's used.
> 
> So what would the goal be?  To make it compatible with XeLaTeX and
> LuaLaTeX out of the box?

Yes, this is what I mean.  I would be happy to have some clever line in there 
that would do the right thing for variants of LaTeX.  THis is also what I mean 
by "all cases".

- Carsten

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



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] Can't get dvipng to work

2013-09-18 Thread Nick Dokos
Ken Williams  writes:

> Ken Williams  gmail.com> writes:
>
>> I can try installing manually but it would be great if I could get ELPA 
>> working.
>
> So I installed org-8.1.2 manually and now it does seem to be *trying* to 
> process the images through LaTeX.  But it's not succeeding.  In the 
> *Messages* 
> buffer, I see this:
>
> 
> Creating LaTeX Image...
> Failed to create dvi file from 
> c:/Users/KWILLI~1/AppData/Local/Temp/orgtex6488Qq2.tex
> 
>
> I pasted the contents of ~/AppData/Local/Temp/orgtex6488Qq2.log here, but I 
> don't see anything strange in it:
>
> https://gist.github.com/kenahoo/6613374
>

What happens if you run latex on the tex file by hand?

On Linux, I would say

   cd .../Local/Temp
   latex orgtex6488Qq2.tex

I presume something similar would work on Windows.

-- 
Nick




Re: [O] [Babel][R] Inclusion of multi-line named code blocks in R code

2013-09-18 Thread Alexander Vorobiev
Hi Tom,

Unfortunately I can't have pure SQL output in my org files for two reasons:

1. The result set I am dealing with for this particular problem is about
2 records
2. My SQL server (Netezza, "big data appliance") is not supported by
Babel-SQL. I configured sql-mode to work with Netezza but session-based SQL
is not supported by Babel either. I started adding support for SQL sessions
to ob-sql.el and it kind of works but the results I am getting are
inconsistent and only a small subset of header parameters is supported. Of
course I haven't tested is with any other database. I can share what I've
done if anybody is interested.

Regards,
Alex


On Wed, Sep 18, 2013 at 5:27 PM, Thomas S. Dye  wrote:

> Aloha Alex,
>
> My work flow in this situation evaluates the SQL to create an Org-mode
> table, which serves as input to the R source code block.
>
> For me, seeing the SQL output in a table is a sanity check.
>
> hth,
> Tom
>
> Alexander Vorobiev  writes:
>
> > I have R code which submits SQL statements to a database server. Since
> the
> > SQL is rather complex, I want to put it into a separate code block in
> order
> > to have proper formatting, syntax highlighting, etc:
> >
> > #+name: long-sql
> > #+begin_src sql
> > select *
> > from many, tables
> > where
> > complex_condition1 = 1,
> > complex_condition2 = 2
> > #+end_src
> >
> > * Load the data to R session
> > #+begin_src R :session *R* :noweb yes
> > result <- submit_query('<>')
> > #+end_src
> >
> > Unfortunately, the R block doesn't work. When I open the file generated
> by
> > Babel, I see this:
> >
> > result <- submit_query('select *
> > result <- submit_query('from many, tables
> > etc
> >
> > instead of the one R submit_query call with my SQL statement as an
> > argument. Is there anything I can do to achieve that?
> >
> > Thanks
> > Alex
> > I have R code which submits SQL statements to a database server. Since
> > the SQL is rather complex, I want to put it into a separate code block
> > in order to have proper formatting, syntax highlighting, etc:
> >
> > #+name: long-sql
> > #+begin_src sql
> > select *
> > from many, tables
> > where
> > complex_condition1 = 1,
> > complex_condition2 = 2
> > #+end_src
> >
> > * Load the data to R session
> > #+begin_src R :session *R* :noweb yes
> > result <- submit_query('<>')
> > #+end_src
> >
> > Unfortunately, the R block doesn't work. When I open the file
> > generated by Babel, I see this:
> >
> > result <- submit_query('select *
> > result <- submit_query('from many, tables
> > etc
> >
> > instead of the one R submit_query call with my SQL statement as an
> > argument. Is there anything I can do to achieve that?
> >
> > Thanks
> > Alex
> >
> >
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>


Re: [O] Customizing TOCs in Derived Exporters

2013-09-18 Thread Josiah Schwab

Rasmus writes:

> Josiah Schwab  writes:

>> Independent of the confusion it caused me while trying to figure out how
>> things work, it seems strange that the ox-md exporter generates a
>> non-markdown TOC using org-html-toc.  But I will leave that for those
>> who really use the markdown exporter, which is neither you or me.
>
> Is there a vanilla-markdown TOC-keyword?  My understanding is that
> markdown always understand plain html, whence the html-toc is
> reusable.  If there is exists a vanilla-markdown TOC perhaps it should
> be used.

It sounds likely this is simply a confusion about the markdown
specification on my end then.

Thanks,
Josiah



Re: [O] [Babel][R] Inclusion of multi-line named code blocks in R code

2013-09-18 Thread Thomas S. Dye
Aloha Alex,

My work flow in this situation evaluates the SQL to create an Org-mode
table, which serves as input to the R source code block.

For me, seeing the SQL output in a table is a sanity check.

hth,
Tom

Alexander Vorobiev  writes:

> I have R code which submits SQL statements to a database server. Since the
> SQL is rather complex, I want to put it into a separate code block in order
> to have proper formatting, syntax highlighting, etc:
>
> #+name: long-sql
> #+begin_src sql
> select *
> from many, tables
> where
> complex_condition1 = 1,
> complex_condition2 = 2
> #+end_src
>
> * Load the data to R session
> #+begin_src R :session *R* :noweb yes
> result <- submit_query('<>')
> #+end_src
>
> Unfortunately, the R block doesn't work. When I open the file generated by
> Babel, I see this:
>
> result <- submit_query('select *
> result <- submit_query('from many, tables
> etc
>
> instead of the one R submit_query call with my SQL statement as an
> argument. Is there anything I can do to achieve that?
>
> Thanks
> Alex
> I have R code which submits SQL statements to a database server. Since
> the SQL is rather complex, I want to put it into a separate code block
> in order to have proper formatting, syntax highlighting, etc:
>
> #+name: long-sql
> #+begin_src sql
> select * 
> from many, tables
> where
> complex_condition1 = 1,
> complex_condition2 = 2
> #+end_src
>
> * Load the data to R session
> #+begin_src R :session *R* :noweb yes
> result <- submit_query('<>')
> #+end_src
>
> Unfortunately, the R block doesn't work. When I open the file
> generated by Babel, I see this:
>
> result <- submit_query('select *
> result <- submit_query('from many, tables
> etc
>
> instead of the one R submit_query call with my SQL statement as an
> argument. Is there anything I can do to achieve that?
>
> Thanks
> Alex
>
>

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



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Rasmus
Carsten Dominik  writes:

>> [...]
>> The output tex file looks something like this:
>> 
>>  \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>>  \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
>
> this looks excellent.  I think we will implement this as the default
> behavior, but only after 8.2.
> Does this capture all the possible cases, or are there more cases to consider?

I'm not sure what you mean by all cases.  It depends on the the iftex
package, so everything will break down if it ain't loaded or if it
ain't loaded before it's used.

So what would the goal be?  To make it compatible with XeLaTeX and
LuaLaTeX out of the box?

–Rasmus

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



Re: [O] Customizing TOCs in Derived Exporters

2013-09-18 Thread Rasmus
Josiah Schwab  writes:

> Rasmus writes:
>
>> Josiah Schwab writes:
>>
>>> How does one go about overriding org-html-toc, which unlike something
>>> like org-html-bold, does not appear in org-export-define-backend?  I
>>> don't want the TOC not to appear, rather want it to be generated by
>>> another function, org-md-toc or what have you.
>>
>> I'm not sure whether this would work with md simply 'cause I haven't
>> worked with the html+friends exporter(s), but perhaps you could
>> replace the inner-template, i.e. write a replacement for
>> org-html-inner-template.
>
> Yes, this suggestion worked for me.  Thank you for the advice.  Little
> by little I will come to understand the new exporter (not that I
> understood the old one).
>
> Independent of the confusion it caused me while trying to figure out how
> things work, it seems strange that the ox-md exporter generates a
> non-markdown TOC using org-html-toc.  But I will leave that for those
> who really use the markdown exporter, which is neither you or me.

Is there a vanilla-markdown TOC-keyword?  My understanding is that
markdown always understand plain html, whence the html-toc is
reusable.  If there is exists a vanilla-markdown TOC perhaps it should
be used.

–Rasmus

-- 
Dung makes an excellent fertilizer



Re: [O] [Babel] Padlines

2013-09-18 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
> aditya siram  writes:
>> What's the rationale for having padlines by default in tangled source? It
>> generates wrong programs for languages where whitespace is significant
>> (Haskell) and, for me, doesn't noticeably improve the look of the tangled
>> file in cases where it isn't.
>
> It is possible to change the value of default header arguments on a
> per-language basis because e.g., while (:padlines "yes") may make sense
> for sh, it probably doesn't for Haskell.

Could it be possible that ":padline yes" does not insert a blank line in front
of the very first block, only *between* all blocks?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [Babel][R] Inclusion of multi-line named code blocks in R code

2013-09-18 Thread Alexander Vorobiev
I have R code which submits SQL statements to a database server. Since the
SQL is rather complex, I want to put it into a separate code block in order
to have proper formatting, syntax highlighting, etc:

#+name: long-sql
#+begin_src sql
select *
from many, tables
where
complex_condition1 = 1,
complex_condition2 = 2
#+end_src

* Load the data to R session
#+begin_src R :session *R* :noweb yes
result <- submit_query('<>')
#+end_src

Unfortunately, the R block doesn't work. When I open the file generated by
Babel, I see this:

result <- submit_query('select *
result <- submit_query('from many, tables
etc

instead of the one R submit_query call with my SQL statement as an
argument. Is there anything I can do to achieve that?

Thanks
Alex


Re: [O] [Babel] Padlines

2013-09-18 Thread Eric Schulte
aditya siram  writes:

> Hi all,
> What's the rationale for having padlines by default in tangled source? It
> generates wrong programs for languages where whitespace is significant
> (Haskell) and, for me, doesn't noticeably improve the look of the tangled
> file in cases where it isn't.
> Thanks!
> -deech

It is possible to change the value of default header arguments on a
per-language basis because e.g., while (:padlines "yes") may make sense
for sh, it probably doesn't for Haskell.

I just changed the value of org-babel-default-header-args:haskell, so
that :padlines will be turned off by default for that language.

Cheers,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Customizing TOCs in Derived Exporters

2013-09-18 Thread Josiah Schwab

Rasmus writes:

> Josiah Schwab writes:
>
>> How does one go about overriding org-html-toc, which unlike something
>> like org-html-bold, does not appear in org-export-define-backend?  I
>> don't want the TOC not to appear, rather want it to be generated by
>> another function, org-md-toc or what have you.
>
> I'm not sure whether this would work with md simply 'cause I haven't
> worked with the html+friends exporter(s), but perhaps you could
> replace the inner-template, i.e. write a replacement for
> org-html-inner-template.

Yes, this suggestion worked for me.  Thank you for the advice.  Little
by little I will come to understand the new exporter (not that I
understood the old one).

Independent of the confusion it caused me while trying to figure out how
things work, it seems strange that the ox-md exporter generates a
non-markdown TOC using org-html-toc.  But I will leave that for those
who really use the markdown exporter, which is neither you or me.

Best,
Josiah




Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread aditya siram
Yup running C-c C-c solved it! Didn't know about that.

And I can't believe I made the "padlines" typo.

Thanks for taking the time!
-deech


On Wed, Sep 18, 2013 at 1:59 PM, Sebastien Vauban
wrote:

> aditya siram wrote:
> > Sebastien Vauban wrote:
> >> aditya siram wrote:
> >>>
> >>> Here's the org-file with padlines set to "no" up top:
> >>>
> >>> #+PROPERTY: :padlines no
> >>   ^
> >> Try without the ":"...
>
> ... and without the "s" to padlines...
>
> So, the correct line is:
>
> --8<---cut here---start->8---
> #+PROPERTY: padline no
> --8<---cut here---end--->8---
>
> >>> * Headline
> >>>   #+BEGIN_SRC c :tangle /tmp/padlines-test.c :comments link
> >>>   hello world
> >>>   #+END_SRC
> >
> > I tried `#+PROPERTY :padlines no` , `#+PROPERTY: padlines no` and
> > `#+PROPERTY padlines no` all with the same result.
>
> Don't forget as well that you must do a C-c C-c on the "options" block
> after
> every change you make to one of them. That's annoying, because we always
> forget it, but that's necessary for your change to be applied!
>
> >> You see why an ECM is sometimes the best way to find a problem...
>
> Same conclusion, except I should have run your ECM! ;-)
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>


Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread Sebastien Vauban
aditya siram wrote:
> Sebastien Vauban wrote:
>> aditya siram wrote:
>>>
>>> Here's the org-file with padlines set to "no" up top:
>>>
>>> #+PROPERTY: :padlines no
>>   ^
>> Try without the ":"...

... and without the "s" to padlines...

So, the correct line is:

--8<---cut here---start->8---
#+PROPERTY: padline no
--8<---cut here---end--->8---

>>> * Headline
>>>   #+BEGIN_SRC c :tangle /tmp/padlines-test.c :comments link
>>>   hello world
>>>   #+END_SRC
>
> I tried `#+PROPERTY :padlines no` , `#+PROPERTY: padlines no` and
> `#+PROPERTY padlines no` all with the same result.

Don't forget as well that you must do a C-c C-c on the "options" block after
every change you make to one of them. That's annoying, because we always
forget it, but that's necessary for your change to be applied!

>> You see why an ECM is sometimes the best way to find a problem...

Same conclusion, except I should have run your ECM! ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread aditya siram
I tried `#+PROPERTY :padlines no` , `#+PROPERTY: padlines no` and
`#+PROPERTY padlines no` all with the same result.
Thanks!
-deech


On Wed, Sep 18, 2013 at 12:20 PM, Sebastien Vauban
wrote:

> aditya siram wrote:
> > Here's the org-file with padlines set to "no" up top:
> > #+PROPERTY: :padlines no
>   ^
> Try without the ":"...
>
> > * Headline
> >   #+BEGIN_SRC c :tangle /tmp/padlines-test.c :comments link
> >   hello world
> >   #+END_SRC
> >
> > And the tangle file:
> >
> > /* [[file:/tmp/padlines-test.org::*Headline][Headline:1]] */
> >
> > hello world
> >
> > /* Headline:1 ends here */
>
> You see why an ECM is sometimes the best way to find a problem...
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>


Re: [O] Can't get dvipng to work

2013-09-18 Thread Ken Williams
Ken Williams  gmail.com> writes:

> I can try installing manually but it would be great if I could get ELPA 
> working.

So I installed org-8.1.2 manually and now it does seem to be *trying* to 
process the images through LaTeX.  But it's not succeeding.  In the *Messages* 
buffer, I see this:


Creating LaTeX Image...
Failed to create dvi file from 
c:/Users/KWILLI~1/AppData/Local/Temp/orgtex6488Qq2.tex


I pasted the contents of ~/AppData/Local/Temp/orgtex6488Qq2.log here, but I 
don't see anything strange in it:

https://gist.github.com/kenahoo/6613374

 -Ken




Re: [O] M-x fill-region equivalent for lists?

2013-09-18 Thread Nick Dokos
John Hendy  writes:

> P.S. Oddly, reply-all to your email composes an email to myself and
> the Org-mode list, but not you directly... what might be the cause of
> that?
>
> This is the behavior I get with gmail. Just wanted to let you know.
>

Not really odd: Eric F. set the Mail-followup-to header to just you
and the ML. For some background, see http://cr.yp.to/proto/replyto.html

Nick




Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread Sebastien Vauban
aditya siram wrote:
> Here's the org-file with padlines set to "no" up top:
> #+PROPERTY: :padlines no
  ^
Try without the ":"...

> * Headline
>   #+BEGIN_SRC c :tangle /tmp/padlines-test.c :comments link
>   hello world
>   #+END_SRC
>
> And the tangle file:
>
> /* [[file:/tmp/padlines-test.org::*Headline][Headline:1]] */
>
> hello world
>
> /* Headline:1 ends here */

You see why an ECM is sometimes the best way to find a problem...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Can't get dvipng to work

2013-09-18 Thread Ken Williams
Rasmus  gmx.us> writes:
> 
> So in short I think the easiest course of action is upgrading to the
> newest release, e.g. using ELPA (M-x list-packages).

I agree - I'm trying to update now.  I hadn't used ELPA before, so I tried 
that route and I'm getting a ton of 'ox-*' related errors like this:

--
Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-ascii.el at 
Wed Sep 18 11:30:24 2013
ox-ascii.el:41:1:Error: Symbol's value as variable is void: org-list-allow-
alphabetical

Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-beamer.el at 
Wed Sep 18 11:30:24 2013
ox-beamer.el:117:1:Error: Symbol's value as variable is void: org-list-
allow-alphabetical

Compiling file c:/Users/kwilliams/.emacs.d/elpa/org-20130916/ox-html.el at 
Wed Sep 18 11:30:24 2013
ox-html.el:37:1:Error: Symbol's value as variable is void: org-list-allow-
alphabetical
...
--

I can try installing manually but it would be great if I could get ELPA 
working.

 -Ken





Re: [O] M-x fill-region equivalent for lists?

2013-09-18 Thread John Hendy
P.S. Oddly, reply-all to your email composes an email to myself and
the Org-mode list, but not you directly... what might be the cause of
that?

This is the behavior I get with gmail. Just wanted to let you know.

John

On Wed, Sep 18, 2013 at 4:15 AM, Eric S Fraga  wrote:
> John Hendy  writes:
>
>> Greetings,
>>
>>
>> When editing lists after deleting words (shortening lines) and/or
>> concatenating one line with the one that follows (to remedy a
>> shortened line), I end up with an "unfilled" list item. Is there an
>> Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org
>> document list entries?
>
> Doesn't fill-paragraph work?  It does for me.
>
> Well, to be precise, I have M-q bound to maybe-fill-paragraph which is
> defined as
>
> #+begin_src emacs-lisp
> (defun maybe-fill-paragraph (&optional justify region)
>   "Fill paragraph at or after point (see `fill-paragraph').
>
> Does nothing if `visual-line-mode' is on."
>   (interactive (progn
>  (barf-if-buffer-read-only)
>  (list (if current-prefix-arg 'full) t)))
>   (or visual-line-mode
>   (fill-paragraph justify region)))
> #+end_src
>
> HTH,
> eric
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
>



Re: [O] M-x fill-region equivalent for lists?

2013-09-18 Thread John Hendy
On Wed, Sep 18, 2013 at 4:15 AM, Eric S Fraga  wrote:
> John Hendy  writes:
>
>> Greetings,
>>
>>
>> When editing lists after deleting words (shortening lines) and/or
>> concatenating one line with the one that follows (to remedy a
>> shortened line), I end up with an "unfilled" list item. Is there an
>> Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org
>> document list entries?
>
> Doesn't fill-paragraph work?  It does for me.
>
> Well, to be precise, I have M-q bound to maybe-fill-paragraph which is
> defined as
>

Sort of. Screenshots attached:
- as-is.png is the text from my initial email just yanked into Emacs

- uneven-start.png is the result of `M-x fill-paragraph` on that text

- even-start.png is the result of `M-x fill-paragraph` on the text if
I make sure the start of every line is justified with two spaces, as
it would if I'd been writing that full line directly in an Org list
item and then deleted/shortened some of the lines.

- default.org is me taking the original yanked text and arranging it
all on one line, then pressing space at the end of the line.

So... if the start of the lines in an item aren't even, you get an
uneven fill, and in both cases, the right ragged edge is more ragged
than Org would have done on it's own. I didn't know about this
function and have just always used fill-region (not sure why!), so
thanks for suggesting it, as it's definitely getting things close.


John

> #+begin_src emacs-lisp
> (defun maybe-fill-paragraph (&optional justify region)
>   "Fill paragraph at or after point (see `fill-paragraph').
>
> Does nothing if `visual-line-mode' is on."
>   (interactive (progn
>  (barf-if-buffer-read-only)
>  (list (if current-prefix-arg 'full) t)))
>   (or visual-line-mode
>   (fill-paragraph justify region)))
> #+end_src
>
> HTH,
> eric
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
>
<><><><>

Re: [O] Tag/Property that keeps headline folded during global visibility cycling?

2013-09-18 Thread Thorsten Jolitz
Carsten Dominik  writes:

>> Yes, in principle I'm looking for drawer-style visibility behaviour. In
>> some aspects it would be more convenient though to have this behaviour
>> for certain marked subtrees - for an overview, navigation, tagging,
>> exporting ... a headline offers more than a drawer.
>
> You can also "misuse" the ARCHIVE tag for this purpose.

Ok, nice. 
I don't mind if its a trick as long as it does what I want.

Thanks.

-- 
cheers,
Thorsten




Re: [O] Tag/Property that keeps headline folded during global visibility cycling?

2013-09-18 Thread Carsten Dominik

On 18.9.2013, at 15:56, Thorsten Jolitz  wrote:

> Nick Dokos  writes:
> 
>> Thorsten Jolitz  writes:
>> 
>>> Hi List, 
>>> 
>>> assume an Org file like 
>>> 
>>> ,---
>>> | * Topic 1
>>> | ** Comment
>>> | ** Content
>>> | * Topic 2
>>> | ** Comment
>>> | ** Content
>>> `---
>>> 
>>> where I want the 
>>> 
>>> ,---
>>> | ** Comment
>>> `---
>>> 
>>> subtrees folded all the time (during global visibility cycling, not only
>>> at start-up), except when I explicitly cycle their visibility locally,
>>> i.e. I would like a 'property-drawer' like visibility behaviour for
>>> these subtrees.
>>> 
>>> Is that implemented in Org-mode, or does somebody has a private
>>> implementation of this (maybe via tags or headline properties)?
>>> 
>>> Wouldn't this be a nice feature for Org-mode?
>>> 
>> 
>> Isn't that what drawers are for?
>> 
>> #+DRAWERS: comment
>> 
>> * foo
>>  :comment:
>>  This is a comment
>>  :END:
>> ** This is a subsection
>> * bar
>>  :comment:
>>  This is another comment
>>  :END:
>> ** This is another subsection
> 
> Yes, in principle I'm looking for drawer-style visibility behaviour. In
> some aspects it would be more convenient though to have this behaviour
> for certain marked subtrees - for an overview, navigation, tagging,
> exporting ... a headline offers more than a drawer.

You can also "misuse" the ARCHIVE tag for this purpose.

- Carsten

> 
> -- 
> cheers,
> Thorsten
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] Tag/Property that keeps headline folded during global visibility cycling?

2013-09-18 Thread Thorsten Jolitz
Nick Dokos  writes:

> Thorsten Jolitz  writes:
>
>> Hi List, 
>>
>> assume an Org file like 
>>
>> ,---
>> | * Topic 1
>> | ** Comment
>> | ** Content
>> | * Topic 2
>> | ** Comment
>> | ** Content
>> `---
>>
>> where I want the 
>>
>> ,---
>> | ** Comment
>> `---
>>
>> subtrees folded all the time (during global visibility cycling, not only
>> at start-up), except when I explicitly cycle their visibility locally,
>> i.e. I would like a 'property-drawer' like visibility behaviour for
>> these subtrees.
>>
>> Is that implemented in Org-mode, or does somebody has a private
>> implementation of this (maybe via tags or headline properties)?
>>
>> Wouldn't this be a nice feature for Org-mode?
>>
>
> Isn't that what drawers are for?
>
> #+DRAWERS: comment
>
> * foo
>   :comment:
>   This is a comment
>   :END:
> ** This is a subsection
> * bar
>   :comment:
>   This is another comment
>   :END:
> ** This is another subsection

Yes, in principle I'm looking for drawer-style visibility behaviour. In
some aspects it would be more convenient though to have this behaviour
for certain marked subtrees - for an overview, navigation, tagging,
exporting ... a headline offers more than a drawer.

-- 
cheers,
Thorsten




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Carsten Dominik

On 17.9.2013, at 15:24, Rasmus  wrote:

> Hi Carsten,
> 
> Carsten Dominik  writes:
> 
>> I'd be interested to see a patch to this effect.
> 
> For now here's the filter I use and a add-to-list that hopefully
> works.  It could be turned into a general function such that
> 
>   - Certain packages are only required with certain flavors of TeX
> (curtsy of iftex).
>   - It only applies to the preamble (e.g. I don't want it in my
> code-blocks).
> 
> For me it works great because I can quickly check drafts with pdftex
> (which is substantially faster on my system) and switch to xelatex or
> lualatex for more serious drafts.
> 
>  (setq rasmus/org-protected-packages '(inputenc fontenc))
>  (add-to-list 'org-latex-default-packages-alist '("" "iftex" nil))
> 
>  (defun rasmus/org-latex-filter-protect-inputenc (text backend info)
>"Make inputenc and fontenc only load when using pdflatex"
>(when (org-export-derived-backend-p backend 'latex 'beamer)
>  (replace-regexp-in-string
>   (format  "\\(usepackage\\[.*\\]{\\(%s\\)}\\)"
>(mapconcat 'symbol-name pank/org-protected-packages "\\|"))
>   "ifPDFTeX\\1elsefi"
>   text)))
> 
>  (add-to-list 'org-export-filter-final-output-functions
>   'rasmus/org-latex-filter-protect-inputenc)
> 
> 
> The output tex file looks something like this:
> 
>  \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>  \ifPDFTeX\usepackage[T1]{fontenc}\else\fi

Hi Rasmus,

this looks excellent.  I think we will implement this as the default behavior, 
but only after 8.2.
Does this capture all the possible cases, or are there more cases to consider?

- Carsten

> 
> BTW: I think the \else is redundant.
> 
> –Rasmus
> 
> --
> There are known knowns; there are things we know that we know.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread aditya siram
Here's the org-file with padlines set to "no" up top:
#+PROPERTY: :padlines no
* Headline
  #+BEGIN_SRC c :tangle /tmp/padlines-test.c :comments link
  hello world
  #+END_SRC

And the tangle file:

/* [[file:/tmp/padlines-test.org::*Headline][Headline:1]] */

hello world

/* Headline:1 ends here */




On Wed, Sep 18, 2013 at 2:31 AM, Sebastien Vauban
wrote:

> Hi Aditya,
>
> aditya siram wrote:
> > It appears as though buffer wide properties are ignored when tangling
> > source blocks. This is easily reproducible by add a `#+PROPERTY:
> :padlines
> > no` to the top of the file and tangling something. The source has
> padlines.
> > I tried variations on including `#+PROPERTY: padlines no` and
> `#+PROPERTY:
> > header-args: padlines-no` with the same result.
>
> Could you send an ECM [1], please?
>
> Best regards,
>   Seb
>
> [1] "Exemple Complet Minimal", or Minimal Working Example.
>
> --
> Sebastien Vauban
>
>
>


Re: [O] Tag/Property that keeps headline folded during global visibility cycling?

2013-09-18 Thread Nick Dokos
Thorsten Jolitz  writes:

> Hi List, 
>
> assume an Org file like 
>
> ,---
> | * Topic 1
> | ** Comment
> | ** Content
> | * Topic 2
> | ** Comment
> | ** Content
> `---
>
> where I want the 
>
> ,---
> | ** Comment
> `---
>
> subtrees folded all the time (during global visibility cycling, not only
> at start-up), except when I explicitly cycle their visibility locally,
> i.e. I would like a 'property-drawer' like visibility behaviour for
> these subtrees.
>
> Is that implemented in Org-mode, or does somebody has a private
> implementation of this (maybe via tags or headline properties)?
>
> Wouldn't this be a nice feature for Org-mode?
>

Isn't that what drawers are for?

--8<---cut here---start->8---
#+DRAWERS: comment

* foo
  :comment:
  This is a comment
  :END:
** This is a subsection
* bar
  :comment:
  This is another comment
  :END:
** This is another subsection
--8<---cut here---end--->8---


-- 
Nick




Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Suvayu Ali
Hi Eric,

On Wed, Sep 18, 2013 at 10:07:17AM +0100, Eric S Fraga wrote:
> Suvayu Ali  writes:
> 
> [...]
> 
> > I need some feedback from users using different desktop environments.
> 
> [...]
> 
> > I would like to know if other desktop environments has the same issue:
> > kde-open (KDE) and gvfs-open (Gnome, Mate, etc).  So to test, just open
> > a directory with pdf/odt/html files in dired and run either of them
> > asynchronously with &.
> >
> > Cheers,
> 
> One more data point.  I don't use a desktop environment as such.  I use
> /ratpoison/ as my window manager.  In my use case, on a system running
> Ubuntu 13.04, xdg-open works perfectly fine, both synchronously (!) and
> asynchronously (&), for all three file types listed above, bringing up
> evince, libreoffice and firefox respectively.

I think that is expected.  The bug is in the desktop specific open
commands.  Since you use none, generic open is used.  That is simply a
shell function, and does the right thing.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Displaying links in tables in fixed-width font

2013-09-18 Thread Alan Schmitt
Hello,

I'm using a proportional font for my text modes (including org-mode),
with a little hack to make sure that code and tables are displayed in a
fixed font.

--8<---cut here---start->8---
;; from 
http://yoo2080.wordpress.com/2013/05/30/monospace-font-in-tables-and-source-code-blocks-in-org-mode-proportional-font-in-other-parts/
(defun my-adjoin-to-list-or-symbol (element list-or-symbol)
  (let ((list (if (not (listp list-or-symbol))
  (list list-or-symbol)
list-or-symbol)))
(require 'cl-lib)
(cl-adjoin element list)))

(mapc
 (lambda (face)
   (set-face-attribute
face nil
:inherit
(my-adjoin-to-list-or-symbol
 'fixed-pitch
 (face-attribute face :inherit
 (list 'org-code 'org-block 'org-table 'org-block-background 'org-date))
--8<---cut here---end--->8---

It works great with one exception: links in tables are displayed using a
proportional font, which breaks the alignment of columns. Is there a way
to display links in table in a fixed font (and keep them proportional in
other places)? Or is it only possible to always display them in a fixed
font?

Thanks,

Alan



[O] Tag/Property that keeps headline folded during global visibility cycling?

2013-09-18 Thread Thorsten Jolitz

Hi List, 

assume an Org file like 

,---
| * Topic 1
| ** Comment
| ** Content
| * Topic 2
| ** Comment
| ** Content
`---

where I want the 

,---
| ** Comment
`---

subtrees folded all the time (during global visibility cycling, not only
at start-up), except when I explicitly cycle their visibility locally,
i.e. I would like a 'property-drawer' like visibility behaviour for
these subtrees.

Is that implemented in Org-mode, or does somebody has a private
implementation of this (maybe via tags or headline properties)?

Wouldn't this be a nice feature for Org-mode?

--
cheers,
Thorsten





Re: [O] M-x fill-region equivalent for lists?

2013-09-18 Thread Eric S Fraga
John Hendy  writes:

> Greetings,
>
>
> When editing lists after deleting words (shortening lines) and/or
> concatenating one line with the one that follows (to remedy a
> shortened line), I end up with an "unfilled" list item. Is there an
> Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org
> document list entries?

Doesn't fill-paragraph work?  It does for me.

Well, to be precise, I have M-q bound to maybe-fill-paragraph which is
defined as

#+begin_src emacs-lisp
(defun maybe-fill-paragraph (&optional justify region)
  "Fill paragraph at or after point (see `fill-paragraph').

Does nothing if `visual-line-mode' is on."
  (interactive (progn
 (barf-if-buffer-read-only)
 (list (if current-prefix-arg 'full) t)))
  (or visual-line-mode
  (fill-paragraph justify region)))
#+end_src

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Eric S Fraga
Suvayu Ali  writes:

[...]

> I need some feedback from users using different desktop environments.

[...]

> I would like to know if other desktop environments has the same issue:
> kde-open (KDE) and gvfs-open (Gnome, Mate, etc).  So to test, just open
> a directory with pdf/odt/html files in dired and run either of them
> asynchronously with &.
>
> Cheers,

One more data point.  I don't use a desktop environment as such.  I use
/ratpoison/ as my window manager.  In my use case, on a system running
Ubuntu 13.04, xdg-open works perfectly fine, both synchronously (!) and
asynchronously (&), for all three file types listed above, bringing up
evince, libreoffice and firefox respectively.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] css stylesheet

2013-09-18 Thread Christian Moe

pw writes:

> ... when I look at the html code generated, I can see a bunch of css which I 
> do not want (see below).
>
>
> Why this css code is here and how can I remove it ?

It's included by default to make nice-looking HTML out of the box.

>From the manual: "To turn inclusion of these defaults off,
customize `org-html-head-include-default-style' or set `html-style' to
`nil' in an `OPTIONS' line."

[[info:org#CSS support]]

Yours,
Christian



Re: [O] [Babel] Padlines

2013-09-18 Thread Sebastien Vauban
aditya siram wrote:
> What's the rationale for having padlines by default in tangled source?

It generates more readable source-code, as blocks are not "glued" next to each
other.

> It generates wrong programs for languages where whitespace is significant
> (Haskell) and, for me, doesn't noticeably improve the look of the tangled
> file in cases where it isn't.

Though, I admit that "padlines yes" should be smarter and add only one line
*between* blocks, but NOT before the first one!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [Babel] Buffer-wide properties ignored ...

2013-09-18 Thread Sebastien Vauban
Hi Aditya,

aditya siram wrote:
> It appears as though buffer wide properties are ignored when tangling
> source blocks. This is easily reproducible by add a `#+PROPERTY: :padlines
> no` to the top of the file and tangling something. The source has padlines.
> I tried variations on including `#+PROPERTY: padlines no` and `#+PROPERTY:
> header-args: padlines-no` with the same result.

Could you send an ECM [1], please?

Best regards,
  Seb

[1] "Exemple Complet Minimal", or Minimal Working Example.

-- 
Sebastien Vauban




Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Glyn Millington
Suvayu Ali  writes:

> Hi,
>
> On Tue, Sep 17, 2013 at 10:31:41PM +0200, Carsten Dominik wrote:
>>  On 17.9.2013, at 22:21, Suvayu Ali 
>> wrote:
>> >  I can consistently repeat this outside of Org.  I am trying with
>> > dired-do-shell-command'.
>> > 
>> > Steps: 1) (dired-do-shell-command "xdg-open" nil '("file.pdf")),
>> > the script runs and opens the pdf file.  2)
>> > (dired-do-shell-command "xdg-open &" nil '("file.pdf")), this runs
>> > the script too but the pdf is not opened.
>> > 
>> > (I know the scripts run because I turned on debugging in the
>> > scripts)
>> > 
>> > I'm assuming Org opens it asynchronously.  What lisp function does
>> > Org use?
>>  Org used start-process-shell-command, and this happens in
>> org-open-file, which is called for links to a file in
>> org-open-at-point.
>
> I need some feedback from users using different desktop environments.
> What DEs do you use, Matt, Glyn?

Xfce here too, on Arch linux.


>
> I am on XFCE.  For me xdg-open calls the internal function (defined in
> the script), open_xfce.  Inside that function, exo-open is called.
> This is XFCE specific.  When I replace exo-open with say, evince, and
> open a pdf file; start-process-shell-command works; with exo-open it
> doesn't.  I can repeat this for html files with Firefox.
>
> I would like to know if other desktop environments has the same issue:
> kde-open (KDE) and gvfs-open (Gnome, Mate, etc).  So to test, just
> open a directory with pdf/odt/html files in dired and run either of
> them asynchronously with &.

If you don't get any other feedback I'll try again with KDE in the
morning - it's late here!

with thanks and best wishes





Glyn



Re: [O] bug#14605: Problem with export an .org file to .pdf does not open pdf file

2013-09-18 Thread Glyn Millington
Matt Price  writes:

> On Tue, Sep 17, 2013 at 5:25 PM, Glyn Millington
>  wrote:
>> Carsten Dominik  writes:
>>
>>> On 17.9.2013, at 15:56, Suvayu Ali 
>>> wrote:
>>>
 On Tue, Sep 17, 2013 at 09:04:45AM +0100, Glyn Millington wrote:
> Carsten Dominik  writes:
>
>> On 17.9.2013, at 08:01, Matt Price  wrote:
>>
>>> On Tue, Sep 17, 2013 at 12:42 AM, Matt Price
>>>  wrote:
 On Tue, Sep 3, 2013 at 5:12 AM, Achim Gratz
  wrote:
> Or you could leave it in and see who complains.  The
> instances where xdg-open doesn't work or is not correctly
> configured will probably be in multi-user / corporate
> environments where it is unlikely that the newest Org or
> Emacs is installed anyway.
 Hi,
 I'm running today's org with a recent emacs-snapshot in a
 single-user linux environment (ubuntu 13.04).
 xdg-open xxx.html works fine when run from the command line,
 but from inside org-mode it seems to fail to run In
 particular, html, odt and pdf documents no longer seem to open
 from the export menu, even though the log in *Messages*
 reports that the relevant command
 ("xdg-open-my-org-file.html") has been run.
>>  Is there anyone else who has tried the xgd-open way to follow
>> links with Org?
>>
>  Yes, I have the same symptoms as Matt.
> GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2)
> Org-mode 8.1.1 (the latest ELPA package fails in the same way)
> xdg-open works on the command line but not through the org-export
> menu - pdfs and html files don't open automatically.  There are
> no error messages.
  I see the same problem.  But I think this might be an Emacs
 issue; I can't open a pdf from dired either (with & on a pdf
 file).  However I can open it if I execute a shell command: M-!
 xdg-open file.pdf RET.
>>> Do I need to conclude that, for the time being, xdg-open has to be
>>> removed from the default value of org-file-apps?
>> That did the trick - pdf files now open as before, as do html
>> exports.
>
>
> Glyn, can you just tell me what you set org-file-apps to? I wasn't
> able to find a value that worked.  Thank you!

Having checked on the git page and seen that Carsten reverted the changes
that caused the problem, I cleared out my elpa installation and cloned
the git repository!  The value I now have, the default, is:

 ((auto-mode . emacs)
 ("\\.mm\\'" . default)
 ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))

The changes are listed here:


http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=3f177965ee606a64e6fb6cc948a12f8f5a0290c4


diff --git a/lisp/org.el b/lisp/org.el
index 0cf141c..0762696 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1899,13 +1899,9 @@ single keystroke rather than having to type \"yes\"."
:type 'regexp)
(defconst org-file-apps-defaults-gnu
- (append
- '((remote . emacs))
- (if (executable-find "xdg-open")
- '((system . "xdg-open %s")
- (t . "xdg-open %s"))
- '((system . mailcap)
- (t . mailcap
+ '((remote . emacs)
+ (system . mailcap)
+ (t . mailcap))
"Default file applications on a UNIX or GNU/Linux system.
See `org-file-apps'.")


atb

Glyn