[O] Resolving conflicts with ediff and folding

2015-04-20 Thread Suvayu Ali
Hi,

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

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

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

Any thoughts, ideas?


Footnotes:

[1] I guess I can advice ediff*, but compiling a comprehensive list of
all such functions might be bit of a chore.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Sparse tree for undated TODOs, or hierachical agenda?

2015-04-20 Thread Nikolaus Rath
Hi,

On Apr 17 2015, Nikolaus Rath nikol...@rath.org wrote:
 However, for me the global todo list in the Agenda very hard to digest
 (even when excluding sublevels), so I'd rather have a view that
 conserves the document structure.

 Is there a way to create a sparse tree that shows only undated TODOs
 (i.e., excludes anything that scheduled or has a deadline)?

 Or, alternatively, is there a way to generate an Agenda view that
 preserves the outline of the document (i.e., TODO items are grouped by
 their headings)?

Really no one has any suggestion?

Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

 »Time flies like an arrow, fruit flies like a Banana.«



Re: [O] Resolving conflicts with ediff and folding

2015-04-20 Thread Charles C. Berry

On Tue, 21 Apr 2015, Suvayu Ali wrote:


Hi,

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

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

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

Any thoughts, ideas?


Did you see this thread:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html

??

HTH,

Chuck




Re: [O] How to deal with conflicting org-toc?

2015-04-20 Thread Leo Ufimtsev
I've contacted the author about it. In the mean time I pulled the repo, renamed 
all org-toc to org-dyn-toc and got it to work. It would be nice to have a 
long-term fix for it I guess.

Leo Ufimtsev | Intern Software Engineer @ Eclipse Team


- Original Message -
From: Rasmus ras...@gmx.us
To: emacs-orgmode@gnu.org
Sent: Friday, April 17, 2015 11:52:40 AM
Subject: Re: [O] How to deal with conflicting org-toc?

Leo Ufimtsev lufim...@redhat.com writes:

 Is three any way to resolve this without forking and renaming the variables?

Not that I know of.  Perhaps you can fix the github package?

—Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio





Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Yeah, I though of that, but that require us to maintain a list of latex
 math environments, which may or may not be annoying.

Well, if an environment is not recognized as a math one, it still gets
a label. So, that's not a big deal to miss some of them.

 If we add such a variable where should it live? org.el or ox-latex.el?

ox-latex.el. This is a hack. There's no need to leak it elsewhere.

Regards,



Re: [O] Bug: HTML export ignoring CUSTOM_ID properties

2015-04-20 Thread Daniel Clemente
El Sat, 18 Apr 2015 15:57:15 +0200 Rasmus va escriure:
 
  Note that this also breaks any CSS styling for the section with the
  CUSTOM_ID (which I also use).  If I used a CUSTOM_ID because wanted a
  swanky background for the heading saying Bill Clinton, the current
  export not only doesn't use that ID, it doesn't encompass the heading
  with his name in.
 

I was also bit by that CUSTOM_ID change. I'm not using CSS to style an element, 
like #clinton in your example, but in some places I want to define an ID 
#clinton so that I can build a URL like myweb.com/presidents/#clinton (instead 
of, say, /presidents/#orgheadline515).


I also saw this change (diff format):

-div id=outline-container-sec-1-4-3-1-2 class=outline-6
-h6 id=sec-1-4-3-1-2span class=section-number-61.4.3.1.2/span tercer 
error con stash/h6
+div id=outline-container-orgheadline129 class=outline-6
+h6 id=orgheadline129span class=section-number-61.4.3.1.2/span tercer 
error con stash/h6

The #sec-1-4-3-1-2 format was better. If I delete section 1.4.3.1.2, section 
1.5 is still called 1.5, that's good. With a flat numbering like 
#orgheadline129, deleting any headline would change the IDs of all headers 
after it. And what's the use of IDs if they're not permanent?





[O] fr: consistent list style

2015-04-20 Thread Samuel Wales
  - i wonder if it might
+ be good to optionally make shift right
  - change bullet style for the + line above and the * line below
* consistently so they do not get out of sync?



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Can we have conditional dependence on texmathp?

 I guess it doesn't hurt. You need to declare it as an external function
 in order to silence byte-compiler, tho.

You are right.  Thanks.

 If so, maybe something like the attached, though the latex-environment
 part is ugly.

 Another option is to simply extract environment from :value and decide
 if it is a math environment or not. This is what `texmathp' does (i.e.,
 `texmathp-tex-commands-default') although the list is configurable
 (through `texmathp-tex-commands').

 Nesting is not a problem here since you're only interested if the
 top-most environment.

Yeah, I though of that, but that require us to maintain a list of latex
math environments, which may or may not be annoying.  If we add such a
variable where should it live?  org.el or ox-latex.el?

—Rasmus

-- 
This message is brought to you by the department of redundant departments



[O] Extending the @@html: making for other content ?

2015-04-20 Thread Olivier Berger
Hi.

I wonder whether the @@html:...@@ syntax for embedding raw HTML is
extensible/customizable, for instance for embedding other stuff.

I imagine one could use @@rdf:...@@ for instance.

How would one do that ?

I can't figure out much doc or matching sources to check for hints.

Thanks in advance.

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)




Re: [O] Agenda fails to display

2015-04-20 Thread Sharon Kimble
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Sharon Kimble boudic...@skimble.plus.com writes:

 A problem has developed overnight where I am not able to display my
 usual 3-week agenda. I can display a list of TODOs but no display of
 agenda. When I try C-c a a It displays 21 days-agenda (W17-W19):
 and nothing else. But, it does throw up this debug info, rather long
 unfortunately, but I'll put it at the end.

 This is with org-version Org-mode version 8.2.10 (release_8.2.10 @
 /home/boudiccas/git/org-mode/lisp/) which I cloned on the 18th
 April.

 My last action on my organiser file was to change the date of a
 scheduled task.

 How can I get it working properly again please?

 Thanks
 Sharon.

 Debugger entered--Lisp error: (void-variable org-ts-regexp-inactive)
   (format ^[ ]*-[ ]+\\(?:State \%s\.*%s%s\\) (regexp-opt
 org-done-keywords) org-ts-regexp-inactive (let ((value (cdr (assq (quote
 done) org-log-note-headings (if (not value)  (concat \\|
 (org-replace-escapes (regexp-quote value) (cons (cons %d
 org-ts-regexp-inactive) (cons (cons %D org-ts-regexp) (cons ...
 ...
   (let* ((maxdays (+ org-habit-preceding-days
   org-habit-following-days)) (reversed org-log-states-order-reversed)
   (search (if reversed (quote re-search-forward) (quote
   re-search-backward))) (limit (if reversed end (point))) (count 0)
   (re (format ^[]*-[]+\\(?:State \%s\.*%s%s\\)
   (regexp-opt org-done-keywords) org-ts-regexp-inactive (let ((value
   (cdr ...))) (if (not value)  (concat \\| (org-replace-escapes
   ... ...))) (if reversed nil (goto-char end)) (while (and (
   count maxdays) (funcall search re limit t)) (setq closed-dates (cons
   (time-to-days (org-time-string-to-time (or
   (org-match-string-no-properties 1) (org-match-string-no-properties
   2 closed-dates)) (setq count (1+ count

 This change was introduced in e4da74c452f945274a8586be2803ed6b3a31b0bc,
 which is in master brach, not maint. For some reason, it seems you are
 using a version of org-habit.el that doesn't belong to Org 8.2.10.

Thanks for this Nicholas.

I've just checked and the version of org-habit.el is dated 18th
April, the same time and date as when I cloned the repo.

I cloned using this command -

╭
│git clone git://orgmode.org/org-mode.git
╰

I've just done a git-check which shows -

--8---cut here---start-8---
[boudiccas:Mon Apr 20 13:51:49 @~/git/org-mode]$ [5050]; git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
--8---cut here---end---8---

If I do git describe it then shows

╭
│release_8.3beta-1051-g4ee8f4f
╰

So I've done git checkout maint which then shows

--8---cut here---start-8---
Branch maint set up to track remote branch maint from origin.
Switched to a new branch 'maint'
--8---cut here---end---8---

So I did make autoloads, closed emacs, restarted emacs, and the
agenda now displays perfectly. So thanks, everything is now working
well again.

I've deliberately been a bit long-winded in my reply, so that other
folk in the same problem can see what to do to get things working
again. 

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.7, emacs 24.5.50.1


signature.asc
Description: PGP signature


Re: [O] Agenda fails to display

2015-04-20 Thread Nicolas Goaziou
Hello,

Sharon Kimble boudic...@skimble.plus.com writes:

 A problem has developed overnight where I am not able to display my
 usual 3-week agenda. I can display a list of TODOs but no display of
 agenda. When I try C-c a a It displays 21 days-agenda (W17-W19):
 and nothing else. But, it does throw up this debug info, rather long
 unfortunately, but I'll put it at the end.

 This is with org-version Org-mode version 8.2.10 (release_8.2.10 @
 /home/boudiccas/git/org-mode/lisp/) which I cloned on the 18th
 April.

 My last action on my organiser file was to change the date of a
 scheduled task.

 How can I get it working properly again please?

 Thanks
 Sharon.

 Debugger entered--Lisp error: (void-variable org-ts-regexp-inactive)
   (format ^[ ]*-[]+\\(?:State \%s\.*%s%s\\) (regexp-opt 
 org-done-keywords) org-ts-regexp-inactive (let ((value (cdr (assq (quote 
 done) org-log-note-headings (if (not value)  (concat \\| 
 (org-replace-escapes (regexp-quote value) (cons (cons %d 
 org-ts-regexp-inactive) (cons (cons %D org-ts-regexp) (cons ... ...
   (let* ((maxdays (+ org-habit-preceding-days
   org-habit-following-days)) (reversed org-log-states-order-reversed)
   (search (if reversed (quote re-search-forward) (quote
   re-search-backward))) (limit (if reversed end (point))) (count 0)
   (re (format ^[ ]*-[]+\\(?:State \%s\.*%s%s\\)
   (regexp-opt org-done-keywords) org-ts-regexp-inactive (let ((value
   (cdr ...))) (if (not value)  (concat \\| (org-replace-escapes
   ... ...))) (if reversed nil (goto-char end)) (while (and (
   count maxdays) (funcall search re limit t)) (setq closed-dates (cons
   (time-to-days (org-time-string-to-time (or
   (org-match-string-no-properties 1) (org-match-string-no-properties
   2 closed-dates)) (setq count (1+ count

This change was introduced in e4da74c452f945274a8586be2803ed6b3a31b0bc,
which is in master brach, not maint. For some reason, it seems you are
using a version of org-habit.el that doesn't belong to Org 8.2.10.

Regards,

-- 
Nicolas Goaziou



[O] Colorization/masking of @@html: @@ in emacs editing mode ?

2015-04-20 Thread Olivier Berger
Hi.

The '@@html:...@@' markers allow to embed raw HTML. Unfortunately, they
are not rendered in any special way in the Emacs editing mode, AFAIU.

It would be interesting, I think, to be able to colorize them, and/or
mask them somehow visually, to not clutter the plain org editing.

I haven't found instructions for reporting feature requests for org, so
feel free to direct me to a more appropriate venue.

Hope ths helps.

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)




Re: [O] Error when using org-ctrl-c-ctrl-c to add tags

2015-04-20 Thread Rasmus
Hi,

Rasmus ras...@gmx.us writes:

 I still don't know how to reproduce the error.  I have tried with Emacs
 24.4 and the git version.

Sorry for the noise.  This should be fixed now.

Thanks,
Rasmus

-- 
I feel emotional landscapes they puzzle me



Re: [O] HTML + RDFa export/publishing ?

2015-04-20 Thread Olivier Berger
Hi.

John Kitchin jkitc...@andrew.cmu.edu writes:

 Can you give us an example of what you are trying to do? I don't think
 org-mode supports this rich of behavior out of the box, but see
 http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
 for an example idea of what you could imagine doing with a link type
 approach that could be inline with text.


I've tried applying your link type approach, but (as reported in the
blog comments too), I get :
 \nil[nil][nil]{kitchin-2010}
instead of the expected :
 \cite[See for example][page 47]{kitchin-2010}

Any clue what's wrong ?

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)



[O] org-table relative reference questions

2015-04-20 Thread Jeffrey Brent McBeth
I'm looking for a way to reference a row or column on both the left side and 
right side of a table formula that is easily manipulable.  

At first, I thought the hline references would work for me @I..@II, except they 
cannot be used on the left side of an equation.  I hoped that maybe named 
fields would work (^,_), but those are apparently value aliases and not 
location references.

Essentially, I want to keep a single table in which I can enter and calculate 
data, and limit the computation to start at a given row that I change as I go 
along.  Maybe I'm simply using the wrong tool for this, excel is certainly not 
capable; so if org-table isn't either, it certainly doesn't lessen it.

#+BEGIN_EXAMPLE

| F |  A |  B |  C |
|---+++|
| _ | tA | tB | tC |
|   |  1 |  3 | 42 |
|   |  2 |  4 | 69 |
|---+++|
| # ||||
#+TBLFM=@$2=vsum(@tA..@II)::$tC=$-2+$-1

| F |  A |  B |  C |
|---+++|
|   |  1 |  3 | 42 |
| _ | tA | tB | tC |
|   |  2 |  4 | 69 |
|---+++|
| # ||||
#+TBLFM=@$2=vsum(@tA..@II)::$tC=$-2+$-1

#+END_EXAMPLE




-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] Extending the @@html: making for other content ?

2015-04-20 Thread Rasmus
Hi,

Olivier Berger olivier.ber...@telecom-sudparis.eu writes:

 I wonder whether the @@html:...@@ syntax for embedding raw HTML is
 extensible/customizable, for instance for embedding other stuff.

AFAIK, for all backends, @@BACKEND: code-snippet@@ will work.

 I imagine one could use @@rdf:...@@ for instance.

Maybe a macro would be better?

 How would one do that ?

See e.g. org-latex-export-snippet.

 I can't figure out much doc or matching sources to check for hints.

They are called export-snippets.

Hope it helps,
Rasmus

-- 
It was you, Jezebel, it was you




Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 However, tab:orgtable1 or sec:orgheadline1 are fine, IMO, since
 org part can keep the label out of userland.

 That's fine with me as well.

 Fair enough. Do you want to take care of extending `org-latex--label'
 appropriately?

Can we have conditional dependence on texmathp?  If so, maybe something
like the attached, though the latex-environment part is ugly.

Results areq pretty ugly.  E.g. for headline, table, figure, latex-math
env, latex-env:

\ref{sec:orgheadline1}, \ref{tab:orgtable1}, \ref{fig:orgparagraph1},
\ref{eq:orglatexenvironment1}, \ref{orglatexenvironment2}

—Rasmus

-- 
Vote for proprietary math!
From cc2c027ab611c3abcdc5c7cac46b6f45d682657f Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Mon, 20 Apr 2015 15:06:55 +0200
Subject: [PATCH] ox-latex: Use standard LaTeX label prefixes.

* ox-latex.el (org-latex--label): Use standard LaTeX prefixes.
---
 lisp/ox-latex.el | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 2727f1c..075f4e4 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1067,7 +1067,22 @@ Eventually, if FULL is non-nil, wrap label within \\\label{}\.
 	  (and (or user-label force)
 	   (if (and user-label (plist-get info :latex-prefer-user-labels))
 		   user-label
-		 (org-export-get-reference datum info)
+		 (concat (case type
+			   (headline sec:)
+			   (table tab:)
+			   (latex-environment
+			(and (featurep 'texmathp)
+ (with-temp-buffer
+   (insert (org-element-property :value datum))
+   (goto-char (point-min))
+   (search-forward } nil t)
+   (latex-mode)
+   (texmathp))
+ eq:))
+			   (paragraph
+			(when (org-element-property :caption datum)
+			  fig:)))
+			 (org-export-get-reference datum info))
 (cond ((not full) label)
 	  (label (format \\label{%s}%s
 			 label
-- 
2.3.5



Re: [O] Error when using org-ctrl-c-ctrl-c to add tags

2015-04-20 Thread Rasmus
Hi,

Marc Ihm m...@ihm.name writes:

 Okay, this one only tries to fix, what seems broken ...
 Could someone please check ?

Please run pull the latest version and create your patch using git am.

I still don't know how to reproduce the error.  I have tried with Emacs
24.4 and the git version.

Combining your two diffs I get:

diff --git a/lisp/org.el b/lisp/org.el
index 8a00847..f440382 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10512,11 +10512,11 @@ from.
  (listp (second args)))
 'org-iswitchb-completing-read)
(t (or (and (boundp 'completing-read-function)
-   completing-read-function)
-  'completing-read)))
+   completing-read-function))
+  'completing-read))
   (concat (car args))

which seems wrong (notice that the or becomes irrelevant).

What is completing-read-function?

Thanks,
Rasmus

-- 
You people at the NSA are becoming my new best friends!



Re: [O] Resume: Squeezing lines tighter in LaTeX output?

2015-04-20 Thread Eric S Fraga
On Friday, 17 Apr 2015 at 22:20, Peter Davis wrote:
 Thanks. I've had some success with these headers:

[...]

 #+LATEX_HEADER: \setlength{\headsep}{0pt}
 #+LATEX_HEADER: \setlength{\topskip}{0pt}
 #+LATEX_HEADER: \setlength{\topmargin}{0pt}
 #+LATEX_HEADER: \setlength{\topsep}{-10pt}

[...]

You may wish to consider using the geometry package to set up the page
instead of settings lengths directly.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9



Re: [O] [RFC] Org linting library

2015-04-20 Thread Nicolas Goaziou
Charles C. Berry ccbe...@ucsd.edu writes:

  - orphaned affiliated keywords

 This generates an orphaned keyword warning, but seems innocuous and is 
 what babel renders.

 #+NAME: abc
 #+BEGIN_SRC emacs-lisp
 nil #+END_SRC

 #+RESULTS: abc

Indeed, it is innocuous. It is meant to catch, e.g.,

  #+CAPTION: my table

  | table with a spurious newline above |

This check has a low trust level so false positive are OK.

  - wrong header arguments in src blocks

 IFF the header args are in the #+BEGIN_SRC line.

 #+HEADER lines and header-arg properties are not screened AFAICS.

Indeed. Here's an update.

Thank you for the feedback.


Regards,
From 1b6b392f6e8e1bba68e07a36e7f9afc792e699a2 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou m...@nicolasgoaziou.fr
Date: Wed, 15 Apr 2015 22:24:15 +0200
Subject: [PATCH] Implement Org linting

* lisp/org-lint.el: New file.
---
 lisp/org-lint.el | 768 +++
 1 file changed, 768 insertions(+)
 create mode 100644 lisp/org-lint.el

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
new file mode 100644
index 000..c818ff1
--- /dev/null
+++ b/lisp/org-lint.el
@@ -0,0 +1,768 @@
+;;; org-lint.el --- Linting for Org documents-*- lexical-binding: t; -*-
+
+;; Copyright (C) 2015  Free Software Foundation
+
+;; Author: Nicolas Goaziou m...@nicolasgoaziou.fr
+;; Keywords: outlines, hypermedia, calendar, wp
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see http://www.gnu.org/licenses/.
+
+;;; Commentary:
+
+;; This library implements linting for Org syntax.  The sole public
+;; function is `org-lint', which see.
+
+;; Internally, the library defines a new structure:
+;; `org-lint-checker', with the following slots:
+
+;;   - NAME: Unique check identifier, as a symbol.  The check is done
+;; calling the function `org-lint-NAME' with one mandatory
+;; argument, the parse tree describing the current Org buffer.
+;; Such function calls are wrapped within a `save-excursion' and
+;; point is always at `point-min'.  Its return value has to be an
+;; alist (POSITION MESSAGE) when POSITION refer to the buffer
+;; position of the error, as an integer, and MESSAGE is a strings
+;; describing the error.
+
+;;   - DESCRIPTION: Summary about the check, as a string.
+
+;;   - CATEGORIES: Categories relative to the check, as a list of
+;; symbol.  They are used for filtering when calling `org-lint'.
+;; Checkers not explicitly associated to a category are collected
+;; in the `default' one.
+
+;;   - TRUST: The trust level one can have in the check.  It is either
+;; `low' or `high', depending on the heuristics implemented and
+;; the nature of the check.  This has an indicative value only and
+;; is displayed along reports.
+
+;; All checks have to be listed in `org-lint--checkers'.
+
+;; Results are displayed in a special *Org Lint* buffer with
+;; a dedicated major mode, derived from `tabulated-list-mode'.  In
+;; addition to the usual key-bindings inherited from it, C-j
+;; displays problematic line reported under point and RET jumps to
+;; it.
+
+;; Checks currently implemented are:
+
+;;   - duplicates CUSTOM_ID properties
+;;   - duplicate NAME values
+;;   - duplicate targets
+;;   - duplicate footnote definitions
+;;   - orphaned affiliated keywords
+;;   - obsolete affiliated keywords
+;;   - missing language in src blocks
+;;   - NAME values with a colon
+;;   - wrong header arguments in src blocks
+;;   - misuse of CATEGORY keyword
+;;   - coderef links with unknown destination
+;;   - custom-id links with unknown destination
+;;   - fuzzy links with unknown destination
+;;   - id links with unknown destination
+;;   - links to non-existent local files
+;;   - SETUPFILE keywords with non-existent file parameter
+;;   - INCLUDE keywords with wrong link parameter
+;;   - special properties in properties drawer
+;;   - obsolete syntax for PROPERTIES drawers
+;;   - missing definition for footnote references
+;;   - missing reference for footnote definitions
+;;   - non-footnote definitions in footnote section
+;;   - probable invalid keywords
+;;   - invalid blocks
+;;   - probable incomplete drawers
+;;   - obsolete QUOTE section
+
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'org-element)
+(require 'ox)
+(require 'ob)
+
+
+;;; Checkers
+
+(cl-defstruct (org-lint-checker (:copier nil))
+  (name 

[O] Agenda fails to display

2015-04-20 Thread Sharon Kimble
A problem has developed overnight where I am not able to display my
usual 3-week agenda. I can display a list of TODOs but no display of
agenda. When I try C-c a a It displays 21 days-agenda (W17-W19):
and nothing else. But, it does throw up this debug info, rather long
unfortunately, but I'll put it at the end.

This is with org-version Org-mode version 8.2.10 (release_8.2.10 @
/home/boudiccas/git/org-mode/lisp/) which I cloned on the 18th
April.

My last action on my organiser file was to change the date of a
scheduled task.

How can I get it working properly again please?

Thanks
Sharon.

--8---cut here---start-8---
Debugger entered--Lisp error: (void-variable org-ts-regexp-inactive)
  (format ^[   ]*-[]+\\(?:State \%s\.*%s%s\\) (regexp-opt 
org-done-keywords) org-ts-regexp-inactive (let ((value (cdr (assq (quote done) 
org-log-note-headings (if (not value)  (concat \\| (org-replace-escapes 
(regexp-quote value) (cons (cons %d org-ts-regexp-inactive) (cons (cons %D 
org-ts-regexp) (cons ... ...
  (let* ((maxdays (+ org-habit-preceding-days org-habit-following-days)) 
(reversed org-log-states-order-reversed) (search (if reversed (quote 
re-search-forward) (quote re-search-backward))) (limit (if reversed end 
(point))) (count 0) (re (format ^[   ]*-[]+\\(?:State \%s\.*%s%s\\) 
(regexp-opt org-done-keywords) org-ts-regexp-inactive (let ((value (cdr ...))) 
(if (not value)  (concat \\| (org-replace-escapes ... ...))) (if 
reversed nil (goto-char end)) (while (and ( count maxdays) (funcall search re 
limit t)) (setq closed-dates (cons (time-to-days (org-time-string-to-time (or 
(org-match-string-no-properties 1) (org-match-string-no-properties 2 
closed-dates)) (setq count (1+ count
  (let* ((scheduled (org-get-scheduled-time (point))) (scheduled-repeat 
(org-get-repeat org-scheduled-string)) (end (org-entry-end-position)) 
(habit-entry (org-no-properties (nth 4 (org-heading-components closed-dates 
deadline dr-days sr-days sr-type) (if scheduled (setq scheduled (time-to-days 
scheduled)) (error Habit %s has no scheduled date habit-entry)) (if 
scheduled-repeat nil (error Habit '%s' has no scheduled repeat period or has 
an incorrect one habit-entry)) (setq sr-days (org-habit-duration-to-days 
scheduled-repeat) sr-type (progn (string-match [\\.+]?\\+ scheduled-repeat) 
(org-match-string-no-properties 0 scheduled-repeat))) (if ( sr-days 0) nil 
(error Habit %s scheduled repeat period is less than 1d habit-entry)) (if 
(string-match /\\([0-9]+[dwmy]\\) scheduled-repeat) (progn (setq dr-days 
(org-habit-duration-to-days (match-string-no-properties 1 scheduled-repeat))) 
(if (= dr-days sr-days) (error Habit %s deadline repeat period is less than 
or equal to scheduled (%s) habit-entry scheduled-repeat)) (setq deadline (+ 
scheduled (- dr-days sr-days) (org-back-to-heading t) (let* ((maxdays (+ 
org-habit-preceding-days org-habit-following-days)) (reversed 
org-log-states-order-reversed) (search (if reversed (quote re-search-forward) 
(quote re-search-backward))) (limit (if reversed end (point))) (count 0) (re 
(format ^[   ]*-[]+\\(?:State \%s\.*%s%s\\) (regexp-opt 
org-done-keywords) org-ts-regexp-inactive (let ((value ...)) (if (not value)  
(concat \\| ...)) (if reversed nil (goto-char end)) (while (and ( count 
maxdays) (funcall search re limit t)) (setq closed-dates (cons (time-to-days 
(org-time-string-to-time (or ... ...))) closed-dates)) (setq count (1+ 
count (list scheduled sr-days deadline dr-days closed-dates sr-type))
  (save-excursion (if pom (goto-char pom)) (progn (or (org-is-habit-p (point)) 
(signal (quote cl-assertion-failed) (list (quote (org-is-habit-p (point)) 
nil) (let* ((scheduled (org-get-scheduled-time (point))) (scheduled-repeat 
(org-get-repeat org-scheduled-string)) (end (org-entry-end-position)) 
(habit-entry (org-no-properties (nth 4 (org-heading-components closed-dates 
deadline dr-days sr-days sr-type) (if scheduled (setq scheduled (time-to-days 
scheduled)) (error Habit %s has no scheduled date habit-entry)) (if 
scheduled-repeat nil (error Habit '%s' has no scheduled repeat period or has 
an incorrect one habit-entry)) (setq sr-days (org-habit-duration-to-days 
scheduled-repeat) sr-type (progn (string-match [\\.+]?\\+ scheduled-repeat) 
(org-match-string-no-properties 0 scheduled-repeat))) (if ( sr-days 0) nil 
(error Habit %s scheduled repeat period is less than 1d habit-entry)) (if 
(string-match /\\([0-9]+[dwmy]\\) scheduled-repeat) (progn (setq dr-days 
(org-habit-duration-to-days (match-string-no-properties 1 scheduled-repeat))) 
(if (= dr-days sr-days) (error Habit %s deadline repeat period is less than 
or equal to scheduled (%s) habit-entry scheduled-repeat)) (setq deadline (+ 
scheduled (- dr-days sr-days) (org-back-to-heading t) (let* ((maxdays (+ 
org-habit-preceding-days org-habit-following-days)) (reversed 
org-log-states-order-reversed) (search (if reversed 

Re: [O] HTML + RDFa export/publishing ?

2015-04-20 Thread Olivier Berger
Hi.

Olivier Berger olivier.ber...@telecom-sudparis.eu writes:

 Hi.

 John Kitchin jkitc...@andrew.cmu.edu writes:

 Can you give us an example of what you are trying to do?

 For instance, I'd like to link my WebID to publications of mine in a
 semantic way, using dcterm or FOAF vocabularies.

 This is done as RDFa by using links like :
 pspan about=#me rel=foaf:homepageThe canonical address of my
 homepage is at a
 href=http://example.com/~bob/;http://example.com/~bob//a/span

 This would ideally be encoded in org in a way that is more compact than
 this construct ;)

FYI, I've managed to render this by using the following approach :

@@html:span about=#me rel=foaf:homepage@@The canonical address of my
homepage is at [[http://example.com/~bob/]]@@html:@@/span@@

But this is not exactly compact, and suffers from inability of the
emancs org mode to colorize or mask the @@html: @@ constructs :-/

I'm still researching a more usable solution.

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)




Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 However, tab:orgtable1 or sec:orgheadline1 are fine, IMO, since
 org part can keep the label out of userland.

 That's fine with me as well.

Fair enough. Do you want to take care of extending `org-latex--label'
appropriately?

Regards,



Re: [O] [RFC] Org linting library

2015-04-20 Thread Nicolas Goaziou
Marco Wahl marcowahls...@gmail.com writes:

 I think it's too much that org-lint tries to follow ssh links.

It doesn't follow remote paths.

 2278 low   Link to non-existent local file 
 ///ssh:root@127.0.0.1#:/etc/httpd/conf/httpd.conf
  ^   ^^^

There's a bug in the parser, which doesn't know how to handle
/ssh:root@127.0.0.1#:/etc/httpd/conf/httpd.conf.

It prefixes it with //, turning it into
///ssh:root@127.0.0.1#:/etc/httpd/conf/httpd.conf. Then `org-lint'
thinks it's a local file.

The problem should be fixed in master, so you need to update Org.

Thanks for the feedback.

Regards,



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 So we could replace ^org with a mapping, e.g. headline → sec: and
 table → tab:.  Then there's the added safety of TYPE-NUMBER and the
 expected prefix.

Do you mean orgheadline1 becomes orgsec:1 and orgtable1 becomes
orgtab:1? In this case, I don't mind, as long as it is limited to
ox-latex and derived back-ends.

Regards,



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 However, tab:orgtable1 or sec:orgheadline1 are fine, IMO, since
 org part can keep the label out of userland.

That's fine with me as well.

—Rasmus


-- 
Evidence suggests Snowden used a powerful tool called monospaced fonts



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 That's what I meant.  Or rather a wrapper like org-latex--label.  A
 mapping like the one that was reverted for ox-latex only.  Or are there
 pitfalls in that approach?

 It will not give you predictability either since you cannot guess 4 in
 sec:4.

That's fine.

 Also, it is dangerous since a user could use \label{sec:4} for something
 different.

So we could replace ^org with a mapping, e.g. headline → sec: and
table → tab:.  Then there's the added safety of TYPE-NUMBER and the
expected prefix.

 What is the real benefit of sec:4 over orgheadline4? Aesthetics?

Mostly aesthetics.  sec:4 is expected, though I have no numbers to back
this claim.

I would expect breakage following the change to be pretty rare, but one
example of breakage is fancyref:

\documentclass{article}
\usepackage{fancyref}
\begin{document}
\section{h1}
\label{sec:h1}
\section{h2}
\label{orgheading2}
See \fref{sec:h1} and \fref{orgheading2}
\end{document}

 It does not IMO. I would rather not label sections manually.

 I don't understand that part. Would you mind elaborating a bit?

Given my taste for standard prefixes, I would rather not have to label
every section with some custom id to get a standard prefix in the output.

—Rasmus

-- 
I almost cut my hair, it happened just the other day



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 So we could replace ^org with a mapping, e.g. headline → sec: and
 table → tab:.  Then there's the added safety of TYPE-NUMBER and the
 expected prefix.

 Do you mean orgheadline1 becomes orgsec:1 and orgtable1 becomes
 orgtab:1? In this case, I don't mind, as long as it is limited to
 ox-latex and derived back-ends.

No, like orgheadline1 → sec:headline1 and orgtable1 → tab:table1.  It
seems a bit repetitive.

—Rasmus

-- 
Bang bang



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 No, like orgheadline1 → sec:headline1 and orgtable1 → tab:table1.  It
 seems a bit repetitive.

I think this is no good.

tab:table1 is something a user can use for its own LaTeX code, e.g. in
a latex block or environment. In this case, it might interfere with
Org's tab:table1, which could label a different element.

However, tab:orgtable1 or sec:orgheadline1 are fine, IMO, since
org part can keep the label out of userland.


Regards,



Re: [O] org-table relative reference questions

2015-04-20 Thread Jeffrey Brent McBeth
On Mon, Apr 20, 2015 at 09:35:28AM -0400, Jeffrey Brent McBeth wrote:
 I'm looking for a way to reference a row or column on both the left side and 
 right side of a table formula that is easily manipulable.  
 
 At first, I thought the hline references would work for me @I..@II, except 
 they cannot be used on the left side of an equation.  I hoped that maybe 
 named fields would work (^,_), but those are apparently value aliases and not 
 location references.

snip

To be clear, for my use case, I think functional hline references on the left 
side would be sufficient.  I started going down the ^_ route because I thought 
it might give me an out, the notation is tons messier.

Jeffrey McBeth

-- 
The man who does not read good books has no advantage over 
 the man who cannot read them.
 -- Mark Twain



Re: [O] HTML + RDFa export/publishing ?

2015-04-20 Thread John Kitchin
thanks. I fixed that. I am not sure how that happened. It had to work
right once ;)

Olivier Berger writes:

 Hi.

 John Kitchin jkitc...@andrew.cmu.edu writes:

 Can you give us an example of what you are trying to do? I don't think
 org-mode supports this rich of behavior out of the box, but see
 http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
 for an example idea of what you could imagine doing with a link type
 approach that could be inline with text.


 I've tried applying your link type approach, but (as reported in the
 blog comments too), I get :
  \nil[nil][nil]{kitchin-2010}
 instead of the expected :
  \cite[See for example][page 47]{kitchin-2010}

 Any clue what's wrong ?

 Best regards,

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Colorization/masking of @@html: @@ in emacs editing mode ?

2015-04-20 Thread John Kitchin
If you can define a regexp for those snippets, you can colorize them
like this, even getting a click function:

http://kitchingroup.cheme.cmu.edu/blog/2015/03/18/Clickable-links-for-Twitter-handles-in-Emacs/

This isn't all that portable, as others would need your code for the
colorization, but it might serve your needs.

Olivier Berger writes:

 Hi.

 The '@@html:...@@' markers allow to embed raw HTML. Unfortunately, they
 are not rendered in any special way in the Emacs editing mode, AFAIU.

 It would be interesting, I think, to be able to colorize them, and/or
 mask them somehow visually, to not clutter the plain org editing.

 I haven't found instructions for reporting feature requests for org, so
 feel free to direct me to a more appropriate venue.

 Hope ths helps.

 Best regards,

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] HTML + RDFa export/publishing ?

2015-04-20 Thread Thomas S. Dye
Aloha,

Olivier Berger olivier.ber...@telecom-sudparis.eu writes:

 Hi.

 Olivier Berger olivier.ber...@telecom-sudparis.eu writes:

 Hi.

 John Kitchin jkitc...@andrew.cmu.edu writes:

 Can you give us an example of what you are trying to do?

 For instance, I'd like to link my WebID to publications of mine in a
 semantic way, using dcterm or FOAF vocabularies.

 This is done as RDFa by using links like :
 pspan about=#me rel=foaf:homepageThe canonical address of my
 homepage is at a
 href=http://example.com/~bob/;http://example.com/~bob//a/span

 This would ideally be encoded in org in a way that is more compact than
 this construct ;)

 FYI, I've managed to render this by using the following approach :

 @@html:span about=#me rel=foaf:homepage@@The canonical address of my
 homepage is at [[http://example.com/~bob/]]@@html:@@/span@@

 But this is not exactly compact, and suffers from inability of the
 emancs org mode to colorize or mask the @@html: @@ constructs :-/

 I'm still researching a more usable solution.

Would a macro do what you want?

#+MACRO: rdfa @@html:span about=$1 rel=$2@@$3@@html:@@/span@@

{{{rdfa(#me, foaf:homepage, The canonical address of my homepage is at
[[http://example.com/~bob/]])}}}

Untested.

All the best,
Tom

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



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-20 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Can we have conditional dependence on texmathp?

I guess it doesn't hurt. You need to declare it as an external function
in order to silence byte-compiler, tho.

 If so, maybe something like the attached, though the latex-environment
 part is ugly.

Another option is to simply extract environment from :value and decide
if it is a math environment or not. This is what `texmathp' does (i.e.,
`texmathp-tex-commands-default') although the list is configurable
(through `texmathp-tex-commands').

Nesting is not a problem here since you're only interested if the
top-most environment.

WDYT?

 Results areq pretty ugly.  E.g. for headline, table, figure, latex-math
 env, latex-env:

 \ref{sec:orgheadline1}, \ref{tab:orgtable1}, \ref{fig:orgparagraph1},
 \ref{eq:orglatexenvironment1}, \ref{orglatexenvironment2}

OK.

 +(paragraph
 + (when (org-element-property :caption datum)
 +   fig:)))

Nitpick: 

  (and (org-element-property ...) fig:)
  

Regards,



Re: [O] Error when using org-ctrl-c-ctrl-c to add tags

2015-04-20 Thread Marc Ihm
Works for me too, and probably better than my suggestion :-)

best regards
Marc