Re: [O] org-ref code

2014-05-01 Thread Eric S Fraga
On Wednesday, 30 Apr 2014 at 16:59, John Kitchin wrote:
 Greetings,

 All the talk about citations in org-mode inspired me to finish and polish
 some code I have been working on for my group for a while on
 bibtex/reftex/org-mode integration. I packaged it up in a literate
 programming org-file here:
 https://github.com/jkitchin/jmax/blob/master/org-ref.org.

Hi John,

Thanks for this.  I'll play with it as it looks like a really nice
collection of utilities for links and I must admit that I still find I
under-use org links.  I'll post any feedback here in due course.

One quick comment: I think it's bad practice to define global bindings
for Fxx keys in a package.  Let the user define these keys outside the
package maybe?  I have F10 and F12 defined to some very common actions
for me (recentf and org-clock).

Thanks again,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



[O] [PATCH] Make the point visible when jumping to the mark

2014-05-01 Thread Ian Kelling
From 9191e4a364e251119cf8b7c72e41f6c0d09583f2 Mon Sep 17 00:00:00 2001
Message-ID: 87ha5aqa93@treetowl.lan
MIME-Version: 1.0
Content-Type: text/plain

*lisp/org.el: Advise commands which jump to the mark
---

There are several non-org commands that jump to a location and would be
unwieldy if the location remained hidden, (isearch, bookmark-jump,
save-place), but org-mode has code to fix them. In this patch, I
followed their example.

I have an emacs fsf copyright assignment completed  on file with fsf, I can
send gpg signed copy if you need it.

- Ian Kelling


 lisp/org.el |   21 +
 1 file changed, 21 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 44a4e44..9365059 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -24326,6 +24326,27 @@ To get rid of the restriction, use 
\\[org-agenda-remove-restriction-lock].
   (outline-invisible-p)))
(org-show-context 'bookmark-jump)))
 
+(eval-after-load simple
+  '(defadvice set-mark-command (after org-make-visible activate)
+ Make the point visible with `org-show-context'.
+ (org-mark-jump-unhide)))
+
+(eval-after-load simple
+  '(defadvice exchange-point-and-mark (after org-make-visible activate)
+ Make the point visible with `org-show-context'.
+ (org-mark-jump-unhide)))
+
+(eval-after-load simple
+  '(defadvice pop-global-mark (after org-make-visible activate)
+ Make the point visible with `org-show-context'.
+ (org-mark-jump-unhide)))
+
+(defun org-mark-jump-unhide ()
+  Make the point visible with `org-show-context' after jumping to the mark.
+  (when (and (derived-mode-p 'org-mode)
+(outline-invisible-p))
+(org-show-context 'mark-goto)))
+
 ;; Make session.el ignore our circular variable
 (defvar session-globals-exclude)
 (eval-after-load session
-- 
1.7.10.4




[O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Ian Kelling
From dc0b727328266785528fe160046ae1aa8df8a993 Mon Sep 17 00:00:00 2001
Message-ID: 87zjj2ous9@treetowl.lan
MIME-Version: 1.0
Content-Type: text/plain

* lisp/ob-core.el: Test that all elements are in a list are lists
instead of just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error, as in this example:
#+begin_src emacs-lisp 
'((1) 2)
#+end_src
---
 lisp/ob-core.el |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..5872b68 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2185,8 +2185,7 @@ code  the results are extracted in the syntax of the 
source
  (goto-char beg)
  (insert (concat (orgtbl-to-orgtbl
   (if (or (eq 'hline (car result))
-  (and (listp (car result))
-   (listp (cdr (car result)
+  (cl-every 'listp result))
   result (list result))
   '(:fmt (lambda (cell) (format %s cell 
\n))
  (goto-char beg) (when (org-at-table-p) (org-table-align)))
-- 
1.7.10.4




Re: [O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Achim Gratz
Ian Kelling writes:
 org-babel table output uses different formatting for a list of lists,
 but detects it incorrectly causing an error, as in this example:
 #+begin_src emacs-lisp 
 '((1) 2)
 #+end_src

So this isn't a proper table, what do you expect to happen?

 -(and (listp (car result))
 - (listp (cdr (car result)
 +(cl-every 'listp result))

This is wrong, because a table can come with any number of 'hline
symbols, so ostensibly not every element will be a listp.  Besides, you
can't use cl-every unless Org drops backwards compatibility with older
Emacsen or mandates cl-lib to be present.  Even then, you'd also need to
require cl-extra.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Ian Kelling
Achim Gratz strom...@nexgo.de writes:

 Ian Kelling writes:
 org-babel table output uses different formatting for a list of lists,
 but detects it incorrectly causing an error, as in this example:
 #+begin_src emacs-lisp 
 '((1) 2)
 #+end_src

 So this isn't a proper table, what do you expect to happen?

I expect to be able to emacs -q, make an org mode buffer containing 
that block, do ctrl-c c on it, and not have an error message pop up and
fail to have any output. What is improper about it? Would it be better
if org did not try to format it as a table?


 -   (and (listp (car result))
 -(listp (cdr (car result)
 +   (cl-every 'listp result))

 This is wrong, because a table can come with any number of 'hline
 symbols, so ostensibly not every element will be a listp.

Yes, I agree. It will have to test if elements are listp or hline. 


 Besides, you
 can't use cl-every unless Org drops backwards compatibility with older
 Emacsen or mandates cl-lib to be present.  Even then, you'd also need to
 require cl-extra.

I forgot about the multiple parts of cl. I originally wrote it without,
and can change it.



Re: [O] [babel][PATCHES] ob-R patches for review

2014-05-01 Thread Rainer M Krug
Charles C. Berry ccbe...@ucsd.edu writes:

 On Wed, 30 Apr 2014, Rainer M Krug wrote:

 Charles Berry ccbe...@ucsd.edu writes:

 Rainer M Krug Rainer at krugs.de writes:


 Hi

 Attached please find seven patches for review to implement the storing
 of org variables in their own environment and to make the org-issued R
 code look nicer in the R session.


 Rainer,


 I have suggestions and a concern.

 I suggest [...]


 That is effectively what I am doing as well, only that I am not using a
 package but an environment and add it to the search path.


 [...]

 OK. I did not study your patches closely enough. Sorry.

No problem.





 I also suggest that you introduce a customization variable to
 allow a user to turn off the functionality you have created.

 I don't think this is necessary as the behavior for the user does not
 change at all, only that it becomes safer to use org variables in R (see
 above).


 All you have to do is add this:

 (defvar org-babel-R-assign-elisp-function 'org-babel-R-assign-elisp
   Name or definition of function to handle `:var name=value'
 header args.
   )

 and change one line in org-babel-variable-assignments:R from

 (org-babel-R-assign-elisp to

(funcall org-babel-R-assign-elisp-function

 and the user can provide her own elisp assignment function.

 This gives users who want special behavior like creating something
 other than a data.frame the option of providing their own function.

This assumes, that the user knows elisp. For many customizations this is
necessary, but I would prefer a system where the user only has to
provide an R function which will be used. This offers less
customizability, but this would make it possible to use R to do the
customization. To write a new org-babel-R-assign-elisp-function would be
quite a challenge for an R programmer (like me...).

Thanks,

Rainer





 Best,


 Chuck

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgp9eNkZLoplR.pgp
Description: PGP signature


Re: [O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Ian Kelling
Ian Kelling i...@iankelling.org writes:

 Achim Gratz strom...@nexgo.de writes:

 Ian Kelling writes:
 org-babel table output uses different formatting for a list of lists,
 but detects it incorrectly causing an error, as in this example:
 #+begin_src emacs-lisp 
 '((1) 2)
 #+end_src

 So this isn't a proper table, what do you expect to happen?

 I expect to be able to emacs -q, make an org mode buffer containing 
 that block, do ctrl-c c on it, and not have an error message pop up and
 fail to have any output. What is improper about it? Would it be better
 if org did not try to format it as a table?

Actually, I see what you mean by improper.



 -  (and (listp (car result))
 -   (listp (cdr (car result)
 +  (cl-every 'listp result))

 This is wrong, because a table can come with any number of 'hline
 symbols, so ostensibly not every element will be a listp.

 Yes, I agree. It will have to test if elements are listp or hline. 


 Besides, you
 can't use cl-every unless Org drops backwards compatibility with older
 Emacsen or mandates cl-lib to be present.  Even then, you'd also need to
 require cl-extra.

 I forgot about the multiple parts of cl. I originally wrote it without,
 and can change it.

Below is a patch that addresses the 2 previously mentioned
problems. 

-- 8 --
Subject: [PATCH] Fix error prone babel table output format detection

* lisp/ob-core.el: Test that all elements are in a list are lists or
'hline instead of just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error, as in this example:
#+begin_src emacs-lisp 
'((1) 2)
#+end_src
---
 lisp/ob-core.el |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..b5b0bc7 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2184,9 +2184,16 @@ code  the results are extracted in the syntax of the 
source
 ((funcall proper-list-p result)
  (goto-char beg)
  (insert (concat (orgtbl-to-orgtbl
-  (if (or (eq 'hline (car result))
-  (and (listp (car result))
-   (listp (cdr (car result)
+(if (let ((len (length result))
+  (proper t)
+  (i 0)
+  elem)
+  (while (and proper ( i len ))
+(setq elem (nth i result))
+(unless (or (listp elem) (eq elem 
'hline))
+  (setq proper nil))
+(setq i (1+ i)))
+  proper)
   result (list result))
   '(:fmt (lambda (cell) (format %s cell 
\n))
  (goto-char beg) (when (org-at-table-p) (org-table-align)))
-- 
1.7.10.4





Re: [O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Ian Kelling
Ian Kelling i...@iankelling.org writes:
 Below is a patch that addresses the 2 previously mentioned
 problems. 

It's a bit late.  here is the same patch with correct indentation.

 -- 8 --
Subject: [PATCH] Fix error prone babel table output format detection

* lisp/ob-core.el: Test that all elements are in a list are lists or
'hline instead of just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error. An example of a block
causing an error is an emacs lisp source block containing just 1 line:
'((1) 2)
---
 lisp/ob-core.el |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..9eb2c7a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2184,9 +2184,16 @@ code  the results are extracted in the syntax of the 
source
 ((funcall proper-list-p result)
  (goto-char beg)
  (insert (concat (orgtbl-to-orgtbl
-  (if (or (eq 'hline (car result))
-  (and (listp (car result))
-   (listp (cdr (car result)
+  (if (let ((len (length result))
+(proper t)
+(i 0)
+elem)
+(while (and proper ( i len ))
+  (setq elem (nth i result))
+  (unless (or (listp elem) (eq elem 
'hline))
+(setq proper nil))
+  (setq i (1+ i)))
+proper)
   result (list result))
   '(:fmt (lambda (cell) (format %s cell 
\n))
  (goto-char beg) (when (org-at-table-p) (org-table-align)))
-- 
1.7.10.4



Re: [O] [PATCH] Fix error prone babel table output format detection

2014-05-01 Thread Ian Kelling
Ian Kelling i...@iankelling.org writes:
 It's a bit late.  here is the same patch with correct indentation.

That patch went out of it's way not to check more of the list than was
necessary, but after sending it, I kept thinking that it does extra
things which possibly negate any performance benefit of not checking the
whole list. So here is a simpler patch does the same thing, but goes
over the whole list. I'd love to hear a more experienced emacs lisper
weigh in on which is better.

-- 8 --
Subject: [PATCH] Fix error prone babel table output format detection

* lisp/ob-core.el: Test that all elements are in a list are lists or
'hline instead of just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error. An example of a block
causing an error is an emacs lisp source block containing just 1 line:
'((1) 2)
---
 lisp/ob-core.el |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..05ccb00 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2184,9 +2184,10 @@ code  the results are extracted in the syntax of the 
source
 ((funcall proper-list-p result)
  (goto-char beg)
  (insert (concat (orgtbl-to-orgtbl
-  (if (or (eq 'hline (car result))
-  (and (listp (car result))
-   (listp (cdr (car result)
+  (if (let ((proper t))
+(dolist (elem result proper)
+  (unless (or (listp elem) (eq elem 
'hline))
+(setq proper nil
   result (list result))
   '(:fmt (lambda (cell) (format %s cell 
\n))
  (goto-char beg) (when (org-at-table-p) (org-table-align)))
-- 
1.7.10.4



Re: [O] org-ref code

2014-05-01 Thread Eric S Fraga
John,

I've been playing with the package although, so far, only for
citations.  A few points:

1. Do you have any support for choosing the type of citation entry
 (i.e. \cite versus \autocite versus ...) when inserting a
 citation in the text?
 
2. You define org-link-types.  Unfortunately, this overwrites my own
 definitions, especially for cite.  I wonder whether this type
 of customisation belongs in org-ref itself.  This is similar to
 my earlier comment about key bindings, I guess. 

3. I sometimes use biblatex instead of bibtex.  As a result, I do not
 use \bibliography and use \addbibresource instead.  I have
 defined my bibliography files in org-ref-default-bibliography but
 this is only picked up on initialisation.  It is difficult to
 update this for a document in progress (I had to locally set
 reftex-default-bibliography manually).

4. The customisation interface for org-ref-default-bibliography should be
 list aware...

Otherwise, seems to working just fine.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



[O] Title of org files in github not recognized

2014-05-01 Thread Julian Gehring

Hi,

How I can convince github to recognize the '#+TITLE:' field of an 
org-file?  This should be a 'h1' heading, while it is currently treated 
as normal text (for example, see 
https://github.com/julian-gehring/vignettes/blob/master/README.org).  I 
know that this is a problem of the parsing on github's site, but is 
anyone aware of a good solution?


Best wishes
Julian




Re: [O] Title of org files in github not recognized

2014-05-01 Thread Ian Kelling
Julian Gehring julian.gehr...@gmail.com writes:

 Hi,

 How I can convince github to recognize the '#+TITLE:' field of an org-file?  
 This should be a 'h1' heading, while it is
 currently treated as normal text (for example, see 
 https://github.com/julian-gehring/vignettes/blob/master/README.org).
 I know that this is a problem of the parsing on github's site, but is anyone 
 aware of a good solution?

 Best wishes
 Julian

Use free software, then you can fix it. One example,
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md




Re: [O] Contacts/Resources/People

2014-05-01 Thread Alexander Baier
Hello Shin,

On 2014-04-30 20:17 Shin Sungmin wrote:
 But, how does it make it easier to assign a person to a task in my
 todo.org? Is there any type of auto complete functionality?

You have the function org-contacts which helps you search through your
contacts. From there you can quickly jump to the contact you want to
link, store a link to that heading `org-store-link' and insert that link
in your todo.org with `C-c C-l' and then `M-p'.

 Do I have to make a manual link to the people.org file instance to be
 able to easily access that persons contact information?

In essence this is just a plain old manual org link to the right
headline in person.org. The procedure described above is not very
automatic.

You may want to take a look at helm. Its a completion and narrowing
framework, something a bit like ido, but way more powerful. There is a
plugin for helm that lets you search/complete/narrow over the headline
of an org-file. It might even offer to execute certain actions on said
headlines such as creating and inserting a link to them.

I just heard of said plugin, but never used it. If it does indeed have
described functionality it would make linking to a contact as simple as
pressing a key binding (launching helm on people.org) typing a few
characters to narrow to the contact you want to insert and press enter
to insert said link.

HTH,
--
Alexander Baier



Re: [O] Title of org files in github not recognized

2014-05-01 Thread Sebastien Vauban
Julian Gehring wrote:
 How I can convince github to recognize the '#+TITLE:' field of an org-file?
 This should be a 'h1' heading, while it is currently treated as normal text
 (for example, see
 https://github.com/julian-gehring/vignettes/blob/master/README.org).  I know
 that this is a problem of the parsing on github's site, but is anyone aware of
 a good solution?

That was supposed to be solved.

See https://github.com/wallyqs/org-ruby/issues/3

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-ref code

2014-05-01 Thread Seb Frank
Hi Eric,

Now that you have mentioned it, do you have a good web resource / manual
for your set up, or would you mind sharing bits of it? It looks eminently
useful. I have a set up largely following this

http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

but I wouldn't know how to get some of the things you mention (type of
citation entry, biblatex vs latex etc.) to work.

Thanks,
  Seb

On Thu, May 1, 2014 at 6:01 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 John,

 I've been playing with the package although, so far, only for
 citations.  A few points:

 1. Do you have any support for choosing the type of citation entry
  (i.e. \cite versus \autocite versus ...) when inserting a
  citation in the text?

 2. You define org-link-types.  Unfortunately, this overwrites my own
  definitions, especially for cite.  I wonder whether this type
  of customisation belongs in org-ref itself.  This is similar to
  my earlier comment about key bindings, I guess.

 3. I sometimes use biblatex instead of bibtex.  As a result, I do not
  use \bibliography and use \addbibresource instead.  I have
  defined my bibliography files in org-ref-default-bibliography but
  this is only picked up on initialisation.  It is difficult to
  update this for a document in progress (I had to locally set
  reftex-default-bibliography manually).

 4. The customisation interface for org-ref-default-bibliography should be
  list aware...

 Otherwise, seems to working just fine.

 Thanks,
 eric

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11




Re: [O] org-ref code

2014-05-01 Thread John Kitchin
Thanks for the feedback. I moved the key-bindings for f10-12 out of org-ref.


On Thu, May 1, 2014 at 6:01 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 John,

 I've been playing with the package although, so far, only for
 citations.  A few points:

 1. Do you have any support for choosing the type of citation entry
  (i.e. \cite versus \autocite versus ...) when inserting a
  citation in the text?


Not at the moment. There are a few ways I can see doing this. With the
existing code, you can do M-x reftex-citation, select the format you want
and select the references. We could easily enough define additional formats
for other citation types. I found this way of inserting citations annoying,
because 99.99% of the time I want a simple cite link, and pressing  C-c ]
return regexp marking return was too much for me (




 2. You define org-link-types.  Unfortunately, this overwrites my own
  definitions, especially for cite.  I wonder whether this type
  of customisation belongs in org-ref itself.  This is similar to
  my earlier comment about key bindings, I guess.

 3. I sometimes use biblatex instead of bibtex.  As a result, I do not
  use \bibliography and use \addbibresource instead.  I have
  defined my bibliography files in org-ref-default-bibliography but
  this is only picked up on initialisation.  It is difficult to
  update this for a document in progress (I had to locally set
  reftex-default-bibliography manually).

 4. The customisation interface for org-ref-default-bibliography should be
  list aware...

 Otherwise, seems to working just fine.

 Thanks,
 eric

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



Re: [O] org-ref code

2014-05-01 Thread John Kitchin
sorry, premature send!


On Thu, May 1, 2014 at 8:36 AM, John Kitchin jkitc...@andrew.cmu.eduwrote:

 Thanks for the feedback. I moved the key-bindings for f10-12 out of
 org-ref.


 On Thu, May 1, 2014 at 6:01 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 John,

 I've been playing with the package although, so far, only for
 citations.  A few points:

 1. Do you have any support for choosing the type of citation entry
  (i.e. \cite versus \autocite versus ...) when inserting a
  citation in the text?


 Not at the moment. There are a few ways I can see doing this. With the
 existing code, you can do M-x reftex-citation, select the format you want
 and select the references. We could easily enough define additional formats
 for other citation types. I found this way of inserting citations annoying,
 because 99.99% of the time I want a simple cite link, and pressing  C-c ]
 return regexp marking return was too much for me (I cite a lot). I also
 found this method was not flexible, in the sense that it was not easy to
 add citations to an existing citation. That is why there is an ?a option to
 append citations in the code.


an alternative would be to use a prefix command that gave you an option to
change the cite format, similar to the minibuffer menu for cite links. I
have not written much prefix code before, but I will try that out.





 2. You define org-link-types.  Unfortunately, this overwrites my own
  definitions, especially for cite.  I wonder whether this type
  of customisation belongs in org-ref itself.  This is similar to
  my earlier comment about key bindings, I guess.


In the end, the link definitions can be as short as this:

#+BEGIN_SRC emacs-lisp :tangle org-ref.el
(org-add-link-type
 cite
 'org-ref-cite-onclick-minibuffer-menu
 'org-ref-cite-link-format)
#+END_SRC

I wrote this for my research group to use, and eventually the links have to
be defined somewhere. I am not sure what the best place would be. It is an
interesting issue of reproducibility though. Two people with different link
definitions would get different results.


 3. I sometimes use biblatex instead of bibtex.  As a result, I do not
  use \bibliography and use \addbibresource instead.  I have
  defined my bibliography files in org-ref-default-bibliography but
  this is only picked up on initialisation.  It is difficult to
  update this for a document in progress (I had to locally set
  reftex-default-bibliography manually).


It should be easy enough to make an addbibresource link that does the same
thing as the bibliography link. And maybe to modify the find-bibliography
code to check for that too. I have never used biblatex though, so I dont
have any experience with it.



 4. The customisation interface for org-ref-default-bibliography should be
  list aware...


I think I fixed this.



 Otherwise, seems to working just fine.

 Thanks,
 eric

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org
 release_8.2.6-923-g233c11





Re: [O] Title of org files in github not recognized

2014-05-01 Thread Julian Gehring

Hi Seb,

Nice. So it seems that github is using an older version of org-ruby.  Is 
it clear what the update policy/cycle of github for softwares like 
org-ruby is?


Best wishes
Julian


On 01.05.2014 14:17, Sebastien Vauban wrote:

Julian Gehring wrote:

How I can convince github to recognize the '#+TITLE:' field of an org-file?
This should be a 'h1' heading, while it is currently treated as normal text
(for example, see
https://github.com/julian-gehring/vignettes/blob/master/README.org).  I know
that this is a problem of the parsing on github's site, but is anyone aware of
a good solution?


That was supposed to be solved.

See https://github.com/wallyqs/org-ruby/issues/3

Best regards,
   Seb







Re: [O] org-ref code

2014-05-01 Thread Eric S Fraga
On Thursday,  1 May 2014 at 08:47, John Kitchin wrote:

[...]

Hi John,

thanks for your quick response!

 an alternative would be to use a prefix command that gave you an option to
 change the cite format, similar to the minibuffer menu for cite links. I
 have not written much prefix code before, but I will try that out.

This would be good, with many a way of stating the default one would
like?  For instance, for grant proposals, I often use autocite in
biblatex for generating citations as footnotes whereas for research
papers I use cite most often.  

 In the end, the link definitions can be as short as this:

 #+BEGIN_SRC emacs-lisp :tangle org-ref.el
 (org-add-link-type
  cite
  'org-ref-cite-onclick-minibuffer-menu
  'org-ref-cite-link-format)
 #+END_SRC

My comment was not so much the definitions you used but that you were
overwriting those that I had already defined.  Your definitions were
arguably better than mine so maybe I was being a bit picky here... :)

 I wrote this for my research group to use, and eventually the links have to
 be defined somewhere. I am not sure what the best place would be. It is an
 interesting issue of reproducibility though. Two people with different link
 definitions would get different results.

Yes, this is true but there is so much that can be customised in org
that you will never have reproducibility at this level (e.g. handling of
latex snippets, code listings, even latex classes).  I would leave
something like this to a separate set of code that is not part of
org-ref.

 It should be easy enough to make an addbibresource link that does the same
 thing as the bibliography link. And maybe to modify the find-bibliography
 code to check for that too. I have never used biblatex though, so I dont
 have any experience with it.

I have only started using biblatex recently, and that was because I
wanted to use autocite.  The only change I had to make was \bibliography
to \addbibresource.  I still use the same bibtex files.  Of course,
others may be making more effective use of biblatex...

 4. The customisation interface for org-ref-default-bibliography should be
  list aware...

 I think I fixed this.

Thanks!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



Re: [O] org-ref code

2014-05-01 Thread Eric S Fraga
On Thursday,  1 May 2014 at 08:21, Seb Frank wrote:
 Hi Eric,

 Now that you have mentioned it, do you have a good web resource / manual
 for your set up, or would you mind sharing bits of it? It looks eminently
 useful. I have a set up largely following this

 http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

 but I wouldn't know how to get some of the things you mention (type of
 citation entry, biblatex vs latex etc.) to work.

Hi Seb,

I don't have much of a setup, actually.  You already do much more than I
do!

I tend to do things manually until somebody else posts something useful
already configured (like John has just done).  For instance, I simply
use C-c C-l to store a link manually, typing in the type of link (cite
vs autocite) and the bibtex key directly.  I used to use reftex with org
but found it got in the way although I cannot now remember how or why!

When in doubt, I resort to LaTeX.  I have been using LaTeX for 30 years
or so.  The beauty of org is that it allows me to fall back to LaTeX
without any hassle for most things.

I suffer (or have suffered badly in the past) from RSI so my main
concern is having things that are easy to type but paradoxically I don't
have a problem with typing normal text and I do touch type quickly.  I
use evil mode which means I can avoid most chorded commands.  To use
org, I have bound many org commands to keys in the normal state mode map
in evil.  For instance, I have org-export-dispatch assigned to , e so
I can export to pdf and view it in emacs by typing , e l o.  I have
similar key bindings for many org commands.  For instance, t on a
headline will invoke org-todo.  , n and , p move to next and
previous headlines,  to org-metaleft, etc.  The aim is to avoid all
or most M- and especially M-S- key bindings which kill my hands.  C- is
not so bad but I avoid even these if possible.

I use a few yasnippets and make significant use of abbrev mode in Emacs
to help with typing.  I also make use of org's own snippet system.

Sorry I cannot be more helpful and thanks for the link to your setup.

eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



[O] Heading vs Headline

2014-05-01 Thread Sebastien Vauban
Hello,

Particularly in the Org Beamer documentation, headlines seems the most
used term while there is a tag ignoreheading...

I have the impression that both terms (heading and headline) are
synonyms. Though, is this true, or is there some subtle nuance?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Agenda view in Fortnight mode

2014-05-01 Thread J. David Boyd

I've searched the docs, and looked through my .emacs and custom.el files, but
I don't see anywhere that lets me set the default view for the Agenda.

I would like it to come up in Fortnight mode as a default.  Is this possible?

Thanks.

Dave in New Port Richey, FL




Re: [O] Title of org files in github not recognized

2014-05-01 Thread Sebastien Vauban
Julian Gehring wrote:
 On 01.05.2014 14:17, Sebastien Vauban wrote:
 Julian Gehring wrote:
 How I can convince github to recognize the '#+TITLE:' field of an
 org-file?  This should be a 'h1' heading, while it is currently
 treated as normal text (for example, see
 https://github.com/julian-gehring/vignettes/blob/master/README.org).
 I know that this is a problem of the parsing on github's site, but
 is anyone aware of a good solution?

 That was supposed to be solved.

 See https://github.com/wallyqs/org-ruby/issues/3

 Nice. So it seems that github is using an older version of org-ruby.  Is it
 clear what the update policy/cycle of github for softwares like org-ruby is?

Unfortunately, not to me... ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Agenda view in Fortnight mode

2014-05-01 Thread Sebastien Vauban
J. David Boyd wrote:
 I've searched the docs, and looked through my .emacs and custom.el files, but
 I don't see anywhere that lets me set the default view for the Agenda.

 I would like it to come up in Fortnight mode as a default.  Is this possible?

(setq org-agenda-span 'fortnight)

?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Agenda view in Fortnight mode

2014-05-01 Thread Charles Millar

Dave,

J. David Boyd wrote:


I've searched the docs, and looked through my .emacs and custom.el files, but
I don't see anywhere that lets me set the default view for the Agenda.

I would like it to come up in Fortnight mode as a default.  Is this possible?



I can't recall if there is specific fortnight span. I use

(setq org-agenda-span 14)

Charlie Millar



Re: [O] Agenda view in Fortnight mode

2014-05-01 Thread J. David Boyd
Sebastien Vauban sva-n...@mygooglest.com writes:

 J. David Boyd wrote:
 I've searched the docs, and looked through my .emacs and custom.el files,
 but I don't see anywhere that lets me set the default view for the Agenda.

 I would like it to come up in Fortnight mode as a default.  Is this
 possible?

 (setq org-agenda-span 'fortnight)

 ?

 Best regards,
   Seb

Ah, 'span' Thanks!

Dave




Re: [O] Agenda view in Fortnight mode

2014-05-01 Thread J. David Boyd
Charles Millar mill...@verizon.net writes:

 Dave,

 J. David Boyd wrote:

 I've searched the docs, and looked through my .emacs and custom.el files,
 but I don't see anywhere that lets me set the default view for the Agenda.

 I would like it to come up in Fortnight mode as a default.  Is this
 possible?


 I can't recall if there is specific fortnight span. I use

 (setq org-agenda-span 14)

 Charlie Millar

That works!  Thanks,

Dave




Re: [O] org-ref code

2014-05-01 Thread John Kitchin
I implemented some of this partially. I made it so you can specify the
default cite link in a user variable, with a default of cite. When you type
C-c ], this format will automatically be used. If you want to choose
another format, type C-u C-c ] which will prompt you for a type, and then
use the reftex-citation command to complete it. I added most of the
citation types I know of to this. Most of those will not work with
completion. I did make the cite link completion function use the default
link type, so that it will at least do what you want. I might add
completion functions for all the link types, it is just a lot of cut and
pasting. and I do not use that much. I just wanted to see if I could do it
;)

I also added addbibresource as a link type, and updated org-ref to be able
to use that instead of bibliography.

Thanks for the ideas!

John

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



On Thu, May 1, 2014 at 9:30 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 On Thursday,  1 May 2014 at 08:47, John Kitchin wrote:

 [...]

 Hi John,

 thanks for your quick response!

  an alternative would be to use a prefix command that gave you an option
 to
  change the cite format, similar to the minibuffer menu for cite links. I
  have not written much prefix code before, but I will try that out.

 This would be good, with many a way of stating the default one would
 like?  For instance, for grant proposals, I often use autocite in
 biblatex for generating citations as footnotes whereas for research
 papers I use cite most often.

  In the end, the link definitions can be as short as this:
 
  #+BEGIN_SRC emacs-lisp :tangle org-ref.el
  (org-add-link-type
   cite
   'org-ref-cite-onclick-minibuffer-menu
   'org-ref-cite-link-format)
  #+END_SRC

 My comment was not so much the definitions you used but that you were
 overwriting those that I had already defined.  Your definitions were
 arguably better than mine so maybe I was being a bit picky here... :)

  I wrote this for my research group to use, and eventually the links have
 to
  be defined somewhere. I am not sure what the best place would be. It is
 an
  interesting issue of reproducibility though. Two people with different
 link
  definitions would get different results.

 Yes, this is true but there is so much that can be customised in org
 that you will never have reproducibility at this level (e.g. handling of
 latex snippets, code listings, even latex classes).  I would leave
 something like this to a separate set of code that is not part of
 org-ref.

  It should be easy enough to make an addbibresource link that does the
 same
  thing as the bibliography link. And maybe to modify the find-bibliography
  code to check for that too. I have never used biblatex though, so I dont
  have any experience with it.

 I have only started using biblatex recently, and that was because I
 wanted to use autocite.  The only change I had to make was \bibliography
 to \addbibresource.  I still use the same bibtex files.  Of course,
 others may be making more effective use of biblatex...

  4. The customisation interface for org-ref-default-bibliography should
 be
   list aware...
 
  I think I fixed this.

 Thanks!
 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11



[O] Export as ASCII whilst respecting current fill column

2014-05-01 Thread Miguel Guedes
Using org-mode version 7.93f, when exporting to ASCII it doesn't respect
the current fill column. Can this be enforced?

Also, I've noticed that org doesn't remove verbatim tags (=verbatim=)
but removes BEGIN_EXAMPLE blocks and presumably other BEGIN_xxx blocks;
is this by design?




Re: [O] Contacts/Resources/People

2014-05-01 Thread Shin Sungmin



	
	
Yes, i meant org-contacts.I created a file I called people.org and I input some contacts in it.But, how does it make it easier to assign a person to a task in my todo.org? Is there any type of auto complete functionality? Do I have to make a manual link to the people.org file instance to be able to easily access that persons contact information?Thank you in advance./Sungminps.This mailings list / community is awesome!- 원본 메일 -보낸사람: Alexander Baier lexi.ba...@gmail.com받는사람 : Sungmin sungsongs...@daum.net참조 : emacs-orgmode@gnu.org날짜: 2014년 5월 01일 목요일, 02시 55분 36초 +0900제목: Re: Contacts/Resources/People

	On 2014-04-30 18:28 Sungmin wrote:
 Julien Danjou have made contacts.el, might to be a better fit.

If you are referring to org-contacts than this might just be your
solution. Or at least the best way possible to integrate your contacts
with other org-related things.

With org-contacts your address book is just a plain old org-mode
formatted file, where headlines with a certain property (the default is
EMAIL I think) are treated as contacts. For example:

#+begin_src org
* Person A
  :PROPERTIES:
  :EMAIL: a...@example.com
  :END:
** Notes Meeting
- foo
- bar...

* Person B
  :PROPERTIES:
  :EMAIL: b...@example.com
  :END:
#+end_src

As you can see, notes are easily added as you are just editing your
plain old org-file. Adding people to a certain event may just be as
simple as linking to the headline corresponding to the person. About
tracking time, there should be functionality for this built in - I am no
expert there.

HTH,
-- 
Alexander Baier

		






 			  


 



Re: [O] [Orgmode] POLL: the 40 variables project

2014-05-01 Thread Shin Sungmin



	
	
Thank you for your quick reply Eric.Using M-x customize-group RET org RET was one of the first things I did. Maybe even the first thing I did in Org-mode to try to get a better understanding about what is possible.It is really amazing how customizable everything is. That is why it would be so helpful to see what other peoples settings are on a big scale.Quite randomly, I looked at Sacha Chua's blog after posting this and noticed that an additional survey actually happened in end of 2013 with a lot ofresponseshttp://sachachua.com/blog/2013/11/emacs-org-mode-customization-survey/But it seems like the result was never published.Well, I will just look through the old survey (http://orgmode.org/worg/org-configs/org-customization-survey.html) I am sure that will give a ton of ideas as well.With kind regards,Sungmin- 원본 메일 -보낸사람: Eric S Fraga e.fr...@ucl.ac.uk받는사람 : Sungmin sungsongs...@daum.net참조 : emacs-orgmode@gnu.org날짜: 2014년 5월 01일 목요일, 00시 50분 23초 +0900제목: Re: [O] [Orgmode] POLL: the 40 variables project

	On Wednesday, 30 Apr 2014 at 15:29, Sungmin wrote:

[...]

 808 options. That is Scary, and daunting and amazing. 

 I have just started to scratch on the surface of orgmode. Maybe 8 months of 
 usage. For me it would help me understand what I should look into next.

Although I am not in general a big fan of emacs's customize feature, it
can be very useful for exploring options in packages.  I would suggest
you do

  M-x customize-group RET org RET

and browse...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11

		






 			  


 



Re: [O] [RFC] Rewrite indentation functions

2014-05-01 Thread Nicolas Goaziou
Nicolas Goaziou n.goaz...@gmail.com writes:

 I would like to install the following patches on master. Basically, they
 consist of a full rewrite of all indentation related functions, with
 explicit rules in docstrings, comprehensive test suites, and backed-up
 by the parser.

Here's an update for the first patch, in order to fix behaviour after
a footnote definition or an inline task. More specifically, in the
following example,

  * Headline
  
Some

  [fn:1] Definition


  XParagraph

line with point at X should be indented like Some, since it doesn't
belong to the footnote definition.


Regards,

-- 
Nicolas Goaziou
From 283588780f3ee64c87b336ff65fc758047687923 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Tue, 24 Dec 2013 14:04:17 +0100
Subject: [PATCH 1/3] Rewrite `org-indent-line'

* lisp/org.el (org--get-expected-indentation): New function.
(org-indent-line): Use new function.  Also merge functionalities with
`org-src-native-tab-command-maybe'.

* lisp/org-src.el (org-src-native-tab-command-maybe): Remove function.

* testing/lisp/test-org.el (test-org/indent-line): New test.
---
 lisp/org-src.el  |  11 --
 lisp/org.el  | 273 ---
 testing/lisp/test-org.el | 143 +
 3 files changed, 308 insertions(+), 119 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 791f934..8d60f68 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -895,17 +895,6 @@ issued in the language major mode buffer.
   :version 24.1
   :group 'org-babel)
 
-(defun org-src-native-tab-command-maybe ()
-  Perform language-specific TAB action.
-Alter code block according to what TAB does in the language major mode.
-  (and org-src-tab-acts-natively
-   (org-in-src-block-p)
-   (not (equal this-command 'org-shifttab))
-   (let ((org-src-strip-leading-and-trailing-blank-lines nil))
-	 (org-babel-do-key-sequence-in-edit-buffer (kbd TAB)
-
-(add-hook 'org-tab-first-hook 'org-src-native-tab-command-maybe)
-
 (defun org-src-font-lock-fontify-block (lang start end)
   Fontify code block.
 This function is called by emacs automatic fontification, as long
diff --git a/lisp/org.el b/lisp/org.el
index 44a4e44..3db6e86 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22206,116 +22206,173 @@ hierarchy of headlines by UP levels before marking the subtree.
 
 ;;; Indentation
 
+(defun org--get-expected-indentation (element contentsp)
+  Expected indentation column for current line, according to ELEMENT.
+ELEMENT is an element containing point.  CONTENTSP is non-nil
+when indentation is to be computed according to contents of
+ELEMENT.
+  (let ((type (org-element-type element))
+	(start (org-element-property :begin element)))
+(org-with-wide-buffer
+ (cond
+  (contentsp
+   (case type
+	 (footnote-definition 0)
+	 ((headline inlinetask nil)
+	  (if (not org-adapt-indentation) 0
+	(let ((level (org-current-level)))
+	  (if level (1+ level) 0
+	 ((item plain list)
+	  (org-list-item-body-column
+	   (or (org-element-property :post-affiliated element) start)))
+	 (otherwise
+	  (goto-char start)
+	  (org-get-indentation
+  ((memq type '(footnote-definition headline inlinetask nil)) 0)
+  ;; First paragraph of a footnote definition or an item.
+  ;; Indent like parent.
+  (( (line-beginning-position) start)
+   (org--get-expected-indentation
+	(org-element-property :parent element) t))
+  ;; At first line: indent according to previous sibling, if any,
+  ;; ignoring footnote definitions and inline tasks, or parent's
+  ;; contents.
+  ((= (line-beginning-position) start)
+   (catch 'exit
+	 (while t
+	   (if (= (point-min) start) (throw 'exit 0)
+	 (goto-char (1- start))
+	 (let ((previous (org-element-at-point)))
+	   (while (let ((parent (org-element-property :parent previous)))
+			(and parent
+			 (setq previous parent)
+			 (= (org-element-property :end parent) start
+	   (cond ((or (not previous)
+			  ( (org-element-property :end previous) start))
+		  (throw 'exit (org--get-expected-indentation previous t)))
+		 ((memq (org-element-type previous)
+			'(footnote-definition inlinetask))
+		  (setq start (org-element-property :begin previous)))
+		 (t (goto-char (org-element-property :begin previous))
+			(throw 'exit (org-get-indentation)
+  ;; Otherwise, move to the first non-blank line above.
+  (t
+   (beginning-of-line)
+   (let ((pos (point)))
+	 (skip-chars-backward  \r\t\n)
+	 (cond
+	  ;; Two blank lines end a footnote definition or a plain
+	  ;; list.  When we indent an empty line after them, the
+	  ;; containing list or footnote definition is over, so it
+	  ;; qualifies as a previous sibling.  Therefore, we indent
+	  ;; like its first line.
+	  ((and (memq type '(footnote-definition plain-list))
+		( (count-lines (point) pos) 2))
+	   (goto-char 

Re: [O] org-babel, lilypond, tables

2014-05-01 Thread Grant Rettke
Perhaps you are doing cutting edge stuff that no one has even
considered before, which is great.
Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gret...@acm.org | 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 Wed, Apr 30, 2014 at 6:27 PM, Steven Arntson
ste...@stevenarntson.com wrote:
 I'm wondering if someone could tell me if this idea is impossible. I'm
 trying to find a way to leverage org-tables in a document containing
 lilypond markup for a piano part such that both staves occupy the same
 line, visually (instead of the lefthand notes occupying the top of the
 doc and the righthand notes occupying the bottom). Right now I'm
 accomplishing this with a vertical split in the buffer, which works, but
 is clunky. I'd love to do something like:

 left hand | right hand  | measure
 --+-+--
 a16 b c d e f g a |  a8 b d f e4~  |  %m1
 c e gs4 a8 g|  e g c'4 g d b   |  %m2

 et cetera. This is easy enough to lay out in org mode, and it would look
 terrific, but I can't imagine how to accomplish it such that the
 lilypond markup would respond correctly to ly-tangle without bracketing
 every cell in #+BEGIN_SRC LILYPOND #END_SRC (and even then, I doubt what
 would happen.)

 Maybe the answer is You just have to get used to the way things are,
 which is fine--even that would at least get me thinking about other
 problems.

 Thank you!
 Steven Arntson





Re: [O] Contacts/Resources/People

2014-05-01 Thread Charles Millar
A discussion about contacts, etc. from a couple of years ago might be 
useful.


http://comments.gmane.org/gmane.emacs.orgmode/57972

Charlie Millar



[O] :mkdirp without path specifier

2014-05-01 Thread Michael Weylandt
If it intended that setting :mkdirp yes should break tangling with 
'directory-free' file names?

I.e., should
#
#+TITLE: test
#+BEGIN_SRC python :mkdirp yes :tangle test.py
print 1+2
#+END_SRC
###

tangle without error? 

It currently doesn't because (file-name-directory test.py), which is nil, 
gets passed to make-directory, which throws an error. 

The manual is ambiguous, stating only that the arg to :tangle is interpreted as 
a path. A strict reading says this shouldn't work, regardless of :mkdirp, since 
we're not giving a path, but I think the understood ./ of :mkdirp no is 
reasonable. 

I'm not in a position to do so now, but can send a one-line patch to fix 
tonight if wanted. 

Michael


[O] How to load and use Github Flavored Markdown exporter?

2014-05-01 Thread Grant Rettke
Hi,

Org-mode version 8.2.6. Loaded from MELPA org-2014-04-28.

The nice github flavored markdown package is in there ox-gfm.el.

My goal is to use it to do a Markdown export of an org document
instead of the vanilla exporter.

In an attempt to do so, I ran at startup:


(require 'ox-gfm)


And did an org dispatch export for Markdown.

Wondering if this is the correct approach?

I don't have any expectations for how the file is generated; I just
want to know that I am loading and using it correctly.

Alternately

Regards,

Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gret...@acm.org | 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] [Orgmode] POLL: the 40 variables project

2014-05-01 Thread Nick Dokos
Shin Sungmin sungsongs...@daum.net writes:

 Well, I will just look through the old survey
 (http://orgmode.org/worg/org-configs/org-customization-survey.html) I
 am sure that will give a ton of ideas as well.


Beware however that some variable names (in particular, export-related
ones) were changed in org 8.x, whereas the survey is for an earlier
version (IIRC).

Nick





[O] How to use ispell in org mode: goal is to skip source blocks

2014-05-01 Thread Grant Rettke
Hi,

Org 8.2.6, Emacs 24.3.1.

Working on large literate org documents takes a lot longer when ispell
reports errors in the source
code. My goal is to avoid spell checking anything inside the source
blocks. For example the following lines would not be spell checked at
all:

#+begin_src emacs-lisp
(require 'expand-region)
(global-set-key (kbd C-=) 'er/expand-region)
#+end_src

Looking around on the org list via a search engine did not yield many results.

Regards,

Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
gret...@acm.org | 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] Export as ASCII whilst respecting current fill column

2014-05-01 Thread Charles Berry
Miguel Guedes miguel.a.guedes at gmail.com writes:

 
 Using org-mode version 7.93f, when exporting to ASCII it doesn't respect
 the current fill column. Can this be enforced?


Miguel,

Upgrade to current org-mode (version 8.2.6) before you do anything else.

Then modify `org-ascii-text-width' to suit your needs.

,
| 
| org-ascii-text-width is a variable defined in `ox-ascii.el'.
| Its value is 72
| 
|   Automatically becomes buffer-local when set.
| 
| Documentation:
| Maximum width of exported text.
| This number includes margin size, as set in
| `org-ascii-global-margin'.
| 
| You can customize this variable.
`

 
 Also, I've noticed that org doesn't remove verbatim tags (=verbatim=)
 but removes BEGIN_EXAMPLE blocks and presumably other BEGIN_xxx blocks;
 is this by design?
 
 


Same deal - upgrade. Then =xyz= becomes `xyz' on export.

HTH,

Chuck




Re: [O] How to load and use Github Flavored Markdown exporter?

2014-05-01 Thread Charles Berry
Grant Rettke gcr at wisdomandwonder.com writes:

 
 Hi,
 
 Org-mode version 8.2.6. Loaded from MELPA org-2014-04-28.
 
 The nice github flavored markdown package is in there ox-gfm.el.
 
 My goal is to use it to do a Markdown export of an org document
 instead of the vanilla exporter.
 
 In an attempt to do so, I ran at startup:
 
 
 (require 'ox-gfm)
 
 
 And did an org dispatch export for Markdown.
 
 Wondering if this is the correct approach?
 
 I don't have any expectations for how the file is generated; I just
 want to know that I am loading and using it correctly.
 

If, after loading ox-gfm, this:

C-c C-e g G


pops up a buffer, then you are on the right track. If the export menu has no 

[g] Export to Github Flavored Markdown

choices, then something is amiss.


C- C-e m char is the wrong path.

HTH,

Chuck






[O] [PATCH] Fix capture to make it save the point location

2014-05-01 Thread Alex Kosorukoff
Hello:

this is another small patch to org-capture.el to make sure that after
completion it returns to the same place from where it was invoked. This way
users won't loose track of where they were before capturing something. The
minimal setup to reproduce the case where capture fails to return to the
place of its invocation is attached.

Best,
Alex
From ac50a5300e35d7abd5f50317069b2a795fde4ad8 Mon Sep 17 00:00:00 2001
From: Alex Kosorukoff a...@3form.com
Date: Mon, 17 Mar 2014 12:56:09 -0700
Subject: [PATCH] fix org-capture error The mark is not set now, so there is no region

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

diff --git a/lisp/org.el b/lisp/org.el
index dc4f2cc..bc5a69e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14611,7 +14611,7 @@ When JUST-ALIGN is non-nil, only align tags.
 When JUST-ALIGN is 'ignore-column, align tags without trying to set
 the column by ignoring invisible text.
   (interactive P)
-  (if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
+  (if (and (mark t) (org-region-active-p) org-loop-over-headlines-in-active-region)
   (let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
 		'region-start-level 'region))
 	org-loop-over-headlines-in-active-region)
-- 
1.7.0.4

;; capmove.el org-mode capture moving the point in a buffer
;; $ emacs -Q -l capfail.el

(unless window-system
  (insert This test needs window-system, exiting...)
  (sleep-for 3)
  (kill-emacs))

(setq inhibit-splash-screen t)
(add-to-list 'load-path ~/.emacs.d/org/lisp)
(require 'org)
(setq org-capture-templates
  '((t Todo entry (file todo.org) * TODO %^{Title}\n  %?)))
(define-key global-map (kbd C-c c) 'org-capture)

(switch-to-buffer test.org)
(insert we start here and do some editing\n) (goto-char 0)
(select-frame (make-frame))
(goto-char (point-max))
(dotimes (n 5)
(insert (format %d\n n))
(sit-for 1))
(insert now we invoke capture here)
(sit-for 1)

(setq last-kbd-macro [?\C-c ?c ?t ?t ?e ?s ?t return return])
(sleep-for 3) (kmacro-call-macro nil)
(insert note that capture had already moved the point\n)
(insert to the top of the file in this buffer\n\n)
(sit-for 3)
(insert so we end up in a different place when we finish\n)
(insert even if we abort it with C-c C-k)
(sit-for 3)
(setq last-kbd-macro [?\C-c ?\C-k])
(sleep-for 3) (kmacro-call-macro nil)
(provide 'capmove)



Re: [O] [PATCH] Fix capture to make it save the point location

2014-05-01 Thread Alex Kosorukoff
sorry, I accidentally sent my previous patch. This is the one that belongs
here.


On Thu, May 1, 2014 at 7:00 PM, Alex Kosorukoff a...@3form.com wrote:

 Hello:

 this is another small patch to org-capture.el to make sure that after
 completion it returns to the same place from where it was invoked. This way
 users won't loose track of where they were before capturing something. The
 minimal setup to reproduce the case where capture fails to return to the
 place of its invocation is attached.

 Best,
 Alex

From cf97dd81aa94510e5dcd5be478b515c732cd93d4 Mon Sep 17 00:00:00 2001
From: Alex Kosorukoff a...@3form.com
Date: Thu, 1 May 2014 18:50:43 -0700
Subject: [PATCH] org-capture: fix org-capture to make it save the point position

* lisp/org-capture.el (org-capture-fill template) can change the point
  position in the buffer where capture was invoked, so user may not return
  to the same place after capture completion
---
 lisp/org-capture.el |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index c053640..1e3ae5b 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -584,7 +584,9 @@ of the day at point (if any) or the current HH:MM time.
 			 (org-current-time)))
 	(org-capture-set-target-location)
 	(condition-case error
-	(org-capture-put :template (org-capture-fill-template))
+	(org-capture-put :template
+			 (save-excursion
+			   (org-capture-fill-template)))
 	  ((error quit)
 	   (if (get-buffer *Capture*) (kill-buffer *Capture*))
 	   (error Capture abort: %s error)))
-- 
1.7.0.4



Re: [O] Export as ASCII whilst respecting current fill column

2014-05-01 Thread Miguel Guedes
Charles,

Thanks very much for the tips -- they certainly helped!

Miguel


On 02/05/14 00:56, Charles Berry wrote:
 Miguel Guedes miguel.a.guedes at gmail.com writes:
 

 Using org-mode version 7.93f, when exporting to ASCII it doesn't respect
 the current fill column. Can this be enforced?

 
 Miguel,
 
 Upgrade to current org-mode (version 8.2.6) before you do anything else.
 
 Then modify `org-ascii-text-width' to suit your needs.
 
 ,
 | 
 | org-ascii-text-width is a variable defined in `ox-ascii.el'.
 | Its value is 72
 | 
 |   Automatically becomes buffer-local when set.
 | 
 | Documentation:
 | Maximum width of exported text.
 | This number includes margin size, as set in
 | `org-ascii-global-margin'.
 | 
 | You can customize this variable.
 `
 
  
 Also, I've noticed that org doesn't remove verbatim tags (=verbatim=)
 but removes BEGIN_EXAMPLE blocks and presumably other BEGIN_xxx blocks;
 is this by design?


 
 
 Same deal - upgrade. Then =xyz= becomes `xyz' on export.
 
 HTH,
 
 Chuck
 
 
 





Re: [O] Is org-protocol working on Fedora?

2014-05-01 Thread Brady Trainor

On 04/30/2014 05:55 PM, Brady Trainor wrote:

Hi, I was curious if anyone had org-protocol working on Fedora.

...

 It's working in Opera on Fedora.

Brady





Re: [O] [RFC] Rewrite indentation functions

2014-05-01 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 I would like to install the following patches on master. Basically, they
 consist of a full rewrite of all indentation related functions, with
 explicit rules in docstrings, comprehensive test suites, and backed-up
 by the parser.

Wish I was competent to actually review this, but... In lieu of that,
I'd be happy to run it and report errors. If you think a separate
testing branch is warranted, that might be an idea. Otherwise I'd say
let it drop and we'll pick up the pieces :)

 The following changes in `org-indent-line' are expected:

   1. Indentation of the first line of an element should be, when
  applicable, relative to the /first line/ of the element before.
  Therefore, in the following example

  Some long paragraph
with multiple line

XAnother paragraph

  indenting line starting with X will align it with Some, not
  with.  This is consistent with plain lists

  - A list with some
long paragraph

XAnother paragraph

  where last line should be indented like -, not long.

   2. It should be possible to indent example block, verse block or
  export block contents, as `org-indent-line' usually happens on
  behalf of the user, who is assumed to know what he is doing.

  Though, this will not be the case in `org-indent-region', as
  changes could happen without the user knowing about it (e.g., when
  indenting a complete, mostly hidden, buffer).

   3. It should be possible to indent fixed-width areas.

 `org-indent-region' also applies on hidden lines, with a few exceptions,
 as explained above. Also, it should be a lot faster when
 `org-src-tab-acts-natively' is non-nil, and complete without errors. It
 could be made faster, but the main bottleneck in this function is now
 `org-edit-src-code', which will need to be revamped at some point.

 Internally, `org-src-native-tab-command-maybe' is merged into
 `org-indent-line' since this should be a core feature, not something
 installed via a hook.


 WDYT?


 Regards,




Re: [O] Title of org files in github not recognized

2014-05-01 Thread Waldemar Quevedo
Hi, yes this issue would be fixed once Github upgrades the Ruby
implementation of the parser.

To upgrade the version it takes making a pull request to the github/markup
repository so that they bump the version and do the release, but it takes
some time before the upgrade is validated (security checks, etc...)
There another couple of issues that I would like it that they make it to
Github, so once having those tackled I'll see if I can ask one of the
maintainers to help out planning for an update soon.

Cheers


On Fri, May 2, 2014 at 12:21 AM, Sebastien Vauban
sva-n...@mygooglest.comwrote:

 Julian Gehring wrote:
  On 01.05.2014 14:17, Sebastien Vauban wrote:
  Julian Gehring wrote:
  How I can convince github to recognize the '#+TITLE:' field of an
  org-file?  This should be a 'h1' heading, while it is currently
  treated as normal text (for example, see
  https://github.com/julian-gehring/vignettes/blob/master/README.org).
  I know that this is a problem of the parsing on github's site, but
  is anyone aware of a good solution?
 
  That was supposed to be solved.
 
  See https://github.com/wallyqs/org-ruby/issues/3
 
  Nice. So it seems that github is using an older version of org-ruby.  Is
 it
  clear what the update policy/cycle of github for softwares like org-ruby
 is?

 Unfortunately, not to me... ;-)

 Best regards,
   Seb

 --
 Sebastien Vauban