Re: [O] Grouping tasks with todo-keywords

2017-06-25 Thread Fabrice Niessen
Narendra Joshi  writes:
> Is it possible to group tasks in org-agenda by the state they are in? 
> For example, I would like to have horizontal divider between all tasks
> that are ONGOING and tasks that are in TODO state. 
> I have already setup `org-agenda-sorting-strategy' to get the desired
> order.

You could be interested to have a look at my org-leuven-agenda-views.el,
in my own "Emacs Leuven" configuration files.

Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] A summary with weekly processed actions using org-todo

2017-01-14 Thread Fabrice Niessen
Hi Yann,

> My life is relying on orgmode, from a personal standpoint (orgmode is
> faster at reminding me pending actions to fix my house than my wife)
> and to organize my actions at work pushing my mutt mails in org-mode
> as tasks... all this works great. Special thanks to the team for this
> superb work.
>
> I was wondering if there was a way to help me in sorting tasks. I have
> many actions/tasks during the week to process, some are done, some are
> waiting for feedbacks... on Mondays, I would like to generate a
> summary of the few actions that I changed the status during the last
> n-days (week, month...). I checked the Worg and other places but was
> not able to find the trick.
>
> I'm pretty sure somebody had this need before but am not able to find
> the answer. 

You may find some inspiration at the custom Org views I built in
https://github.com/fniessen/emacs-leuven/blob/master/org-leuven-agenda-views.txt
(literate programming file -- needs tangling).

The views are more for daily/weekly usage, but you could make them run
over a month by customizing them to your taste...

-- 
Best regards,
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] Org HTML export (ReadTheOrg)

2016-06-08 Thread Fabrice Niessen
Dear all,

FYI, ReadTheOrg (awesome CSS theme, I dear saying it ;-) [1], for your
HTML exports from Org mode) is now "Web Responsive", thanks to a patch
from Geekplux!  Enjoy!

See https://github.com/fniessen/org-html-themes for more information.

Best regards,
Fabrice

[1] I just cloned the awesome Sphinx CSS theme used in the great
http://readthedocs.org/ Web site (see, for example,
http://org-babel.readthedocs.io/en/latest/).
All credit goes to the author(s) of Sphinx!

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] How to get sum from remote table + how to put in bold?

2015-12-07 Thread Fabrice Niessen
Hello,

Eric S Fraga  writes:
> On Sunday,  6 Dec 2015 at 15:16, Fabrice Niessen wrote:
>>
>> I'm trying to build a template for invoices written in
>> Org... exporting to PDF (and HTML). Will be officially public as soon
>> as it's DONE.
>>
>> Though, I have 2 problems currently:
>>
>> - I'd like to sum up, in table `total', the sub-total column of table
>>   `items'. But the `remote' call does not seem to accept the `vsum'
>>   expression. Is this a foreseen limitation?  Is there a workaround to
>>   this?
>>
>> - I'd like to get the computed amount (last line of `total' table) in
>>   bold (and, if possible, even in a bigger font). How is that doable?
>
> I've fixed your ECM:
>
> 1. moved attr_latex and other latex stuff to before the names of the
>tables and
> 2. inverted the order of vsum and remote so that you do a vsum over what
>the remote function returns.
>
> Seems to work.

I confirm that you *did* fix my first problem. Simple, neat, and smart.
Thanks a lot!

Any idea how to solve my problem #2: get the computed amount in bold
and/or in another color and/or in bigger font?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] How to get sum from remote table + how to put in bold?

2015-12-06 Thread Fabrice Niessen
Hello,

I'm trying to build a template for invoices written in Org... exporting
to PDF (and HTML). Will be officially public as soon as it's DONE.

Though, I have 2 problems currently:

- I'd like to sum up, in table `total', the sub-total column of table
  `items'. But the `remote' call does not seem to accept the `vsum'
  expression. Is this a foreseen limitation?  Is there a workaround to this?

- I'd like to get the computed amount (last line of `total' table) in bold (and,
  if possible, even in a bigger font). How is that doable?

ECM:

--8<---cut here---start->8---
#+TITLE: Invoice #001
#+OPTIONS:   H:2 num:nil toc:nil

#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper,table]
#+LaTeX_HEADER: \usepackage{tabu}
#+LaTeX_HEADER: \taburulecolor{gray}

* Items

#+name: items
#+ATTR_LaTeX: :environment tabu :align lXlrlrrl
|  | <35>|   |  | | 
 |   |   |
| Title of job | Description | Type  | Rate | | 
Quantity | Sub-total |   |
|--+-+---+--+-+--+---+---|
| Consultancy  | Quote template  | Timed |  400 | \EUR/d |  
6.5 |   2600.00 | \EUR |
|--+-+---+--+-+--+---+---|
| Research | Billing invoice template| Timed |  400 | \EUR/d |  
   10.0 |   4000.00 | \EUR |
#+TBLFM: $7=$6*400;%.2f

* Amount Due

#+name: total
#+latex: \hfill\colorbox{yellow}{\begin{minipage}{7.5cm}
#+ATTR_LaTeX: :environment tabu :align Xrl
| /Sub-total/  | 0.00 | \EUR |
|+--+---|
| /Tax @ 21%/  | 0.00 | \EUR |
|+--+---|
| *Amount Due* | 0.00 | *\EUR* |
#+TBLFM: 
@1$2=remote(items,vsum(@3$7..@4$7);%.2f::@2$2=@1*0.21;%.2f::@3$2=vsum(@1..@-1);%.2f

#+latex: \end{minipage}}
--8<---cut here---end------->8---

Any hint for me?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-06 Thread Fabrice Niessen
> Doesn't it get its information from a timestamp in #+DATE?
>
>> I think you missed out explaining what {{{time(FORMAT)}}} does.

You might be interested by `date', `time' and `modification-time',
depending on what you want to achieve. I've put some examples in my
Org-macros project about those:

  https://github.com/fniessen/org-macros

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Change color for two words in LaTeX export using cologr package?

2015-07-27 Thread Fabrice Niessen
Hello,

Rainer M Krug  writes:
> Eric S Fraga  writes:
>> On Friday, 24 Jul 2015 at 15:07, Rainer M Krug wrote:
>>> In an org document, I want to change the text colour of two words
>>> {\color{red} red line } to red in a sentence and the rest should be
>>> normal colour.
>>>
>>> I am missing something, as this changes the text colour for the rest
>>> of the sentence into red. How can I only change the colour of the
>>> two words?
>>
>> I usually do this type of thing as follows:
>>
>> #+latex: {\color{red}
>> red line
>> #+latex: }
>>
>> which allows for org-isms in the text.  Alternatively, you could do:
>>
>> ... @@latex:{\color{red} red line}@@
>>
>> if you don't need to use org syntax within the {}.
>
> Thanks - I will try it out on Monday. But it looks good.

Or, use a macro "color"...

I've begun writing such generic macros for basic and advanced formatting
(see [1]), though they are currently limited to the HTML backend:

  #+MACRO: color @@html:$2@@

I'll update that particular one in the coming hours or days.

Best regards,
Fabrice

Footnotes:

[1] https://github.com/fniessen/org-macros

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Org-lint -- Lisp error: (wrong-type-argument arrayp nil)

2015-07-03 Thread Fabrice Niessen


Nicolas Goaziou writes:
> Fabrice Niessen writes:
>
>> Though, there is one error with which I don't agree:
>>
>>367 high Missing colon in header argument ")"
>>
>> where line 367 is indicated by "<<<":
>
> Are you sure you are using the latest wip-lint? It should be fixed
> already (commit 406cfbf2a148c4ea98278603ed5b096bbcdd5370,
> cherry-picked from master).

It *is* fixed.

I guess I switched to the correct branch, but forgot the "git pull"...

Sorry for the noise. And thanks for org-lint which spotted a real
missing ":" in some PROPERTY drawer. Hard to see afterward...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Org-lint -- Lisp error: (wrong-type-argument arrayp nil)

2015-07-03 Thread Fabrice Niessen
Nicolas Goaziou writes:
> Fabrice Niessen writes:
>
>> Same error with file
>> https://github.com/fniessen/refcard-org-babel/blob/master/docs/eval.org.
>
> I cannot reproduce it. 
>
> Could you pull again wip-lint and try one more time? Thank you.

It works, indeed.  Sorry.

Though, there is one error with which I don't agree:

--8<---cut here---start->8---
   367 high  Missing colon in header argument ")"
--8<---cut here---end--->8---

where line 367 is indicated by "<<<":

--8<---cut here---start->8---
#+name: add1
#+begin_src emacs-lisp :var x=1 :results silent
(+ x 1)
#+end_src

#+call: add1(x=4)

#+results: add1(x=4)
: 5

#+call: add1(6)

#+results: add1(6)
: 7

#+call: add1(add1(9)) <<<

#+results: add1(add1(9))
: 11
--8<-------cut here---end--->8---

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Org-lint -- Lisp error: (wrong-type-argument arrayp nil)

2015-07-02 Thread Fabrice Niessen
Hello,

Nicolas Goaziou writes:
> Fabrice Niessen writes:
>
>> When trying to lint my "Org mode refcard" [1], I get this error:
>>
>> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>
> Fixed. Thank you.

Same error with file
https://github.com/fniessen/refcard-org-babel/blob/master/docs/eval.org.

Using Org-mode version 8.3beta (release_8.3beta-1265-g2c66e4), updated
this morning.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] Org-lint -- Lisp error: (wrong-type-argument arrayp nil)

2015-06-30 Thread Fabrice Niessen
Hello Nicolas,

When trying to lint my "Org mode refcard" [1], I get this error:

--8<---cut here---start->8---
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("[   \n]+\\'" "" nil)
  (replace-regexp-in-string "\\`[   \n]+" "" (replace-regexp-in-string "[   
\n]+\\'" "" s))
  org-trim(nil)
  (org-babel-parse-header-arguments (org-trim (cond ((eq type (quote 
src-block)) (let nil (mapconcat (function identity) (cons (org-element-property 
:parameters datum) (org-element-property :header datum)) " "))) ...
  (list (org-babel-parse-header-arguments (org-trim (cond ((eq type (quote 
src-block)) (let nil (mapconcat (function identity) (cons ... ...) " "))) ((eq 
type (quote inline-src-block)) ...
  (append (list (and (memq type (quote (babel-call inline-babel-call))) 
org-babel-default-lob-header-args)) (progn (goto-char (org-element-property 
:begin datum)) (org-babel-params-from-properties language)) ...
  (apply (function org-babel-merge-params) org-babel-default-header-args (and 
language (let ((v (intern (concat "org-babel-default-header-args:" language 
(and (boundp v) (symbol-value v ...
  (org-babel-process-params (apply (function org-babel-merge-params) 
org-babel-default-header-args (and language (let ((v (intern (concat 
"org-babel-default-header-args:" language ...
  (let* ((type (org-element-type datum)) (language (org-element-property 
:language datum)) (allowed-header-values (append (and language (let ((v ...)) 
(and (boundp v) (symbol-value v org-babel-common-header-args-w-values)) ...
  (closure ((reports) (ast org-data nil (section (:begin 1 :end 972 
:contents-begin 1 :contents-end 971 :post-blank 1 :post-affiliated 1 :parent 
(org-data nil #3 (headline (:raw-value "Summary" :begin 972 :end 2026 ...
  funcall((closure ((reports) (ast org-data nil (section (:begin 1 :end 972 
:contents-begin 1 :contents-end 971 :post-blank 1 :post-affiliated 1 :parent 
(org-data nil #3 (headline (:raw-value "Summary" :begin 972 :end 2026 ...
  (let ((result (funcall fun --data))) (cond ((not result)) (first-match (throw 
(quote --map-first-match) result)) (t (setq --acc (cons result --acc)
  (progn (let ((result (funcall fun --data))) (cond ((not result)) (first-match 
(throw (quote --map-first-match) result)) (t (setq --acc (cons result 
--acc))
  (if (memq --type types) (progn (let ((result (funcall fun --data))) (cond 
((not result)) (first-match (throw (quote --map-first-match) result)) (t (setq 
--acc (cons result --acc)))
  ...
  org-lint-wrong-header-value((org-data nil (section (:begin 1 :end 972 
:contents-begin 1 :contents-end 971 :post-blank 1 :post-affiliated 1 :parent 
#0) (keyword (:key "TITLE" :value "Org mode syntax quick reference card" ...
  funcall(org-lint-wrong-header-value (org-data nil (section (:begin 1 :end 972 
:contents-begin 1 :contents-end 971 :post-blank 1 :post-affiliated 1 :parent 
#0) (keyword (:key "TITLE" :value "Org mode syntax quick reference card" ...
  (save-excursion (funcall (intern (format "org-lint-%s" (progn (or (and 
(vectorp c) (>= ... 5) (memq ... cl-struct-org-lint-checker-tags)) (error "%s 
accessing a non-%s" (quote org-lint-checker-name) (quote org-lint-checker))) ...
  (mapcar (function (lambda (report) (list (car report) trust (nth 1 report) 
c))) (save-excursion (funcall (intern (format "org-lint-%s" (progn (or (and ... 
... ...) (error "%s accessing a non-%s" ... ...)) (aref c 1 ast)))
  (let ((trust (symbol-name (progn (or (and (vectorp c) (>= ... 5) (memq ... 
cl-struct-org-lint-checker-tags)) (error "%s accessing a non-%s" (quote 
org-lint-checker-trust) (quote org-lint-checker))) (aref c 4) ...
  (closure ((last-pos . 1) (last-line . 1) (id . 0) (ast org-data nil (section 
(:begin 1 :end 972 :contents-begin 1 :contents-end 971 :post-blank 1 
:post-affiliated 1 :parent (org-data nil #3 (headline (:raw-value "Summary" 
:begin 972 :end 2026 ...
  ...
  org-lint(nil)
--8<---cut here---end--->8---

(I suppressed a lot of the output as this is 8 MB big...)

[1] https://github.com/fniessen/refcard-org-mode (WiP)

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] ReadTheOrg HTML theme

2015-05-29 Thread Fabrice Niessen
Hello,

Just for your information, I've now allowed up to 3 levels in the TOC
(left sidebar) instead of 2.

See https://github.com/fniessen/org-html-themes for more information on
how to use the ReadTheOrg CSS theme in your exports.

Best regards,
Fabrice

PS- I'll give a 1:30 course on Org mode 8 (aimed to PDF LaTeX) during
the "Stage LaTeX de Dunkerque" (yes, LaTeX?!) held on July, 1st. See
http://stage-latex-gte.univ-littoral.fr/ to subscribe for free to any of
the LaTeX events.

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] PNG images on Worg not appearing in the browser

2015-04-29 Thread Fabrice Niessen
Hello,

I don't understand why the 2 screenshots I added on Worg (in the
following section of `org-hacks.org') do not appear in the browser:

--8<---cut here---start->8---
*** Where can I find nice themes for HTML export?

You can find great looking HTML themes (CSS + JS) at
https://github.com/fniessen/org-html-themes, currently:

- Bigblow, and

  [[file:images/org-html-themes/bigblow.png]]

- ReadTheOrg, a clone of Read The Docs.

  [[file:images/org-html-themes/readtheorg.png]]

See https://www.youtube.com/watch?v=DnSGSiXYuOk for a demo of the Org
HTML theme Bigblow.
--8<---cut here---end--->8---

Link where they should be made visible:

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

The export process seems to run fine, and the links seem right (images
are correctly displayed in the Org buffer), and the images are well
pushed in the repo!?  Any idea what I'm missing?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Marking/highlighting text temporarily

2015-04-24 Thread Fabrice Niessen
Vikas Rawal wrote:
> I am revising a long book manuscript, and would like to mark parts of
> text (not just the headlines) just to remind myself that these need to
> be dealt with.
>
> What could be an the easy way of doing it?

Inserting `XXX' which are automatically highlighted in red?

See "Highlight FIXME notes" in
https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el for
an example.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Publishing on Worg succeeds or fails? -- I can't say!

2015-04-22 Thread Fabrice Niessen
Nicolas Goaziou wrote:
> Fabrice Niessen writes:
>
>> Could that be stated clearly in the output?
>
> You should ask to whom implemented Worg.

And that is?  Bastien?

>> The thing is that I did not touch those links, as you can see in my
>> commit. So, somehow, Org became more strict. And the fact that that
>> file wasn't modified for some time means it wasn't re-exported for
>> the same period; hence, the problem was never found -- until someone
>> modifies whatever in the file...
>
> Correct.
>
>> IOW, shouldn't all files be published each time, to spot such
>> problems as soon as they become problems (because of syntax changes,
>> for example), instead of being much later, whenever the file is
>> changed (if it ever is)?
>
> So you get 50-100 files to fix instead of the one you modified?

No much fun, that's right.

> IMO, it would be a waste to re-publish unmodified files. You only have
> to consider syntax changes when updating a file.

OTOH, I find it uncomfortable to have a "project" (in the publishing
sense) which is, in fact, not publishable anymore, because many files
won't export anymore -- some could even still rely on Org 7...

But I understand your point. The question comes down to what we want:
a uniform, coherent set of Org files (all up-to-date, and exportable) or
a set of HTML pages which we don't touch anymore if their Org
counterpart is not touched either.

> Note that you need to have a very recent Org (less than 7 hours) to use
> it.

Fixed the problems. Now that page is up-to-date on Worg again. Thanks.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Publishing on Worg succeeds or fails? -- I can't say!

2015-04-22 Thread Fabrice Niessen
Hello,

Nicolas Goaziou wrote:
> Fabrice Niessen writes:
>
>> I tried to add a section on Worg (about the ReadTheOrg HTML theme).
>> The Git commit was successfull, the Git push (for which I do have
>> access on Worg) ended with an error code of 0 (hence, successfully?),
>> but it's not visible on Worg!
>
> The push succeeded, i.e., the ".org" file is probably up to date on
> the server.  However the publishing process failed.

Could that be stated clearly in the output?

>> remote: Unknown cross-reference 
>> "#field-coordinates-in-formulas-transpose-table" in file "org-hacks.org"
>> remote: Unknown cross-reference "#transpose-table" in file "org-hacks.org"
>> remote: Unable to resolve link "org-capture"
>> remote: worg publish process 24723 exited at 04/22/15@11:35:28
>> To w...@orgmode.org:worg.git
>>4103052..2015bcd  master -> master
>> $   
>>
>> It seems there are warnings or errors, but the status is not clear (to
>> me).
>
> "org-hacks.org" has some invalid links, which result in an export
> error.  You may want to fix them and republish (try to export locally
> first).

The thing is that I did not touch those links, as you can see in my
commit. So, somehow, Org became more strict. And the fact that that file
wasn't modified for some time means it wasn't re-exported for the same
period; hence, the problem was never found -- until someone modifies
whatever in the file...

IOW, shouldn't all files be published each time, to spot such problems
as soon as they become problems (because of syntax changes, for
example), instead of being much later, whenever the file is changed (if
it ever is)?

> I implemented a tool that may help you in the process. See
> <http://permalink.gmane.org/gmane.emacs.orgmode/97082>

OK, I'll see whether it can help.

Thanks,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] Publishing on Worg succeeds or fails? -- I can't say!

2015-04-22 Thread Fabrice Niessen
 here---end--->8---

It seems there are warnings or errors, but the status is not clear (to
me).

Note that all the above messages are outputted on stderr, which does not
feel right, but that's how Emacs outputs messages in batch mode.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] New Org-HTML-theme!!

2015-04-22 Thread Fabrice Niessen
Hello,

Fabrice Niessen wrote:
> I've just published a new theme, called ReadTheOrg, on
> https://github.com/fniessen/org-html-themes.
>
> It is a clone of the great Sphinx theme used in the
> http://docs.readthedocs.org/en/latest/ site.  It gives a beautiful and
> professional style to all your Org docs...
>
> Wanna test it right away?  Just add the following to your Org files:
>
> #+HTML_HEAD:  src="<a  rel="nofollow" href="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"">https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"</a>;>
> #+HTML_HEAD:  src="<a  rel="nofollow" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"">https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"</a>;>
> #+HTML_HEAD:  src="<a  rel="nofollow" href="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"">http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"</a>;>
>
> and export...

Ooops!  *You need the CSS* as well, hence:

--8<---cut here---start->8---
#+HTML_HEAD: http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
#+HTML_HEAD: https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"</a>;>
#+HTML_HEAD: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"</a>;>
--8<---cut here---end--->8---

> Please see the
> https://github.com/fniessen/org-html-themes/blob/master/demo/org-mode-syntax.org
> page for full examples of headings, code, admonitions, footnotes, tables
> and other details.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] New Org-HTML-theme!!

2015-04-21 Thread Fabrice Niessen
Hello,

I've just published a new theme, called ReadTheOrg, on
https://github.com/fniessen/org-html-themes.

It is a clone of the great Sphinx theme used in the
http://docs.readthedocs.org/en/latest/ site.  It gives a beautiful and
professional style to all your Org docs...

Wanna test it right away?  Just add the following to your Org files:

--8<---cut here---start->8---
#+HTML_HEAD: https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"</a>;>
#+HTML_HEAD: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"</a>;>
--8<---cut here---end--->8---

and export...

#+begin_note
  While the original theme shines on mobile devices as well, ReadTheOrg
  does not stay completely functional.

  I don't have a lot of time to maintain this project due to other
  responsibilities.  Help is welcome to work on that (and eventually
  improve the default structure of the HTML export)!
#+end_note

PS- I also have written a demo page for the themes that provides
a maximal working support of Org mode syntax.

Please see the
https://github.com/fniessen/org-html-themes/blob/master/demo/org-mode-syntax.org
page for full examples of headings, code, admonitions, footnotes, tables
and other details.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Org-mode and YASnippet

2015-02-11 Thread Fabrice Niessen
Hello Marcin,

Marcin Borkowski wrote:
> does anyone use YASnippet with Org?

Yes. [1]

> I tried, but ran into a strange problem: when I type into
> a placeholder field, I get a space after each letter.  Did anyone run
> into this, too?

I don't really understand what your problem is. Maybe a screenshot or
video would help.

Here is a video that I made using YASnippet in an Org file:

http://screencast.com/t/cQnc9dpDf

Best regards,
Fabrice

[1] https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el.

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Change folded headline symbol

2015-02-05 Thread Fabrice Niessen
Centre ML personnel wrote:
> I wonder if it is possible, without a deep knowledge of emacs/org, to
> change the "..." symbol used when headlines are folded into something
> else ("--->" for instance)?

Yes, it is!

For example, that's what I have in my .emacs file [1] to get a black
right-pointing pointer (if supported by the current font, as it is
a UTF8 character):

--8<---cut here---start->8---
  ;; Improve display of the ellipsis.
  (set-face-attribute 'org-ellipsis nil
  :box '(:line-width 1 :color "#99")
  :foreground "#99" :background "#FFF8C0"
  :underline nil)

  ;; Ellipsis to use in the Org mode outline.
  (setq org-ellipsis
(if (char-displayable-p ?\u25BA)
" \u25BA"   ; Black right-pointing pointer.
  'org-ellipsis)))  ; Face.
--8<---cut here-------end--->8---

Fabrice

[1] https://github.com/fniessen/emacs-leuven

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-30 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: dgu...@yandex.ru,  19...@debbugs.gnu.org
>> Date: Fri, 16 Jan 2015 13:04:00 +0100
>> 
>> (gdb) thread 1
>> [Switching to thread 1 (Thread 17252.0x44f0)]
>> #0  0x01142191 in Fnext_single_property_change (position=position@entry=540,
>> prop=62947906, object=118795585, limit=limit@entry=1356)
>> at ../../emacs-24.4/src/textprop.c:1034
>> 1034../../emacs-24.4/src/textprop.c: No such file or directory.
>> (gdb) backtrace
>> #0  0x01142191 in Fnext_single_property_change (position=position@entry=540,
>> prop=62947906, object=118795585, limit=limit@entry=1356)
>> at ../../emacs-24.4/src/textprop.c:1034
>> #1  0x0102e54f in handle_invisible_prop (it=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:4379
>> #2  0x01022e18 in handle_stop (it=it@entry=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:3478
>> #3  0x010231e9 in next_element_from_string (it=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:7915
>> #4  0x01025e1c in get_next_display_element (it=it@entry=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:6925
>> #5  0x0102b00f in display_line (it=)
>> at ../../emacs-24.4/src/xdisp.c:20183
>> #6  0x in ?? ()
>
> Looks like an infloop due to display or overlay strings with text
> properties.  Can you reproduce this in an unoptimized build?

Here it is (with GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2015-01-28 on
LEG570):

--8<---cut here---start->8---
$ gdb -p 8340
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 8340
[New Thread 8340.0x2568]
[New Thread 8340.0x32f0]
[New Thread 8340.0x1b00]
[New Thread 8340.0x2860]
[New Thread 8340.0x2244]
[New Thread 8340.0xfdc]
[New Thread 8340.0x2d04]
[New Thread 8340.0x2288]
[New Thread 8340.0x4fc]
[New Thread 8340.0x29a8]
[New Thread 8340.0x1980]
[New Thread 8340.0x3b68]
[New Thread 8340.0x1030]
[New Thread 8340.0x36b0]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs.exe...done.
0x7758f925 in ntdll!DbgBreakPoint () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) thread 1
[Switching to thread 1 (Thread 8340.0x2568)]
#0  0x01101915 in XSTRING (a=168379948) at C:/emacs/repo/src/lisp.h:974
(gdb) 974   C:/emacs/repo/src/lisp.h: No such file or directory.
backtrace
#0  0x01101915 in XSTRING (a=168379948) at C:/emacs/repo/src/lisp.h:974
#1  0x01103beb in set_string_intervals (s=168379948, i=0xe3f8b54) at 
C:/emacs/repo/src/lisp.h:3419
#2  0x01200220 in balance_possible_root_interval (interval=0xe3f8b54) at 
C:/emacs/repo/src/intervals.c:492
#3  0x01200726 in find_interval (tree=0xe3f8b54, position=135) at 
C:/emacs/repo/src/intervals.c:676
#4  0x01205d13 in validate_interval_range (object=168379948, begin=0x88b320, 
end=0x88b320, force=false) at C:/emacs/repo/src/textprop.c:194
#5  0x0120881d in Fnext_single_property_change (position=542, prop=18880, 
object=168379948, limit=1358) at C:/emacs/repo/src/textprop.c:1029
#6  0x01031bdf in handle_invisible_prop (it=0x88c0b0) at 
C:/emacs/repo/src/xdisp.c:4280
#7  0x0102fa80 in handle_stop (it=0x88c0b0) at C:/emacs/repo/src/xdisp.c:3377
#8  0x0103b998 in next_element_from_string (it=0x88c0b0) at 
C:/emacs/repo/src/xdisp.c:7803
#9  0x01039412 in get_next_display_element (it=0x88c0b0) at 
C:/emacs/repo/src/xdisp.c:6835
#10 0x01063121 in display_line (it=0x88c0b0) at C:/emacs/repo/src/xdisp.c:20151
#11 0x01057332 in try_window (window=24604037, pos=..., flags=1) at 
C:/emacs/repo/src/xdisp.c:16911
#12 0x010540b3 in redisplay_window (window=24604037, just_this_one_p=true) at 
C:/emacs/repo/src/xdisp.c:16384
#13 0x0104c66b in redisplay_window_1 (window=24604037) at 
C:/emacs/repo/src/xdisp.c:14216
#14 0x0119e4c4 in internal_condition_case_1 (bfun=0x104c635 
, arg=24604037, handlers=22582667, hfun=0x104c5c3 
) at C:/emacs/repo/src/eval.c:1359
#15 0x0104b9c8 in redisplay_internal () at C:/emacs/repo/src/xdisp.c:13859
#16 0x0104bfb1 in redisplay_

[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eli Zaretskii wrote:>> From: Fabrice Niessen 
>> Cc: dgu...@yandex.ru,  19...@debbugs.gnu.org
>> Date: Fri, 16 Jan 2015 13:04:00 +0100
>> 
>> (gdb) thread 1
>> [Switching to thread 1 (Thread 17252.0x44f0)]
>> #0  0x01142191 in Fnext_single_property_change (position=position@entry=540,
>> prop=62947906, object=118795585, limit=limit@entry=1356)
>> at ../../emacs-24.4/src/textprop.c:1034
>> 1034../../emacs-24.4/src/textprop.c: No such file or directory.
>> (gdb) backtrace
>> #0  0x01142191 in Fnext_single_property_change (position=position@entry=540,
>> prop=62947906, object=118795585, limit=limit@entry=1356)
>> at ../../emacs-24.4/src/textprop.c:1034
>> #1  0x0102e54f in handle_invisible_prop (it=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:4379
>> #2  0x01022e18 in handle_stop (it=it@entry=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:3478
>> #3  0x010231e9 in next_element_from_string (it=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:7915
>> #4  0x01025e1c in get_next_display_element (it=it@entry=0x889a14)
>> at ../../emacs-24.4/src/xdisp.c:6925
>> #5  0x0102b00f in display_line (it=)
>> at ../../emacs-24.4/src/xdisp.c:20183
>> #6  0x in ?? ()
>
> Looks like an infloop due to display or overlay strings with text
> properties.  Can you reproduce this in an unoptimized build?

Sure, if you can point me to such a version I can download.

Best regards,
Fabrice






[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 19...@debbugs.gnu.org
>> Date: Fri, 16 Jan 2015 12:27:16 +0100
>> 
>> OK, so I just reproduced the problem once again, then:
>> 
>> - tried to C-g in Emacs: impossible!
>> - launched GDB
>> - source ~/.gdbinit
>> - thread 1
>> - thread apply all backtrace
>> 
>> Still, the backtrace is not as long as normal, and I don't get any GDB
>> prompt anymore!
>
> Can you show what this produced.

It's in the video, but I forgot to copy it.

I just re-did the ABOVE for a new Emacs session, to get something
similar to the results in the video.

--8<---cut here---start->8---
$ gdb -p 5676
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 5676
[New Thread 5676.0x4bbc]
[New Thread 5676.0x4b30]
[New Thread 5676.0x3374]
[New Thread 5676.0x1878]
[New Thread 5676.0x4634]
[New Thread 5676.0x61b0]
[New Thread 5676.0x2564]
[New Thread 5676.0x2d4c]
[New Thread 5676.0x155c]
[New Thread 5676.0x4ac0]
[New Thread 5676.0x5998]
[New Thread 5676.0x4be4]
[New Thread 5676.0x369c]
[New Thread 5676.0x3c7c]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-24.4/bin/emacs.exe...done.
0x77d3f925 in ntdll!DbgBreakPoint ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) source ~/.gdbinit
Warning: /cygdrive/c/Program Files (x86)/emacs-24.4/bin/../lwlib: No such file 
or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from 
terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x109436d: file ../../emacs-24.4/src/emacs.c, line 350.
Temporary breakpoint 2 at 0x10aa8ce: file ../../emacs-24.4/src/sysdep.c, line 
850.
(gdb) thread 1
[Switching to thread 1 (Thread 5676.0x4bbc)]
#0  find_interval (tree=0x6d129a4, position=138)
at ../../emacs-24.4/src/intervals.c:690
(gdb) 690   ../../emacs-24.4/src/intervals.c: No such file or directory.

[Switching to thread 1 (Thread 5676.0x4bbc)]
#0  find_interval (tree=0x6d129a4, position=138)
at ../../emacs-24.4/src/intervals.c:690
690 in ../../emacs-24.4/src/intervals.c
(gdb) thread apply all backtrace

Thread 14 (Thread 5676.0x3c7c):
#0  0x77d3f925 in ntdll!DbgBreakPoint ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x77dadb8c in ntdll!DbgUiRemoteBreakin ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#2  0x95b35457 in ?? ()
#3  0x in ?? ()

Lisp Backtrace:
"redisplay_internal (C function)" (0x1407e78)
"redisplay" (0x88f254)
"sit-for" (0x88f3a8)
"flyspell-check-word-p" (0x88f4f8)
"byte-code" (0x88f610)
"flyspell-post-command-hook" (0x88f844)

Thread 13 (Thread 5676.0x369c):
#0  0x77d3de5c in ntdll!ZwDelayExecution ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x755311f8 in SleepEx () from /cygdrive/c/Windows/SYSTEM32/KERNELBASE.dll
#2  0x0001 in ?? ()
#3  0x6f5aff20 in ?? ()
#4  0x0114ab1e in watch_worker (arg=0x3bf5c00)
at ../../emacs-24.4/src/w32notify.c:278
#5  0x775b86e3 in KERNEL32!BaseThreadInitThunk ()
   from /cygdrive/c/Windows/SYSTEM32/KERNEL32.DLL
#6  0x77d6be19 in ntdll!RtlInitializeExceptionChain ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#7  0x77d6bdec in ntdll!RtlInitializeExceptionChain ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#8  0x in ?? ()
[Thread 5676.0x3c7c exited with code 0]
--8<---cut here---end--->8---

>> I tried to C-c in the shell window, as well without success...
>> 
>> What can I do to provide you with more context?
>
> Try this instead:
>
>  - reproduce the problem
>  - attach GDB, but do NOT "source ~/.gdbinit"
>  - thread 1
>  - backtrace

Here is it (http://screencast.com/t/o9BVgY7hWN):

--8<---cut here---start->8---
$ gdb -p 17252
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL

[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 19...@debbugs.gnu.org
>> Date: Fri, 16 Jan 2015 12:16:26 +0100
>> 
>> Eli Zaretskii wrote:
>>>> From: Glenn Morris 
>>>> Cc: Fabrice Niessen ,  19...@debbugs.gnu.org
>>>> Date: Thu, 15 Jan 2015 16:37:36 -0500
>>>> 
>>>> I just want to note that there seems to be a tendency to try and use
>>>> gdb to debug Org problems, when debug-on-quit and ctrl-g might work.
>>>
>>> Very true.
>> 
>> As it doesn't seem obvious, let me state explicitly that C-g does
>> nothing;
>
> With or without setting debug-on-quit non-nil?

In both cases.





Re: [O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eric Abrahamsen wrote:
> Fabrice Niessen writes:
>> Eli Zaretskii wrote:
>>>> From: Glenn Morris 
>>>> Cc: Fabrice Niessen ,  19...@debbugs.gnu.org
>>>> Date: Thu, 15 Jan 2015 16:37:36 -0500
>>>> 
>>>> I just want to note that there seems to be a tendency to try and
>>>> use gdb to debug Org problems, when debug-on-quit and ctrl-g might
>>>> work.
>>>
>>> Very true.
>>
>> As it doesn't seem obvious, let me state explicitly that C-g does
>> nothing; Emacs is hung and does not answer anymore to anything...
>
> I've had this problem before, also un-quittable, and have gotten
> a backtrace and regained control by sending SIGUSR2 to the emacs
> process.  The backtrace indicates some conflict with flyspell-mode,
> same as you.

On Cygwin (I'm on Windows), that does not seem to work:

  kill -10 
  kill -USR2 

all answer that there is "no such process" -- while, as you can see in
http://screencast.com/t/EFDJIIu7, I typed the right PID of the hung
Emacs process...

Best regards,
Fabrice




[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Fabrice Niessen wrote:
> OK, so I just reproduced the problem once again, then:
>
> - tried to C-g in Emacs: impossible!
> - launched GDB
> - source ~/.gdbinit
> - thread 1
> - thread apply all backtrace
>
> Still, the backtrace is not as long as normal, and I don't get any GDB
> prompt anymore!
>
> I tried to C-c in the shell window, as well without success...
>
> What can I do to provide you with more context?

You can see all those steps on the video
http://screencast.com/t/umVUFo6h6toS.





[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> Date: Fri, 16 Jan 2015 00:06:58 +0300
>> From: Dmitry Gutov 
>> CC: 19...@debbugs.gnu.org
>> 
>> On 01/15/2015 09:14 PM, Eli Zaretskii wrote:
>> 
>>> But you didn't even show the backtrace from the main (a.k.a. "Lisp")
>>> thread.  Your backtrace is from thread 15, whereas the main thread
>>> is thread 1.
>> 
>> The output is from 'thread apply all backtrace', AFAICS.
>
> No, the output is only from threads 15 and 14.  The command "thread
> apply all backtrace" was indeed issued, but Emacs crashed or exited
> abnormally while producing the Lisp-level backtrace for thread 14:
>
>   [Inferior 1 (process 1204) exited with code 01]
>   (gdb) The program being debugged exited while in a function called
>   from GDB.
>   Evaluation of the expression containing the function
>   (backtrace_top) will be abandoned.
>
> Therefore that command didn't produce backtraces of the rest of the
> threads.
>
> The backtraces shown are not interesting: thread 15 is a thread
> created by Windows for attaching the debugger, so it doesn't belong to
> Emacs; and thread 14 is the file-notification thread started by
> w32notify.c, which simply sleeps waiting for file events.  So the
> interesting information from the main thread is not presented, and
> it's therefore impossible to tell where and why Emacs hanged.
>
> Typing "thread 1" explicitly right after attaching to the process
> might have produce the C-level backtrace for the main thread.  It is a
> good thing to do in any case when attaching to Emacs process that's in
> trouble.
>
>> On the other hand, it's not 'bt full' or `xbacktrace', which 
>> report-emacs-bug asks to call.
>
> "xbacktrace" is automatically called after the C-level backtrace, when
> you start GDB from the Emacs's src directory, where .gdbinit file
> arranges for that.  That's why you see this part in the OP:
>
>   Lisp Backtrace:
>   "redisplay_internal (C function)" (0x1407e78)
>   "redisplay" (0x88f254)
>   "sit-for" (0x88f3a8)
>   "flyspell-check-word-p" (0x88f4f8)
>   "byte-code" (0x88f610)
>   "flyspell-post-command-hook" (0x88f844)

OK, so I just reproduced the problem once again, then:

- tried to C-g in Emacs: impossible!
- launched GDB
- source ~/.gdbinit
- thread 1
- thread apply all backtrace

Still, the backtrace is not as long as normal, and I don't get any GDB
prompt anymore!

I tried to C-c in the shell window, as well without success...

What can I do to provide you with more context?

Best regards,
Fabrice





[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-16 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Glenn Morris 
>> Cc: Fabrice Niessen ,  19...@debbugs.gnu.org
>> Date: Thu, 15 Jan 2015 16:37:36 -0500
>> 
>> 
>> I just want to note that there seems to be a tendency to try and use
>> gdb to debug Org problems, when debug-on-quit and ctrl-g might work.
>
> Very true.

As it doesn't seem obvious, let me state explicitly that C-g does
nothing; Emacs is hung and does not answer anymore to anything...

Is there an alternative to GDB in such cases?

Best regards,
Fabrice





[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-15 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> 
>> With the following file -- and my configuration file (!):
>> 
>> --8<---cut here---start->8---
>> #+TITLE: ECM
>> #+LANGUAGE:  en
>> 
>> #+PROPERTY:  eval yes
>> 
>> * Macro
>> 
>> Date at export time: /{{{time(%Y-%m-%d)}}}/.
>> --8<---cut here---end--->8---
>> 
>> Emacs hangs when replacing "yes" by "no" for the "eval" property.
>> 
>> Recipe:
>> - Put cursor after "yes"
>> - Delete "yes"
>> - Type "no"
>> 
>> Symptom: After "n", Emacs hangs, taking 100% of one CPU core.
>
> Thanks, but what do you expect us to do with this report, without any
> information whatsoever regarding your customizations?

I thought that, thanks to the backtrace, you could find the culprit, or
reduce the scope of the search, as you often succeed to do.

> FWIW, the backtrace says Emacs is spell-checking because you have
> Flyspell mode enabled in that buffer.  But that's about all that can
> be said using the information you provided.

My current set of customizations is available at
https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el,
but it's so huge it won't help us.

If you have no idea, the only thing would be a dichotomy of my config
file, but that'll take a while.

Best regards,
Fabrice





Re: [O] ":results none" doesn't seem to be documented

2015-01-15 Thread Fabrice Niessen
Andreas Leha wrote:
> Fabrice Niessen  writes:
>> Andreas Leha wrote:
>>> Kodi Arfer  writes:
>>>> "none" is allowed as an argument to :results (see, for example,
>>>> ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
>>>> results.html. I just learned of its existence while reading
>>>> ob-core.el.
>>>>
>>>> To me, by the way, ":results none" seems like a useful feature rather
>>>> than being redundant with ":results silent", because it won't attempt
>>>> to print a massive object to the echo area. (Pehaps "silent" wasn't a
>>>> great choice of name.)
>>>
>>> Especially given that ":results none" prints "results silenced" in the
>>> echo area.  Should rather be "results nonced" ;-)
>>
>> They're not the same...
>
> I know.  I just wanted to stress the unfortunate naming.  Unfortunate,
> because if you want the source block to produce "results silenced" you
> must not specify ":results silent", but rather ":results none" which is
> counter intuitive.

I agree. I think we cannot afford to change the option values, but you
could imagine changing the string in the echo area to something like
"no results displayed" or some such.

>> Extract from my modest (and still "work in progress") Org-Babel
>> refcard [1]:
>>
>> - :results silent ::
>>  Sends the commands, echoes the results in the minibuffer (to see
>>  code block output), but *does not change the Org mode buffer* (even
>>  during export, *no results are inserted* into the exported
>>  document).
>>  (default for Org and Screen code blocks)
>>
>> - :results none ::
>>  Silents the results, even for the minibuffer.  By definition, such
>>  a code block is run for its side effects.
>>
>> [1] https://github.com/fniessen/refcard-org-babel
>
> That looks nice!

Thanks.

Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] ":results none" doesn't seem to be documented

2015-01-14 Thread Fabrice Niessen
Hello,

Andreas Leha wrote:
> Kodi Arfer  writes:
>> "none" is allowed as an argument to :results (see, for example,
>> ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
>> results.html. I just learned of its existence while reading
>> ob-core.el.
>>
>> To me, by the way, ":results none" seems like a useful feature rather
>> than being redundant with ":results silent", because it won't attempt
>> to print a massive object to the echo area. (Pehaps "silent" wasn't a
>> great choice of name.)
>
> Especially given that ":results none" prints "results silenced" in the
> echo area.  Should rather be "results nonced" ;-)

They're not the same...

Extract from my modest (and still "work in progress") Org-Babel
refcard [1]:

- :results silent ::
 Sends the commands, echoes the results in the minibuffer (to see
 code block output), but *does not change the Org mode buffer* (even
 during export, *no results are inserted* into the exported
 document).
 (default for Org and Screen code blocks)

- :results none ::
 Silents the results, even for the minibuffer.  By definition, such
 a code block is run for its side effects.

Best regards,
Fabrice

[1] https://github.com/fniessen/refcard-org-babel

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Possible to recalculate tables automatically before exporting?

2014-11-14 Thread Fabrice Niessen
William Denton wrote:
> Is it possible to make tables recalculate automatically when exporting?
>
> In a file I'm working on now, I have a table with formulas that take two 
> columns
> of numbers I enter and turn them into two columns of derived numbers.  I had
> missed one line of data, so I entered it, but forgot to recalculate the table,
> so when I exported some numbers were missing.
>
> It was trivial to do by hand, of course, but I looked for a setting that would
> automate this and didn't see it.  Did I overlook it, or is it not there?

See https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00347.html

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Tangling src blocks to files as part of export

2014-11-13 Thread Fabrice Niessen
Hello Michael,

Michael Weylandt wrote:
>> On Nov 13, 2014, at 10:54 AM, Michael Weylandt  
>> wrote:
>> 
>> Is it possible to have certain blocks tangled as part of export so
>> that they are available as input files to later source blocks?
>> 
>> E.g.,
>> 
>> #+BEGIN_SRC python :tangle hello.py
>> print "Hello World"
>> #+END_SRC
>> 
>> #+BEGIN_SRC sh
>> python hello.py
>> #+END_SRC
>> 
>> If I tangle before running, then the second code block will work;
>> else, it fails because 'hello.py' is not found. [1]
>> 
>> I can run tangle and export in a row (and I have my own function to
>> do just that) but is there a native org way to do so?
>
> Adding org-babel-tangle to the org-export-before-processing-hook does
> the job, but I'd still be interested in knowing if there's a more
> official method.

For such a work, I'm using this home-made function:

--8<---cut here---start->8---
  (with-eval-after-load "org"

(defun org-save-buffer-and-do-related ()
  "Save buffer, execute/tangle code blocks, and export to HTML/PDF."
  (interactive)
  (let* ((orgfile (buffer-file-name))
 (base-name (file-name-base orgfile))
 (htmlfile (concat base-name ".html"))
 (pdffile (concat base-name ".pdf")))
(save-buffer) ; See other commands in
  ; `before-save-hook':
  ; `org-update-all-dblocks'
  ; `org-table-iterate-buffer-tables'.
(when (derived-mode-p 'org-mode)
  ;; (org-babel-execute-buffer)   ; XXX Why should we execute all code 
blocks?
  (let ((before-save-hook nil))
(save-buffer))
  (org-babel-tangle)
  (when (file-exists-p htmlfile)
(if (file-newer-than-file-p orgfile htmlfile)
(org-html-export-to-html)
  (message "HTML is up to date with Org file")))
  (when (file-exists-p pdffile)
(if (file-newer-than-file-p orgfile pdffile)
(if (string-match "^#\\+BEAMER_THEME: " (buffer-string))
(org-beamer-export-to-pdf)
  (org-latex-export-to-pdf))
      (message "PDF is up to date with Org file")))
  (beep

(define-key org-mode-map (kbd "") 'org-save-buffer-and-do-related))
--8<---cut here---end--->8---

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
>> Date: Thu, 23 Oct 2014 19:27:26 +0200
>> 
>> 920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or 
>> directory.
>> Value returned is $50 = 206279014
>> (gdb)
>> Run till exit from #0 0x0118ab67 in exec_byte_code (bytestr=206279014,
>> vector=410, maxdepth=1, args_template=21994650, nargs=21994650, args=0x0) at
>> c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
>> [New Thread 2888.0x27e8]
>> [New Thread 2888.0x1160]
>> --8<---cut here---end--->8---
>> 
>> Does it give you some meat?
>
> Some, yes.  Now do that again, but instead of typing "finish", type
> "bt full" after "thread 1".

You mean in another Emacs session, right?  Because I don't have the GDB
prompt anymore...



[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org,  emacs-orgmode@gnu.org
>> Date: Thu, 23 Oct 2014 12:34:01 +0200
>> 
>> > The C-z trick doesn't work on Windows.
>> 
>> That may be worth to mention it in the document?
>
> It's already there.
>
>> Fprogn (body=124089086) at c:/msys/home/Dani/emacs/trunk/src/eval.c:456
>> 456 in c:/msys/home/Dani/emacs/trunk/src/eval.c
>> Value returned is $31 = 0
>> (gdb)
>> --8<---cut here---end--->8---
>> 
>> I've typed "finish" 30 times; not sure when to stop. I still will keep
>> that Emacs open for now, so that you can ask me to work on it.
>
> You should type "finish" as long as you get the GDB prompt "(gdb)" in
> response.  We want to know which frame will not give you that prompt,
> which is the frame where Emacs loops.
>
> Btw, you don't need to type "finish" every time, just press RET after
> the first time, and GDB will repeat the last command.

OK, good to know.

Here is the full trace:

--8<---cut here---start->8---
$ gdb -p 2888
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 2888
[New Thread 2888.0x233c]
[New Thread 2888.0x2894]
[New Thread 2888.0x31a4]
[New Thread 2888.0x1d60]
[New Thread 2888.0x35c]
[New Thread 2888.0x1e2c]
[New Thread 2888.0x1cc8]
[New Thread 2888.0x1f6c]
[New Thread 2888.0x1a54]
[New Thread 2888.0x1cd4]
[New Thread 2888.0x2388]
[New Thread 2888.0x2930]
[New Thread 2888.0x664]
[New Thread 2888.0x1b70]
[New Thread 2888.0x2578]
[New Thread 2888.0x133c]
[New Thread 2888.0x18d8]
[New Thread 2888.0x1328]
[New Thread 2888.0x3110]
[New Thread 2888.0x2768]
[New Thread 2888.0x8d0]
[New Thread 2888.0x2b60]
[New Thread 2888.0x21b4]
[New Thread 2888.0x424]
[New Thread 2888.0x3068]
[New Thread 2888.0x2da0]
[New Thread 2888.0x2c08]
[New Thread 2888.0x24ac]
[New Thread 2888.0x1ee8]
[New Thread 2888.0x1fc]
[New Thread 2888.0x153c]
[New Thread 2888.0x2784]
[New Thread 2888.0x524]
[New Thread 2888.0x1614]
[New Thread 2888.0x2168]
[New Thread 2888.0xa4c]
[New Thread 2888.0x2344]
[New Thread 2888.0x2c40]
[New Thread 2888.0x11e0]
[New Thread 2888.0x1a30]
[New Thread 2888.0x2660]
[New Thread 2888.0x2e18]
[New Thread 2888.0x2a80]
[New Thread 2888.0x1ba4]
[New Thread 2888.0x15c8]
[New Thread 2888.0x270c]
[New Thread 2888.0x694]
[New Thread 2888.0x2764]
[New Thread 2888.0xe74]
[New Thread 2888.0x2914]
[New Thread 2888.0xf5c]
[New Thread 2888.0x1420]
[New Thread 2888.0x2f90]
[New Thread 2888.0x810]
[New Thread 2888.0x22cc]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs.exe...done.
0x7727f925 in ntdll!DbgBreakPoint () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) thread 1
[Switching to thread 1 (Thread 2888.0x233c)]
#0  0x0111cd8e in looking_at_1 (string=, posix=) 
at c:/msys/home/Dani/em
333 c:/msys/home/Dani/emacs/trunk/src/search.c: No such file or directory.
(gdb) finish
Run till exit from #0  0x0111cd8e in looking_at_1 (string=, 
posix=) at c:/msys/home/Dani/emacs/trunk/src/search.c:333
0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
2723c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $1 = 21994682
(gdb) finish
Run till exit from #0  0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
error return 
/usr/src/ports/gdb/gdb-7.8-2.i686/src/gdb-7.8/gdb/windows-nat.c:1239 was 5
[Thread 2888.0x22cc exited with code 0]
0x0118ab67 in exec_byte_code (bytestr=21994682, vector=780, maxdepth=2, 
args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or directory.
Value returned is $2 = 21994682
(gdb) finish
Run till exit from #0  0x0118ab67 in exec_byte_code (bytestr=21994682, 
vector=780, maxdepth=2, args_template=2

Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-23 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: Fabrice Niessen 
>> Cc: 18...@debbugs.gnu.org, Org-mode List 
>> Date: Wed, 22 Oct 2014 12:35:30 +0200
>> 
>> I reproduced the problem.
>> 
>> Then, I tried (multiple times) to C-z in the GDB session, but nothing
>> happens: Emacs stays block and I don't get any GDB prompt.
>> 
>> Am I missing something?
>
> The C-z trick doesn't work on Windows.

That may be worth to mention it in the document?

> So instead run Emacs normally, reproduce the problem, and then attach
> the debugger to the running Emacs with "gdb -p PID", where PID is the
> numerical process ID of Emacs.  Then switch to thread 1, and do what
> etc/DEBUG says about "finish".

OK. Just did it.

--8<---cut here---start->8---
$ gdb -p 2888
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 2888
[New Thread 2888.0x233c]
[New Thread 2888.0x2894]
[New Thread 2888.0x31a4]
[New Thread 2888.0x1d60]
[New Thread 2888.0x35c]
[New Thread 2888.0x1e2c]
[New Thread 2888.0x1cc8]
[New Thread 2888.0x1f6c]
[New Thread 2888.0x1a54]
[New Thread 2888.0x1cd4]
[New Thread 2888.0x2388]
[New Thread 2888.0x2930]
[New Thread 2888.0x664]
[New Thread 2888.0x1b70]
[New Thread 2888.0x2578]
[New Thread 2888.0x133c]
[New Thread 2888.0x18d8]
[New Thread 2888.0x1328]
[New Thread 2888.0x3110]
[New Thread 2888.0x2768]
[New Thread 2888.0x8d0]
[New Thread 2888.0x2b60]
[New Thread 2888.0x21b4]
[New Thread 2888.0x424]
[New Thread 2888.0x3068]
[New Thread 2888.0x2da0]
[New Thread 2888.0x2c08]
[New Thread 2888.0x24ac]
[New Thread 2888.0x1ee8]
[New Thread 2888.0x1fc]
[New Thread 2888.0x153c]
[New Thread 2888.0x2784]
[New Thread 2888.0x524]
[New Thread 2888.0x1614]
[New Thread 2888.0x2168]
[New Thread 2888.0xa4c]
[New Thread 2888.0x2344]
[New Thread 2888.0x2c40]
[New Thread 2888.0x11e0]
[New Thread 2888.0x1a30]
[New Thread 2888.0x2660]
[New Thread 2888.0x2e18]
[New Thread 2888.0x2a80]
[New Thread 2888.0x1ba4]
[New Thread 2888.0x15c8]
[New Thread 2888.0x270c]
[New Thread 2888.0x694]
[New Thread 2888.0x2764]
[New Thread 2888.0xe74]
[New Thread 2888.0x2914]
[New Thread 2888.0xf5c]
[New Thread 2888.0x1420]
[New Thread 2888.0x2f90]
[New Thread 2888.0x810]
[New Thread 2888.0x22cc]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs.exe...done.
0x7727f925 in ntdll!DbgBreakPoint () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) thread 1
[Switching to thread 1 (Thread 2888.0x233c)]
#0  0x0111cd8e in looking_at_1 (string=, posix=) 
at c:/msys/home/Dani/em
333 c:/msys/home/Dani/emacs/trunk/src/search.c: No such file or directory.
(gdb) finish
Run till exit from #0  0x0111cd8e in looking_at_1 (string=, 
posix=) at c:/msys/home/Dani/emacs/trunk/src/search.c:333
0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
2723c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $1 = 21994682
(gdb) finish
Run till exit from #0  0x0114e182 in Ffuncall (nargs=2, args=0x88ccb4) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2723
error return 
/usr/src/ports/gdb/gdb-7.8-2.i686/src/gdb-7.8/gdb/windows-nat.c:1239 was 5
[Thread 2888.0x22cc exited with code 0]
0x0118ab67 in exec_byte_code (bytestr=21994682, vector=780, maxdepth=2, 
args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
920 c:/msys/home/Dani/emacs/trunk/src/bytecode.c: No such file or directory.
Value returned is $2 = 21994682
(gdb) finish
Run till exit from #0  0x0118ab67 in exec_byte_code (bytestr=21994682, 
vector=780, maxdepth=2, args_template=21994650, nargs=21994650, args=0x0) at 
c:/msys/home/Dani/emacs/trunk/src/bytecode.c:920
funcall_lambda (fun=19768957, nargs=nargs@entry=1, 
arg_vector=arg_vector@entry=0x88ce44) at 
c:/msys/home/Dani/emacs/trunk/src/eval.c:2962
2962c:/msys/home/Dani/emacs/trunk/src/eval.c: No such file or directory.
Value returned is $3 = 0
(gdb) finish
Run till exit from #0  funcall_lambda (fun=19768957, 

[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-22 Thread Fabrice Niessen
Eli Zaretskii wrote:
> From: Fabrice Niessen 
>> 
>> On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
>> 8.3beta, I can very often freeze Emacs when clocking into a task, or
>> when editing the timestamps found in the LOGBOOK drawer.
>> 
>> I've run Emacs under GDB, and can send a video of it, where you also see
>> that Emacs takes 100% of the CPU. Though, I can only send it on request,
>> as it contains information in my Org buffers which I don't want to see
>> public.
>
> Is that video worth watching?  I mean, what could a video of a frozen
> Emacs tell?

No, I guess it's not.

>> $ gdb ./emacs.exe
>> GNU gdb (GDB) 7.8
>
> This GDB session brings no useful info.  Please follow the method
> described in etc/DEBUG under "If the symptom of the bug is that Emacs
> fails to respond".

I think I can reproduce it "reliably":

1. Open an Org file
2. Go to a task headline
3. Clock into it (C-c C-x C-i)
4. Press down arrown to go to next line
5. Press TAB to open LOGBOOK drawer
6. Press C-c C-n to go the the next task (as drawer is huge)
7. Press up arrow to go to the line before the last clock line
8. Press left arrow to go to the end of the last clock line

I'm not sure whether variations of this do work or not... or whether the
contents of my file does have impact on the recipe.

Now, as asked...

  ┌
  │ ** If the symptom of the bug is that Emacs fails to respond
  │ 
  │ Don't assume Emacs is `hung'--it may instead be in an infinite loop.
  │ To find out which, make the problem happen under GDB and stop Emacs
  │ once it is not responding.  (If Emacs is using X Windows directly, you
  │ can stop Emacs by typing C-z at the GDB job.)  Then try stepping with
  │ `step'.  If Emacs is hung, the `step' command won't return.  If it is
  │ looping, `step' will return. [...]
  └

...what I did is launch Emacs from GDB in a Cygwin shell:

--8<---cut here---start->8---
$ gdb ./emacs.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Reading symbols from ./emacs.exe...done.
(gdb) set debugexceptions 1
(gdb) run
Starting program: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs.exe
[New Thread 4084.0x15cc]
--8<---cut here---end--->8---

I reproduced the problem.

Then, I tried (multiple times) to C-z in the GDB session, but nothing
happens: Emacs stays block and I don't get any GDB prompt.

Am I missing something?

Best regards,
Fabrice





Re: [O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-22 Thread Fabrice Niessen
Thorsten Jolitz wrote:
> Eric Abrahamsen  writes:
>> Fabrice Niessen writes:
>
>>> On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
>>> 8.3beta, I can very often freeze Emacs when clocking into a task, or
>>> when editing the timestamps found in the LOGBOOK drawer.
>>
>> I've gotten something looking like that from time to time (more often
>> in the early days of the Org caching mechanism), and sending SIGUSR2
>> to the frozen emacs would reveal that it was in the midst of
>> something flyspell-related.

I'm under Windows, though with Cygwin. Not sure if that procedure
works...

>> You don't appear to be running flyspell,

I didn't tell about Flyspell, but though, yes, I'm using it everywhere,
always.

>> but I'll guess that Org's timers are clashing with somebody else's
>> timers.  Not very helpful, I know.
>
> I just crashed
>
> ,
> | GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
> |  of 2014-06-11 on var-lib-archbuild-staging-x86_64-jgc
> `
>
> again today while refiling an Org task, but I already reported this a
> few weeks ago to the Emacs maintainers and it seems I have a "stripped
> binary" that does not deliver useful backtrace info. I don't use
> flyspell and I'm on Archlinux.
>
> Not very helpful, I know.

Yes, the problem is how to collect traces that can help people
understand and fix the problem.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



[O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-21 Thread Fabrice Niessen
Hello,

On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
8.3beta, I can very often freeze Emacs when clocking into a task, or
when editing the timestamps found in the LOGBOOK drawer.

I've run Emacs under GDB, and can send a video of it, where you also see
that Emacs takes 100% of the CPU. Though, I can only send it on request,
as it contains information in my Org buffers which I don't want to see
public.

Info from GDB:

--8<---cut here---start->8---
$ cd bin
$ gdb ./emacs.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Reading symbols from ./emacs.exe...done.
(gdb) set debugexceptions 1
(gdb) run
Starting program: /cygdrive/c/Program Files (x86)/emacs-24.4/bin/emacs.exe
[New Thread 7692.0x18e8]
gdb: Target exception EXCEPTION_BREAKPOINT at 0x772f04d2
[New Thread 7692.0x2564]
[New Thread 7692.0x26cc]
[New Thread 7692.0x2abc]
[New Thread 7692.0xe98]
[Thread 7692.0xe98 exited with code 1]
[New Thread 7692.0x20c]
[Thread 7692.0x20c exited with code 1]
[New Thread 7692.0x1964]
[Thread 7692.0x1964 exited with code 1]
[New Thread 7692.0x1b6c]
[Thread 7692.0x1b6c exited with code 1]
[New Thread 7692.0x2758]
[Thread 7692.0x2758 exited with code 1]
[New Thread 7692.0x16dc]
[Thread 7692.0x16dc exited with code 1]
[New Thread 7692.0x1df0]
[Thread 7692.0x1df0 exited with code 1]
[New Thread 7692.0xe8]
[Thread 7692.0xe8 exited with code 1]
[New Thread 7692.0x1cd4]
[Thread 7692.0x1cd4 exited with code 1]
[New Thread 7692.0xf98]
[Thread 7692.0xf98 exited with code 1]
[New Thread 7692.0x267c]
[Thread 7692.0x267c exited with code 1]
[New Thread 7692.0x1e88]
[New Thread 7692.0x2158]
[New Thread 7692.0x2314]
[Thread 7692.0x2314 exited with code 1]
[New Thread 7692.0x21b4]
[Thread 7692.0x21b4 exited with code 1]
[New Thread 7692.0x2124]
[Thread 7692.0x2124 exited with code 1]
[New Thread 7692.0x1c1c]
[Thread 7692.0x1c1c exited with code 1]
[New Thread 7692.0x2a88]
[Thread 7692.0x2a88 exited with code 1]
[New Thread 7692.0x2624]
[Thread 7692.0x2624 exited with code 1]
[New Thread 7692.0x1c5c]
[Thread 7692.0x1c5c exited with code 1]
[New Thread 7692.0xf5c]
[Thread 7692.0xf5c exited with code 1]
[New Thread 7692.0x1ec4]
[Thread 7692.0x1ec4 exited with code 1]
[New Thread 7692.0x2078]
[Thread 7692.0x2078 exited with code 1]
[New Thread 7692.0x27d8]
[Thread 7692.0x27d8 exited with code 1]
[New Thread 7692.0x2910]
[Thread 7692.0x2910 exited with code 1]
[New Thread 7692.0x2bf8]
[Thread 7692.0x2bf8 exited with code 1]
[New Thread 7692.0x264c]
[New Thread 7692.0x2760]
[New Thread 7692.0x1d00]
[New Thread 7692.0x2810]
[Thread 7692.0x2810 exited with code 1]
[New Thread 7692.0x1a1c]
[Thread 7692.0x1a1c exited with code 1]
[New Thread 7692.0x1878]
[Thread 7692.0x1e88 exited with code 0]
[New Thread 7692.0x217c]
[Thread 7692.0x217c exited with code 1]
[New Thread 7692.0x1a28]
[Thread 7692.0x1a28 exited with code 1]
[New Thread 7692.0x241c]
[Thread 7692.0x1878 exited with code 0]
[Thread 7692.0x1d00 exited with code 0]
[New Thread 7692.0x1c9c]
[Thread 7692.0x1c9c exited with code 1]
[New Thread 7692.0x189c]
[Thread 7692.0x241c exited with code 0]
[New Thread 7692.0x15e8]
[Thread 7692.0x15e8 exited with code 1]
[New Thread 7692.0x1794]
[Thread 7692.0x1794 exited with code 1]
[New Thread 7692.0x22b0]
[Thread 7692.0x22b0 exited with code 1]
[New Thread 7692.0x2574]
[Thread 7692.0x2574 exited with code 1]
[New Thread 7692.0x2b20]
[Thread 7692.0x2b20 exited with code 1]
[New Thread 7692.0x204c]
[Thread 7692.0x204c exited with code 1]
[New Thread 7692.0x26c0]
[Thread 7692.0x26c0 exited with code 1]
[New Thread 7692.0x160c]
[Thread 7692.0x160c exited with code 1]
[New Thread 7692.0xf60]
[Thread 7692.0xf60 exited with code 1]
[New Thread 7692.0x1f1c]
[Thread 7692.0x1f1c exited with code 1]
[New Thread 7692.0x200]

... Trying C-c and al. ...

[Thread 7692.0x26cc exited with code 1]
[Thread 7692.0x264c exited with code 1]
[Thread 7692.0x2158 exited with code 1]
[Thread 7692.0x2abc exited with code 1]
[Thread 7692.0x2760 exited with code 1]
[Thread 7692.0x189c exited with code 1]
[Thread 7692.0x200 exited with code 1]
[Thread 7692.0x2564 exited with code 1]
[Inferior 1 (process 7692) exited with code 01]
(gdb) (gdb) Quit
(gdb)
--8<-

Re: [O] export "simple" HTML?

2014-10-13 Thread Fabrice Niessen
Eric Abrahamsen wrote:
> Grant Rettke writes:
>> Eric Abrahamsen wrote:
>>> Gary Oberbrunner writes:
>>>
>>>> Has anyone created an HTML exporter that just exports "simple" HTML
>>>> with no fancy CSS stuff, just "normal" tags like  and 
>>>> and  and  and ?  Basically something that could be pasted
>>>> into an email or a larger document.  The current HTML export is
>>>> beautiful, but it adds all kinds of divs, spans, CSS tags, and
>>>> other extraneous stuff.
>>>
>>> Try the "body only" export option: in the export dispatcher, hit
>>> "C-b" to toggle. That should give you clean HTML with no file
>>> template, and no bells and whistles.
>>
>> If it is an easy answer, how would one do this in batch mode?
>
> I've never actually exported anything in batch mode, so I won't be
> able to provide a real recipe, but body-only is one of the main export
> options, usually given as an argument to org-export-as (and
> family). If you're calling any one of those export functions directly
> as part of the batch export, you can just set that argument to t.

Making advertisement for my own stuff, you now have the option
"--body-only" to the Orgmk family of scripts (among others, org2html).

See https://github.com/fniessen/orgmk for more information (or example
code).

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] You don't like the HTML export; well, that could change!

2014-10-10 Thread Fabrice Niessen
Joseph Vidal-Rosset wrote:
> Many thanks Fabrice for this very nice html theme. I am going to use it
> also.
>
> I cannot use another emacs-theme than your emacs-leuven-theme, and it is
> going to be probably the same with your html theme !

Thanks for your nice comments.

You still miss one piece of the puzzle to be complete: use my Emacs
configuration file (at https://github.com/fniessen/emacs-leuven) ;-)

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



Re: [O] You don't like the HTML export; well, that could change!

2014-10-10 Thread Fabrice Niessen
Hello Mehul and all,

Mehul Sanghvi wrote:
> On Mon, Sep 15, 2014 at 2:58 PM, Fabrice Niessen wrote:
>>
>> I'm announcing the release of Bigblow, a CSS + JS theme for the Org HTML
>> exports.
>>
>> To use it in your own files, adding these lines should make it:
>>
>> --8<---cut here---start->8---
>> #+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/css/bigblow.css"/>
>> [...]
>> --8<---cut here---end--->8---
>>
>> If you clone my repo from GitHub, it can become as easy as adding
>> just one line:
>>
>> --8<---cut here---start->8---
>> #+SETUPFILE: path/to/Git/repo/setup/bigblow-pirilampo.setup
>> --8<---cut here---end--->8---
>>
>> Test it on your files, or look at the video I posted on YouTube to see
>> what it looks like:
>>
>>   https://www.youtube.com/watch?v=DnSGSiXYuOk
>
> This is awesome !! I tried it out and liked it.  About the only things
> I would change are the fonts being used and the font-size.

On that front, I know I'd have to make the CSS more responsive, by
removing some (or many?) specifications in px, and replace them by
percentages.

> Oh and the colour scheme since I prefer slightly darker colours :)

Not much I can do here ;-)

> Otherwise this works out just fine for publishing one project per
> file.  Not sure how it will work with one project spread out over
> multiple files.  Or a site with multiple sub-projects.

Yes, it currently is targeted toward the publication of one file,
presented as if it were many (because of the tab presentation). Not sure
how to for many files.

Maybe the CSS should be cut into what's common for both use cases, and
what's specific to "one Org page" or "multiple Org pages".

> Though I think those are more Orgmode related, rather than CSS related.
>
> Regardless, this looks awesome, at least to a non-CSS, non-HTML person
> like myself.

Thanks.

> p.s.  Links to the images you are using for things like (info, tip,
> etc.)  are relative so they wont work in the case where I am using the
> HTML_HEAD method to add the theme.

I think it does work.  Do you have an ECM where it doesn't?  Or another
proposition?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



Re: [O] How to invoke org-export externally from outside Emacs

2014-09-25 Thread Fabrice Niessen
Russell Adams wrote:
> On Thu, Sep 25, 2014 at 10:56:26AM +0200, Miguel Telleria de Esteban wrote:
>> I am using org-mode more and more everyday, congrats to the community for
>> such a great program!!
>>
>> I would like to automate the generation of PDF/HTML/ODT... thorough a
>> command line with a makefile.  Something like:
>>
>> file.pdf:  file.org
>>  
>>
>> Is there a way to externally launch, let's say org-latex-export-to-pdf from
>> outside Emacs?.  Maybe through a script.
>>
>> Probably this is more an Emacs-list question than an org-mode one but any
>> suggestion here will be welcome.
>>
>> Cheers and thanks in advance for any suggestion.
>
> I use a Makefile to export to latex, then I use pdflatex to compile
> the final version. Org does the same thing if you ask it to go
> straight to PDF, but this lets me include my revision number.
>
> This also launches my pdf viewer (xpdf), and works for every .org file
> in the directory.

FWIW, I've written small standalone scripts (such as org2pdf, org2html,
org2odt, etc.) to automate such tasks.

If you're interested, have a look at https://github.com/fniessen/orgmk.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] You don't like the HTML export; well, that could change!

2014-09-15 Thread Fabrice Niessen
Hi Ista,

Ista Zahn wrote:
> Very very nice, I enjoy it a lot.

Thanks.

> If you are accepting feature requests, the only thing I really miss is
> "Next" section link at the bottom.

Of course, I accept change requests (or, better, patches ;-)). Though,
I cannot commit ATM to make them soon, even if it does look simple for
this one.

You can safely open an issue about it on GitHub.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



[O] You don't like the HTML export; well, that could change!

2014-09-15 Thread Fabrice Niessen
Hello,

I'm announcing the release of Bigblow, a CSS + JS theme for the Org HTML
exports.

To use it in your own files, adding these lines should make it:

--8<---cut here---start->8---
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/css/htmlize.css"/>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/css/bigblow.css"/>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/css/hideshow.css"/>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/jquery-1.11.0.min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/jquery-ui-1.10.2.min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/jquery.localscroll-min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/jquery.scrollTo-1.4.3.1-min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/jquery.zclip.min.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/bigblow.js"</a>;>
#+HTML_HEAD: http://www.pirilampo.org/styles/bigblow/js/hideshow.js"</a>;>
--8<---cut here---end--->8---

If you clone my repo from GitHub [1], it can become as easy as adding
just one line:

--8<---cut here---start->8---
#+SETUPFILE: path/to/Git/repo/setup/bigblow-pirilampo.setup
--8<---cut here---end--->8---

(PS- It would be very nice if we could add http references here!  Then,
there would even be no need to copy the files locally...)

Test it on your files, or look at the video I posted on YouTube to see
what it looks like:

  https://www.youtube.com/watch?v=DnSGSiXYuOk

Best regards,
Fabrice

PPS- I will still make some changes in a couple of days, like renaming
 the files so that they have a version number, but that I'll warn
 you when I'll get this done.

[1] https://github.com/fniessen/org-html-themes

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] LaTeX export and org-add-link-type

2014-07-29 Thread Fabrice Niessen
Leonard Avery Randall wrote:
> Serge Cohen writes:
>> Is this normal, if so is there another way to obtain the same results
>> as what is proposed in the documentation ?
>
> The behaviour you are explaining is not normal.  The setup you described
> should work.
>
>> To complete the post : I am using Aquamacs (MacOSX gui-version), based
>> on GNU emacs 23.4.1 The included version of org.el is Version: 6.33x
>
> Herein lies your problem.  6.33 is a very old version of org. I tested
> the old Aquamacs 2.5 with org 6.33 and it does not work.  You should
> update your org version and probably your emacs as well.  I tested your
> code on the newer Aquamacs 3.0 release and it works.  If you like the
> Aquamacs key commands then 3.0 is a reasonable bet. It comes with org
> 7.9.3. Other good distros for OSX can be acquired through macports,
> homebrew, or emacsforosx.  All of these are fairly integrated into the
> osx environment (the homebrew distro comes with a few config options so
> you may want to look to see which one is best for you).
>
> Regarding org mode version, I would recommend the most recent version
> which is available through melpa.  If you have a lot of stuff in your
> org configuration file, updating to org version 8.x requires a bit of
> work, but the new backend should be stable, so you want have to fiddle
> too much with your init file in the future.
>
> Once you upgrade to emacs 24, adding new packages is fairly easy through
> package.el. Just add this snippet to your init file.
>
> (when (>= emacs-major-version 24)
>   (require 'package)
>   (package-initialize)
>   (add-to-list 'package-archives 
>   '("melpa" . "http://melpa.milkbox.net/packages/";) t))
>
> Then to upgrade to the latest version of org-mode just press `M-x package
> install RET org-plus-contrib RET'. 

Note that using custom link types is -- in my opinion -- outperformed by
the Org macros. For example, because custom link types limit you to
2 arguments, no more.

With macros, you can have as many as you want (or at least 9?), and you
can also easily convert the macro code per back-end; for example:

  #+MACRO: cite @@latex:\cite{$1}odt:\cite{$1}@@

Note that I'm planning to write a set of default (useful) Org macros,
and publish them.

My project is currently on GitHub: https://github.com/fniessen/org-macros.

See documentation on
http://htmlpreview.github.io/?https://github.com/fniessen/org-macros/blob/master/README.html.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Directly search for Headlines?

2014-07-28 Thread Fabrice Niessen
Ken Mankoff wrote:
> On 2014-07-08 at 17:01, Samuel Wales wrote:
>> On 7/7/14, Ken Mankoff  wrote:
>>> "s" in agenda just saves all Org Buffers for me.
>>
>> c-c a s
>>
>>> My work-around is to search for "* Foo", but this doesn't find headlines
>>> with TODO items.
>>
>> it should.
>
> You're right. It does! Not sure why I thought it didn't. 
>
> OP issue solved, I think, with this.

More info on http://orgmode.org/worg/org-tutorials/advanced-searching.html
about the different syntax (*, !, :).

Fabrice Niessen

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Macros in included file not expanded in batch export

2014-07-28 Thread Fabrice Niessen
Hello Suvayu,

Suvayu Ali wrote:
> I am trying to export to LaTeX in batch mode, but it seems the exporter
> ignores macros defined in included files when exporting in batch mode.
>
> I tried to export like this:
>
>   $ emacs --eval "(require 'ox-latex)" include-test.org \
> --eval '(org-LaTeX-export-to-latex nil nil nil t)' -f kill-emacs
>
>   $ emacs --batch --eval "(require 'ox-latex)" include-test.org \
> --eval '(org-LaTeX-export-to-latex nil nil nil t)'
>
> The first one exports correctly, the second doesn't.  The org files, and
> the good and bad exported TeX files are attached.

In case you or others want a simplified command-line version of such
conversion tools, you can have a look at my Orgmk project on GitHub [1].

It provides you with:

- org2html [OPTION] FILE
- org2latex [OPTION] FILE
- org2pdf [OPTION] FILE
- org2beamerpdf [OPTION] FILE
- org2odt [OPTION] FILE
- org2txt [OPTION] FILE
- org-tangle FILE

stand-alone scripts, and the `orgmk' wrapper (to convert all files
which need to in a directory, and possibly recursively).

Best regards,
Fabrice

[1] https://github.com/fniessen/orgmk

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] Org mode @ Stage LaTeX de Dunkerque (France)

2014-06-24 Thread Fabrice Niessen
Hello,

FYI, I'll give 2 talks (of 1h30 each) during the "stage LaTeX de
Dunkerque 2014":

- Edit LaTeX in the Emacs tool

  I'll present Emacs, AUCTeX, RefTeX (thanks Carsten!) and many other
  useful packages or settings.

- Generate a LaTeX document using a light syntax (Org mode)

  I'll present the key features for choosing Org mode (over plain LaTeX)
  to compose PDF documents, and I'll exemplify my talk with a Beamer
  presentation composed in live.

All talks are free; though, subscription is required.

If you're interested to follow some of the proposed talks (mine or the
MANY other ones -- then, over LaTeX, TikZ, etc.), have a look at
http://stage-latex-gte.univ-littoral.fr/ for the program and all the
necessary details.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Thoughts on weaving variable documentation

2014-06-24 Thread Fabrice Niessen
Hello Grant,

> A lot of people are weaving their Emacs init files for the obvious
> reason: it is difficult to remember why
> we configured stuff and other people definitely won't know why we did
> it. There is a common operation
> that occurs though when other people read our Emacs init:
>
> 1. They open it up in Emacs
> 2. Find what looks interesting
> 3. Do a C-h f or C-h v on it and learn about it
>
> Makes total sense.
>
> What I got curious about is for this specific use case, people
> scanning other people's configs, how I could make it easier.

Remember the following quote of Knuth:

  ╭
  │ Let us change our traditional attitude to the construction of
  │ programs: Instead of imagining that our main task is to instruct
  │ a computer what to do, let us concentrate rather on explaining to
  │ human beings what we want a computer to do.
  │ 
  │ The practitioner of literate programming can be regarded as an
  │ essayist, whose main concern is with exposition and excellence of
  │ style. Such an author, with thesaurus in hand, chooses the names of
  │ variables carefully and explains what each variable means. He or she
  │ strives for a program that is comprehensible because its concepts
  │ have been introduced in an order that is best for human
  │ understanding, using a mixture of formal and informal methods that
  │ reinforce each other.
  ╰

Hence, for me, people scanning your config should read the document that
you've made therefore (that is, the weaved document), not the file
that's made for a computer (that is, the tangle document).

If there are parts you don't want others to see, tag them as
":noexport:" or similar more subtle ways.

As a guy convinced by LP, I wouldn't invest much time into facilitating
the reading of the tangled file; I would, on the opposite, invest a lot
of time (and I did -- results will be public soon on my Web site and on
GitHub!) on the weaved document, by improving CSS for the HTML version
and LaTeX styles.

> A thought is to weave the docstrings for variables right into the
> weaved file any time a variable is set. I am thinking something like
> this:
>
> 1. When the weave occurs
> 2. Look at each line of code that starts with a setq
> 3. Look up the docstring for the variable
> 4. TBD: Weave that documentation into the output.
>
> That is the idea, at least.
>
> My question is:
> 1. What are the standard mechanisms to do something like this within
> the ob lifecycle?
> 2. What do you think in general?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] A simple org tangle and weave makefile

2014-06-19 Thread Fabrice Niessen
Hello Grant,

Grant Rettke wrote:
> My goals was to have a simple makefile to tangle and weave a document;
> so org-mk was out of scope.

If you're talking of Orgmk (on https://github.com/fniessen/orgmk),
please know that I've add a new standalone script `org-tangle'.

Just redo a `make install' so that a symlink [1] gets created to it.

For weaving, you already there are:

- org2html [OPTION] FILE
- org2latex [OPTION] FILE
- org2pdf [OPTION] FILE
- org2beamerpdf [OPTION] FILE
- org2odt [OPTION] FILE
- org2txt [OPTION] FILE

Best regards,
Fabrice

[1] Works in Windows too (that's my platform) with Cygwin.

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Better way to specify the latex documentclass of an exported file without changing my configuration?

2014-03-26 Thread Fabrice Niessen
Feng Shu wrote:
> Alan Schmitt  writes:
>>
>> I'm collaborating on a paper with some colleagues, and I convinced
>> them to use org-mode. I'm trying to make sure the paper is as
>> self-contained as possible (I don't want them to have to change their
>> emacs configuration file).To change the documentclass name of the
>> exported
>
> Maybe you can write a Makefile to change their emacs configure...

You could have a look at Orgmk [1], a suite of shell scripts I wrote
with the following goals in mind:

- to be more productive, by running the export only when the source Org
  files are updated.

- *to share some common Emacs and Org configuration inside your team*,
  separately of what you have in your personal Emacs configuration file.

- to offload compilation into an external batch Emacs process, allowing
  you to go on editing or working while exporting the documents.

You just need to install it, and then using it is a simple as:

--8<---cut here---start->8---
  org2html [OPTION] FILE
  org2latex [OPTION] FILE
  org2pdf [OPTION] FILE
  org2beamerpdf [OPTION] FILE
  org2odt [OPTION] FILE
  org2txt [OPTION] FILE
  orgmk [OPTION]
  orgmk [OPTION] [html | pdf]
  orgmk [OPTION] [FILE]
--8<---cut here---end--->8---

Best regards,
Fabrice

[1] https://github.com/fniessen/orgmk

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] bug#16832: Emacs goes crazy when deleting lines

2014-03-20 Thread Fabrice Niessen
53   2%
 + org-element-footnote-reference-successor 
53   2%
 + org-element-statistics-cookie-successor  
   53   2%
 + org-element-timestamp-successor  
   51   2%
 + org-element-target-successor 
50   2%
 + org-element-radio-target-successor   
  49   2%
 + org-element-export-snippet-successor 
47   1%
 + org-element-sub/superscript-successor
 37   1%
 + org-element-text-markup-successor
  8   0%
   intern   1   0%
+ let 325  13%
  + cond1   0%
   Automatic GC14   0%
+ flyspell-post-command-hook   28   1%
+ command-execute  17   0%
+ redisplay_internal (C function)  12   0%
--8<---cut here---end--->8---

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



Re: [O] bug#16832: Emacs goes crazy when deleting lines

2014-03-17 Thread Fabrice Niessen
Stefan wrote:
>> I thought at using the profiler of Emacs 24, and it gives meaningful
>> results. Good news #2.
>> Here they are:
>> --8<---cut here---start->8---
>> - flyspell-post-command-hook 3271  98%
>
> Does this report only cover a single command that took a "very long
> time" until it gave you back control (in which case I'm wondering why
> flyspell-post-command-hook should be called so many times), or does it
> cover a longer part of your editing session?

I launched M-x profiler-start just before killing (C-k) the line which
I know shows the problem.

I launched M-x profiler-report as soon as I got control back.

So, it only covers a single command (C-k).

Fabrice Niessen

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



Re: [O] bug#16832: Emacs goes crazy when deleting lines

2014-03-14 Thread Fabrice Niessen
Eli Zaretskii wrote:
>> From: "Fabrice Niessen" 
>> Cc: 16...@debbugs.gnu.org
>> Date: Wed, 26 Feb 2014 20:42:20 +0100
>> 
>> Eli Zaretskii wrote:
>> >> From: "Fabrice Niessen" 
>> >> Cc: 16...@debbugs.gnu.org
>> >> Date: Wed, 26 Feb 2014 12:06:24 +0100
>> >> 
>> >> > Then try F12 (if you are on XP), or try attaching a debugger and
>> >> > getting a C and Lisp backtrace.
>> >> 
>> >> Hope this helps:
>> >
>> > Thanks.  Without a Lisp-level backtrace, there's not enough useful
>> > info here.
>> 
>> Is there something I can do to get it in such a debugger session?
>
> Probably, but I don't know what to suggest.  I don't understand the
> error messages that you get from GDB, this usually happens when one
> tries to attach a debugger to a program that is already being
> debugged, which seems to be not the case here.  Weird.
>
>> > Perhaps finding the minimal set of customizations that reproduces the
>> > issue would lead faster to the solution.
>> 
>> So you mean that the backtrace, with saveplace calls, does not lead to
>> him as the culprit?
>
> These are not saveplace calls, this is Emacs searching for a string
> that includes "saveplace.elc" and "save-place-alist" as substrings.

I made a big progress on this one.

I realized that Emacs did not into an infloop, but simply gave me back
control after a very long time (more than 2 mins). Good news #1.

I thought at using the profiler of Emacs 24, and it gives meaningful
results. Good news #2.

Here they are:

--8<---cut here---start->8---
- flyspell-post-command-hook 3271  98%
 - apply 3271  98%
  - ad-Advice-flyspell-post-command-hook 3271  98%
   - #3271  98%
- byte-code  3271  98%
 - flyspell-word 3271  98%
  - org-mode-flyspell-verify 3246  97%
   - if  3246  97%
- let*   3246  97%
 - prog1 3053  91%
  - catch3053  91%
   - while   3053  91%
- if 3053  91%
 - progn 3053  91%
  - setq 3053  91%
   - org-element--get-next-object-candidates 3053  91%
- delq   3053  91%
 - if3053  91%
  - mapcar   3053  91%
   - #3053  91%
- funcall3053  91%
 - org-element-inline-babel-call-successor   2873  86%
  - save-excursion   2873  86%
 if  2873  86%
 + org-element-latex-or-entity-successor   81   2%
 + org-element-link-successor  35   1%
 + org-element-line-break-successor19   0%
 + org-element-inline-src-block-successor   9   0%
 + org-element-footnote-reference-successor 5   0%
 + org-element-macro-successor  5   0%
 + org-element-statistics-cookie-successor  5   0%
 + org-element-timestamp-successor  5   0%
 + org-element-export-snippet-successor 4   0%
 + org-element-radio-target-successor   4   0%
 + org-element-target-successor 4   0%
 + org-element-sub/superscript-successor3   0%
 + org-element-text-markup-successor1   0%
 + org-element-at-point   193   5%
  + flyspell-word-search-forward   15   0%
+ redisplay_internal (C function)  28   0%
+ ...  27   0%
--8<---cut here---end--->8---

Though, I don't understand yet wh

Re: [O] Howto: different faces for "begin_src" and "results"

2014-03-10 Thread Fabrice Niessen
Miguel Ruiz wrote:
> I was wondering if it's possible to have different faces for
> "#+begin_src/#+end_src" and "results" so distinguishing the blocks is
> easier.

Yes, you can.

See `org-block-begin/end-line' for the block delimiters.

For an example, take a look at
https://github.com/fniessen/color-theme-leuven, or other themes from
http://orgmode.org/worg/org-color-themes.html.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] [Announcement] Orgmk (automate export of Org documents to PDF, HTML, etc.)

2014-03-04 Thread Fabrice Niessen
Hello,

For the interested ones, please find Orgmk at
https://github.com/fniessen/orgmk.

Orgmk is a suite of Bash scripts [1] for automating the conversion of
Org documents to different formats, such as HTML or PDF.

Objectives?

- Be more productive, by running the export only when the source Org
  files are updated.

- Share some common Emacs and Org configuration inside your team,
  separately of what you have in your personal Emacs configuration file.

- Offload compilation into an external batch Emacs process, allowing you
  to go on editing or working while exporting the documents.

It still can be improved, but is already fully usable.

Note that, prior to exporting, Orgmk will ensure that the tables found
in your Org document are up-to-date... Other improvements could concern:

- checking links and cross-references,
- checking BibTeX entries,
- checking word spelling, and
- any more...

But these are only in my (Org) TODO list.

Best regards,
Fabrice

[1] The scripts run on both Unix and Microsoft Windows (with Cygwin).

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Change Todo colors

2014-03-03 Thread Fabrice Niessen
zwz wrote:
> Chris Henderson  writes:
>
>> I'd like to change the color of Next to Red and Started to brown. At the
>> moment, todo/ next and started all showing as red.
>>
>> Here is my .emacs snippet.
>>
>> (setq org-todo-keywords
>> '((sequence "TODO(t)" "Next(n)" "Started(s)" "|" "DONE(d!)")
>>   (sequence "|" "CANCELED(c)")))
>>
>> (setq org-todo-keyword-faces
>>'(("CANCELED" . (:foreground "blue" :weight bold
>
> You should use "custom-set-faces" instead of "setq".

or `set-face-attribute', as I do in my Emacs configuration file[1]:

--8<---cut here---start->8---
  (with-eval-after-load "org-faces"

;; faces for specific TODO keywords
(setq org-todo-keyword-faces
  '(("NEW"  . leuven-org-created-kwd)
("TODO" . org-todo)
("STRT" . leuven-org-inprogress-kwd)
("WAIT" . leuven-org-waiting-for-kwd)
("SDAY" . leuven-org-someday-kwd)
("DONE" . org-done)
("CANX" . org-done)))

;; Org standard faces
(set-face-attribute 'org-todo nil
:weight 'bold :box '(:line-width 1 :color "#D8ABA7")
:foreground "#D8ABA7" :background "#FFE6E4")

(set-face-attribute 'org-done nil
:weight 'bold :box '(:line-width 1 :color "#BB")
:foreground "#BB" :background "#F0F0F0")

;; Org non-standard faces
(defface leuven-org-created-kwd
  '((t (:weight normal :box (:line-width 1 :color "#EEE9C3")
:foreground "#1A1A1A" :background "#FDFCD8")))
  "Face used to display state NEW.")
(defface leuven-org-inprogress-kwd
  '((t (:weight bold :box (:line-width 1 :color "#D9D14A")
:foreground "#D9D14A" :background "#FCFCDC")))
  "Face used to display state STRT.")
(defface leuven-org-waiting-for-kwd
  '((t (:weight bold :box (:line-width 1 :color "#89C58F")
:foreground "#89C58F" :background "#E2FEDE")))
  "Face used to display state WAIT.")
(defface leuven-org-someday-kwd
  '((t (:weight bold :box (:line-width 1 :color "#9EB6D4")
:foreground "#9EB6D4" :background "#E0EFFF")))
  "Face used to display state SDAY."))
--8<---cut here---end--->8---

Best regards,
Fabrice

[1] https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] [PATCH] `org-macro--collect-macros' can collect macro definitions from include files

2014-02-05 Thread Fabrice Niessen


Hello,

Nicolas Goaziou wrote:
> Bastien  writes:
>> "Fabrice Niessen" writes:
>>
>>> As the DOCSTRING of the function `org-macro--collect-macros' tells it,
>>> it "collects macro definitions in current buffer and setup files", not
>>> from INCLUDE files.
>>
>> Then your patch should change the docstring too.

Right!

>> I think we want to collect macros from setupfile only,
>> that's one of the differences between INCLUDE and SETUPFILE.
>
> I agree.
>
> Not all "Include" files are Org files.

OK, but that shouldn't be a problem either: if there is no #+MACRO in an
"Include" file, that doesn't matter...

> Moreover, "INCLUDE" keywords are expanded before initializing macro
> templates during export, so "MACRO" keywords should be read when
> appropriate.

You say that the order of operations, during export, is:

- Include files through "INCLUDE" keywords
- Expand macros

OK. Still, I don't understand what you mean by "so MACRO keywords should
be read when appropriate"?

Anyway, let me explain what I wish such a feature (_or_ the opposite:
that Babel blocks are allowed in SETUPFILE)...

I'm sharing on GitHub a project [1] where I write Org macros that
everybody could once need, and these are easily accessible (once cloned)
in every file, after a simple directive such as:

  #+INCLUDE: /path/to/org-macros.setup

As I do have Babel code blocks inside the `org-macros.setup' file, it
needs to be loaded via the "INCLUDE" directive, not via a "SETUPFILE".

Example of such macro calling a Babel code block:

  ╭
  │ #+name: version-history
  │ #+begin_src sh :exports none :results silent :colnames '(Version Date 
Author Comment)
  │ git log --pretty=format:"%h%x09%ad%x09%an%x09%s" --date=short | head -n 5
  │ #+end_src
  │
  │ #+MACRO: version-history call_version-history[:eval yes]()[:eval yes 
:results table :colnames '(Version Date Author Comment)]
  ╰────

So, thanks to the INCLUDE directive, I already have a one-liner to
include such "extended macros". But these aren't collected by
`org-macro--collect-macros'...

Best regards,
Fabrice

[1] https://github.com/fniessen/org-macros

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




[O] [PATCH] `org-macro--collect-macros' can collect macro definitions from include files

2014-02-05 Thread Fabrice Niessen
Hello,

As the DOCSTRING of the function `org-macro--collect-macros' tells it,
it "collects macro definitions in current buffer and setup files", not
from INCLUDE files.

This patch ensures that the above does work.

>From a8737be0b12ce700cd348c47f91694bfc0fbe7b8 Mon Sep 17 00:00:00 2001
From: "Fabrice Niessen" 
Date: Wed, 5 Feb 2014 16:59:58 +0100
Subject: [PATCH] Collect macro definitions from INCLUDE files as well

* org-macro.el (org-macro--collect-macros): INCLUDE files are looked up
when searching for macro definitions.

---
 lisp/org-macro.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 50ce438..7f438ed 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -78,7 +78,7 @@ Return an alist containing all macro templates found."
  (org-with-wide-buffer
   (goto-char (point-min))
   (while (re-search-forward
-  "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t)
+  "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\|INCLUDE\\):" nil t)
 (let ((element (org-element-at-point)))
   (when (eq (org-element-type element) 'keyword)
     (let ((val (org-element-property :value element)))

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Making org-agenda-list hide items scheduled for the future

2014-01-20 Thread Fabrice Niessen
Hello Nick,

Nick Dokos wrote:
> "Fabrice Niessen"  writes:
>> Michael Hoffman wrote:
>>> I use the weekly/daily agenda and want to be able to use the SCHEDULED 
>>> keyword
>>> to hide items until the scheduled time comes up. I don't want to think about
>>> them until then. How can I set up org-agenda-list to do this?
>>>
>>> This is the list of agenda items, not the TODO list. I already have
>>> org-agenda-todo-ignore-scheduled set to future. It does not help.
>>
>> See my answer on StackOverflow.
>
> It would be useful if you could post a link to your answer.

Yes; such double postings of questions on both SO and the ML aren't
particularly great (and should not be encouraged)...

Here's the link:

http://stackoverflow.com/questions/21118288/making-org-agenda-list-hide-items-scheduled-for-the-future/21120864

I had no reaction of the OP for 2 days. Dunno if the response resolves
his problem.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/



Re: [O] Making org-agenda-list hide items scheduled for the future

2014-01-19 Thread Fabrice Niessen
Hello Michael,

Michael Hoffman wrote:
> I use the weekly/daily agenda and want to be able to use the SCHEDULED keyword
> to hide items until the scheduled time comes up. I don't want to think about
> them until then. How can I set up org-agenda-list to do this?
>
> This is the list of agenda items, not the TODO list. I already have
> org-agenda-todo-ignore-scheduled set to future. It does not help.

See my answer on StackOverflow.

Fabrice Niessen

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] How do I specify the language for a :results code block

2013-12-04 Thread Fabrice Niessen
Hello Alan,

Alan Schmitt wrote:
> I tried to apply the drawer trick to the :wrap src but it does not work,
> unfortunately. I like your approach better anyway as it allows me to specify
> not only the language used by the output source block, but other properties
> (such as whether it should be evaluated) which wrap does not let me do.

Not sure this is true. Look at the following tricky example from my slides for
the "stage LaTeX de Dunkerque 2013" [1]:

#+begin_src org :results latex replace :wrap "SRC latex :exports code" :exports 
results
<>
#+end_src

It does eval as:

#+results:
#+BEGIN_SRC latex :exports code
\begin{itemize}
\item Premier élément
\begin{itemize}
\item Niveau plus profond
\end{itemize}
\item Autre élément
\item Dernier élément
\end{itemize}
#+END_SRC

which in turn evals (for the export) into the results:

#+results:
#+BEGIN_LaTeX
\begin{itemize}
\item Premier élément
\begin{itemize}
\item Niveau plus profond
\end{itemize}
\item Autre élément
\item Dernier élément
\end{itemize}
#+END_LaTeX

So, you definitely can pass extra options to the wrap header argument...

Best regards,
Fabrice

[1] See http://www.slideshare.net/fniessen/org-modelatexexport or
https://github.com/fniessen/stage-latex-dunkerque-2013/.

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-10-21 Thread Fabrice Niessen


Hello,

"Fabrice Niessen" wrote:
> Due to a friend's request, I've tried to offer AUCTeX key bindings
> within Org documents via a minor mode, called "org-auctex-keys".
> 
> If you're interested, check it out at
> https://github.com/fniessen/org-auctex-key-bindings.
> 
> Note that I'm willing to add extra AUCTeX keys -- but I don't use
> AUCTeX enough to know what's important to transfer to Org.

I've updated `org-auctex-keys' in the following way:

- `C-c C-c' runs a menu which looks a lot like AUCTeX's menu: pressing once the
  key binding calls the export process (that is, generates a PDF file);
  pressing a second time will display it (if available).

  Extra optimization: if the PDF files is newer than the Org file, then
  pressing `C-c C-c' will display it (avoiding to redo it).

- As there are a lot of conflicts between Org and AUCTeX keys, you now can call
  the standard Org command by prefixing the key binding with a `C-u' argument.
  Note that the first `C-u' is not passed onto the standard command.

  For example,

  + C-c C-c  calls my command `org-auckeys-export-dispatch'
  + C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with no `C-u' 
arg (= 1)
  + C-u C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with 1 `C-u' 
arg (= 4)
  + C-u C-u C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with 2 `C-u' 
arg (= 16)
  + etc. (provided it makes sense)

- I've added a key binding to turn off/on "Org AUCKeys": `C-+'.

  So, to call a standard Org command, you can as well disable
  `org-auctex-keys', pressing the key binding you know in standard Org, and
  re-enable `org-auctex-keys', that is:

C-+ C-c C-c C-+

  to call `org-ctrl-c-ctrl-c'.

Fabrice Niessen

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Fabrice Niessen
Hi Joseph,

Joseph Vidal-Rosset wrote:
> Thanks a lot Fabrice for your  package to get AUCTeX key binginds within
> Org documents. 

You're welcome. Still a work in progress -- have to address the points of
Nicolas, Suvayu and Marcin, among others.

> Maybe I  do not  use it correctly  by I  want to point  out to  you some
> unwanted results: 
>
> #+begin_equation
>  \label{ECQ}
> \neg A , A \vdash B
> \tag{ECQ}
> #+end_equation
>
> exported in LaTeX is translated in .tex file:
>
> \begin{equation}
> \label{ECQ}
> $\neg{}$ A , A \vdash B
> \tag{ECQ}
> \end{equation} 
>
> and of course it does not work. 
>
> My question is therefore more  general: how writing scienfific papers in
> org-mode documents  i.e. how writing useful  environments like equation,
> bussproofs,   fitch,   etc.   every  useful   package   for   logicians,
> mathematicians, etc.  ? 

I don't have experience with mathematics in Org nor in LaTeX. The problem you
point out does not seem to be related in any way to org-auctex-keys.el, though.

Could you try different variations of your code: all the "inside" code on one
line, or all lines with indentation (I see that \neg is not indented), or...
and see whether some work.

This should anyway be reported as a separate problem from the AUCTeX key
bindings.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-09-30 Thread Fabrice Niessen



Hello,

"Fabrice Niessen" wrote:
> Nicolas Richard wrote:
>> "Fabrice Niessen" writes:
>>> Due to a friend's request, I've tried to offer AUCTeX key bindings within 
>>> Org
>>> documents via a minor mode, called "org-auctex-keys".
>>
>> I checked that out because I often find myself doing C-c C-e while in
>> org-mode, but I expected it would insert
>>
>> #+BEGIN_SRC latex
>>   \begin{prompted_env}
>>
>>   \end{prompted_env}
>> #+END_SRC
>> instead of a new item.
>
> Why not?  It makes sense -- and the list item did not make such sense...
>
>> OTOH, I don't really want such a feature, because when I do this, I
>> usually realize that it's time for me to export the tree to LaTeX and go
>> on from there.
>>
>>> If you're interested, check it out at
>>> https://github.com/fniessen/org-auctex-key-bindings.
>>
>> I see no licence, which I think (though IANAL) is equal to a strict and
>> super restrictive copyright ; is that intended ?
>
> No, it's just that I'm lost when it comes down to copyrights, copylefts, and
> all the subtle meanings and implications of that.
>
> Any advice on what to put? The purpose is, of course, that it can be freely
> used, copied, etc.

FYI, I've added the suggested key bindings (from you and from Marcin), and
added a copyright (Emacs-alike).

Currently implemented:

| Shortcut| What it runs   |
|-+|
| C-c C-s | org-insert-heading |
| C-c C-j | org-insert-heading-respect-content |
| C-c C-f C-e | org-auckeys-font (emphasize)   |
| C-c C-f C-b | org-auckeys-font (bold)        |
| C-c C-f C-t | org-auckeys-font (typewriter)  |
| C-c C-f C-i | org-auckeys-font (italic)  |
| C-c C-e | org-auckeys-environment|
| C-c C-c | org-export-dispatch|

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium





Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Fabrice Niessen
Hello Marcin,

Marcin Borkowski wrote:
>> Due to a friend's request, I've tried to offer AUCTeX key bindings
>> within Org documents via a minor mode, called "org-auctex-keys".
>> 
>> If you're interested, check it out at
>> https://github.com/fniessen/org-auctex-key-bindings.
>> 
>> Note that I'm willing to add extra AUCTeX keys -- but I don't use
>> AUCTeX enough to know what's important to transfer to Org.
>
> Interesting idea - for me, especially C-c C-f bindings might be
> useful.  What might be missing:
>
> C-c C-f C-e emphasize, might just be equivalent to C-c C-f C-i

Already added.

> C-c C-j new item, might be equivalent to C-RET or something
> C-c C-c in AUCTeX, this just runs a TeX job.  Here it initiate export
> or something like that.

These will follow.

Thanks for your input...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Fabrice Niessen
Hello Nicolas,

Nicolas Richard wrote:
> "Fabrice Niessen" writes:
>> Due to a friend's request, I've tried to offer AUCTeX key bindings within Org
>> documents via a minor mode, called "org-auctex-keys".
>
> I checked that out because I often find myself doing C-c C-e while in
> org-mode, but I expected it would insert
>
> #+BEGIN_SRC latex
>   \begin{prompted_env}
>
>   \end{prompted_env}
> #+END_SRC
> instead of a new item.

Why not?  It makes sense -- and the list item did not make such sense...

> OTOH, I don't really want such a feature, because when I do this, I
> usually realize that it's time for me to export the tree to LaTeX and go
> on from there.
>
>> If you're interested, check it out at
>> https://github.com/fniessen/org-auctex-key-bindings.
>
> I see no licence, which I think (though IANAL) is equal to a strict and
> super restrictive copyright ; is that intended ?

No, it's just that I'm lost when it comes down to copyrights, copylefts, and
all the subtle meanings and implications of that.

Any advice on what to put? The purpose is, of course, that it can be freely
used, copied, etc.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




[O] AUCTeX key bindings within Org documents

2013-09-27 Thread Fabrice Niessen
Hello,

Due to a friend's request, I've tried to offer AUCTeX key bindings within Org
documents via a minor mode, called "org-auctex-keys".

If you're interested, check it out at
https://github.com/fniessen/org-auctex-key-bindings.

Note that I'm willing to add extra AUCTeX keys -- but I don't use AUCTeX enough
to know what's important to transfer to Org.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] [org-8.0.7] pb with org-anniversary

2013-09-03 Thread Fabrice Niessen
Hello Yvon,

Yvon Henel wrote:
> I've just reinstalled org-8.0.7 on emacs-23.3.1 (Ubuntu 12.04)
> and I met a problem with the following syntax

Could you describe which problem?

> %%(org-anniversary 1986 08 17) Cédric a %d ans.

Could it be because of the accent in Cédric?  UTF-8 vs ISO Latin 1?

Personally, I use this, and it works (TM):

--8<---cut here---start->8---
** January

%%(diary-anniversary 1979 01 15) Birthday of Sofia (%d years)
%%(diary-anniversary 1976 01 27) Birthday of Thomas (%d years)
--8<---cut here---end--->8---

> moreover when emacs is in org-mode it does not recognize the function
> org-anniversary

As `org-anniversary' is defined in `org-agenda':

  ╭
  │ org-anniversary is a Lisp function in `org-agenda.el'.
  │
  │ (org-anniversary YEAR MONTH DAY &optional MARK)
  │
  │ Like `diary-anniversary', but with fixed (ISO) order of arguments.
  ╰

adding a:

(require 'org-agenda)

somewhere at the top of your .emacs could resolve that problem?

> any help would be greatly appreciated

HTH...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] Tangle with conditional statement

2013-08-24 Thread Fabrice Niessen
Hello Andreas,

> First time poster to this mailing list.
> I was hoping i could get some pointers to a question I have not yet found a
> solution or example of.
>
> I use orgmode and tangled elisp src blocks to initiate emacs. I also use
> el-get to install packages, however sometimes these packages fail for
> various reasons and I would like to skip them so that the hall emacs
> initailisation doesn't brake. However for important packages i have them
> hardcoded in my init files so that the settings I have doesn't complain.
> But as I use org-mode to tangle this I can just flip the :tangle to "no" to
> to not tangle a specific section.
>
> my question: Is it possible to have a conditional statement for a tangled
> block so that only if a package is installed or a directory exist does the
> block tangle? Meaning that I wouldn't need to hard code all the el-get
> fetches in my init file.
> Is this a good idea? or should I work in conditions in the emacs src blocks
> instead?
> I realize now when I'm typing it out that it might come with some other
> issues like first time running it I would have to reinitialize emacs after
> package installs to get my settings but after that I guess it would be fine.

Instead of trying to put the "look if package is present" constraint on
Babel's side (and have a configuration file which you cannot exchange), I'd do
it on the Emacs (Lisp) side, as I did in my configuration file [1] with a
"try-require" function:

--8<---cut here---start->8---
  (defvar leuven--missing-packages nil
"List of packages that `try-require' or `locate-library' can't find.")

  ;; require a feature/library if available; if not, fail silently
  (defun try-require (feature)
"Attempt to load a library or module. Return true if the
  library given as argument is successfully loaded. If not, instead
  of an error, just add the package to a list of missing packages."
(let (time-start)
  (condition-case err
  ;; protected form
  (progn
(when leuven-load-verbose
  (message "(info) Checking for `%s'..." feature))
(if (stringp feature)
(load-library feature)
  (setq time-start (float-time))
  (require feature))
t)
;; error handler
(file-error ;; condition
 (progn
   (when leuven-load-verbose
 (message "(info) Checking for `%s'... missing" feature))
   (add-to-list 'leuven--missing-packages feature 'append))
 nil
--8<---cut here---end--->8---

Best regards,
Fabrice

[1] https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] Slides about LaTeX export

2013-06-25 Thread Fabrice Niessen
Hi John,

John Hendy wrote:
> On Jun 14, 2013 4:37 PM, "Fabrice Niessen"  wrote:
>>
>> Just to let you know I've made a 1h30 presentation about the LaTeX exporter
>> of Org mode 8 at the "Stage LaTeX de Dunkerque 2013", on last Wednesday
>> (12th of June).
>>
>> My slides are visible on:
>>
>>   http://fr.slideshare.net/fniessen/org-modelatexexport
>>
>> The Org source, LaTeX generated file and PDF output are on:
>>
>>   http://www.github.com/fniessen
>
> Very nice!

Thanks!

> Really nice overview of side by side "translations" between Org and LaTex.

Yes, I wanted to show the "problem" (horrible LaTeX syntax) and the "solution"
(just write what you meant, with almost no extra syntax in Org).

That made quite a shock to the attendants, even if they're used to the LaTeX
side: they were astonished that the Org syntax was so close to the "how it's
displayed" in the PDF -- mainly for the lists, but also for the tables.

> Out of curiosity, why didn't the exponent and subscript examples get
> rendered/converted on slide 22?

That's something I still haven't understood... The only one, and you spotted
it!

I tried all variations of ^:nil, ^:t and ^:{} but none translated the
super/sub-scripts correctly. A mystery that stays to be discovered...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] Slides about LaTeX export

2013-06-20 Thread Fabrice Niessen
Hello,

"Fabrice Niessen" wrote:
> "Fabrice Niessen" wrote:
>> Viktor Rosenfeld wrote:
>>> Fabrice Niessen wrote:
>>>> Could one of you report (as suggested by Nick) whether it works (or not) 
>>>> from
>>>> another browser on the Mac?
>>>
>>> Snow Leopard 10.6.8:
>>>
>>> - Chrome: only yellow boxes
>>> - Safari: only yellow boxes
>>> - Firefox: yellow boxes with code
>>
>> Thanks to all for your tests. I'll report the problems to SlideShare -- I
>> think they must have the key. At least, I hope so.
>
> For your information, I've opened a ticket on SlideShare. But it seems we
> can't expect so good news for our Beamer slides:
>
>   ╭ http://help.slideshare.com/requests/42307 (full ticket report)
>   │
>   │ Let me send this off to my team to look into to see if this can be
>   │ resolved, but since the majority of files (including PDF's) that we
>   │ receive on SlideShare are from more common file creation tools such as
>   │ PowerPoint, this may take some time, and we may not support PDF's
>   │ created with this process.
>   ╰
>
> Quite disappointing: we use the best tool to typeset our presentations,
> and they are the worst when displayed on SlideShare...

BTW, I've now allowed (it wasn't "on" by default) downloading the original PDF
file from SlideShare. So, you can get the original file (about the LaTeX
exporter) in case you don't see correctly part of the pages at

http://fr.slideshare.net/fniessen/org-modelatexexport

Best regards,
Fabrice

--
Fabrice Niessen
Leuven, Belgium




Re: [O] Slides about LaTeX export

2013-06-19 Thread Fabrice Niessen
Hello all,

"Fabrice Niessen" wrote:
> Viktor Rosenfeld wrote:
>> Fabrice Niessen wrote:
>>> Could one of you report (as suggested by Nick) whether it works (or not) 
>>> from
>>> another browser on the Mac?
>>
>> Snow Leopard 10.6.8:
>>
>> - Chrome: only yellow boxes
>> - Safari: only yellow boxes
>> - Firefox: yellow boxes with code
>
> Thanks to all for your tests. I'll report the problems to SlideShare -- I
> think they must have the key. At least, I hope so.

For your information, I've opened a ticket on SlideShare. But it seems we
can't expect so good news for our Beamer slides:

  ╭ http://help.slideshare.com/requests/42307 (full ticket report)
  │
  │ Let me send this off to my team to look into to see if this can be
  │ resolved, but since the majority of files (including PDF's) that we
  │ receive on SlideShare are from more common file creation tools such as
  │ PowerPoint, this may take some time, and we may not support PDF's
  │ created with this process.
  ╰

Quite disappointing: we use the best tool to typeset our presentations,
and they are the worst when displayed on SlideShare...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] Slides about LaTeX export

2013-06-17 Thread Fabrice Niessen
Hello,

Viktor Rosenfeld wrote:
> Fabrice Niessen wrote:
>> Could one of you report (as suggested by Nick) whether it works (or not) from
>> another browser on the Mac?
>
> Snow Leopard 10.6.8:
>
> - Chrome: only yellow boxes
> - Safari: only yellow boxes
> - Firefox: yellow boxes with code

Thanks to all for your tests. I'll report the problems to SlideShare -- I
think they must have the key. At least, I hope so.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] Slides about LaTeX export

2013-06-17 Thread Fabrice Niessen
Hello all,

Yagnesh Raghava Yakkala wrote:
> On Jun 17 2013, t...@tsdye.com (Thomas S. Dye) wrote:
>> Carsten Dominik  writes:
>>> On 16.6.2013, at 23:00, Nick Dokos  wrote:
>>>> t...@tsdye.com (Thomas S. Dye) writes:
>>>>
>>>>>>> all source code objects are empty yellow squares when I view this
>>>>>>> slide show with Chrome...
>>>>>>
>>>>>> It works as expected for me with Google Chrome.
>>>>>
>>>>> I get empty yellow rectangles with Google Chrome.
>>>>
>>>> IIRC, both you and Carsten use Macs - correct?
>>>
>>> Yes, this is correct on my side.
>>
>> Yes, I'm on a Mac, too.

Could one of you report (as suggested by Nick) whether it works (or not) from
another browser on the Mac?

The fact it's limited to Mac would make me think of a font problem?  I'm using
Libertine through a require package in my "white" Beamer color theme (based on
the Org theme from Marcin Borkowski).

> Here is the pdf version of slides.
> https://github.com/fniessen/stage-latex-dunkerque-2013/blob/master/org-mode-latex-export.pdf?raw=true

When viewing the fonts used in the document (via Adobe Acrobat,
"Properties..." > "Fonts"), they all seem "embedded". So, I don't
understand...

Plus I thought that SlideShare was making images of the slides, à la DocView!?
Seems not...

Best regards,
Fabrice

--
Fabrice Niessen
Leuven, Belgium




[O] Slides about LaTeX export

2013-06-14 Thread Fabrice Niessen
Hello,

Just to let you know I've made a 1h30 presentation about the LaTeX exporter of
Org mode 8 at the "Stage LaTeX de Dunkerque 2013", on last Wednesday (12th of
June).

My slides are visible on:

  http://fr.slideshare.net/fniessen/org-modelatexexport

The Org source, LaTeX generated file and PDF output are on:

  http://www.github.com/fniessen

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




[O] Fwd: [Stage LaTeX 2013] Stage LaTeX à Dunkerque, 11e édition !

2013-05-14 Thread Fabrice Niessen
Hello,

FYI, I will give for the second time a 90-min course on Org mode, mainly
focused on its LaTeX exporter (... and all the advantages of writing in Org
instead of in AUCTeX).

I will present my seminar during the "Stage LaTeX de Dunkerque" (France), held
on the 12th of June. It's free and open to everybody.

See the announcement (in French) in the FCTT newsgroup:

  ╭
  │ From: Denis Bitouzé 
  │ Newsgroups: fr.comp.text.tex,fr.sci.maths
  │ Subject: [Stage LaTeX 2013] Stage LaTeX à Dunkerque,
  │  11e édition !
  │ Followup-To: fr.comp.text.tex
  │ Date: Thu, 9 May 2013 16:21:16 +0200
  │
  │ Bonjour,
  │
  │ (Et désolé pour d'éventuelles redondances.)
  │
  │ le département Génie Thermique et Énergie de l'IUT Saint-Omer Dunkerque
  │ a le plaisir de vous annoncer la 11e édition de son stage gratuit de
  │ formation à LaTeX, organisé en partenariat avec les associations
  │ GUTenberg (Groupe des Utilisateurs francophones de TeX) et CLX (Club
  │ des utilisateurs de LinuX du Nord_Pas-de-Calais).
  │
  │ Pour cette 11e édition, qui se déroulera le
  │
  │   mercredi 12 juin 2013 de 9h à 17h30
  │
  │ nous proposons des cursus de niveaux :
  │
  │   -- débutant : pour ceux qui n'ont pas ou que peu pratiqué LaTeX, au
  │   cours duquel seront présentées les bases du logiciel ;
  │
  │   -- intermédiaire : destiné à ceux pratiquant déjà LaTeX mais
  │   souhaitant être initiés à certaines fonctionnalités qui n'ont pas été
  │   abordées au niveau débutant ;
  │
  │   -- avancé : réservé à ceux ayant une (très) bonne maîtrise de LaTeX
  │   et de ses programmes annexes et qui souhaitent augmenter leur
  │   productivité ou entrer dans les arcanes du système.
  │
  │ Sur le site consacré au stage LaTeX à Dunkerque :
  │
  │   http://stage-latex-gte.univ-littoral.fr
  │
  │ vous pourrez trouver le programme de l'édition 2013 :
  │
  │   http://stage-latex-gte.univ-littoral.fr/programme
  │
  │ disponible aussi sous forme de fichiers PDF, plus agréable à lire :
  │
  │   
http://stage-latex-gte.univ-littoral.fr/programme/programme-format-pdf-ecran/at_download/file
  │
  │ Si vous souhaitez assister à cette édition, nous vous invitons à
  │ en consulter les modalités d'inscription :
  │
  │   http://stage-latex-gte.univ-littoral.fr/inscriptions
  │
  │ Nous vous remercions à l'avance de nous aider à faire connaître notre
  │ stage auprès de vos collègues, connaissances, amis, entourage, etc.
  │ Vous pouvez par exemple signaler son existence :
  │
  │   -- sur les listes de diffusion et forums (notamment académiques),
  │   réseaux sociaux, etc. que vous fréquentez ;
  │
  │   -- en placardant des exemplaires de son affiche :
  │
  │ 
http://stage-latex-gte.univ-littoral.fr/affiche/affiche-du-stage-au-format-pdf/at_download/file
  │
  │ Nous espérons vous voir nombreux !
  │
  │ Bien cordialement.
  │ --
  │ Pour l'équipe organisatrice, Denis Bitouzé
  ╰

Best regards,
Fabrice Niessen

--
Fabrice Niessen
Leuven, Belgium




Re: [O] Presentation on Org-mode at Dunkerque (France)

2012-06-20 Thread Fabrice Niessen


Hello,

> Just to tell you that I will make a presentation on Org-mode during the LaTeX
> day in Dunkerque (FR) on Wed 13th June 2012.
>
> Here is my summary in English for the 1:30 presentation:
>
> You wish to write high-quality documents or presentations, whose
> successive versions are easy to compare (thanks to CVS, SVN or Git, for
> example)? LATEX is un-miss-able.
>
> You find, nevertheless, the syntax very heavy to write tables or to handle
> nested lists? You have problems convincing your colleagues to go the LaTeX
> route?
>
> Come then discover org-mode (http://orgmode.org/). Writing a document or a
> presentation will become as simple as an writing an email. And you inherit
> new possibilites (of which outlining, status and tags on the sections, as
> well as the advanced search functions are some examples that will be
> looked at).
>
> It will be more focused to the LaTeX exporter, of course, but I will try to
> give more incentive for making the switch!
>
> My slides will be publicly available (first in French, in English as well if
> these are judged as worthing it ;-)).

Here they are:

https://github.com/fniessen/stage-latex-dunkerque-2012

Please note that -- even if the event was on last Wed -- the slides aren't
really in a terminal state yet. In particular, some Org blocks aren't rendered
as they should because of bugs in the old LaTeX exporter. I'm sure they'll go
away with the new Beamer exporter (as it's already good when exporting to a
standard document, with the new LaTeX exporter).

Best regards,
Fabrice




[O] Presentation on Org-mode at Dunkerque (France)

2012-05-22 Thread Fabrice Niessen
Hello,

Just to tell you that I will make a presentation on Org-mode during the LaTeX
day in Dunkerque (FR) on Wed 13th June 2012.

Here is my summary in English for the 1:30 presentation:

You wish to write high-quality documents or presentations, whose
successive versions are easy to compare (thanks to CVS, SVN or Git, for
example)? LATEX is un-miss-able.

You find, nevertheless, the syntax very heavy to write tables or to handle
nested lists? You have problems convincing your colleagues to go the LaTeX
route?

Come then discover org-mode (http://orgmode.org/). Writing a document or a
presentation will become as simple as an writing an email. And you inherit
new possibilites (of which outlining, status and tags on the sections, as
well as the advanced search functions are some examples that will be
looked at).

It will be more focused to the LaTeX exporter, of course, but I will try to
give more incentive for making the switch!

My slides will be publicly available (first in French, in English as well if
these are judged as worthing it ;-)).

For subscribing to the event (limited to 100 seats), see details at:

http://stage-latex-gte.univ-littoral.fr/

Best regards,
Fabrice

-- 
Fabrice Niessen