Re: [O] org-babel-capitalize-example-region-markers

2017-02-26 Thread Sebastien Vauban
Hello all,

Kyle Meyer <k...@kyleam.com> writes:
> Kyle Meyer <k...@kyleam.com> writes:
>
> [...]
>
>>> Also, it seems "capitalize" is the wrong verb here?
>>
>> Something with "upcase" or "uppercase" would have been better given the
>> behavior of upcase and capitalize.
>
> Here's a patch.  I'll apply it to master in a day or two if there are no
> objections.

Shouldn't we have an option which would control the case of all
"keywords" found in `org-structure-template-alist' in one go -- and not
just the "example" template?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Dynamic block

2017-02-22 Thread Sebastien Vauban
Dear all,

I've used the following for years -- until (finally!) my switch to Org
mode 9, a couple of weeks ago.

--8<---cut here---start->8---
#+NAME: prestasTotal
#+BEGIN: clocktable :lang "fr" :block 2017-02 :maxlevel 3 :scope 
("~/4-Admin/client.org") :fileskip0 t :tags "-notbillable" :narrow 80! :indent t
#+CAPTION: Horodatage sommaire à [2017-02-22 Wed 16:01], for February 2017.
| Fichier | En-tête   | Durée |   |   |
|-+---+---+---+---|
| | TOUT Durée totale |  0:00 |   |   |
#+END:
--8<---cut here---end--->8---

Now, as you see, the total stays 0 -- while there are time clocking
lines for Feb 2017 in that `client.org' file.

In the *Messages* buffer, I just see:

--8<---cut here---start->8---
Updating dynamic block ‘clocktable’ at line 20...done
--8<---cut here---end--->8---

No error reported...

Have I missed something?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-time-stamp, day format

2017-02-09 Thread Sebastien Vauban
Nick Dokos <ndo...@gmail.com> writes:
> Eric S Fraga <e.fr...@ucl.ac.uk> writes:
>> On Monday,  6 Feb 2017 at 22:33, Uwe Brauer wrote:
>>
>> [...]
>>
>>> No idea that is was set up like this do you know by change
>>> how and where can I change that?
>>
>> No idea really but I suggest you look at update-locale and locale
>> commands.  Have a look at /etc/default/locale which should contain the
>> actual defaults created by update-locale.
>>
>> I only have
>>
>> #  File generated by update-locale
>> LANG="en_GB.UTF-8"
>> LANGUAGE="en_GB:en"
>>
>> in my /etc/default/locale file and my environment has no LC_ variables
>> set, interestingly.
>
> If LANG is set, that's enough: all the LC_* default to whatever LANG says,
> but you can override them if you set them explicitly.

And if you want to fix this in Emacs only:

--8<---cut here---start->8---
  ;; System locale to use for formatting time values.
  (setq system-time-locale "C") ; Make sure that the weekdays in the
; time stamps of your Org mode files and
; in the agenda appear in English.
--8<---cut here---end--->8---

-- 
Best regards,
Sebastien Vauban




Re: [O] [Patch v2] Add support for sqsh sql src blocks

2016-12-04 Thread Sebastien Vauban
Hello all,

A quick question: does someone has a link to a working executable on
Windows (with or without Cygwin).  I have searched recently, but found
nothing, or not-working exe.

A pity it's not available in Cygwin packages...

Thanks in advance.

-- 
Sebastien Vauban




Re: [O] DEADLINE: position in entry

2016-11-21 Thread Sebastien Vauban
Yasushi SHOJI <ya...@atmark-techno.com> writes:
> Alan Tyree wrote:
>>
>> Is this the way it should be? The first DEADLINE: shows up both as a
>> warning and on the due date in the agenda, but the second one does
>> not. It only works for me if the DEADLINE: is the first line after the
>> heading. Version 9, emacs 24
>>
>> *** test 1
>> DEADLINE: <2016-11-19 Sat>
>>
>> *** test 2
>>
>> DEADLINE: <2016-11-19 Sat>
>
> at release_9.0.1-47-gb062593 with the following org file, org-agenda
> shows the closed entry.  Is this also related?
>
> Yes, org-lint complains about the 4th "scheduled" line saying:
> "Misplaced planning info line", but isn't deadline planning info line?
> is any of planning info line not allowed in the body?
>
>  >8  cut  >8 
> * DONE org
>   DEADLINE: [2016-01-07 Thu 17:39]
>
>   SCHEDULED: <2015-09-29 Tue .+1w>
>
>  >8  cut  >8 

A shoot in the dark: replace the [] by <>.

[] for DEADLINE does not make much sense...

-- 
Sebastien Vauban




Re: [O] colored code background in org 8.3

2016-06-07 Thread Sebastien Vauban
Hello all,

Rasmus <ras...@gmx.us> writes:
> John Kitchin <jkitc...@andrew.cmu.edu> writes:
>
>> I am finally getting around to switching over to org 8.3... One thing
>> I miss already is the colored background in the code blocks. I recall
>> that was removed. Has anyone looked into a way to put it back?
>
> I use the attached patch for some "interactive slides" with babel.

Could it be put into the official code base, for all users to enjoy
colored backgrounds without having to patch their Org by hand?

Best regards,
Seb

-- 
Sebastien Vauban




Re: [O] fixmee / syntax-ppss

2015-12-25 Thread Sebastien Vauban
Hello,

Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> Jeremy Hankins <no...@nowan.org> writes:
>> Aaron Ecay <aarone...@gmail.com> writes:
>>
>>> Org mode provides built-in functionality to create “TODO” annotations
>>> (called inline tasks).  These might server your purpose better than what
>>> you are trying to do with fixmee.  You need to put the following line in
>>> your emacs init file:
>>
>> Hmm, I may be able to make this work.  It's pretty important for my
>> purposes that notes like this not show up in the published version.  I'm
>> still learning my way around org-mode, but my sense is that will be
>> fairly straightforward to achieve.
>
> As another data point, drawers may also do the job, e.g.:
>
>   :FIXME:
>   ...
>   :END:
>
> You can then control what drawers are exported with
> `org-export-with-drawers' (or per document with d OPTIONS item).

Tagging such inline tasks with "noexport" should also work, right?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Very slow execution, tangling and export with noweb and quick-and-dirty

2015-09-01 Thread Sebastien Vauban
Rainer M Krug <rai...@krugs.de> writes:
> Rainer M Krug <rai...@krugs.de> writes:
>> I have a rather extensive literate programming document with several
>> hundred code blocks. In two subtrees, I use :noweb. Each of these has
>> one noweb block which is located onder the first level header, and
>> used several times in the sub-sections of this tree.
>>
>> But even with the quick-and-dirty option
>>
>> ,
>> | #+BIND: org-babel-use-quick-and-dirty-noweb-expansion "t"
>> `
>
> Hm - I just realised that despite having this #+BIND: in the file, the
> variable was not set. I set it manually now, and it is fast again.
>
> Shouldn't this BIND set the variable to true?

IIUC, `BIND' sets the variable to the value you're giving to it at
export-time only (in the temporary buffer created for the export
process).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Not getting replies from the orgmode list to my e-mail address

2015-08-31 Thread Sebastien Vauban
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:
> Eric Abrahamsen writes:
>> Jorge A. Alfaro-Murillo writes:
>>> 
>>> I do not subscribe with my email to lists, but using 
>>> news.gwene.org in gnus. There must be a way to check for 
>>> duplicates in two different servers, but so few people reply to 
>>> both the personal email address and the email list that I have 
>>> never found the need to look how to set that up. I just delete 
>>> the email and get slightly annoyed. I also have 
>>> gnus-confirm-mail-reply-to-news set to t not to make the 
>>> mistake of replying instead of following-up to news. 
>> 
>> I'm also reading through the Gnus newsreader. Personally I 
>> appreciate getting replies emailed to me directly, because some 
>> of these groups are high traffic and it can be easy to miss 
>> replies to threads.
>
> This is a cool trick for that:
>
> #+BEGIN_SRC emacs-lisp
>   (add-hook 'message-sent-hook 'gnus-score-followup-thread)
> #+END_SRC

(This is OOT, but) is there a way to only do that for newsgroups items
(that is, not for mails)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Worg isn't publishing

2015-08-31 Thread Sebastien Vauban
Robert Klein <rokl...@roklein.de> writes:
> Thomas S. Dye <t...@tsdye.com> wrote:
>> Robert Klein <rokl...@roklein.de> writes:
>>> Kyle Meyer <k...@kyleam.com> wrote:
>>>> Thomas S. Dye <t...@tsdye.com> writes:
>>>> >
>>>> > Worg hasn't published for several days.
>>>> >
>>>> > All the best,
>>>> > Tom
>>>> 
>>>> I pushed to Worg last night and noticed that it did not update.  I
>>>> recorded the message below but hadn't got around to emailing the
>>>> list.
>>>
>>> I saw two updates on worg from yesterday, so probably everything is
>>> Ok again.
>> 
>> I'm not seeing my changes to
>> http://orgmode.org/worg/org-contrib/babel/languages.html
>
> I fixed the build.  Your changes now show up.

Could you tell us what had to be fixed, so that we can lear as well?
Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Do you like to have your TODOs at the same headline level?

2015-08-26 Thread Sebastien Vauban
dbo...@mmm.com (J. David Boyd) writes:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 William Denton w...@pobox.com writes:
 I'm trying to spend more time in a sparse tree view where I just see
 TODOs (C-c / t).  I didn't like having the TODOs at different levels
 of indentation, though.  I prefer seeing them all lined up, so
 I moved them all to be fourth-level headline.  It's visually
 pleasing, and I don't care if a second-level headline has
 a fourth-level child without a third-level one.

 Do other people do this?

 No, and I don't think that's sane.  It would be logical to expect
 problems at export time (to LaTeX, among others) and in Org-lint.

 I try to put all the tasks at the 2nd level, the 1st level being
 reserved for big sections such as Administration, Tasks, Team,
 etc.

 I'm very rigorous about expecting that all my project management
 documents can be exported (without loosing subtrees or generating error)
 to HTML (as the very first goal) and to LaTeX (as the second one).

 OTOH, I don't deny your wish to get things aligned; that's why I've
 opted to 4-char todo states only!

 4-char todo states?  How about a list? I can't picture how to
 abbreviate some things...

Sure. Here it is:

- TODO :: Open, not (yet) started.
- STRT :: In progress, working on, doing.
- WAIT :: On hold, assigned, feedback.
- SDAY :: Someday, maybe, perhaps, wish.
- DONE :: Completed, closed, resolved.
- CANX :: Wontfix, rejected.

The only exception, but that's on purpose is NEW for things going to
the CollectBox.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Literate programming in org

2015-08-26 Thread Sebastien Vauban
Max Linke max_li...@gmx.de writes:
 On 08/26/2015 12:36 PM, Sebastien Vauban wrote:
 See:

 - inline Babel calls: ... call_NAME(ARGUMENTS) ... and/or
 - inline code blocks: src_LANGUAGE{BODY}.

 Yes I'm currently using inline babel calls.

 * reruning specific cells only one time after emacs was started

 I have some cells that are long running and produce some variables
 I later use for plotting or calculating related values. To avoid
 recalculating I have added `cache: yes` to these cells. But they
 are only run once across restarts of emacs or my interpreter session
 in the background. When I start working again I would like to have a
 way to rerun all code-cells independent of the fact if they are cached
 or not. This would lead to a huge speed up in converting to latex for
 me.

 I don't understand why re-running code blocks which are cached is
 a problem.  Could you elaborate?

 I wanted a shortcut to rerun every code cell independent of cached
 status. Looking again into the docs I found the short-cut

   'C-u C-c C-v b'

 This calls 'org-babel-execute-buffer'.

... to forcibly re-evaluate the blocks (even when marked :cache), yes.
OK, got it now!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Do you like to have your TODOs at the same headline level?

2015-08-26 Thread Sebastien Vauban
William Denton w...@pobox.com writes:
 I'm trying to spend more time in a sparse tree view where I just see
 TODOs (C-c / t).  I didn't like having the TODOs at different levels
 of indentation, though.  I prefer seeing them all lined up, so I moved
 them all to be fourth-level headline.  It's visually pleasing, and
 I don't care if a second-level headline has a fourth-level child
 without a third-level one.

 Do other people do this?

No, and I don't think that's sane.  It would be logical to expect
problems at export time (to LaTeX, among others) and in Org-lint.

I try to put all the tasks at the 2nd level, the 1st level being
reserved for big sections such as Administration, Tasks, Team,
etc.

I'm very rigorous about expecting that all my project management
documents can be exported (without loosing subtrees or generating error)
to HTML (as the very first goal) and to LaTeX (as the second one).

OTOH, I don't deny your wish to get things aligned; that's why I've
opted to 4-char todo states only!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Literate programming in org

2015-08-26 Thread Sebastien Vauban
Hi,

Max Linke max_li...@gmx.de writes:
 I'm currently trying to use org-modes literate programming capabilities 
 to write up a paper. So far it has been a joy to have the plotting code
 and text in the same document. Thanks for all the work people here have
 already put in to make this so easy.

Can't add anything! ;-)

 I have run into a two small problems so far

 * How can I use computed variables (string/int/float) in floating text?

I have for example calculated a autocorrelation time and now want to
use that calculated number in the text. The best solution I have
found so far is

#+name: print_acf_time
#+begin_src ipython :session :exports none

  print(acf_time)
#+end_src

The autocorrelation time for the process is call_print_acf_time().
That is OK-ish but I have to write a special code cell for every
variable that I want to reference in my document. Is there another
method to export variables to be easily accessible in org-mode?

See:

- inline Babel calls: ... call_NAME(ARGUMENTS) ... and/or
- inline code blocks: src_LANGUAGE{BODY}.

 * reruning specific cells only one time after emacs was started

I have some cells that are long running and produce some variables
I later use for plotting or calculating related values. To avoid
recalculating I have added `cache: yes` to these cells. But they
are only run once across restarts of emacs or my interpreter session
in the background. When I start working again I would like to have a
way to rerun all code-cells independent of the fact if they are cached
or not. This would lead to a huge speed up in converting to latex for
me.

I don't understand why re-running code blocks which are cached is
a problem.  Could you elaborate?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-block-background in 8.3.1?

2015-08-19 Thread Sebastien Vauban
Hi Bastien,

Bastien writes:
 Sebastien Vauban writes:

 Really, it has been removed because of a problem when ps-print'ing an
 Org buffer -- though the bug was to find in `ps-def.el' and not in
 Org, as reported by Stefan Monnier [1].  It should have been fixed
 there instead.

 Yes, indeed.

 I'm not aware of anything that has been introduced in its place.

 I'm planning to reintroduce it as an optional feature.  At least in
 my personal Git repository, if that's not accepted in Org core.

 If you can find an implementation that does not rely on overlays, I'm
 fine with it - overlays have inherent scalability issues, and I'm
 reluctant using them for something as pervasive as code blocks
 background.

I don't know how to add the background color without overlays.

That's why the very first step would (have) be(en) to put it as an
optional feature, that could been disabled by those who feel that it
introduces a performance delay -- what hasn't been shown so far IIRC.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] M-x org-publish in 8.3.1 results in error org-check-agenda-file: Wrong type argument: stringp, nil

2015-08-19 Thread Sebastien Vauban
Bastien b...@gnu.org writes:
 Omid omidl...@gmail.com writes:

 user-error: No language for src block: (unnamed)

 This suggests to look for a #+begin_src block with no language name.

Use the function `my-src-block-check' [1] to find where it's missing.

Best regards,
  Seb

[1] https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00776.html

-- 
Sebastien Vauban




Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-14 Thread Sebastien Vauban
Hello John,

 Here is the setup I have that worked when I tried it last ;)

 ;; encryption
 (require 'epa-file)
 (unless (memq epa-file-handler file-name-handler-alist)
   (epa-file-enable))

Do you remember what are those 2 lines for?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-14 Thread Sebastien Vauban
Hello John,

  Here is the setup I have that worked when I tried it last ;)
 
  ;; encryption
  (require 'epa-file)
  (unless (memq epa-file-handler file-name-handler-alist)
(epa-file-enable))

 Do you remember what are those 2 lines for?

 They are basically copied from thetop of
 http://orgmode.org/worg/org-tutorials/encrypting-files.html

 The first line loads epa-file (epa-file.el --- the EasyPG Assistant,
 transparent file encryption )

 The second line looks like a way to call epa-file-enable if it hasn't been
 enabled. You can just call epa-file-enable, and it does the check too, but
 this probably avoids a minibuffer message when it is already loaded. I
 think this function provides a handler for files ending in .gpg which need
 to be en/decrypted by gpg.

It simply because it Just Works (TM) with those 3 lines which I have in
my .emacs file:

--8---cut here---start-8---
  ;; EasyPG Assistant
  (with-eval-after-load epa-file
(setq epa-file-encrypt-to j...@doe.com)
(setq epa-file-cache-passphrase-for-symmetric-encryption t))
--8---cut here---end---8---

Best regards,
  Seb

--
Sebastien Vauban




Re: [O] Macros or properties in source blocks

2015-08-12 Thread Sebastien Vauban
Charles C. Berry ccbe...@ucsd.edu writes:
 On Tue, 11 Aug 2015, Gary Oberbrunner wrote:

 I'd like to have either a macro or a property that controls some behavior
 of an org-mode babel file:

 #+PROPERTY: report_type All

 and use that property inline: {{{property(report_type)}}} and in a source
 block:

 #+NAME: rtype
 #+BEGIN_SRC emacs-lisp :results value
 {{{property(report_type)}}}
 #+END_SRC

 And use that source block:

 The report type is call_rtype()[:results raw]

 But this doesn't work,

 BUT THIS DOES:

 #+NAME: rtype
 #+header: :var prop=(org-entry-get (point) report_type t)
 #+BEGIN_SRC emacs-lisp
 prop
 #+END_SRC

 And use that source block:

 The report type is call_rtype()[:results raw]

Though, I don't understand either why your example did not work, as --
during the export process -- macros are supposed to be expanded before
Babel code be evaluated.

There must be some restriction, then, on which part of a document
a macro can reside in.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-block-background in 8.3.1?

2015-08-12 Thread Sebastien Vauban
Kyle Meyer k...@kyleam.com writes:
 Luke Crook l...@balooga.com wrote:
 I'm not sure if I still need to set org-block-background in 8.3.1.

 But if I do need to continue setting this, what is the new name for org-
 block-background?

 (set-face-attribute 'org-block-background nil
 :height (round (* 0.9 (face-attribute 'fixed-pitch
 :height
 (set-face-attribute 'org-block nil
 :height (round (* 0.9 (face-attribute 'fixed-pitch
 :height

 org-block-background was removed in f8b42e8 (Don't use an overlay for
 src blocks backgrounds, 2014-07-28) for performance reasons.

IIRC, we never saw a profiler report showing that it slowed down buffer
fontification in a visible way.  Correct me if I'm wrong.

Really, it has been removed because of a problem when ps-print'ing an
Org buffer -- though the bug was to find in `ps-def.el' and not in Org,
as reported by Stefan Monnier [1].  It should have been fixed there
instead.

 I'm not aware of anything that has been introduced in its place.

I'm planning to reintroduce it as an optional feature.  At least in my
personal Git repository, if that's not accepted in Org core.

Best regards,
  Seb

[1] http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00403.html

-- 
Sebastien Vauban




Re: [O] org-html-use-unicode-chars breaks source code blocks

2015-08-09 Thread Sebastien Vauban
Andreas Leha andreas.l...@med.uni-goettingen.de writes:
 [ deleted: discussion on beatification ]

 My initial reaction was to kill it as well.  But I might feel like this a
 bit to often (I feel the same way about headline keywords like COMMENT).

 There has been repeated 'bashing' of the COMMENT keyword lately on this
 list.  Let me just raise a voice in defence.  I do not mind the syntax
 too much, but the functionality of commenting a whole subtree without
 loosing the outline functionality is really handy.  Especially also in
 distinction to the equally handy :noexport: tag.

 So, even if there is probably not a high risk for the COMMENT keyword to
 be dropped I just wanted to express my support for it.

+1

Both COMMENT and :noexport: are necessary, for achieving different tasks.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] C-c * is undefined

2015-08-07 Thread Sebastien Vauban
Hello,

I've noticed (for a couple of weeks) that I now get C-c * is undefined
when trying to recalculate an Org table [1].

Has it somehow been removed?

Current configuration:
- GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL
- Org-mode version 8.3.1 (release_8.3.1-14-gac29de)

Best regards,
  Seb

[1] http://orgmode.org/manual/Updating-the-table.html

-- 
Sebastien Vauban




Re: [O] C-c * is undefined

2015-08-07 Thread Sebastien Vauban
Hello Nicolas,

 Sebastien Vauban writes:

 I've noticed (for a couple of weeks) that I now get C-c * is undefined
 when trying to recalculate an Org table [1].

 Has it somehow been removed?

 I don't think so, and I cannot reproduce it with a quick test. Do you
 have an ECM?

Blush... There was a `local-unset-key' of it (because of that same
binding used with Multiple Cursors) in some local package I use here.

Sorry for the noise.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Trouble with autofill mode

2015-08-05 Thread Sebastien Vauban
Eric S Fraga e.fr...@ucl.ac.uk writes:
 For LaTeX directives that I used to always put in #+latex: lines when
 I needed these within a paragraph, I now increasingly use
 @@latex:...@@.

FYI, you could make it smelt to just @@l:...@@ with:

--8---cut here---start-8---
(add-to-list 'org-export-snippet-translation-alist
 '(l . latex))
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Problem with table computations

2015-08-03 Thread Sebastien Vauban
Hello,

Since an update done this morning (last one somewhere beginning of last
week, IIRC), the following table (for example) is not correctly computed
anymore:

  |   | Date | AM Trp |  AM Tme | AM Avg | PM Trp |  PM Tme | PM 
Avg |
  
|---+--++-+++-+|
  | 1 | [2014-09-04 Thu] |   13.1 | 0:32:03 |   24.6 |   12.5 | 0:32:21 |   
23.2 |
  | 2 | [2014-09-08 Mon] |   12.6 | 0:31:48 |   23.8 |   12.6 | 0:30:23 |   
24.9 |
  | 3 | [2014-09-11 Thu] |   13.1 | 0:32:12 |   24.4 |   12.4 | 0:30:19 |   
24.6 |
  | 4 | [2014-09-12 Fri] |   12.7 | 0:33:20 |   22.9 |   12.5 | 0:31:16 |   
24.0 |
  | 5 | [2014-09-26 Fri] |   12.4 | 0:33:01 |   22.5 |   12.5 | 0:32:13 |   
23.3 |
  | 6 | [2014-10-01 Wed] |   12.6 | 0:34:09 |   22.2 |   12.6 | 0:31:54 |   
23.6 |
  | 7 | [2014-10-10 Fri] |   12.8 | 0:34:53 |   22.0 |   12.5 | 0:31:25 |   
23.9 |
  
|---+--++-+++-+|
  |   | Mean |0.0 | |0.0 |0.0 | |
0.0 |
  |   | Total|0.0 | |   20.8 |0.0 | |   
 |
  
|---+--++-+++-+|
  |   | Grand total  || ||0.0 | |   
 |
  
|---+--++-+++-+|
  #+TBLFM: 
@9$3=vmean(@-I..@-II);%.1f::@9$5..@9$6=vmean(@-I..@-II);%.1f::@9$8=vmean(@-I..@-II);%.1f::@10$3=vsum(@-I..@-II);%.1f::@10$6=vsum(@-I..@-II);%.1f::@11$6=@10$3+@10$6;%.1f

PS- Org-mode version 8.3beta (release_8.3beta-1315-ga3b2b7).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Special blocks with options in LaTeX export

2015-07-30 Thread Sebastien Vauban
Rasmus ras...@gmx.us writes:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 I am trying to export special blocks with options.  But it seems the
 options part is being ignored completely.  I expect the following:

   #+begin_aside :options {Combinatorial background}
   It is all random!
   #+end_aside

 to be exported as:

   \begin{aside}{Combinatorial background}
   It is all random!
   \end{aside}

 However what I get is without the extra argument to the environment.

 Am I missing something, or is this a bug?

 #+attr_latex: :options test

 #+begin_aside 
 random 
 #+end_aside

I think Suvayu uncovers something interesting: how do we give a title
to such an admonition (note, warning, tip, sidebar, etc.)?

If we want to export our document to multiple backends, we would be
forced to have:

--8---cut here---start-8---
  #+attr_html: :options {By the way...}
  #+attr_latex: :options {By the way...}
  #+attr_odt: :options {By the way...}
  #+begin_note
  This is a useful note (with a title).
  #+end_note
--8---cut here---end---8---

Wouldn't it make more sense to get the title as part of the admonition,
as Suvayu tried it in his OP?

--8---cut here---start-8---
  #+begin_note :options {By the way...}
  This is a useful note (with a title).
  #+end_note
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Questions about exporting: subtitle, level formating, custom highlight markers error

2015-07-28 Thread Sebastien Vauban
Eric S Fraga e.fr...@ucl.ac.uk writes:
 3) Custom highlight markers error
 No idea about this.  It could be a bug anywhere.
 Could you maybe post a small example file?  I have no idea what you are
 describing unfortunately.
 I retrieved what I did, from here
 http://stackoverflow.com/questions/20016634/highlight-selected-text-in-emacs-org-mode:

 I am not sure the new exporter allows you to define new highlighting
 methods.  The old one did but that was quite a while ago now.

That's true we liked `@' for `alert'...

 You can always use macros instead?

Or the `font-lock-add-keywords' mechanism?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ox-latex: default packages cleaning

2015-07-27 Thread Sebastien Vauban
Hello,

Rasmus ras...@gmx.us writes:
 I have a few other questions:
 - how does one change the variant when doing a subtree export?  By
   setting EXPORT_LATEX_VARIANT?

 It seems to work at least to the point that the right engine is written to
 the file:

 #+LATEX_VARIANT: xelatex
 * pdflatex
 :PROPERTIES:
 :export_latex_variant: pdflatex
 :END:

 * lualatex
 :PROPERTIES:
 :export_latex_variant: lualatex
 :END:


 - Is it possible to set a default variant?

 org-latex-variant = pdflatex

FWIW, it seems that people who played with different LaTeX engines used
the LATEX_CMD property, as adviced on Worg [1].  Doesn't matter if we
change that, but just a reminder of some already common usage.

Best regards,
  Seb

[1] http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export 

-- 
Sebastien Vauban




Re: [O] Specify org-latex-pdf-process for a single file?

2015-07-27 Thread Sebastien Vauban
Vikas Rawal vikasli...@agrarianresearch.org writes:
 Thanks all. I was not familiar with this way of defining local variables. Just
 checked the relevant part of the manual. Very useful.

And, finally, one solution exposed on Worg:

http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ox-latex: default packages cleaning

2015-07-27 Thread Sebastien Vauban
Rasmus ras...@gmx.us writes:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 FWIW, it seems that people who played with different LaTeX engines used
 the LATEX_CMD property, as adviced on Worg [1].  Doesn't matter if we
 change that, but just a reminder of some already common usage.

 I didn't know that worg page.  Just to understand, you are advising to
 use LATEX_CMD as the keyword name?

Yes.

 FWIW, that's fine with me, though presently it's not really accurate
 as only {pdf,xe,lua}latex is allowed

AFAIK, it's not intended to do more than just indicating which flavor of
the LaTeX engine to use (and, then, correctly update the real commands
which will be run), that is {pdf,xe,lua}latex.

 (I'm hesitant to allow arbitrary scripts).

I agree. Just stick to the basic need, which is to be able to easily
change of LaTeX engine.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] long code blocks making Org Mode very slow

2015-07-14 Thread Sebastien Vauban
Angus M anguscmelvi...@gmail.com writes:
 I'm trying to run a long Python code block (~4000 lines) in org mode.  The
 code is sandwiched between:
 #+begin_src python
 python code block
 #+end_src

 It runs fine, but org mode becomes incredibly slow - when typing text there
 is about a 10 second delay before the character appears on the screen.  If I
 reduce the number of lines of code in the block there is a noticeable
 increase in speed.

 I am not using line numbers, and the delay is not ameliorated by turning off
 fontification.

 If I add a semi-colon before #+begin_src, to comment it off (get rid of src
 environment), then org mode returns to it's normal speed.

The best thing to do, now, is run the profiler:

M-x profiler-start
... type one character (which takes 10 s to be rendered)
M-x profiler-report

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [BUG] org-clock-display is partial (only some entries are counted)

2015-07-03 Thread Sebastien Vauban


Hello Nicolas,

Nicolas Goaziou writes:
 Sebastien Vauban writes:

 Applied the patch:

 [...]

 Tested on one of my real files, with:

 [...]

 Got this:

 Debugger entered--Lisp error: (error Specified time is not
 representable)

 [...]

 BTW, `untilnow' is not proposed when TAB'ing on `C-u C-u C-c C-x C-d'.

 Time for another take on this. What about the following patch?

Perfect for me...  I now have the expected total durations displayed.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] ELisp expression in a var not executed anymore on tangle

2015-07-03 Thread Sebastien Vauban
Hello,

I noticed that the following code block:

--8---cut here---start-8---
#+begin_src shell :tangle yes :var workingDir=(file-name-directory (or 
load-file-name (buffer-file-name))) :shebang #!/bin/sh
cmd=$EMACS -q -l ${workingDir}init.el
#+end_src
--8---cut here---end---8---

does now return this:

--8---cut here---start-8---
#!/bin/sh
cmd=$EMACS -q -l ${workingDir}init.el
--8---cut here---end---8---

instead of:

--8---cut here---start-8---
#!/bin/sh
workingDir='d:/Users/sva/ecm/'
cmd=$EMACS -q -l ${workingDir}init.el
--8---cut here---end---8---

IIRC, you can also see that it's not working by pressing `C-c C-v C-v'
(preview).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] problem with ox-pandoc export

2015-07-02 Thread Sebastien Vauban
Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Alan Schmitt alan.schm...@polytechnique.org writes:

 In short, it exports the org file to another temporary org file (using
 the pandoc exporter that inherits from the org exporter), then it calls
 the pandoc binary to convert from org to the target format. The first
 step (org to temporary org) is used to extract some information from the
 org file that is used in further steps (like creating a custom CSS or
 adding arguments to the call to the pandoc binary).

 So this is not a Pandoc export back-end (i.e. a back-end that translates
 Org syntax into Pandoc's extended Markdown syntax).

If the pandoc back-end is some flavor of Markdown, shouldn't it be
better named `ox-md-pandoc'?

BTW, when looking at Markdown formats known by Pandoc, there are:

- Pandoc markdown
- Pandoc markdown_github
- Pandoc markdown_mmd
- Pandoc markdown_phpextra
- Pandoc markdown_strict

Is the Pandoc back-end exporting the flavor known as Pandoc markdown?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] problem with ox-pandoc export

2015-07-02 Thread Sebastien Vauban


Hello,

Nicolas Goaziou writes:
 Sebastien Vauban writes:
 Nicolas Goaziou writes:

 So this is not a Pandoc export back-end (i.e. a back-end that
 translates Org syntax into Pandoc's extended Markdown syntax).

 If the pandoc back-end is some flavor of Markdown, shouldn't it be
 better named `ox-md-pandoc'?

 Which one are you talking about, the one from ELPA or the one
 I suggest adding to core?

The latter.

 The former doesn't translate to Markdown at all. It simply calls
 pandoc on an Org document to produce something else. It depends on how
 well pandoc's Org importer behaves, i.e, how much Org syntax it does
 support.

 Therefore, I suggest to write an Org to native pandoc's syntax. It
 would be derived from ox-md but that doesn't mean its name must be
 prefixed with ox-md,

I'd think it'd make more sense, yes.

 consider, for example ox-beamer and ox-latex.

Even if it's not necessarily like that for all cases.

_My_ point of view is simply to make `ox-pandoc' more visible as an
alternative option when one wants to export to Markdown: simply by
looking at file names, by Googling or by looking at require calls used
in other's configs, one would expect that `ox-md' and `ox-md-pandoc'
would both generate markdown.

For Beamer, it could be similar, except that people don't necessarily
search for latex when trying to export to beamer.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Tangling takes long - profiling and calling R

2015-07-02 Thread Sebastien Vauban
Aaron Ecay aarone...@gmail.com writes:
 which adds to header-args, what is missing is
 
 ,
 | :header-args-: noweb
 `
 
 which would remove the noweb yes from the header arguments 

 This is not possible with the old syntax either, though:

 * One
 :PROPERTIES:
 :noweb: yes
 :END:

 ** Two
 :PROPERTIES:
 ???
 :END:

 #+begin_src emacs-lisp
   ...
 #+end_src

 There’s nothing you can put in the ?s at heading Two to get rid of the
 noweb property inherited from One.  (Unless you have something in mind
 which I’m not thinking of.)

Quickly, just on that particular point: what you'd put there would be
the toggle of the property (here :noweb: no), but that's of course
sort of limited to boolean values which have an explicit no (or nil)
value; so I admit I just cover this particular exemple.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Org-lint PROPERTIES

2015-06-30 Thread Sebastien Vauban
Rainer M Krug rai...@krugs.de writes:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 A suggestion here: could Org-lint tell the user to replace such
 a block:

 #+PROPERTY:  eval never
 #+PROPERTY:  padline yes
 #+PROPERTY:  tangle yes

 by its newer syntax:

 #+PROPERTY:  header-args :eval never :padline yes :tangle yes

 I agree - this would be very useful. This was already raised in
 Tangling takes long - profiling and calling R.

IIRC, such a warning is already displayed for the PROPERTIES drawer.

 It might even be already included?

No, I looked it up (in the latest release of the wip-lint branch) before
sending the post...

Best regards,
  Seb

-- 
Sebastien Vauban



[O] Org-lint PROPERTIES

2015-06-30 Thread Sebastien Vauban
Hello,

A suggestion here: could Org-lint tell the user to replace such
a block:

--8---cut here---start-8---
#+PROPERTY:  eval never
#+PROPERTY:  padline yes
#+PROPERTY:  tangle yes
--8---cut here---end---8---

by its newer syntax:

--8---cut here---start-8---
#+PROPERTY:  header-args :eval never :padline yes :tangle yes
--8---cut here---end---8---

?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Org-lint PROPERTIES

2015-06-30 Thread Sebastien Vauban
Hello,

 A suggestion here: could Org-lint tell the user to replace such
 a block:

 #+PROPERTY:  eval never
 #+PROPERTY:  padline yes
 #+PROPERTY:  tangle yes

 by its newer syntax:

 #+PROPERTY: header-args :eval never :padline yes :tangle yes

 ?

 Done. Thank you.

Didn't check yet, but I'm sure I don't have to either; so, thanks to
you!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Is it possible to embed tag search as a link?

2015-06-25 Thread Sebastien Vauban
Jay Dresser j...@jaydresser.us writes:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 Jay Dresser org-m...@jaydresser.us writes:
 Piotr Isajew pisajew at yahoo.com writes:
 what I'm looking for is a link format that, when C-c C-o'ed,
 opens agenda match query view for custom query which arguments
 are specified in the link. I.e.:

 org-search://+work-boss-TODO=DONE

 I am aware of org-protocol which can be used to develop a custom
 handler for something like this. I would just like to check if
 there exists any working solution before I start working on my
 own.

 Jay Dresser org-mode at jaydresser.us writes:

 I just happened to run across this which seems to better match your
 original question, to do it as a new link type:
 http://endlessparentheses.com/use-org-mode-links-for-absolutely-anything.html

 so you could have [[org-search:+work-boss-TODO=DONE]]

 When I click on such a link, I have the error:

 --8---cut here---start-8---
 No match - create this as a new heading? (y or n)
 --8---cut here---end---8---

 Best regards,
   Seb

 Did you add the elisp from the article into your .emacs?

 Although the article described using tag as the link type I displayed
 org-search since that's what the OP wanted. To get the desired effect
 add this to .emacs:

 (org-add-link-type
  org-search 'endless/follow-tag-link)

 (defun endless/follow-tag-link (tag)
   Display a list of TODO headlines with tag TAG.
 With prefix argument, also display headlines without a TODO keyword.
   (org-tags-view (null current-prefix-arg) tag))

No, I skipped that part -- thinking it was standard.

Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [BUG] org-clock-display is partial (only some entries are counted)

2015-06-25 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou writes:
 Sebastien Vauban writes:

 I still consider the default behavior as dangerous -- because the novice
 is not aware (except if obvious) that some clock times may be dropped in
 the computation, and I find that scary --, but thanks anyway for the
 workaround.

 Would you mind testing the following patch, then? `untilnow' is just
 a suggestion.

Applied the patch:

--8---cut here---start-8---
patching file lisp/org-clock.el
Hunk #1 succeeded at 441 (offset 1 line).
Hunk #2 succeeded at 2091 (offset 3 lines).
Hunk #3 succeeded at 2200 (offset 3 lines).
Hunk #4 succeeded at 2216 (offset 3 lines).
--8---cut here---end---8---

Tested on one of my real files, with:

  ┌
  │ org-clock-display-default-range is a variable defined in `org-clock.el'.
  │ Its value is untilnow
  │ Original value was thisyear
  │ 
  │ Documentation:
  │ Default range when displaying clocks with `org-clock-display'.
  │ 
  │ You can customize this variable.
  └

Got this:

--8---cut here---start-8---
Debugger entered--Lisp error: (error Specified time is not representable)
  encode-time(0 0 0 1 1 1)
  (setq ts (encode-time s m h d month y) te (encode-time (or s1 s) (or m1 m) 
(or h1 h) (or d1 d) (or month1 month) (or y1 y)))
  (let* ((tm (decode-time (or time (current-time (s 0) (m (nth 1 tm)) (h 
(nth 2 tm)) (d (nth 3 tm)) (month (nth 4 tm)) (y (nth 5 tm)) (dow (nth 6 tm)) 
(ws (or wstart 1)) (ms (or mstart 1)) (skey (symbol-name key)) (shift 0) (q 
(cond ((= (nth 4 tm) 10) 4) ((= (nth 4 tm) 7) 3) ((= (nth 4 tm) 4) 2) ((= 
(nth 4 tm) 1) 1))) s1 m1 h1 d1 month1 y1 diff ts te fm txt w date interval tmp 
shiftedy shiftedm shiftedq) (cond ((string-match ^[0-9]+$ skey) (setq y 
(string-to-number skey) m 1 d 1 key (quote year))) ((string-match 
^\\([0-9]+\\)-\\([0-9]\\{1,2\\}\\)$ skey) (setq y (string-to-number 
(match-string 1 skey)) month (string-to-number (match-string 2 skey)) d 1 key 
(quote month))) ((string-match ^\\([0-9]+\\)-[wW]\\([0-9]\\{1,2\\}\\)$ skey) 
(require (quote cal-iso)) (setq y (string-to-number (match-string 1 skey)) w 
(string-to-number (match-string 2 skey))) (setq date 
(calendar-gregorian-from-absolute (calendar-iso-to-absolute (list w 1 y 
(setq d (nth 1 date) month (car date) y (nth 2 date) dow 1 key (quote week))) 
((string-match ^\\([0-9]+\\)-[qQ]\\([1-4]\\)$ skey) (require (quote cal-iso)) 
(setq y (string-to-number (match-string 1 skey))) (setq q (string-to-number 
(match-string 2 skey))) (setq date (calendar-gregorian-from-absolute 
(calendar-iso-to-absolute (org-quarter-to-date q y (setq d (nth 1 date) 
month (car date) y (nth 2 date) dow 1 key (quote quarter))) ((string-match 
^\\([0-9]+\\)-\\([0-9]\\{1,2\\}\\)-\\([0-9]\\{1,2\\}\\)$ skey) (setq y 
(string-to-number (match-string 1 skey)) month (string-to-number (match-string 
2 skey)) d (string-to-number (match-string 3 skey)) key (quote day))) 
((string-match \\([-+][0-9]+\\)$ skey) (setq shift (string-to-number 
(match-string 1 skey)) key (intern (substring skey 0 (match-beginning 1 (if 
(and (memq key (quote (quarter thisq))) ( shift 0)) (error Looking forward 
with quarters isn't implemented (if (= shift 0) (progn (cond ((eq key 
(quote yesterday)) (setq key (quote today) shift -1)) ((eq key (quote 
lastweek)) (setq key (quote week) shift -1)) ((eq key (quote lastmonth)) (setq 
key (quote month) shift -1)) ((eq key (quote lastyear)) (setq key (quote year) 
shift -1)) ((eq key (quote lastq)) (setq key (quote quarter) shift -1) 
(cond ((memq key (quote (day today))) (setq d (+ d shift) h 0 m 0 h1 24 m1 0)) 
((memq key (quote (week thisweek))) (setq diff (+ (* -7 shift) (if (= dow 0) (- 
7 ws) (- dow ws))) m 0 h 0 d (- d diff) d1 (+ 7 d))) ((memq key (quote (month 
thismonth))) (setq d (or ms 1) h 0 m 0 d1 (or ms 1) month (+ month shift) 
month1 (1+ month) h1 0 m1 0)) ((memq key (quote (quarter thisq))) (cond (( (+ 
(- q 1) shift) 0) (setq interval (* -1 (+ ... shift))) (setq tmp (org-floor* 
interval 4)) (if (= 0 (nth 1 tmp)) (setq shiftedy (- y ...) shiftedm 1 shiftedq 
1) (setq shiftedy (- y ...) shiftedm (- 13 ...) shiftedq (- 5 ...))) (setq d 1 
h 0 m 0 d1 1 month shiftedm month1 (+ 3 shiftedm) h1 0 m1 0 y shiftedy)) (( (+ 
q shift) 0) (setq shiftedq (+ q shift)) (setq shiftedy y) (setq d 1 h 0 m 0 d1 
1 month (+ 1 (* 3 ...)) month1 (+ 4 (* 3 ...)) h1 0 m1 0 ((memq key (quote 
(year thisyear))) (setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y))) ((eq key 
(quote untilnow)) (setq y1 y month1 m d1 d m 0 h 0 d 1 month 1 y 1)) ((eq key 
(quote interactive)) nil) (t (user-error No such time block %s key))) (setq 
ts (encode-time s m h d month y) te (encode-time (or s1 s) (or m1 m) (or h1 h) 
(or d1 d) (or month1 month) (or y1 y))) (setq fm (cdr org-time-stamp-formats)) 
(cond ((memq key (quote (day today))) (setq txt (format-time-string %A, %B %d, 
%Y ts))) ((memq key (quote

Re: [O] Trouble passing variables into shell blocks on windows

2015-06-23 Thread Sebastien Vauban
Johan W. Klüwer johan.w.klu...@gmail.com writes:
 Thank you for the information -- I suppose the cygwin version of emacs may
 be the only viable option. Still that seems like quite a big change,
 swapping emacs versions, just for this particular feature.

 2015-06-15 10:12 GMT+02:00 Rainer M Krug rai...@krugs.de:
 Johan W. Klüwer johan.w.klu...@gmail.com writes:
 I'm having difficulties passing org variables into shell source blocks.
 This is using Windows 7 and Cygwin with bash shell. For instance, the
 following

 #+BEGIN_SRC sh :var x=.
   ls $x
 #+END_SRC

 fails with the error message (as displayed in emacs)

I dunno what's the real impact of that, but pay attention that the sh
language has been renamed shell quite a long time ago (more than one
year IIRC).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Is it possible to embed tag search as a link?

2015-06-23 Thread Sebastien Vauban
Jay Dresser org-m...@jaydresser.us writes:
 Piotr Isajew pisajew at yahoo.com writes:
 what I'm looking for is a link format that, when C-c C-o'ed,
 opens agenda match query view for custom query which arguments
 are specified in the link. I.e.:
 
 org-search://+work-boss-TODO=DONE
 
 I am aware of org-protocol which can be used to develop a custom
 handler for something like this. I would just like to check if
 there exists any working solution before I start working on my
 own.

 Jay Dresser org-mode at jaydresser.us writes:

 I just happened to run across this which seems to better match your
 original question, to do it as a new link type:
 http://endlessparentheses.com/use-org-mode-links-for-absolutely-anything.html

 so you could have [[org-search:+work-boss-TODO=DONE]]

When I click on such a link, I have the error:

--8---cut here---start-8---
No match - create this as a new heading? (y or n)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Why navigating in Org mode is so slow in overview mode?

2015-06-22 Thread Sebastien Vauban
Gregor Zattler telegr...@gmx.net writes:
 * Nicolas Goaziou m...@nicolasgoaziou.fr [17. Jun. 2015]:
 Gregor Zattler telegr...@gmx.net writes:
 I would like to help but need help myself on how to produce
 profiler reports.
 
 M-x profiler-start
 
 Do something slow
 
 M-x profiler-report

 Thanks, this seemed rather easy and I open the org file in
 question in overview now:

 - most of the time it’s not slow! That’s great and a big
   difference to months ago, when it was slow very often.

 - but there some hangs now and then.  At that moment I cannot
   start the profiler.  If I start the profiler at the
   beginning of using this org file and stop it maybe hours later
   after something was slow: Would such report be helpful? 

FWIW, I've always used:

--8---cut here---start-8---
  ;; Do not switch to OVERVIEW at startup.
  (setq org-startup-folded nil)
--8---cut here---end---8---

and I don't see any particular slowdown for my Org files:

--8---cut here---start-8---
(Info) Found file 
~/Public/Repositories/org-mode/lisp/../doc/library-of-babel.org in 1.28 s
(Info) Found file ~/org/personal/travaux-listing.org in 2.32 s
(Info) Found file ~/org/personal/travaux.org in 0.28 s
(Info) Found file ~/org/personal/conso.txt in 1.71 s
(Info) Found file ~/org/notes/Notes-on-Lisp.txt in 0.61 s
(Info) Found file ~/org/personal/Personal.org in 0.97 s
--8---cut here---end---8---

PS- Code to get the above timings:

--8---cut here---start-8---
  (defadvice find-file (around my/find-file activate)
Open the file named FILENAME and report time spent.
(let ((filename (ad-get-arg 0))
  (find-file-time-start (float-time)))
  (message (Info) Finding file %s... filename)
  ad-do-it
  (message (Info) Found file %s in %.2f s filename
   (- (float-time) find-file-time-start
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Tangling takes long - profiling and calling R

2015-06-16 Thread Sebastien Vauban
Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Rainer M Krug rai...@krugs.de writes:

 I would not remove it as even I have some org files using them - shame
 on me.

To be clear, are we talking of constructs such as:

--8---cut here---start-8---
** Subtree
   :PROPERTIES:
   :tangle: no
   :END:
--8---cut here---end---8---

?

 We can check for that in Org Lint and warn the user.

 But what about making it user configurable? a variable
 ~org-babel-tangle-use-deprecated-header-args~ which if set to non-nil would
 enable this additional code, if nil it would be skipped? The default
 should be set to ~t~ to be backward compatible.

 This looks like backward-compatibility hell to me. If we make it
 conditional the feature is no longer deprecated, is it?

I understand your point, and I'm enclined to agree with you (for
a long-term sanity and stability of the mode we all cherish) -- even if
I dunno yet if I still use such (Well, if this is the above structure,
then, yes, I use it a lot as well...).

 The more general question is: how many years do we need to wait before
 removing a deprecated (i.e., marked as such) feature?

Your suggestion with Org-lint, or even writing a function that would
convert from the old to the new syntax, makes a shorter period
acceptable IMO.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] clocktables output in hours and minutes only

2015-06-15 Thread Sebastien Vauban
Sharon Kimble boudic...@skimble.plus.com writes:
 Still on about clocktables, how can I have the time output show just
 in hours.minutes and not in days.hours.minutes please?

IIRC, customizing `org-time-clocksum-format' should help.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: Org export to latex produces incorrect table [8.3beta (release_8.3beta-1157-g8ddb84 @ /home/malsburg/usr/share/emacs/site-lisp/org/)]

2015-05-29 Thread Sebastien Vauban
Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Titus von der Malsburg malsb...@posteo.de writes:
 On 2015-05-24 Sun 10:09, Thomas S. Dye wrote:
 Titus von der Malsburg malsb...@posteo.de writes:
 On 2015-05-24 Sun 08:36, Thomas S. Dye wrote:
 Titus von der Malsburg malsb...@posteo.de writes:

 You got the result of rownames(x), which is expected.  The table you
 expect is given by the following code:

 Ah, I see, thanks.  Although the results is still somewhat
 unexpected.  c(One:, Two:) doesn’t have rownames and colnames.  So
 org apparently made them up when generating the table.

 Also expected due to :rownames yes :colnames yes.  Without those two
 header arguments:

 Consider this example:

 #+BEGIN_SRC R :results table :exports results :colnames yes :rownames yes
   v - c(a, b)
 #+END_SRC

 #+RESULTS:
 |   | x |
 |---+---|
 | 1 | a |
 | 2 | b |

 Where is the “x” coming from?  In R, colnames(v) gives me NULL.

 rownames(v) is also NULL.

 You are asking Org mode to produce a table with row and column names
 from a vector, which lacks rows and columns.  What behavior do you
 expect?

 Almost anything is better than Org showing me values that do not exist
 in the original data.  Empty cells for row and columns names are
 probably the best solution because that would be faithful to the data
 and to the settings (:rownames yes :colnames yes).

 AFAICT, the x comes from R, not Org. It could also come from the way
 Org calls R, but I don't know enough of the latter to tell.

The thread colnames with a list of columns does not work (see 
https://lists.gnu.org/archive/html/emacs-orgmode/2015-01/msg00589.html)
shouldn't be forgotten, as it contains an (un?)applied patch -- can't
verify now.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Export org file to Mardown (github flavour)

2015-05-18 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 Kaviraj Kanagaraj wrote:
 I am facing a problem with converting org file to markdown. While
 converting i find html in it. but I want to be in github flavour markdown.
 Any ideas??.
 I have found that org-gfm.el would help.. But I dont know how to setup
 custom backend for markdown export..

 That's certainly not the sexiest answer, but you might want to take
 a look at Pandoc.

 What's wrong with (require 'ox-gfm)?

I guess I read too quickly...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Export org file to Mardown (github flavour)

2015-05-18 Thread Sebastien Vauban
Kaviraj Kanagaraj wrote:
 I am facing a problem with converting org file to markdown. While
 converting i find html in it. but I want to be in github flavour markdown.
 Any ideas??.
 I have found that org-gfm.el would help.. But I dont know how to setup
 custom backend for markdown export..

That's certainly not the sexiest answer, but you might want to take
a look at Pandoc.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] \nbsp trick to get prefixed superscript to work?

2015-05-18 Thread Sebastien Vauban
John Kitchin wrote:
 I think what Eric is referring to is:

 #+latex_header: \usepackage[version=3]{mhchem}

 @@latex:\ce{^{147}Pm}@@

 that exports for me.

 \nbsp{}^{147}Pm also seems to work, but might put an extra space in.

 you might prefer \phantom{}^{147}Pm

Or using the zero-width char (via the predefined entity \zwnj in Org)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] get name of source block

2015-05-18 Thread Sebastien Vauban
Andreas Leha wrote:
 for quite some time I've had the following in my .emacs:

 ;; This Snippet returns the name of the current source block.
 ;; An elisp block to simplify the =:prologue= definition.
 ;; Author: Eric Schulte
 ;; It is useful to insert the debug message 'Entering foo()' as output.
 ;; For R code blocks, enable it with this line:
 ;; #+PROPERTY: header-args:R :session *R* :prologue (format print(\entering 
 %s\) (get-current-name))
 (defun get-current-name ()
   (or (when org-babel-current-src-block-location
 (save-excursion
   (goto-char org-babel-current-src-block-location)
   (while (and (forward-line -1)
   (looking-at org-babel-multi-line-header-regexp)))
   (when (looking-at org-babel-src-name-w-name-regexp)
 (org-no-properties (match-string 3)
   ))

 That had stopped working during export (my main use-case) a few weeks
 back.  Now, org-babel-src-name-w-name-regexp is gone from the source
 so that this snippet is completely broken.

 I would like to again have the name of the source block displayed
 during execution of src blocks.  Is there a function in org already?
 And if not, how would the proposed function look like so that it works
 during export as well?

Seems to come from:

* 49a656a ob-core: Remove `org-babel-src-name-w-name-regexp' Nicolas Goaziou 
(2015-05-01)
* cec47a6 ob-core: Change `org-babel-named-src-block-regexp-for-name' signature 
Nicolas Goaziou (2015-05-01)

Maybe looking at the diff would give you the way to translate the regexp
into some newer form?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] bug:? org babel updating images (C-c C-c) triggers show as text (C-c C-c) in imagemagick buffer.

2015-05-10 Thread Sebastien Vauban
Eric S Fraga wrote:
 On Friday,  8 May 2015 at 15:22, Leo Ufimtsev wrote:
 I use org-babel to make graphviz diagrams in my notes.

 I open resulting images in the side panel via C-u C-c C-o (or right-click 
 image).
 (See 20 screen shot)

 Now it shows the image fine at first.

 Then I run org-babel in the text buffer (on the left) to update the image on 
 disk (C-c C-c).
 But for some reason, this also calls 'show as text' 'C-c C-c'
 (image-toggle-display) in the side panel and causes the image to look
 like bits of text.

 I then have to constantly go to the side panel to return it back to image. 
 (C-c C-c). 

 Sometimes I it happens after the 2nd update of the image. But eventually 
 I'll see text.

 this happens to me all the time so it's nothing unique in your
 configuration.  I also find it very annoying and would love to see a
 solution.

IIUC, you should retrain yourselves to use other key bindings than the
do-it-all C-c C-c.

For executing code, that's C-c C-v C-e (or e on the beginning of the
code block -- speed key).

For images, that's C-c C-x C-v.

In fact, I never use C-c C-c in Org. I've even customized:

  (setq org-babel-no-eval-on-ctrl-c-ctrl-c t)

to be sure to unlearn C-c C-c.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Turn \[...\] constructs into full-fledged elements

2015-05-09 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 The point is to make \[...\] an element, which means that:

   - it cannot be inlined anymore, i.e., it has to start on a new line,
   - it cannot be filled anymore.

 So basically, \[...\] will be closer to LaTeX definition.

Nitpick: I thought that \[...\] could be inlined in LaTeX.

But, whatever your choice/change, I'll be happy with it.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] paste from clip to code block

2015-05-07 Thread Sebastien Vauban
John Kitchin wrote:
 I have these templates defined in my setup:

 ;; * Expansions for blocks [...]

 ;; add sh for shell
 (add-to-list 'org-structure-template-alist
  '(sh #+BEGIN_SRC sh\n?\n#+END_SRC src
 lang=\shell\\n?\n/src))

Note that the language should be `shell' in Org from Git (not sure about
MELPA, which I don't use). That'll be so in Org 8.3 as well.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] navigate between source code blocks

2015-05-04 Thread Sebastien Vauban
Leo Ufimtsev wrote:
 There are some build in things also, 

 E.g you can name source code blocks:
 #+name: EDE Config
 #+begin_src emacs-lisp
 (require 'ede)
 (global-ede-mode)
 (load-file (concat user-emacs-directory my/cedet-projects.el))
 #+end_src

 And then with Helm + org-babel-goto-named-src-block you can search
 your named source code blocks.

Would you mind sharing your config for the above
(Helm + org-babel-goto-named-src-block)?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Tag background color overridden by hl-line in the agenda

2015-04-28 Thread Sebastien Vauban
Hello,

Could it be possible to make the behavior for the tag colors the same as
for priority cookies when `hl-line-mode' is enabled?

At http://screencast.com/t/T0n1x6L93f, you can easily see what I mean:
the background of #A is not overridden by the highlighting of the
current line while it is for the tag FLAGGED -- quite unreadable when
one chooses a light foreground for the tags. 

Minimal settings:

--8---cut here---start-8---
(setq org-tag-alist '((FLAGGED . ??)))

(setq org-tag-faces
  '((FLAGGED
 (:weight bold :slant italic
  :foreground white :background #DB2D27

(setq org-priority-faces
  '((?A . (:weight bold :foreground #5F3731 :background #EFC4C0))
(?B . (:foreground #475443 :background #D5E1D0))
(?C . (:foreground #2D373F :background #C9DBE3
--8---cut here---end---8---

ECM:

--8---cut here---start-8---
#+TITLE: Example of Tasks

* Work:work:

** TODO [#A] Plan conference in Boston :FLAGGED:
   DEADLINE: 2015-04-13 lun.

** TODO [#B] Launch advertisement
   DEADLINE: 2015-04-06 lun.

* Personal   :perso:

** TODO Go to the dentist
   SCHEDULED: 2015-04-11 sam.
--8---cut here---end---8---

PS- Note that the background of #A is well overridden by the hl-line
in the Org source buffer. Not the same behavior as within the
agenda... See http://screencast.com/t/KzyM78xP.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] custom agenda view not possible?

2015-04-28 Thread Sebastien Vauban
Traycer Bullet wrote:
 This doesn't work because tags-todo excludes 'DONE' status tasks:
 (add-to-list 'org-agenda-custom-commands
  '(J Completed Recently tags-todo CLOSED=\-2d\))

Use `tags' instead of `tags-todo':

--8---cut here---start-8---
  (add-to-list 'org-agenda-custom-commands
  '(J Completed Recently
((tags CLOSED=\-2d\))) t)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Resolving conflicts with ediff and folding

2015-04-28 Thread Sebastien Vauban
J. David Boyd wrote:
 Charles C. Berry ccbe...@ucsd.edu writes:
 On Tue, 21 Apr 2015, Suvayu Ali wrote:

 Something that has been bugging me for many years now, everytime
 I resolve conflicts in Org files with ediff, it's a pain.  All the
 buffers keep folding the outlines, hiding the conflicts.  I keep
 going to the buffers manually (which can be somewhat of a pain in
 a text terminal), and unfolding them manually.  But of course the
 PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded!

 And then after I have jumped through hoops, and resolved the
 conflicts, I realise I could have just switched to text-mode before
 invoking ediff!

 Is there a way where I don't have to remember to switch the major
 mode before invoking ediff[1]?  Or maybe an ediff experience where
 the buffers are forced to unhide text.  I guess it should be
 possible to just temporarily remove all overlays or invisible
 properties.

 Any thoughts, ideas?

 Did you see this thread:
 http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html
 ??

 That't what I was going to say.  I added that to my setup long ago,
 and it has been working fine since then.  I don't ediff all that
 often, but when I do it certainly helps.

The only (tiny) problem is that the `truncate-lines' and `visible-mode'
settings stay in the buffer after the Ediff session -- while one would
love to get back to the original settings of the buffer.c

Best regards,
  Seb

-- 
Sebastien Vauban



Re: [O] Cannot use unknown latex back-end

2015-04-28 Thread Sebastien Vauban
Hello Thomas,

Thomas S. Dye wrote:
 I pulled from master this morning, refreshed Org mode, and got this
 error message in *Messages*:

 Loading /Users/dk/.emacs.d/src/org-mode/contrib/lisp/ox-koma-letter.el 
 (source)...
 org-export-register-backend: Cannot use unknown latex back-end as a parent

Don't you have, maybe, to add:

--8---cut here---start-8---
  (add-to-list 'org-babel-load-languages '(latex . t))
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [bug] Leading spaces aren't preserved in a `verse' special block

2015-04-24 Thread Sebastien Vauban
Hello,

As you can see on http://screencast.com/t/A7yegfql7awg, leading spaces
aren't preserved in the HTML export of a verse environment.

ECM:

--8---cut here---start-8---
* Verse

#+begin_verse
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.

 Tempor incididunt ut labore?
 Et dolore magna aliqua?

In a verse,
   indentation should be
preserved.
#+end_verse
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] ARCHIVE'd trees look like empty headlines

2015-04-24 Thread Sebastien Vauban
Hello,

When exporting to HTML a file such as:

--8---cut here---start-8---
* Item 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod.

** Subitem 1.1

Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam.

** Subitem 1.2 :finance:

Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.

* Item 2

Consequat. Duis aute irure dolor in reprehenderit in voluptate velit
esse.

** Subitem 2.1 :ARCHIVE:

Cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non.

** Suitem 2.2 :mail:

Proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
--8---cut here---end---8---

the HTML shows the ARCHIVE'd headline as it was an regular *empty* one,
as you can see on http://screencast.com/t/YmsezCA58.

I guess that exporting the tag ARCHIVE would be sufficient to solve
this confusion.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Leading spaces aren't preserved in a `verse' special block

2015-04-24 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 ECM:

 #+begin_verse
 In a verse,
indentation should be
 preserved.
 #+end_verse

 I cannot reproduce it.

The HTML rendering is not correct, IMHO.  But, indeed, the spaces are
well in the HTML generated by Org, but then eaten by the browser...

Not sure what's the solution if one wants the spaces preserved in the
displayed page...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Leading spaces aren't preserved in a `verse' special block

2015-04-24 Thread Sebastien Vauban
Rasmus wrote:
 Sebastien Vauban writes:

 The HTML rendering is not correct, IMHO.  But, indeed, the spaces are
 well in the HTML generated by Org, but then eaten by the browser...

 Not sure what's the solution if one wants the spaces preserved in the
 displayed page...

 On my system the spaces are displayed in the browser.  Org-mode
 version 8.3beta (release_8.3beta-1065-g99609a @
 /usr/share/emacs/site-lisp/org/) Produced code from emacs -q:

 p class=verse
 In a verse,br  /
 #xa0;#xa0;#xa0;indentation should bebr  /
 preserved.br  /
 /p
 /div

The above A0 is the Unicode for `nbsp', right?

I do have:

--8---cut here---start-8---
p class=verse
In a verse,br /
   indentation should bebr /
preserved.br //p
--8---cut here---end---8---

instead with Org-mode version 8.3beta (release_8.3beta-1063-g2bdc66).

Not sure why this difference, then...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ARCHIVE'd trees look like empty headlines

2015-04-24 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 When exporting to HTML a file such as:

 [...]

 * Item 2

 Consequat. Duis aute irure dolor in reprehenderit in voluptate velit
 esse.

 ** Subitem 2.1 :ARCHIVE:

 Cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
 cupidatat non.

 ** Suitem 2.2 :mail:

 Proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 the HTML shows the ARCHIVE'd headline as it was an regular *empty*
 one,

 Solved in 84e2e1e752692c17c4b7bfb669ab181d431170e0. Thank you.

Confirmed. Thanks to *you*!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Org linting library

2015-04-23 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Here's another update. I added a few more tests.

 If there's no more bug report or feedback, I'll simply put it in
 a wip-lint branch until Org 8.4 starts its development cycle.

Could `org-lint' return a success/fail indication, so that we could
write something along in an export hook:

--8---cut here---start-8---
(if (org-lint)
... continue with export ...
  ... stop with message or display the lint buffer ...)
--8---cut here---end---8---

As well, could the buffer be hidden (or killed) if it's empty?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Org linting library

2015-04-22 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
 Here's another update. I added a few more tests.

 If there's no more bug report or feedback, I'll simply put it in
 a wip-lint branch until Org 8.4 starts its development cycle.

I'd like to enforce org-lint on all my Org docs, either in a find-file
hook or before export, for example.

Can't you put it in master as well?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Cannot insert footnote here

2015-04-21 Thread Sebastien Vauban
Thomas S. Dye wrote:
 Vikas Rawal vikasli...@agrarianresearch.org writes:

 But a footnote at the end of a headline breaks LaTeX export. LaTeX
 needs an optional title as follows, to be able to include footnote in
 headline.

 http://tex.stackexchange.com/questions/47380/how-can-i-have-a-footnote-with-an-url-in-a-section-title
 http://tex.stackexchange.com/questions/47380/how-can-i-have-a-footnote-with-an-url-in-a-section-title

 How does one get that in Org?

 I don't know how to get \section[short]{long} with Org mode.

There is the ALT_TITLE property, which allows to set an alternate
(shorter, for example) title for a given headline.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Portable way to insert and display images in an org entry ?

2015-04-21 Thread Sebastien Vauban
Xavier wrote:
 Hello,

 I use org-mode on many different OS (cygwin, OSX, GNU/linux), as such, I
 have problems when I want to include a link of the 'file:' family.

 Last example, I wanted to include a picture from my Dropbox into my org
 file which is ok. But, C-c C-x C-v can't do anything good on my cygwin
 installation since the link is:

 [[file:Captures d'écran/20150421-SOAINFRA-saturation.png][Illustration
 de la saturation du TBS I7_SOAINFRA_AA_DATA01]]

Can't you avoid the space in Capture d'écran (and maybe the accent as
well)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] stty fails in babel sh blocks, workaround?

2015-04-08 Thread Sebastien Vauban
George Jones wrote:
   #+BEGIN_SRC sh :results output :exports both
   exec 21; date; set -e; # set -x; 
   stty || true
   #+END_SRC

FYI, `sh' gets replaced by `shell' in Org from master. That should hit
MELPA in a couple of days or weeks.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Best practices for dual HTML/LaTeX export for scientific papers

2015-04-03 Thread Sebastien Vauban
Charles C. Berry wrote:
 On Thu, 2 Apr 2015, Rasmus wrote:
 David Dynerman da...@block-party.net writes:

 2) Figures containing multiple side-by-side figures with subcaptions
(e.g. in LaTeX I would use minipage + subcaption)

 For LaTeX you can find solution on this list.  I would not know how
 to do it in plain HTML.  That would be the first step to
 a solution.

 You can get part way just by using a table.

I guess the most pragmatic answer for now (and maybe later?) would be to
use a MACRO call which translate all the bits and pieces correctly for
both HTML and LaTeX at least:

- using minipage and subcaption (or something else) for LaTeX
- using ??? for HTML

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Performance of table computing

2015-03-31 Thread Sebastien Vauban
Hello,

In one of my Org files, I have 20 small tables. Among them, 11 have
a line of formula's (TBLFM), mainly for computing a total (sum), so
that's in essence relatively standard and simple.

The file in itself is quite big (11,000 lines), but I did not expect to
see that re-applying formulas to all of them would take 30 seconds... at
every save... since I did add the following to my `.emacs' file:

--8---cut here---start-8---
  (defmacro measure-time (message rest body)
Measure the time it takes to evaluate BODY.
`(let ((time (current-time)))
   ,@body
   (message __%s (in %.02f s)___
,message (float-time (time-since time)

  (defun my/org-update-buffer ()
Update all dynamic blocks and all tables in the buffer.
(interactive)
(when (derived-mode-p 'org-mode)
  (message (Info) Update Org buffer %s
   (file-name-nondirectory (buffer-file-name)))
  (sit-for 1.5)
  (let ((flyspell-mode-before-save flyspell-mode))
(flyspell-mode -1)  ; Temporarily disable Flyspell to
; avoid checking the following
; modifications of the buffer.
(measure-time Updated all dynamic blocks
  (org-update-all-dblocks))
(measure-time Re-applied formulas to all tables
  (org-table-iterate-buffer-tables))
(when flyspell-mode-before-save (flyspell-mode 1)

  ;; Make sure that all dynamic blocks and all tables are always up-to-date.
  (add-hook 'before-save-hook 'my/org-update-buffer)
--8---cut here---end---8---

Is my observation shared?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Performance of table computing

2015-03-31 Thread Sebastien Vauban
Jacob Nielsen wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 In one of my Org files, I have 20 small tables. Among them, 11 have
 a line of formula's (TBLFM), mainly for computing a total (sum), so
 that's in essence relatively standard and simple.

 Try this:
 # -*- cache-long-scans: nil; -*-
 # This makes forward-line much faster and thus org-goto-line and
 # thus org-table-sum (C-c +)

 My org file is 9990 lines and I just do weekly summations on small
 tables used for invoices. The performance was driving my crazy but
 setting cache-long-scans to nil has made me happy again.

Euh... It went down (no suspense anymore) from:

__Re-applied formulas to all tables (in 33.32 s)___


to:

__Re-applied formulas to all tables (in 0.21 s)___


Well, that's an HUGE improvement!  I couldn't believe my eyes...

I'll let-bind this variable in my above function, so that I don't have
to hardcode this anywhere...

Thanks a lot!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to create agenda which ignores headings with deadline/scheduled dates older than 3 months

2015-03-30 Thread Sebastien Vauban
Martin Beck wrote:
 how can I set up an agenda view in org-mode which does NOT show old
 entries which contain scheduled or deadline dates older than 3 months?
 I did not find an option for that - maybe I've overlooked it?

Something like (untested):

  (tags-todo DEADLINE\-3m\)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] comment section with latex_header

2015-03-26 Thread Sebastien Vauban
Robert Klein wrote:
 On 03/24/2015 10:04 AM, Sebastien Vauban wrote:

 Can't we say that a COMMENT'ed subtree is like having all of its
 contents commented, line by line?  IOW, nothing accessible?

 This would probably break a lot of babel stuff.

Could you elaborate why?

 If there was an option to disable exports for #+NAME:-ed stuff (i.e.
 data sources for babel), e.g. somtehing like

 #+NAME: xyzzy :exports none
 | munich  | 13 |
 | cologne | 12 |

 you could deprecate and eventually disable data sources in COMMENT-ed
 section.

If you *not to export* some stuff in a subtree, adding the noexport
tag would be enough, right?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] render - as rarr on html export?

2015-03-24 Thread Sebastien Vauban
Rasmus wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 Rasmus wrote:
 Matt Price mopto...@gmail.com writes:

 I feel like I've seen the answer to this somewhere but I can't find it --
 is it possible for me to get - and = to render as rightarrows (→, ⇒)?

 Do you want to render it in the buffer or on export?  For the buffer you
 could use prettify-symbols-mode.

 ... by adding the following into your .emacs:

   ;; Show entities as UTF8 characters.
   (setq org-pretty-entities t)  ; emsp, etc.

 This would work for \rightarrow but I don't think you can configure it
 to support -.  For that you'd need prettify-symbols-mode, I think.

I think you're right, indeed!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] Fix massive slowdown in org-id-find

2015-03-24 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Florian Beck f...@miszellen.de writes:

 the recent changes in org-id (presumably
 8cdb2eef0f9f98f9e00a5e689decfe341fe0c6ec) lead to a massive slowdown.

 Would you mind elaborating a bit? Slow down doing what? In which cases?
 Could you profile it?

 org-id-find is slow as it is, now I find it almost unusable.

 Attached patch provides a fix.

 Thanks. However, your patch is (partly) wrong.

 -  (re (org-re-property property nil (not value
 -  (catch 'exit
 -(while (re-search-forward re nil t)
 -  (when (if value (equal value (org-entry-get (point) property nil t))
 -  (org-entry-get (point) property nil t))
 -(throw 'exit (progn (org-back-to-heading t) (point)
 +  (re (org-re-property property nil (not value) value)))
 +  (when (re-search-forward re nil t)
 +(org-back-to-heading t)
 +(point)

 Here, it catches false positives, e.g., lines looking like properties in
 example blocks. It also overlooks accumulated values. It should fail
 with make test.

 However, the optional VALUE argument is nice (I think some profiling
 would still be welcome, tho).

For my own information, does one know if it's possible to integrate
profiling tests in ERT?  So that one could write that if test X takes
more than 2 s (for example), the test would fail?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] comment section with latex_header

2015-03-24 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Robert Klein rokl...@roklein.de writes:

 this patch also breaks this kind of construct where not the table is
 exported, but the one created from the booktabs() call:


 --- begin example ---
   * Grundlagen
   *** COMMENT unexported subtree with table source
   #+tblname: masse

 This is deprecated. Use #+name: instead.

   | 1 gestr. Teelffel   | 1 gestr. Elffel   | 1 Tasse |
   | ca. 5 ccm   | ca 15 ccm | ca 120 ccm  |
   |-+---+-|
   | Zimt 2 g| Haferflocken 8 g  | Mehl 80 g   |
   | Paprika 2 g | Speisestärke 9 g  | Grieß 96 g  |
   | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g |
   | Zucker 4 g  | Salz, Zucker, Öl 15 g | |
   | Salz 5 g| Reis, Butter 15 g | |

   ** Maße und Gewichte

   #+call: booktabs(table=masse, align=lll) :results latex :exports results
 --- end example ---

 Good catch. The line between data that can be accessed and data that
 cannot in a commented subtree is blurry.

Can't we say that a COMMENT'ed subtree is like having all of its
contents commented, line by line?  IOW, nothing accessible?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode timestamp and calendar questions

2015-03-24 Thread Sebastien Vauban
Randomcoder wrote:
 Hi,

 Is it possible to make org-mode timestamps inactive? (I mean, the
 calendar(Google calendar) and the org-agenda would ignore them)

 I tried specifying that I should be notified 1h in advance for an
 event like this :  2015-03-24 Mon 07:30 -1h but apparently this is
 not the way to do it.
 Is it currently possible to do this and if so, what is the correct
 org-mode timestamp markup for this ?

As written in the docs, inactive timestamps have `[' brackets instead of
`'.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] render - as rarr on html export?

2015-03-24 Thread Sebastien Vauban
Rasmus wrote:
 Matt Price mopto...@gmail.com writes:

 I feel like I've seen the answer to this somewhere but I can't find it --
 is it possible for me to get - and = to render as rightarrows (→, ⇒)?

 Do you want to render it in the buffer or on export?  For the buffer you
 could use prettify-symbols-mode.

... by adding the following into your .emacs:

--8---cut here---start-8---
  ;; Show entities as UTF8 characters.
  (setq org-pretty-entities t)  ; emsp, etc.
--8---cut here---end---8---

 \rightarrow will work, but doesn't give me the visual cue I want when
 working in org.

 With org-entities you can have it displayed as the equivalent unicode
 characters of e.g. \rightarrow.  With cdlatex you can insert \rightarrow
 quickly (on my keyboard: ¨).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [OT] A short (less than a minute), informal survey about LaTeX

2015-03-23 Thread Sebastien Vauban
Marcin Borkowski wrote:
 Hi there,

 two questions for people using LaTeX (possibly only as Org-mode
 backend).

 1. Did you know about the savetrees package by Scott Pakin
 (http://www.ctan.org/pkg/savetrees)?  From the description:

 ,
 | The goal of the savetrees package is to pack as much text as
 | possible onto each page of a LaTeX document. Admittedly, this
 | makes the document far less attractive. Nevertheless,
 | savetrees is a simple way to save paper when printing draft copies
 | of a document.
 `

Yes.

 2. Would you find it useful when producing PDF files other that
 scientific articles (using Org-mode or not)?

Not sure about that. All my work reports are made in Org mode and
exported to PDF. They never are scientific reports (they're discussion
notes with TODO items, etc.), and I must adhere to the format others use
when writing in Word.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] comment section with latex_header

2015-03-23 Thread Sebastien Vauban
Rasmus wrote:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 If there are `#+latex_header:' entries in a section and that section is
 `COMMENT'ed out, I'd expect the #+latex_header entries to be
 uneffective.  As they are when I comment them out one by one as in
 `# #+latex_header:'.

 Is this a bug? (I'd say, yes)

 Why?  I guess you can still archive 

I'd also say that this is a bug, as -- in my understanding --
COMMENT'ing a subtree is exactly equivalent to commenting every line of
it, that is:

--8---cut here---start-8---
* COMMENT Section
Some text
Some code
Some text
--8---cut here---end---8---

should be equivalent to:

--8---cut here---start-8---
# * Section
# Some text
# Some code
# Some text
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [ox, patch] Add #+SUBTITLE

2015-03-23 Thread Sebastien Vauban
 – it would be
 a much simpler project – gives 1-2 months or so.  NB. Fun fact: the work
 on the class for the journal I’m talking about includes coding some
 Emacs Lisp to extract metadata from LaTeX (and aux) files and generate
 XML files for uploading pdfs to the journal site.)

 WDYT?

+1^{2} ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ID property generated by org-mobile

2015-03-21 Thread Sebastien Vauban
Alexis wrote:
 On 2015-03-20T22:45:02+1100, Randomcoder randomcod...@gmail.com said:

 R Does the ID property have any use? I know I can disable it, but R where

 R is it being used ?  (the ID property that org-mobile generates for R each
 heading)

 R Are there any drawbacks to just disabling it with (setq R
 org-mobile-force-id-on-agenda-items nil) ?

 R Is it being used somewhere in particular ?

 i think it might be used for syncing purposes, to uniquely identify items that
 need to be added, removed etc.

I also think it serves that purpose. Though, I'm quite sure Orgzly does
not rely on such ID; how does it do, then?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Config best practices?

2015-03-21 Thread Sebastien Vauban
Nick Dokos wrote:
 Marcin Borkowski mb...@wmi.amu.edu.pl writes:
 On 2015-03-20, at 10:07, Sebastien Vauban sva-n...@mygooglest.com wrote:
 Marcin Borkowski wrote:
 I'm wondering what people do to keep the configuration of their Org
 files in order.

 I'm not sure to correctly grasp your objective.  Could you restate it?

 Sure.

 Where do you put things like

 #+OPTIONS: toc:nil

 or

 #+SEQ_TODO: TODO | DONE

 or

 #+LATEX_HEADER: \newcommand{\eps}{\varepsilon}

 ?

 I use a dedicated top-level headline, with a COMMENT keyword, but
 I started to think that a :noexport: tag might be a better idea.

 Are there any advantages of one over the other, or other approaches
 altogether?

 I can tell you they aren't isomorphic...  The noexport tag simply says
 don't export this subtree.  The COMMENT keyword adds don't run any
 Babel code block in there.

 COMMENT also says that the whole subtree is not to be exported according
 to the doc:

(info (org) Comment lines)

 Has that changed?

Nope, it hasn't: I wrote that COMMENT *adds* don't run any code to
don't export this subtree either. So, we're both on the same
frequency.

 So I guess that – since the lines with options etc. are not exported
 anyway – that using a :noexport: tag might be a better idea.  Am I right?

 The reason I'm asking is that I'm tweaking my org-one-to-many utility
 so that it propagates the config to all the generated files.

 Still not that clear to me.  Maybe an ECM would clarify your request?

 As you wish.  This is what I usually do.

 * Headline
 * Another one
 ** Subheadline
 * COMMENT Config
 #+LATEX_HEADER: \newcommand{\eps}{\varepsilon}
 #+SEQ_TODO: TODO | DONE CANCEL
 #+OPTIONS: toc:nil

 Yes, but why do you do that? What are you trying to accomplish? What
 does keeping the configuration in order mean?

+1

 I sometimes use a Setup heading marked with COMMENT, so it does not get
 exported.  I never put babel stuff in there so I haven't worried about
 that, but if Seb is correct that it prevents babel from evaluating
 things in the subtree, that's a bonus. If you are just trying to
 (mostly) hide it from view, add an :ARCHIVE: tag to the heading.
 But most of the time I have them at the top of the file in plain view.

+1.

Sometimes, I also have a Setup section at the top, with a :ARCHIVE:
tag so that it does not expand when cycling view states (via S-TAB).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Config best practices?

2015-03-21 Thread Sebastien Vauban
Marcin Borkowski wrote:
 On 2015-03-21, at 04:05, Nick Dokos ndo...@gmail.com wrote:

 Yes, but why do you do that? What are you trying to accomplish? What
 does keeping the configuration in order mean?

 I have that org-one-to-many utility, which splits the Org file at
 (selected) headings, effectively making them separate Org files.  If
 I e.g. use LaTeX macro definitions, or custom (per-file) TODO keywords
 in that file, it makes sense to put the same configs in the files split
 from the main one.  Putting them into their own headline may be the
 simplest way to tell org-one-to-many what to copy to each generated
 file.

 I don't like putting them at the top; while #+TITLE or #+AUTHOR do make
 sense there (and don't in the split files!), cluttering the first few
 screens with e.g. LaTeX definitions is not my favorite way of using
 Org-mode.

As I wrote, you could choose for an ARCHIVE'd heading (one that's
always collapsed) or for a SETUPFILE?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Config best practices?

2015-03-20 Thread Sebastien Vauban
Hello Marcin,

Marcin Borkowski wrote:
 I'm wondering what people do to keep the configuration of their Org
 files in order.

I'm not sure to correctly grasp your objective.  Could you restate it?

 I use a dedicated top-level headline, with a COMMENT keyword, but
 I started to think that a :noexport: tag might be a better idea.

 Are there any advantages of one over the other, or other approaches
 altogether?

I can tell you they aren't isomorphic...  The noexport tag simply says
don't export this subtree.  The COMMENT keyword adds don't run any
Babel code block in there.

 The reason I'm asking is that I'm tweaking my org-one-to-many utility
 so that it propagates the config to all the generated files.

Still not that clear to me.  Maybe an ECM would clarify your request?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Possible bug: Can not search for text in links - only description

2015-03-20 Thread Sebastien Vauban
Richard Lawrence wrote:
 Rainer M Krug rai...@krugs.de writes:

 I figured out that I can not search for text in the link.

 Thins is quite annoying, especially as I even thought of opening the
 file in another texteditor, search for the string, and save it again.

 As an example: if this link is in an org-mode file, A search for exa
 does not return any results.

 [[*Examples][Link to exp]]

 Is this a problem on my side?

 No, I confirm that that's how it works for me, too.  

 I am not sure if this counts as a bug or not, so someone else should
 still address this question.  Maybe this is the desired behavior, given
 that the link text is hidden?  Or maybe it's just not possible to search
 in hidden text?

 There's a less-drastic solution than switching to another editor though!
 You can just turn off Org mode...try M-x fundamental-mode, then run the
 search.

M-x visible-mode is your friend here.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to represent Emacs keystrokes in Org?

2015-03-20 Thread Sebastien Vauban
Marcin Borkowski wrote:
 Hi there,

 it seems that reviving old threads is my new hobby;-).

 On 2014-11-29, at 22:58, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:

 On 2014-11-29, at 22:53, Marcin Borkowski wrote:

 On 2014-11-24, at 19:38, Rasmus wrote:

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

 Hello,

 I'm writing (in Org) a text on Emacs usage.  How to
 correctly/canonically represent keystrokes, like C-x RET f?
 Currently, I use =C-x RET f=; are there any alternatives?

 That's what I'd do.  Or ~C-x RET f~.  You could also use a macro, if you
 want it to me be more semantic (I hope I use this word correctly).

 This might seem a good idea, but how do I do it?  (See below for
 a concrete problem statement.)

 Houston, we've got a problem.  What about =M-,=?  Somehow it seems not
 to be interpreted in the right way: it does not get fontified correctly,
 nor does export in the right way.  What can I do about it?  I found
 about org-emphasis-regexp-components, is it the only way?  Also, how do
 I reload Org without restarting Emacs?  (I am an Emacs geek and I try to
 beat my record of emacs-uptime, you know. ;-) )

 Wow, I got an idea, and it worked.  Here's an excerpt from `C-u C-x ='
 at my solution;-):

  position: 11859 of 16051 (74%), column: 253
 character: ‍ (displayed as ‍) (codepoint 8205, #o20015, #x200d)
 preferred charset: unicode (Unicode (ISO10646))
 code point in charset: 0x200D
syntax: . which means: punctuation
  to input: type C-x 8 RET HEX-CODEPOINT or C-x 8 RET NAME
   buffer code: #xE2 #x80 #x8D
 file code: #xE2 #x80 #x8D (encoded by coding system utf-8-unix)
   display: by this font (glyph code)
 xft:-unknown-Phetsarath 
 OT-normal-normal-normal-*-17-*-*-*-*-0-iso10646-1 (#x120)

 Character code properties: customize what to show
   name: ZERO WIDTH JOINER

 A bit ugly trick, but works.  What are the opinions?

 After a while I have to say that my opinion is strongly negative: this
 breaks LaTeX export.  (LaTeX doesn’t like some unicode characters, it
 turns out.)  Also, this was really an ugly hack...

 So, here is my problem: how to represent a key like M-, or
 e.g. a sequence \, (important in regexps) as “code” or “verbatim stuff”
 in org-mode?  Neither =\,= nor ~\,~ work, of course.  Also, I’d like
 this to be backend-agnostic, so \texttt{M-,} doesn’t really work.

I'm thinking at something like this (partially untested):

--8---cut here---start-8---
#+LATEX_HEADER: \usepackage{menukeys}
#+LATEX_HEADER: \let\ORIkeys\keys
#+LATEX_HEADER: \renewcommand{\keys}[1]{\ORIkeys{\texttt{#1}}}
#+LATEX_HEADER: \newcommand{\repeatedkeys}[1]{\keys{\textcolor{gray}{#1}}}

#+MACRO: kbd \keys{$1}
--8---cut here---end---8---

Of course, the macro would have to be improved to work at least (in my
case) in both HTML and LaTeX, by using the @@latex:...@@ construct.

 What is the rationale behind forbidding the comma as the “border”
 character in org-emphasis-regexp-components?  Should I change this
 variable in my setup or is there a more general way to convince Org that
 I really want verbatim/code snippets like =\,=?

I share your point about a better `org-emphasis-regexp-components' by
default, which would work in 99.9% of the cases.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [bug] Multi-day events aren't properly fontified in the agenda

2015-03-18 Thread Sebastien Vauban
Hello,

Having 2 events such as:

--8---cut here---start-8---
** Party during day 1 of the week-end
   2015-03-21 Sat

** Party during week-end
   2015-03-21 Sat--2015-03-22 Sun
--8---cut here---end---8---

you'll see that the mono-day event will be fontified with the face
`org-agenda-calendar-event', not the multi-day event.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Multiple (identical) RESULTS blocks of one code block?

2015-03-09 Thread Sebastien Vauban
John Kitchin wrote:
 Rainer M Krug writes:

 Consider the following:

 * The calculation
 #+NAME: testcode :exports both
 #+begin_src R  :session test
 runif(10)
 #+end_src


 * summary of the results
 First time
 #+RESULTS: testcode :exports both
 |  0.772744940361008 |
 |  0.170518629485741 |
 | 0.0833237133920193 |
 |  0.149035625392571 |
 |  0.698798568220809 |
 |  0.627075897762552 |
 |  0.177144371205941 |
 | 0.0476319056469947 |
 |  0.289851602632552 |
 | 0.0296813279855996 |

 * and another
 testthingy
 #+RESULTS: testcode :exports both

 If I update the calculation, the first results block is updated, but
 not the second one. I would like to have two RESULTS blocks which
 are both updated when the code block is evaluated.

 Is this possible?

 I don't believe this is possible out of the box. The first RESULTS block
 from the beginning of the buffer will be updated, and not the others.

 You might be able to use a hook function to do this [...].

Another solution is to use the `echo' [1] code block to copy whatever
contents where you want it...

Best regards,
  Seb

[1] http://orgmode.org/cgit.cgi/org-mode.git/plain/doc/library-of-babel.org

-- 
Sebastien Vauban




Re: [O] Citation syntax: a revised proposal

2015-03-09 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
 Honestly, Org is already full of cryptic symbols, e.g., {{{...}}}
 @@...@@, , ..., and so on. This is not worse than the
 rest of Org.

What is ...?

PS- Not easy to search for that in the Org manual in Emacs: neither 
nor  are in the index, though I know about the first one (Noweb).

PPS- Before, I could use C-s to go through pages which would contain
 . Now, I don't know if that's because of a change on my side,
 that does not work anymore...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bleeding edge in elpa

2015-03-09 Thread Sebastien Vauban
Nikolai Weibull wrote:
 On Sat, Mar 7, 2015 at 3:47 PM, Xavier Maillard xav...@maillard.im wrote:
 Nikolai Weibull n...@disu.se writes:

 Would it be of interest to anyone else if the bleeding edge version
 was available via elpa?

 Isn't it already available via M-x package interface ?

 No, only the version based on the maint branch is available via elpa.

 I'd rather use git (I really do not like the package stuff).

 As Grant pointed out, it’s a lot more convenient working inside Emacs
 for switching between versions and such.

How do you switch between versions in ELPA?  IIUC, you only get the
latest version, and if that one is not right, you're kind of stuck: you
can't reinstall the previous version via the interface. Or maybe I have
to learn something new?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Embedding diagrams in Org

2015-03-05 Thread Sebastien Vauban
Charles C. Berry wrote:
 Why :results latex raw and not :results latex?

 I have no idea ;-)

 I find, unfortunately, that getting babel to do what I want is somewhat
 of an arcane art (for me) so once I get something doing what I want it
 to do, I leave things alone...

 `:results latex raw' is equivalent to `:results raw'.

 [...]

 For example, a naked ~tildes~ will be marked up as \verb~tildes~ under
 `:results raw' or `:results latex raw', and as ~tildes~ under
 `:results latex'.

Aren't raw and latex two _mutually exclusive_ format options?

See http://orgmode.org/manual/results.html.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org.css for mobile-friendly

2015-03-05 Thread Sebastien Vauban
OSiUX wrote:
 El mié, 04 mar 2015, Rasmus decía:
 OSiUX xu...@osiux.com.ar writes:
 
 Testing my blog [0] (org-mode publish) in
 mobile-friendly [1] obtain bad result. :(

 Same result for orgmode.org, maybe somebody have
 better CSS for org-mode export?

 thanks!

 [0] http://osiux.com
 [1] https://www.google.com/webmasters/tools/mobile-friendly/?url=orgmode.org
 
 Did you try to add viewport?  E.g.:
 
 meta name=viewport content=width=device-width, initial-scale=1

 ^ this meta is the begining for OK in mobile-friendly
 I play with CSS for adapt images sizes.

Is there a generic line (the above one, maybe?) that could/should be
added in ox-html in order to make compliant pages from the start,
without forcing all users to add lines in their Org documents?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Escape individual underscore?

2015-03-04 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 FWIW, I always set

 #+OPTIONS: ^:{}

 in my files.

You could set the following, then:

--8---cut here---start-8---
  ;; Interpret _ and ^ for export when braces are used.
  (setq org-export-with-sub-superscripts '{})
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] agenda folding/hiding of sections?

2015-03-04 Thread Sebastien Vauban
Samuel Wales wrote:
 great idea, but that only toggles the grid, not the entries.

You mean you want to remove the timed (i.e., the ones with a time
component) entries from your agenda?  That's against the purpose of the
agenda view, which shows you all the entries for today, this week, this
month, etc.

If you need that, you must make your own agenda view.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] agenda folding/hiding of sections?

2015-03-03 Thread Sebastien Vauban
Samuel Wales wrote:
 i wonder if anybody has made the agenda sections fold or hide?  i
 often find i want to hide the time section.

M-x org-agenda-toggle-time-grid?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Embedding diagrams in Org

2015-02-19 Thread Sebastien Vauban
Hello Andreas,

Andreas Leha wrote:
 I also use tikz in my org files.  I just include a slightly more
 involved version of Eric's example to show some of the beauty of org.

 This includes a caption for the diagram, and different output formats
 for different export routes.

 #+LATEX_HEADER: \usepackage{tikz}

 * tikz example

 #+name: tikz_example
 #+header: :packages '(( tikz))
 #+header: :file (by-backend (latex example_diagram.tikz) (html 
 example_diagram.svg) (t example_diagram.png))

Where is the `by-backend' function defined?

 #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 
 800
 #+header: :results file raw
 #+header: :fit yes
 #+begin_src latex
   \begin{tikzpicture}
 \node[red!50!black] (a) {A};
 \node (b) [right of=a] {B};
 \draw[-] (a) -- (b);
   \end{tikzpicture}
 #+end_src

 #+caption: A tikz example diagram with a caption
 #+results: tikz_example
 [[file:example_diagram.png]]

What'd be nice is that you could say (in a *file* property) that the
extension for LaTeX always has to be .tikz, for HTML .svg and .png in
all the other cases.

Then, you could simply give the base name of the figure where
appropriate, in a DRY configuration.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Embedding diagrams in Org

2015-02-19 Thread Sebastien Vauban
Eric S Fraga wrote:
 I do wonder, however, why we need to turn languages on or off?  It
 would be nice if org-babel would do this automatically when a language
 specific src block is encountered...

That'd make some sense, indeed... Kind of autoloads for all the
languages...

Best regards,
  Seb

-- 
Sebastien Vauban




[O] How to get a column correctly formatted in Babel + R (w/ or w/o name)?

2015-02-19 Thread Sebastien Vauban
#+PROPERTY:  session *R*

* Source

#+name: table
| ID  | User1 | User2 |
|-+---+---|
| 26/0163 | lrp   | nil   |
| 37/0001 | nil   | nil   |
| 37/0003 | nil   | nil   |

#+begin_src R :var df=table :colnames yes
df
#+end_src

#+results:
| ID  | User1 | User2 |
|-+---+---|
| 26/0163 | lrp   | nil   |
| 37/0001 | nil   | nil   |
| 37/0003 | nil   | nil   |

We just checked that the table is correctly imported in R.

* First column (with name)

When I try to get the first column printed along with its name (ID), I have
troubles doing so...

#+begin_src R :var df=table :colnames yes
df[, 1]
#+end_src

#+results:
| x   |
|-|
| 26/0163 |
| 37/0001 |
| 37/0003 |

#+begin_src R :var df=table :colnames yes
as.data.frame(df[, 1])
#+end_src

#+results:
| df[, 1] |
|-|
| 26/0163 |
| 37/0001 |
| 37/0003 |

Here, maybe I'm lacking R knowledge?

* First column (without name)

Now, to get it without the column name:

#+begin_src R :var df=table :colnames no
df[, 1]
#+end_src

#+results:
| ID  |
| 26/0163 |
| 37/0001 |
| 37/0003 |

It's not much better, as I don't expect ID to be printed here!

Can you clear up things for me?  Bad R code?  Babel feature?

Best regards,
  Seb

-- 
Sebastien Vauban




  1   2   3   4   5   6   7   8   9   10   >