[O] special status for state-log plain list elements?

2014-06-09 Thread Eric Abrahamsen
Is there any chance of building slightly on org-element's parsing of
plain-lists, so that it lists which represent state logs are somehow
noted as such? I'm imagining that `org-element-plain-list-parser' could
be augmented to provide a (:log t) property, or if we accept that
state-log lists are always unordered, the :type property could even just
be 'log.

For that it might be nice if list items knew if they were state-change
notes (State "WAIT" from "TODO", etc) or plain notes (Note taken on...
etc).

It's probably feature creep! But it would make some interesting things
easier. My most immediate use-case would be a function in the Agenda
which shows the most recent state log of the item under point. That way
you could see what an item was WAITing on, or what you're actually
supposed to do NEXT, and so on.

And, in the back of my head, I've always felt that Org should be able to
do arbitrary value logging -- sort of a generalization of org-clock.
That would be a project for a very rainy day indeed, but this would be a
bit of the groundwork done.

Anyway, let me know if this would be acceptable in principle (and to
what extent), and I can take a stab at a patch.

Eric




[O] bug#17724: 24.4.50; regression: error "`recenter'ing a window that does not display current-buffer." when opening org-mode file

2014-06-09 Thread Eli Zaretskii
> From: Nicolas Richard 
> Date: Mon, 09 Jun 2014 22:53:47 +0200
> Cc: 17...@debbugs.gnu.org, Gregor Zattler 
> 
> FWIW, there was a call to recenter which was removed recently (less than
> four weeks ago -- see
> http://permalink.gmane.org/gmane.emacs.orgmode/86259) from org-overview.
> I guess that should fix the reported bug but it's hard to tell without a
> backtrace.

I provided a full backtrace, C and Lisp, in my response.





Re: [O] When is the right time to modify the contents of org-structure-template-alist?

2014-06-09 Thread Grant Rettke
Thanks Jorge.

It turns out that the error occurred between my keyboard and my chair.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Jun 9, 2014 at 6:14 PM, Jorge A. Alfaro-Murillo
 wrote:
> Grant Rettke  writes:
>
>> Hi,
>>
>> Wanting to modify the contents of org-structure-template-alist I had
>> this code run at startup after org was required:
>>
>> (mapc (lambda (asc)
>> (let ((org-sce-dc (downcase (nth 1 asc
>>   (setf (nth 1 asc) org-sce-dc)))
>>   org-structure-template-alist)
>>
>> That didn't modify the list, though.
>>
>> When I run that code after Emacs is started up, it works as expected.
>>
>> I tried putting that code in the org mode hook too, with the same result.
>
> Hi Grant,
>
> Since org-structure-template-alist is defined in org.el, you could
> modify it after org.el loads:
>
> #+BEGIN_SRC emacs-lisp
>   (eval-after-load "org"
> '(progn
>;; modify org-structure-template-alist here
>   ))
> #+END_SRC
>
> Best,
>
> Jorge.
>
>
>



[O] bug in exporter (org-babel-exp-process-buffer)

2014-06-09 Thread Charles Berry


The use of `org-confirm-babel-evaluate' as a function breaks inline src 
blocks just as was described in this thread from last year:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00669.html

I believe that the patch by Eric Schulte in 


===
commit 6a4dfd318296925b3b895ca6ab85e31309acf84d
Author: Eric Schulte 
Date:   Sat Nov 23 12:24:34 2013 -0700


fixed export of inline src blocks

* lisp/ob-exp.el (org-babel-exp-non-block-elements): Fixed export of
  inline src blocks.
===

did the right thing back then, but the function to which it was applied was
removed later on,

I think org-babel-exp-process-buffer took over the work of the 
removed function.

I believe that Eric's patch or something like it would fix the current 
problem in org-babel-exp-process-buffer:

   (inline-src-block
-   (let* ((info (org-babel-parse-inline-src-block-match))
+   (let* ((head (match-beginning 0))
+  (info (append (org-babel-parse-inline-src-block-match)
+(list nil nil head)))
   (params (nth 2 info)))
  (setf (nth 1 info)

Can this be fixed, please?

Thanks,

Chuck





Re: [O] When is the right time to modify the contents of org-structure-template-alist?

2014-06-09 Thread Jorge A. Alfaro-Murillo
Grant Rettke  writes:

> Hi,
>
> Wanting to modify the contents of org-structure-template-alist I had
> this code run at startup after org was required:
>
> (mapc (lambda (asc)
> (let ((org-sce-dc (downcase (nth 1 asc
>   (setf (nth 1 asc) org-sce-dc)))
>   org-structure-template-alist)
>
> That didn't modify the list, though.
>
> When I run that code after Emacs is started up, it works as expected.
>
> I tried putting that code in the org mode hook too, with the same result.

Hi Grant,

Since org-structure-template-alist is defined in org.el, you could
modify it after org.el loads:

#+BEGIN_SRC emacs-lisp
  (eval-after-load "org"
'(progn
   ;; modify org-structure-template-alist here
  ))
#+END_SRC

Best,

Jorge.





[O] When is the right time to modify the contents of org-structure-template-alist?

2014-06-09 Thread Grant Rettke
Hi,

Wanting to modify the contents of org-structure-template-alist I had
this code run at startup after org was required:

(mapc (lambda (asc)
(let ((org-sce-dc (downcase (nth 1 asc
  (setf (nth 1 asc) org-sce-dc)))
  org-structure-template-alist)

That didn't modify the list, though.

When I run that code after Emacs is started up, it works as expected.

I tried putting that code in the org mode hook too, with the same result.

Suspect my ignorance is catching up with me.

Any ideas what I may be doing wrong here?

Kind regards,

Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] org version check on start

2014-06-09 Thread Grant Rettke
Thank you.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Jun 9, 2014 at 1:19 PM, Alexander Baier
 wrote:
> On 2014-06-09 02:38 Grant Rettke wrote:
>
> [...]
>
>> (when (not (string-equal (org-version) "8.2.6"))
>
>   (when (not (version= (org-version) "8.2.6"))
>
>>   (display-warning
>>'org-mode
>>(concat
>> "Insufficient requirements. Expected 8.2.6. Found " (org-version))
>>:emergency))
>
> Maybe using version= instead of string-equal to compare version string
> might save you some additional headaches ;-).
>
> HTH,
> --
> Alexander Baier



Re: [O] Is

2014-06-09 Thread Grant Rettke
Understood. Thanks Nick.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Sun, Jun 8, 2014 at 11:15 PM, Nick Dokos  wrote:
> Grant Rettke  writes:
>
>> Hi,
>>
>> When I type
>>
>> >
>> it is expanded into
>>
>> #+BEGIN_SRC
>>
>> #+END_SRC
>>
>> Is supposed to expand into upper case letters?
>>
>> For some reason, my system won't tangle blocks that are all upper
>> case, instead only all lower case is tangled.
>>
>
> All the discussion has been about changing the expansion to lower case,
> but that misses the point: why does tangling not work? AFAIK, things
> are supposed to work whether or not source blocks are demarcated with
> upper-, lower-, or mixed-case. So if it's not working for you, it's
> either a bug or it's some problem in your setup. Can you please post
> a minimal example so we can try it out and determine whether it is a
> bug?
>
>
> Thanks,
> --
> Nick
>
>
>



[O] bug#17724: 24.4.50; regression: error "`recenter'ing a window that does not display current-buffer." when opening org-mode file

2014-06-09 Thread Nicolas Richard
Bastien  writes:

> Glenn Morris  writes:
>
>> Eli Zaretskii wrote:
>>
>>> Bastien, could you please look into this?
>>
>> This is like forwarding every Emacs bug to Stefan.
>>
>> I suggest instead reassigning the bug to org-mode (or "emacs,org-mode"),
>> then simply posting a reply in the normal way. It will then go to the
>> emacs-orgmode mailing list (which is where Org bugs are supposed to go).
>>
>> (I reassigned it before sending this reply.)
>
> Thanks to both of you, I'll look into this next week.

FWIW, there was a call to recenter which was removed recently (less than
four weeks ago -- see
http://permalink.gmane.org/gmane.emacs.orgmode/86259) from org-overview.
I guess that should fix the reported bug but it's hard to tell without a
backtrace.

There's another one in org-fix-ellipsis-at-bol which might be related
(at least it has bitten me) :

(defsubst org-fix-ellipsis-at-bol ()
  (save-excursion (goto-char (window-start)) (recenter 0)))

(I have no idea how this is supposed to fix "ellipsis at bol".)

-- 
Nico.





Re: [O] Add-on: Github Flavored Markdown exporter

2014-06-09 Thread Nicolas Girard
2014-06-09 18:45 GMT+02:00 Bastien :
>
> That's because ELPA packages are made from the maint branch of Org's
> repository.
>


Hi Bastien,

ooh, I see... nevermind, thanks for your reply !

Nicolas



Re: [O] babel setup

2014-06-09 Thread Shiyuan
For me, without the setup step, python/latex doesn't work by default. `C-c
C-c`  gives me the error :
org-babel-execute-src-block: No org-babel-execute function for latex!

But with the setup step, `C-c C-c` works now.


On Mon, Jun 9, 2014 at 8:03 AM, psycho_punch 
wrote:

> Yes, I had the same problem earlier (see the thread on required
> 'ox-publish). Here's what I did:
>
> First, I noticed that the packages get loaded only after initialization,
> so I put my org-related initialization script in the after-init-hook. Then
> after other people here told me about (package-initialize), I just placed
> it somewhere in the beginning of my emacs initialization script, and it
> worked as well.
>
> I also removed a similar script for setting up babel since I noticed my
> installation works without it anyway. I think those languages are supported
> by default.
>
>
>
> On Mon, Jun 9, 2014 at 10:54 PM, Jorge A. Alfaro-Murillo <
> jorge.a.alf...@gmail.com> wrote:
>
>> Shiyuan  writes:
>>
>> > Hi all,
>> > I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
>> > I followed this instruction
>> > http://orgmode.org/worg/org-contrib/babel/languages.html#configure
>> >
>> > and added the following to my .emacs file.
>> >
>> > (org-babel-do-load-languages
>> > 'org-babel-load-languages
>> > '((python . t)
>> > (emacs-lisp . t)))
>> >
>> > After that, org-mode mysteriously switched back to the old version
>> > 7.9. Another problem is that export command C-c C-e no longer works
>> > and generates error: Symbol's function definition is void:
>> > org-defvaralias. Is there any step I missed? Thanks.
>> >
>> > Shiyuan
>>
>> Hi Shiyuan,
>>
>> Have you tried to put (package-initialize) early (say first line) in
>> your .emacs?
>>
>> Best,
>>
>> Jorge.
>>
>>
>>
>


Re: [O] babel setup

2014-06-09 Thread Shiyuan
Yes. Putting (package-initialize) immediately before the
(org-babel-do-load-languages
...) solves the problem.



On Mon, Jun 9, 2014 at 7:54 AM, Jorge A. Alfaro-Murillo <
jorge.a.alf...@gmail.com> wrote:

> Shiyuan  writes:
>
> > Hi all,
> > I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
> > I followed this instruction
> > http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> >
> > and added the following to my .emacs file.
> >
> > (org-babel-do-load-languages
> > 'org-babel-load-languages
> > '((python . t)
> > (emacs-lisp . t)))
> >
> > After that, org-mode mysteriously switched back to the old version
> > 7.9. Another problem is that export command C-c C-e no longer works
> > and generates error: Symbol's function definition is void:
> > org-defvaralias. Is there any step I missed? Thanks.
> >
> > Shiyuan
>
> Hi Shiyuan,
>
> Have you tried to put (package-initialize) early (say first line) in
> your .emacs?
>
> Best,
>
> Jorge.
>
>
>


Re: [O] babel setup

2014-06-09 Thread Shiyuan
No, I don't have anything else in my .emacs.

Thanks for the suggestion for subject line. Next time, I will write more
meaningful(and longer) subject line.




On Mon, Jun 9, 2014 at 6:48 AM, Omid  wrote:

> What else do you have in your .emacs related to Org?
>
> (BTW, it would be much better if you could write a more detailed
> subject line than "babel setup" like "Using
> org-babel-do-load-languages causes Org mode to switch to older
> version" so that the right people on the list can more easily
> prioritize answering to your email based on how urgent it is.)
>
> On 06/09/2014 01:18 AM, Shiyuan wrote:
> > Hi all,
> >   I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
> >   I followed this
> > instruction
> http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> >
> > and added the following to my .emacs file.
> >
> > (org-babel-do-load-languages
> >   'org-babel-load-languages
> >   '((python . t)
> > (emacs-lisp . t)))
> >
> > After that, org-mode mysteriously switched back to the old version 7.9.
> >  Another problem is that export command C-c C-e no longer works and
> > generates error: Symbol's function definition is void: org-defvaralias.
> > Is there any step I missed? Thanks.
> >
> > Shiyuan
> >
> >
> >
>
> --
> Omid
>
> Sent from my Emacs
> GPG: 0x371DC12B (see https://u.fsf.org/yw)
>
>


Re: [O] org version check on start

2014-06-09 Thread Alexander Baier
On 2014-06-09 02:38 Grant Rettke wrote:

[...]

> (when (not (string-equal (org-version) "8.2.6"))

  (when (not (version= (org-version) "8.2.6"))

>   (display-warning
>'org-mode
>(concat
> "Insufficient requirements. Expected 8.2.6. Found " (org-version))
>:emergency))

Maybe using version= instead of string-equal to compare version string
might save you some additional headaches ;-).

HTH,
-- 
Alexander Baier



Re: [O] Repeat work / week days

2014-06-09 Thread Jorge A. Alfaro-Murillo
Nicolas Goaziou  writes:

> It is probably because you don't need it. Syntax wise, SCHEDULED,
> DEADLINE and CLOSED can only appear once, on the line right after the
> related headline.

> There is no limitation to the number of plain timestamps under a headline.

Thanks for the clarification.

Best,

Jorge.




Re: [O] Repeat work / week days

2014-06-09 Thread Nicolas Goaziou
jorge.a.alf...@gmail.com (Jorge A. Alfaro-Murillo) writes:

> I guess if you do not plan to do start working on the task you should
> not put the SCHEDULED and just a simple timestamp. But if you plan to
> work on a task every day of the week, why shouldn't you be able to do it
> this way?

Because Org doesn't allow it. Anyway, it doesn't make sense to use
SCHEDULED here: "scheduled" has a special meaning in Org. You don't
_start_ working on a task every day. You could use plain timestamps.

> It does work, btw.

Then, beware, it is a bug and it might be fixed one day.

> Is it because it can conflict with changing TODO states?

It is probably because you don't need it. Syntax wise, SCHEDULED,
DEADLINE and CLOSED can only appear once, on the line right after the
related headline.

> Also related, if you want it to repeat in your agenda only for a certain
> period, look at org-class. For example, while I was a student I had used
> things like
>
> #+BEGIN_SRC emacs-lisp
> %%(org-class 2013 1 7 2013 4 27 2) 12:00pm-01:15pm The name of the class
> %%(org-class 2013 1 7 2013 4 27 4) 12:00pm-01:15pm The name of the class
> #+END_SRC
>
> for classes that were Tuesday and Thursday. It was also under a single
> headline. Is this, or several simple timestamps under a single headline
> also bad syntax?

There is no limitation to the number of plain timestamps under a headline.


Regards,

-- 
Nicolas Goaziou



Re: [O] Repeat work / week days

2014-06-09 Thread Jorge A. Alfaro-Murillo
Nicolas Goaziou  writes:

> This is not valid syntax. A given headline cannot have more than one
> SCHEDULED entry attached to it. Even if it works (I didn't test),
> I wouldn't count on it: this is a bug.

I guess if you do not plan to do start working on the task you should
not put the SCHEDULED and just a simple timestamp. But if you plan to
work on a task every day of the week, why shouldn't you be able to do it
this way? It does work, btw. Is it because it can conflict with changing
TODO states?

Also related, if you want it to repeat in your agenda only for a certain
period, look at org-class. For example, while I was a student I had used
things like

#+BEGIN_SRC emacs-lisp
%%(org-class 2013 1 7 2013 4 27 2) 12:00pm-01:15pm The name of the class
%%(org-class 2013 1 7 2013 4 27 4) 12:00pm-01:15pm The name of the class
#+END_SRC

for classes that were Tuesday and Thursday. It was also under a single
headline. Is this, or several simple timestamps under a single headline
also bad syntax?

Best,

Jorge.




Re: [O] Add-on: Github Flavored Markdown exporter

2014-06-09 Thread Bastien
Hi Nicolas,

Nicolas Girard  writes:

> =ox-gfm.el= didn't seem to make its way to the org+contrib package
> from Org ELPA repo. Could anyone add it ?

That's because ELPA packages are made from the maint branch of Org's
repository.

-- 
 Bastien



Re: [O] Repeat work / week days

2014-06-09 Thread Nick Dokos
Nick Dokos  writes:

> SabreWolfy  writes:
>
>> I searched here and elsewhere, and then played with various diary sexp
>> settings, but I could not find a way to repeat an entry on work/week days
>> (Monday to Friday) every week. I would like a task to appear on all Mondays
>> to Fridays. The repeat should preferably be from Monday to Tuesday, Tuesday
>> to Wednesday, etc., rather than from Monday to Monday, Tuesday to Tuesday,
>> etc., but this is not so important.
>
> IIRC, you can't have repeaters on diary sexps. You can add five
> identical entries (except for starting date) with a +1w repeater - see
> e.g.
>
> http://thread.gmane.org/gmane.emacs.orgmode/7294/focus=7296
>
> I think there is an easy way to do that but I can't put my finger on it
> right now - maybe someone will remember it and chime in.
>

I should have checked the manual :-(


(info "(org) Repeated tasks")

Last paragraph points to

`C-c C-x c' (`org-clone-subtree-with-time-shift')
 Clone a subtree by making a number of sibling copies of it.  You
 will be prompted for the number of copies to make, and you can
 also specify if any timestamps in the entry should be shifted.
 This can be useful, for example, to create a number of tasks
 related to a series of lectures to prepare.  For more details, see
 the docstring of the command `org-clone-subtree-with-time-shift'.  


Nick





Re: [O] Repeat work / week days

2014-06-09 Thread Nicolas Goaziou
Hello,

jorge.a.alf...@gmail.com (Jorge A. Alfaro-Murillo) writes:

> #+BEGIN_SRC emacs-lisp
> * Test
>   SCHEDULED: <2014-06-09 Mon +1w>
>   SCHEDULED: <2014-06-10 Tue +1w>
>   SCHEDULED: <2014-06-11 Wed +1w>
>   SCHEDULED: <2014-06-12 Thu +1w>
>   SCHEDULED: <2014-06-13 Fri +1w>
> #+END_SRC

This is not valid syntax. A given headline cannot have more than one
SCHEDULED entry attached to it. Even if it works (I didn't test),
I wouldn't count on it: this is a bug.


Regards,

-- 
Nicolas Goaziou



Re: [O] Repeat work / week days

2014-06-09 Thread Nick Dokos
SabreWolfy  writes:

> I searched here and elsewhere, and then played with various diary sexp
> settings, but I could not find a way to repeat an entry on work/week days
> (Monday to Friday) every week. I would like a task to appear on all Mondays
> to Fridays. The repeat should preferably be from Monday to Tuesday, Tuesday
> to Wednesday, etc., rather than from Monday to Monday, Tuesday to Tuesday,
> etc., but this is not so important.

IIRC, you can't have repeaters on diary sexps. You can add five
identical entries (except for starting date) with a +1w repeater - see
e.g.

http://thread.gmane.org/gmane.emacs.orgmode/7294/focus=7296

I think there is an easy way to do that but I can't put my finger on it
right now - maybe someone will remember it and chime in.

Nick




Re: [O] Stopping "done/cancelled" from showing in agenda view?

2014-06-09 Thread Nick Dokos
Nick Dokos  writes:

> Sharon Kimble  writes:
>
>> This is probably an easy one to answer, but I can't even think of
>> how to query google with it. And I can't see how to do it in the org
>> manual either!
>>
>> But, how do you stop a "done", or "cancelled" item from appearing in
>> the agenda view please? Is there some code that will auto-magically
>> do it for me please?
>>
>
> Set org-agenda-skip-scheduled-if-done to t perhaps? And similarly
> for org-agenda-skip-deadline-if-done. Not sure whether that will do
> anything for CANCELLED though.
>

Assuming that CANCELLED is a DONE state - see

  (info "(org) workflow states")

for details - the above should work for CANCELLED as well. E.g.

--8<---cut here---start->8---
#+TODO: TODO | DONE CANCELLED
* TODO foo
SCHEDULED: <2014-06-09 Mon>

* DONE bar
SCHEDULED: <2014-06-09 Mon>

* CANCELLED baz
SCHEDULED: <2014-06-09 Mon>
--8<---cut here---end--->8---

then the agenda shows all three if org-agenda-skip-scheduled-if-done is
nil, but shows only `foo' if it is set to t.

As a more general question, should the default be t for all three of the
org-agenda-skip-*-if-done variables? It seems that most people prefer
that behaviour. Perhaps we have gone around this before, but I didn't
check the archives.

Nick




Re: [O] Add-on: Github Flavored Markdown exporter

2014-06-09 Thread Nicolas Girard
2014-04-11 12:29 GMT+02:00 Bastien :
> Hi Lars,
>
>
> I added your file to /contrib/lisp in the master branch,
> thanks a lot!
>
> I updated the copyright section of the file to put you
> as the author, instead of the FSF.
>

Hi, and thanks to Lars for this nice contribution !

=ox-gfm.el= didn't seem to make its way to the org+contrib package
from Org ELPA repo. Could anyone add it ?

Thanks in advance,
cheers,

Nicolas



[O] Links Drawer

2014-06-09 Thread Leonard Randall
Hi all,
In a few functions that I use for organizing my research, I use links
drawers. This enables me to write functions that automatically insert links
in all entries matching particular criteria, or insert links directly from
the headline or anywhere else in the entry. To do this I wrote a couple of
functions. The first function is nearly identical to
org-insert-properties-drawer (I only changed a bit of regexp). It simply
inserts a LINKS drawer near the top of the entry below any clocking,
scheduling, or deadline or PROPERTIES info. It is not for interactive use.
The the other searches for a links drawer in the current entry and inserts
one if none is found. It  then inserts a link in the drawer using
org-insert-link.


Anyway I thought they might be useful for others, and I wondered if people
thought that they should be part of org-mode.  Here is the code. Don't
hesitate to give any suggestions.


(defun my-org-insert-links-drawer ()
  "Insert a links drawer near the beginning of the current entry.
Inserts drawer near beginning of entry after scheduling, deadline
and clocking info and after standard logging, property and clock
drawers."
  (org-back-to-heading t)
  (looking-at org-outline-regexp)
  (let ((indent (if org-adapt-indentation
(- (match-end 0) (match-beginning 0))
  0))
(beg (point))
(re (concat "^[ \t]*" org-keyword-time-regexp))
end hiddenp)
(outline-next-heading)
(setq end (point))
(goto-char beg)
(while (re-search-forward re end t))
(setq hiddenp (outline-invisible-p))
(end-of-line 1)
(and (equal (char-after) ?\n) (forward-char 1))
(while (looking-at "^[
\t]*\\(:CLOCK:\\|:LOGBOOK:\\|CLOCK:\\|:PROPERTIES:\\|:END:\\)")
  (if (member (match-string 1) '("CLOCK:" ":END:"))
  ;; just skip this line
  (beginning-of-line 2)
;; Drawer start, find the end
(re-search-forward "^\\*+ \\|^[ \t]*:END:" nil t)
(beginning-of-line 1)))
(org-skip-over-state-notes)
(skip-chars-backward " \t\n\r")
(if (and (eq (char-before) ?*) (not (eq (char-after) ?\n)))
(forward-char 1))
(goto-char (point-at-eol))
(let ((inhibit-read-only t)) (insert "\n:LINKS:\n:END:"))
(beginning-of-line 0)
(org-indent-to-column indent)
(beginning-of-line 2)
(org-indent-to-column indent)
(beginning-of-line 0)
(if hiddenp
(save-excursion
  (org-back-to-heading t)
  (hide-entry))
  (org-flag-drawer t

(defun my-org-insert-link-in-drawer (&optional complete-file link-location
default-description)
  "Find or create links drawer then insert link with `org-insert-link'.
The arguments COMPlETE-FILE LINK-LOCATION and DEFAULT-DESCRIPTION
are passsed on to `org-insert-link'.  See its documentation for
information on how these arguments are handled."
  (interactive)
  ;; make sure that we are currently in an entry.
  (if (not (org-before-first-heading-p))
  ;; look for links drawer.
  (save-excursion
(org-back-to-heading t)
(let ((beg (point))
  end hiddenp)
  (outline-next-heading)
  (setq end (point))
  (backward-char 1)
  (setq hiddenp (outline-invisible-p))
  (goto-char beg)
  (unless (and (re-search-forward "[ \t]*:LINKS:[ \t]*$" end t)
   (re-search-forward "[ \t]*:END:[ \t]*$" end t))
;; if no links drawer found create one.
(my-org-insert-links-drawer))
  ;; go to links drawer.
  (goto-char beg)
  (re-search-forward "[ \t]*:LINKS:[ \t]*$")
  ;; open new line and insert link.
  (newline)
  (org-insert-link complete-file link-location default-description)
  (if hiddenp
  (hide-entry
;; Give error if before first heading.
(error "Before first heading")))



All best,
Leonard


Re: [O] babel setup

2014-06-09 Thread psycho_punch
Yes, I had the same problem earlier (see the thread on required
'ox-publish). Here's what I did:

First, I noticed that the packages get loaded only after initialization, so
I put my org-related initialization script in the after-init-hook. Then
after other people here told me about (package-initialize), I just placed
it somewhere in the beginning of my emacs initialization script, and it
worked as well.

I also removed a similar script for setting up babel since I noticed my
installation works without it anyway. I think those languages are supported
by default.



On Mon, Jun 9, 2014 at 10:54 PM, Jorge A. Alfaro-Murillo <
jorge.a.alf...@gmail.com> wrote:

> Shiyuan  writes:
>
> > Hi all,
> > I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
> > I followed this instruction
> > http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> >
> > and added the following to my .emacs file.
> >
> > (org-babel-do-load-languages
> > 'org-babel-load-languages
> > '((python . t)
> > (emacs-lisp . t)))
> >
> > After that, org-mode mysteriously switched back to the old version
> > 7.9. Another problem is that export command C-c C-e no longer works
> > and generates error: Symbol's function definition is void:
> > org-defvaralias. Is there any step I missed? Thanks.
> >
> > Shiyuan
>
> Hi Shiyuan,
>
> Have you tried to put (package-initialize) early (say first line) in
> your .emacs?
>
> Best,
>
> Jorge.
>
>
>


Re: [O] Repeat work / week days

2014-06-09 Thread Jorge A. Alfaro-Murillo
Hi SabreWolfy,

SabreWolfy  writes:

> I searched here and elsewhere, and then played with various diary sexp
> settings, but I could not find a way to repeat an entry on work/week days
> (Monday to Friday) every week. I would like a task to appear on all Mondays
> to Fridays.

You could add five entries like this:

#+BEGIN_SRC emacs-lisp
* Test
  SCHEDULED: <2014-06-09 Mon +1w>
  SCHEDULED: <2014-06-10 Tue +1w>
  SCHEDULED: <2014-06-11 Wed +1w>
  SCHEDULED: <2014-06-12 Thu +1w>
  SCHEDULED: <2014-06-13 Fri +1w>
#+END_SRC

Then "Test" will appear in your agenda every Mon, Tue, Wed, Thu and Fri.

> The repeat should preferably be from Monday to Tuesday, Tuesday to
> Wednesday, etc., rather than from Monday to Monday, Tuesday to
> Tuesday, etc., but this is not so important.

This I do not understand, can you explain further?

Best,

Jorge.




Re: [O] babel setup

2014-06-09 Thread Jorge A. Alfaro-Murillo
Shiyuan  writes:

> Hi all, 
> I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA) 
> I followed this instruction
> http://orgmode.org/worg/org-contrib/babel/languages.html#configure
>
> and added the following to my .emacs file. 
>
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '((python . t)
> (emacs-lisp . t)))
>
> After that, org-mode mysteriously switched back to the old version
> 7.9. Another problem is that export command C-c C-e no longer works
> and generates error: Symbol's function definition is void:
> org-defvaralias. Is there any step I missed? Thanks. 
>
> Shiyuan 

Hi Shiyuan,

Have you tried to put (package-initialize) early (say first line) in
your .emacs?

Best,

Jorge.




Re: [O] Stopping "done/cancelled" from showing in agenda view?

2014-06-09 Thread Nick Dokos
Sharon Kimble  writes:

> This is probably an easy one to answer, but I can't even think of
> how to query google with it. And I can't see how to do it in the org
> manual either!
>
> But, how do you stop a "done", or "cancelled" item from appearing in
> the agenda view please? Is there some code that will auto-magically
> do it for me please?
>

Set org-agenda-skip-scheduled-if-done to t perhaps? And similarly
for org-agenda-skip-deadline-if-done. Not sure whether that will do
anything for CANCELLED though.

BTW, the search I did was within emacs (much more likely to be on
point than  a Google search):

  C-h v org-agenda--done TAB TAB ...

or when I'm really vague about what I'm looking for

  C-h v org-agenda- TAB

I then C-x o to the completion buffer and just use normal emacs
commands to look around.

Nick







Re: [O] Stopping "done/cancelled" from showing in agenda view?

2014-06-09 Thread Sharon Kimble
Thorsten Jolitz  writes:

> Sharon Kimble  writes:
>
>> This is probably an easy one to answer, but I can't even think of
>> how to query google with it. And I can't see how to do it in the org
>> manual either!
>>
>> But, how do you stop a "done", or "cancelled" item from appearing in
>> the agenda view please? Is there some code that will auto-magically
>> do it for me please?
>
> hmm... should be the default:
>
> ,-
> | C-c a t (org-todo-list)
> | Show the global TODO list. This collects the TODO items from all
> | agenda files (see Agenda Views) into a single buffer. By
> | default, this lists items with a state the is not a DONE state.
> `-
>
I do C-c a a which shows the 3 coming weeks and the 1 past week.

> There are:
>
> ,
> | C-h v org-not-done-keywords
> `
>
> and 
>
> ,
> | C-h v org-done-keywords
> `
>
> which are probably nil in your case.

Yes, they are.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.91.1


signature.asc
Description: PGP signature


[O] Repeat work / week days

2014-06-09 Thread SabreWolfy
I searched here and elsewhere, and then played with various diary sexp
settings, but I could not find a way to repeat an entry on work/week days
(Monday to Friday) every week. I would like a task to appear on all Mondays
to Fridays. The repeat should preferably be from Monday to Tuesday, Tuesday
to Wednesday, etc., rather than from Monday to Monday, Tuesday to Tuesday,
etc., but this is not so important.




[O] Generate directory tree for each directory, and project navigation

2014-06-09 Thread psycho_punch
I'm still working on publishing my notes as HTML. I'm organizing them in
different directories, and I want to be able generate some sort of sitemap
for each directory showing all the notes (recursively?) inside. In
addition, I'd also like to understand how :html-link-up, and
:html-link-home could work "automagically" that would work wherever a
particular note is located.


Re: [O] babel setup

2014-06-09 Thread Omid
What else do you have in your .emacs related to Org?

(BTW, it would be much better if you could write a more detailed
subject line than "babel setup" like "Using
org-babel-do-load-languages causes Org mode to switch to older
version" so that the right people on the list can more easily
prioritize answering to your email based on how urgent it is.)

On 06/09/2014 01:18 AM, Shiyuan wrote:
> Hi all, 
>   I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA) 
>   I followed this
> instruction http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> 
> and added the following to my .emacs file. 
> 
> (org-babel-do-load-languages
>   'org-babel-load-languages
>   '((python . t)
> (emacs-lisp . t)))
> 
> After that, org-mode mysteriously switched back to the old version 7.9.
>  Another problem is that export command C-c C-e no longer works and
> generates error: Symbol's function definition is void: org-defvaralias.
> Is there any step I missed? Thanks. 
> 
> Shiyuan 
> 
>
> 

-- 
Omid

Sent from my Emacs
GPG: 0x371DC12B (see https://u.fsf.org/yw)



Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread psycho_punch
Yup. That works, too.

Thanks for all the help, everyone.


On Mon, Jun 9, 2014 at 9:42 PM, Jorge A. Alfaro-Murillo <
jorge.a.alf...@gmail.com> wrote:

> psycho_punch  writes:
>
> > So I need to explicitly call (package-initialize) in init.el, probably
> > one of the, if not the, first line?
>
> Yes, I had a similar issue with different versions from ELPA, and
> applying (package-initialize) early (first line in my .emacs) fixed.
>
>
>


Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread Jorge A. Alfaro-Murillo
psycho_punch  writes:

> So I need to explicitly call (package-initialize) in init.el, probably
> one of the, if not the, first line?

Yes, I had a similar issue with different versions from ELPA, and
applying (package-initialize) early (first line in my .emacs) fixed.




Re: [O] Stopping "done/cancelled" from showing in agenda view?

2014-06-09 Thread Thorsten Jolitz
Sharon Kimble  writes:

> This is probably an easy one to answer, but I can't even think of
> how to query google with it. And I can't see how to do it in the org
> manual either!
>
> But, how do you stop a "done", or "cancelled" item from appearing in
> the agenda view please? Is there some code that will auto-magically
> do it for me please?

hmm... should be the default:

,-
| C-c a t (org-todo-list)
| Show the global TODO list. This collects the TODO items from all
| agenda files (see Agenda Views) into a single buffer. By
| default, this lists items with a state the is not a DONE state.
`-


There are:

,
| C-h v org-not-done-keywords
`

and 

,
| C-h v org-done-keywords
`

which are probably nil in your case.

-- 
cheers,
Thorsten




Re: [O] org-drill: remove duplicates

2014-06-09 Thread Alexander Baier
On 2014-06-09 13:28 Dennis Yurichev wrote:
> Hi.
>
> I just started using org-drill, which is seems pretty good.
> One thing I noticed at first: are there a way to remove duplicates which 
> will inevitably be added into the file?
>
> And/or: it's possible to sort all entries in org-file by, let's say,
> "** English" heading?
>
> I've something like...
>
> ==
> * Word
> ** English
> english word 2
> ** Russian
> russian word 2
>
> * Word
> ** English
> english word 1
> ** Russian
> russian word 1
> ==
>
> It's possible to sort file so that's entry with "english word 1" 
> will be at top?

I do not know of any build-in sorting strategy that does what you want.
But you can always write your own function and pass it along with
`C-c ^ f'.  Such a function takes no arguments and returns the sorting
key.  I put together a small function, but it does not work correctly
yet.  Maybe someone can point out why.  Or maybe this will help you as a
point to start and investigate further.

This function is called with point at the beginning of the top level
headline.  Note: I called `C-c ^ f' with an active region over the whole
file.
#+BEGIN_SRC emacs-lisp
  (defun my-sort ()
(forward-line 2)
(message "%s" (thing-at-point 'line))
(thing-at-point 'line))
#+END_SRC

Using this function with org-sort results in some weird behaviour where
only the "English" but not the "Russian" headlines are sorted.


I hope this helps a bit,
-- 
Alexander Baier



[O] Stopping "done/cancelled" from showing in agenda view?

2014-06-09 Thread Sharon Kimble
This is probably an easy one to answer, but I can't even think of
how to query google with it. And I can't see how to do it in the org
manual either!

But, how do you stop a "done", or "cancelled" item from appearing in
the agenda view please? Is there some code that will auto-magically
do it for me please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.91.1


signature.asc
Description: PGP signature


Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread Eric Abrahamsen
psycho_punch  writes:

> So I need to explicitly call (package-initialize) in init.el,
> probably one of the, if not the, first line?

If I recall correctly, the recommended thing is to put all of your
package-specific customizations either in the customize interface (in
which case they'll get applied correctly) or behind either a mode hook,
or an eval-after-load. Also see package-enable-at-startup, in the info
node (emacs) Package Installation

E

>
> On Mon, Jun 9, 2014 at 7:59 PM, Alexis  wrote:
>
>
> psycho_punch writes:
>
> > I've defined my initialization script in ~/.emacs.d/init.el;
> I'm not sure
> > if it matters. So since 'ox-publish doesn't get loaded until
> after
> > initialization, I defined:
> >
> > (add-hook 'after-init-hook (lambda() (load-file
> > "/path/to/org-publish-project.el")))
> >
> > I'm wondering when do the packages installed via
> package-install get
> > loaded...
>
> They get loaded when (package-initialize) is called in one's
> initialisation file(s).
>
>
> Alexis.
>




Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread psycho_punch
So I need to explicitly call (package-initialize) in init.el, probably one
of the, if not the, first line?


On Mon, Jun 9, 2014 at 7:59 PM, Alexis  wrote:

>
> psycho_punch writes:
>
> > I've defined my initialization script in ~/.emacs.d/init.el; I'm not sure
> > if it matters. So since 'ox-publish doesn't get loaded until after
> > initialization, I defined:
> >
> > (add-hook 'after-init-hook (lambda() (load-file
> > "/path/to/org-publish-project.el")))
> >
> > I'm wondering when do the packages installed via package-install get
> > loaded...
>
> They get loaded when (package-initialize) is called in one's
> initialisation file(s).
>
>
> Alexis.
>
>


Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread Alexis

psycho_punch writes:

> I've defined my initialization script in ~/.emacs.d/init.el; I'm not sure
> if it matters. So since 'ox-publish doesn't get loaded until after
> initialization, I defined:
>
> (add-hook 'after-init-hook (lambda() (load-file
> "/path/to/org-publish-project.el")))
>
> I'm wondering when do the packages installed via package-install get
> loaded...

They get loaded when (package-initialize) is called in one's
initialisation file(s).


Alexis.



[O] Using templates for generating HTML

2014-06-09 Thread psycho_punch
Hello everyone.

I'm wondering if there's a way to specify a template when publishing my
org-notes into HTML. For example, data like author, creator, etc. are by
default added in the postamble. I want to be able to specify what part of
the HTML page such data are placed. I tried using #+begin_html...#+end_html
template but I can't use macros inside like {{{author}}}. In addition, I
want the org-notes to be as agnostic of "publishing intent" as much as
possible, which means I'd like to use plain org-mode components (as much as
possible).

Is there a way to do this?

Thanks.


Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread psycho_punch
I've defined my initialization script in ~/.emacs.d/init.el; I'm not sure
if it matters. So since 'ox-publish doesn't get loaded until after
initialization, I defined:

(add-hook 'after-init-hook (lambda() (load-file
"/path/to/org-publish-project.el")))

I'm wondering when do the packages installed via package-install get
loaded...



On Mon, Jun 9, 2014 at 7:04 PM, Achim Gratz  wrote:

> psycho_punch writes:
> > Ok, so apparently, ox-publish doesn't get loaded after init in my
> > setup; I'm not sure why. What I have done so far is to run the publish
> > script after init using the after-init-hook. However, I feel like this
> > shouldn't be how it's done.
>
> It's hard to tell, but you're likely trying to configure Org before
> package-initialize has run.
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Factory and User Sound Singles for Waldorf Q+, Q and microQ:
> http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
>
>
>


[O] org-drill: remove duplicates

2014-06-09 Thread Dennis Yurichev
Hi.

I just started using org-drill, which is seems pretty good.
One thing I noticed at first: are there a way to remove duplicates which 
will inevitably be added into the file?

And/or: it's possible to sort all entries in org-file by, let's say, "** 
English" heading?

I've something like...

==
* Word
** English
english word 2
** Russian
russian word 2

* Word
** English
english word 1
** Russian
russian word 1
==

It's possible to sort file so that's entry with "english word 1" 
will be at top?

-- 
-- http://yurichev.com



Re: [O] Do not export single newlines to latex

2014-06-09 Thread Alexander Baier
On 2014-06-09 09:42 James Harkins wrote:
> Alexander Baier  mailbox.org> writes:
>
>> I am writing a document for which my main export target is latex.  To
>> obtain reasonable diffs wrt version control systems, I use one line
>> per sentence in addition to =visual-line-mode= as was mentioned in this
>> post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
>> 
>> The problem with this is that these newlines get translated to newlines
>> in latex aka "\\".
>
> I use the LaTeX exporter routinely, and I have never seen this behavior. For
> instance,
>
> ~~~ org input file
> * Headline
> The first sentence.
> The second sentence.
> ~~~
>
> ~~~ LaTeX export (minus preamble)
> \begin{document}
>
> \maketitle
> \tableofcontents
>
> \section{Headline}
> \label{sec-1}
> The first sentence.
> The second sentence.
> % Emacs 23.3.1 (Org mode 8.2.5f)
> \end{document}
> ~~~
>
> I also checked the customization variables in the org-export-latex group,
> and I didn't see anything immediately relevant to newline translation.
>
> So I can think of a couple of possibilities:
>
> - You might have some strange configuration lying around somewhere.
> (Additional evidence that you're seeing nonstandard behavior is that none of
> the .el files in the org distribution contain the string 'newline', let
> alone ''.)
>
> - Or you might be using a newer org than I'm using, in which case you might
> be seeing a regression bug. (As far as I know, a single line break in the
> input should definitely not translate into "\\"!!)
>
>> I want the export back end to ignore those
>> single newlines and only insert "\\" into the latex document
>> upon encountering two consecutive newlines in my org-mode file.
>
> Two consecutive line breaks in the input should be copied over directly into
> the .tex file. It's then up to LaTeX to interpret this -- per its own
> standards -- as a paragraph break. Again, "\\" would be quite
> exceptional.

You misunderstood me, maybe I didn't explain this very well. The
document doesn't literally contain "\\".  For me your
example results in the following output.

#+BEGIN_SRC latex
  \begin{document}

  \maketitle
  
  \section{Head
  \label{sec-1}
  The first sentence. \\
  The second sentence.
  % Emacs 24.3.1 (Org mode 8.2.6)
  \end{document}
#+END_SRC

Note the "\\" after "The first sentence".  That is what I want to get
rid of.

-

While producing said output I glanced at the org file's header and saw
the following line:

#+OPTIONS: \n:t

After removing that line, everything works as expected.  I cannot
remember putting this option there and thus did not think of looking for
a cause in the header of my org file.

Thank you anyway for you response!

Kind regards,
-- 
Alexander Baier



Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread Achim Gratz
psycho_punch writes:
> Ok, so apparently, ox-publish doesn't get loaded after init in my
> setup; I'm not sure why. What I have done so far is to run the publish
> script after init using the after-init-hook. However, I feel like this
> shouldn't be how it's done.

It's hard to tell, but you're likely trying to configure Org before
package-initialize has run.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] babel setup

2014-06-09 Thread Jacob Gerlach
I think this has to do with autoload, but I am not an emacs or org expert.

Try making sure that (package-initialize) comes before any org functions in
your .emacs (from the answer here

).

HTH,
Jake


On Mon, Jun 9, 2014 at 1:18 AM, Shiyuan  wrote:

> Hi all,
>   I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
>   I followed this instruction
> http://orgmode.org/worg/org-contrib/babel/languages.html#configure
>
> and added the following to my .emacs file.
>
> (org-babel-do-load-languages
>   'org-babel-load-languages
>   '((python . t)
> (emacs-lisp . t)))
>
> After that, org-mode mysteriously switched back to the old version 7.9.
>  Another problem is that export command C-c C-e no longer works and
> generates error: Symbol's function definition is void: org-defvaralias. Is
> there any step I missed? Thanks.
>
> Shiyuan
>
>
>
>


Re: [O] babel C, C++, D enhancement

2014-06-09 Thread Thierry Banel
Good !
Now I will update the documentation
(worg/org-contrib/babel/languages/ob-doc-C.org)
and... that's it.

Le 09/06/2014 01:22, Eric Schulte a écrit :
> Hi Theirry,
>
> This new patch looks great, and the test suite passes locally.  I've
> just applied it.
>
> Thanks!
> Eric
>
> also, thanks for taking the time to flesh out the commit message
>



Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread rdgoite
I've tried replacing it with 'ox-publish but it can't be found. Does it
need to be installed separately?

---
sent through my mobile
On Jun 9, 2014 1:43 PM, "Achim Gratz"  wrote:

> psycho_punch writes:
> > I have just upgraded org-mode to the latest available in ELPA.
> > According to the official documentation, the installation has to be
> > done in fresh emacs session where no org-related scripts/files have
> > been loaded. The installation is successful, and org-version reports
> > that I have updated to 8.2.6 (from 7.9.3f). However, as soon as I put
> > back my old org-related scripts, and reload emacs, I'd get 7.9.3f when
> > I run org-version. To track what's causing it I retrace my steps by
> > adding my org-related scripts one by one. I found out that when I add
> > back (require 'org-publish), the version downgrades to the built-in
> > one. I don't know why this is happening.
>
> You need to replace this with (require 'ox-publish).  As to why this is
> happening, you're sending Emacs down the wrong rabbit hole to search for
> Org and the autoload stuff will do the rest.
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Wavetables for the Terratec KOMPLEXER:
> http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
>
>
>


Re: [O] (require 'org-publish) causes downgrade in org-version

2014-06-09 Thread psycho_punch
Ok, so apparently, ox-publish doesn't get loaded after init in my setup;
I'm not sure why. What I have done so far is to run the publish script
after init using the after-init-hook. However, I feel like this shouldn't
be how it's done.


On Mon, Jun 9, 2014 at 1:42 PM, Achim Gratz  wrote:

> psycho_punch writes:
> > I have just upgraded org-mode to the latest available in ELPA.
> > According to the official documentation, the installation has to be
> > done in fresh emacs session where no org-related scripts/files have
> > been loaded. The installation is successful, and org-version reports
> > that I have updated to 8.2.6 (from 7.9.3f). However, as soon as I put
> > back my old org-related scripts, and reload emacs, I'd get 7.9.3f when
> > I run org-version. To track what's causing it I retrace my steps by
> > adding my org-related scripts one by one. I found out that when I add
> > back (require 'org-publish), the version downgrades to the built-in
> > one. I don't know why this is happening.
>
> You need to replace this with (require 'ox-publish).  As to why this is
> happening, you're sending Emacs down the wrong rabbit hole to search for
> Org and the autoload stuff will do the rest.
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Wavetables for the Terratec KOMPLEXER:
> http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
>
>
>


Re: [O] Do not export single newlines to latex

2014-06-09 Thread James Harkins
Alexander Baier  mailbox.org> writes:

> I am writing a document for which my main export target is latex.  To
> obtain reasonable diffs wrt version control systems, I use one line
> per sentence in addition to =visual-line-mode= as was mentioned in this
> post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
> 
> The problem with this is that these newlines get translated to newlines
> in latex aka "\\".

I use the LaTeX exporter routinely, and I have never seen this behavior. For
instance,

~~~ org input file
* Headline
The first sentence.
The second sentence.
~~~

~~~ LaTeX export (minus preamble)
\begin{document}

\maketitle
\tableofcontents

\section{Headline}
\label{sec-1}
The first sentence.
The second sentence.
% Emacs 23.3.1 (Org mode 8.2.5f)
\end{document}
~~~

I also checked the customization variables in the org-export-latex group,
and I didn't see anything immediately relevant to newline translation.

So I can think of a couple of possibilities:

- You might have some strange configuration lying around somewhere.
(Additional evidence that you're seeing nonstandard behavior is that none of
the .el files in the org distribution contain the string 'newline', let
alone ''.)

- Or you might be using a newer org than I'm using, in which case you might
be seeing a regression bug. (As far as I know, a single line break in the
input should definitely not translate into "\\"!!)

> I want the export back end to ignore those
> single newlines and only insert "\\" into the latex document
> upon encountering two consecutive newlines in my org-mode file.

Two consecutive line breaks in the input should be copied over directly into
the .tex file. It's then up to LaTeX to interpret this -- per its own
standards -- as a paragraph break. Again, "\\" would be quite
exceptional.

hjh




Re: [O] Can this table formula be done more efficient

2014-06-09 Thread Cecil Westerhof
2014-06-08 15:07 GMT+02:00 Eric Schulte :

> Nick Dokos  writes:
>
> > Cecil Westerhof  writes:
> >
> >> At the moment I am using the following formula:
> >> #+TBLFM: @<<$4..@>>$4 = $2 - $3 :: @>$2=vsum(@<<$2..@>>$2) ::
> >> @>$3=vsum(@<<$3..@>>$3) :: @>$4=vsum(@<<$4..@>>$4)
> >>
> >> This does what I want, but there are two things that could be improved.
> >>
> >> - The second, third and fourth formula do exactly the same, only on
> >> different columns. Could this be rewritten to one formula?
> >>
> >
> > --8<---cut here---start->8---
> > #+TBLFM: @<<$4..@>>$4 = $2 - $3 :: @>$2..$4=vsum(@<<$0..@>>$0)
> > --8<---cut here---end--->8---
> >
> > See (info "(org) References")
> >
> >> - The line becomes long and hard to evaluate for a person. Is there
> >> a possibility to put the formulas below each-other?
> >>
> >
> > I don't believe so but my belief may be out of date. It has been
> > discussed before: check the list archives.
>
> Sort of but not really.  See "Using multiple #+TBLFM lines" in the
> manual.
>

​That I found. Is handy, but only for debugging. But with the shortened
formula line, it is less of a problem.

-- 
Cecil Westerhof


Re: [O] Can this table formula be done more efficient

2014-06-09 Thread Cecil Westerhof
2014-06-08 13:53 GMT+02:00 Nick Dokos :

> Cecil Westerhof  writes:
>
> > At the moment I am using the following formula:
> > #+TBLFM: @<<$4..@>>$4 = $2 - $3 :: @>$2=vsum(@<<$2..@>>$2) ::
> @>$3=vsum(@<<$3..@>>$3) :: @>$4=vsum(@<<$4..@>>$4)
> >
> > This does what I want, but there are two things that could be improved.
> >
> > - The second, third and fourth formula do exactly the same, only on
> different columns. Could this be rewritten to one formula?
> >
>
> --8<---cut here---start->8---
> #+TBLFM: @<<$4..@>>$4 = $2 - $3 :: @>$2..$4=vsum(@<<$0..@>>$0)
> --8<---cut here---end--->8---
>

​Works like a charm. Thanks.

​


> ​​
> See
> ​​
> (info "(org) References")
>

​I should study that more diligently.

-- 
Cecil Westerhof