[O] [ox] possible to modify org-export-document-properties OTG

2015-03-16 Thread Rasmus
Hi,

Is it possible to modify or extend org-export-document-properties on the
go?  And would it be OK?  From the docstring of ox-version version of
document-properties I would say 'yes'.  I'm not sure when reading the
docstrig of org-element version.

Or should org-element-parse-secondary-string be used with appropriate
limitations?

It would be useful 'cause it's an easy way to have a property parsed.  In
ox-koma-letter.el it would make sense to make #+SUBJECT a document
property (ATM org-syntax isn't interpreted).  In some backends it would
probably also make sense to make #+KEYWORDS parsed.  I'm also working on a
patch to add #+SUBTITLE, which would also benefit from being easily added
as a document-property.

—Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.





Re: [O] Why don't datetrees use timestamps?

2015-03-16 Thread Nick Dokos
Reuben Thomas r...@sc3d.org writes:

 On 16 March 2015 at 16:52, Subhan Michael Tindall subh...@familycareinc.org 
 wrote:

 You can use a custom capture template and have timestamps of various 
 sorts inserted.

 For example, I have one datetree I use that inserts a date/time stamp 
 using %T (%t gives only date, not time)

 See the documentation for capture (hit C-c C C  to get into the customize 
 interface then scroll down)

 ​ My question was about the datetree entry headings of the form 2015-03-16 
 Monday. These aren't controlled by the template. I was interested to know 
 why these
 headings look very much like timestamps (and effectively are timestamps, 
 though at the top level they mention just a year and at the second level just 
 a year and a
 month), but aren't actual timestamps.

 Eric Fraga said I don't think it would make sense for the headlines in the 
 date-tree to have time stamps; but my question is not why they don't have 
 time stamps,
 but why they ARE not time stamps (purely in the formal sense: the information 
 they contain is already effectively a time stamp, as far as I can see).


This is third-hand knowledge and guesswork on my part, but I think that
datetrees are used for things like journals: that's what I did that
day.  Datetrees just give you a hierarchical structure of nodes for
easy navigation: you can look at your journal and open and close nodes
at will, so you can navigate to the date of interest. The fact that the
third-level headings look like timestamps is purely coincidental.

Timestamps are given to things that are going to appear in an agenda:
that's what I have to do today, tomorrow or next week. They are
completely orthogonal to datetrees in that respect.

The stuff that ends up in your journal is stuff that (mostly) did not
appear in the agenda: all the little things that you did that day,
probably unplanned (otherwise they would be in the agenda!)

Not that the headings in a datetree couldn't be made into timestamps;
but that's not what people use datetrees for[fn:1]. The one thing that
would be facilitated if they *were* timestamps, would be clicking on one
and getting the day agenda for that long-gone day, so you could
reminisce about the other things that you did that day, that did not end
up in your journal. Maybe that's enough reason to make them
timestamps, but there are other (perhaps less convenient) ways
to do that.

Of course, I may be suffering from a failure of imagination: you might
be using datetrees in a completely different way, one where having the
heading be a timestamp is a very good idea, but I can't think of any:
if you *have* something in mind, do tell.

 I was hoping to discover the rationale for the design from a developer :)

You'll have to ask Carsten about it: he invented datetrees I believe (as
well as most of org), but he does not frequent org circles much these
days.

Footnotes:

[fn:1] Remember however my caveat about third-hand knowledge and
guesswork: I don't use datetrees.

Nick




[O] org-ref update

2015-03-16 Thread John Kitchin
Hi all,

The org-ref code is finally all in emacs-lisp! This should make it much
easier to install, and is another step closer to getting org-ref into
MELPA.

The code can be found at https://github.com/jkitchin/org-ref

There are some relatively new features in org-ref if you have not been
following the bleed edge:

- New colored org-ref links to differentiate them from other
  org-links. Citations are greenish, refs and labels are maroonish.

- Context messages about links. With your cursor on a cite, ref or label
  link you will get a context message, e.g. a formatted citation, some
  context about the label a ref refers to, or a count of the labels in
  the mini-buffer.

- There is now an org-ref menu in the Org menu.

- There is a new org-ref-help function that opens an org-file of org-ref
  documentation.

- Pretty thorough integration of helm throughout org-ref, and some
  integration of hydra.

- A few utility libraries: doi-utils, isbn, wos, pubmed, arxiv,
  jmax-bibtex, sci-id, x2bib. Not all these are new, but if you didn't
  know about them, check them out.

- Cask integration. This mostly provides access to testing and
dependencies right now. org-ref is also now tested continuously at
https://travis-ci.org/jkitchin/org-ref (although, there are no tests of
substance yet, it at least checks that you can load it ;).

Read more at:
http://kitchingroup.cheme.cmu.edu/blog/2015/03/16/Update-on-org-ref-it-is-now-all-emacs-lisp/


--
Professor John Kitchin
Department of Chemical Engineering
Carnegie Mellon University
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps

2015-03-16 Thread Gustav Wikström
Hi again!

It seems my mail got stuck in some filters - I sent one from another
address yesterday. Oh well, here it is anyway!

Comments below.

 From: Nicolas Goaziou [mailto:m...@nicolasgoaziou.fr]

  + (taggroups (if downcased (mapcar (lambda (tg) (mapcar #'downcase tg))
  +  taggroups) taggroups))

 Nitpick: indentation

Can't see what's wrong.. Autoindent by emacs did this. Anyways.. I
made the if-construct clearer by adding linebreaks.

  +(delq nil (mapcar (lambda (x)
  + (if (stringp x)
  +(and (equal { (substring x 0 1))
  + (equal } (substring x -1))
  + x)
  +  x)) tags-in-group))

 Same here. TAGS-IN-GROUP should be at the same level as (lambda (x) ...)

Ok, fixed.

  +regexp-in-group
  +(mapcar (lambda (x)
  +  (substring x 1 -1)) regexp-in-group-escaped)

 Ditto.

Fixed.

  +tags-in-group
  +(delq nil (mapcar (lambda (x)
  + (if (stringp x)
  +(and (not (equal { (substring x 0 1)))
  + (not (equal } (substring x -1)))
  + x)
  +   x)) tags-in-group)))

 Ditto.

Fixed.

  +  ; If single-as-list, do no more in the while-loop...
  +  (if (not single-as-list)
  +  (progn
  +(if regexp-in-group
  + (setq regexp-in-group (concat \\| (mapconcat 'identity regexp-in-group 
  \\|
  +(setq tags-in-group (concat dir {\\ (regexp-opt tags-in-group) 
  regexp-in-group  \\}))

 You need to keep lines within 80 columns.

Trying to avoid it.

  +  (when (member tg g)
  +(mapc (lambda (x)
  +(setq current (delete x current)))
  +  g)))

 While you're at it:

   (when (member tg g) (dolist (x g) (setq current (delete x current

Ok!

  +(defun org-agenda-filter-by-tag (arg optional char exclude)
 Keep only those lines in the agenda buffer that have a specific tag.
   The tag is selected with its fast selection letter, as configured.
  -With prefix argument STRIP, remove all lines that do have the tag.
  -A lisp caller can specify CHAR.  NARROW means that the new tag should be
  -used to narrow the search - the interactive user can also press `-' or `+'
  -to switch to narrowing.
  +With a single `C-u' prefix ARG, exclude the agenda search.  With a
  +double `C-u' prefix ARG, filter the literal tag. I.e. don't filter on
   ^^^
  missing space

Fixed.

 Also, instead of hard-coding `C-u', you could use \\[universal-argument]
 within the doc string. See, for example, `org-tree-to-indirect-buffer'.

Fixed.

  + (exclude (if exclude exclude (equal arg '(4

   (exclude (or exclude (equal arg '(4

Fixed.

  +  (while (not (memq char (append '(?\t ?\r ?/ ?. ?\ ?q)
  + (string-to-list tag-chars

 For clarity, use ?\s instead of ?\

Fixed.

 Also, I suggest to move the consing before the while loop.

Good point, changed.

  + ((eq char ?. )

 Spurious space.

Fixed.

  + ((or (eq char ?\ )

 See above.

Fixed.


  +  (save-match-data
  +(let (tags-expanded)
  +  (dolist (x (cdr tags-in-group))
  + (if (and (member x taggroups-keys)
  + (not (member x work-already-expanded)))
  +(setq tags-expanded (delete-dups
  + (append (org-tags-expand x t downcased work-already-expanded)
  + tags-expanded)))
  +  (setq tags-expanded (append (list x) tags-expanded)))
  + (setq work-already-expanded (delete-dups (append tags-expanded 
  work-already-expanded
  +  (setq tags-in-group (delete-dups (cons (car tags-in-group)
  +
  tags-expanded)

 Lines too wide.

Ok, fixed kind of. I don't want to compromise on the relatively long
variable names.


  +Tags can be defined in hierarchies. A tag can be defined as a @emph{group
  ^^^
   missing space

Fixed.

   @lisp
  -(setq org-tag-alist '((:startgroup . nil)
  +(setq org-tag-alist '((:startgrouptag . nil)
 (@@read . nil)
 (:grouptags . nil)
 (@@read_book . nil)
 (@@read_ebook . nil)
  -  (:endgroup . nil)))
  +  (:endgrouptag . nil)))
   @end lisp

 The following is clearer

   @lisp
   (setq org-tag-alist '((:startgrouptag)
 (@@read)
 (:grouptags)
 (@@read_book)
 (@@read_ebook)
 (:endgrouptag)))
   @end lisp


Indeed

 However, shouldn't this example apply to the one above? (e.g.., with
 Control : Context Task tag line)?

Indeed again!


  +Searching for the tag Project will now list all tags also including regular
  +expression matches for P@@.+.  Similar for tag-searches on Vision, Goal and
  +AOF.  This can be good for example if tags for a certain project is tagged
  +with a common project-identifier, i.e. P@@2014_OrgTags.

 @samp{Project} @samp{Vision}... @samp{P@@2014_OrgTags}.

 This all looks very nice.

Thx!

 As a final 

[O] org-mobile-pull put a heading at the document head

2015-03-16 Thread James Harkins
Hi,

org-mobile-pull just messed up.

I have a top level heading, Dates. In mobileorg (android), I created a 
second-level heading under it, Entrance exams, and then a third level heading 
under that, Auditions, with a scheduled date. That was on my phone.

Later, I synced on the phone and did C-c C-x RET g, and this produced:

* Entrance exams#+LAST_MOBILE_CHANGE: 2015-03-16 21:30:23
* Dates

Instead of adding Entrance exams as the last child under Dates, it placed 
the heading (with no line break) at the beginning of the buffer, pushing 
#+LAST_MOBILE_CHANGE to the middle of the line (nonsensically).

Org-mode version 8.3beta (release_8.3beta-467-gcbb4c5 @ 
/home/dlm/share/org-mode.git/lisp/)

hjh



Re: [O] Org entry to email

2015-03-16 Thread Eric Abrahamsen
Xavier Maillard xav...@maillard.im writes:

 Hello,

 Is there something to automatically mark an org element and put it in
 an e-mail body ? This is something I am doing quite often and this
 would be really useful to me.

 Currently, I do M-h then M-w then open a new mail buffer and finally
 C-y into it. I'd probably write a macro for that, but, who knows,
 there can be a better solution ;-)

 Regards
 -- Xavier.

There's org-mime in contribute, if what you want is a text-plus-html
multipart email. I've also got a package in the repos called Gnorb,
which includes a command called gnorb-org-email-subtree, which does
pretty much what it sounds like: Exports the subtree at point into your
choice of format, and either pastes the resulting text into the email,
or attaches the resulting file to the email.

Eric




Re: [O] Org entry to email

2015-03-16 Thread John Kitchin
I have some email functions here:
https://github.com/jkitchin/jmax/blob/master/email.el
that I use with org-mode regularly.

see email-heading in particular.

Xavier Maillard writes:

 Hello,

 Is there something to automatically mark an org element and put it in
 an e-mail body ? This is something I am doing quite often and this
 would be really useful to me.

 Currently, I do M-h then M-w then open a new mail buffer and finally
 C-y into it. I'd probably write a macro for that, but, who knows,
 there can be a better solution ;-)

 Regards
 -- Xavier.

--
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] Why don't datetrees use timestamps?

2015-03-16 Thread Eric S Fraga
On Sunday, 15 Mar 2015 at 17:35, Reuben Thomas wrote:
 I'm using orgmode 8.2.10. When I use capture, the year/month/day headers
 inserted aren't timestamps; why not? Is there a way to make them
 timestamps? (I can't find anything about this in the manual.)

I do not think you can customise this aspect of org.

In any case, I don't think it would make sense for the headlines in the
date-tree to have time stamps.  The time stamps, for me, belong with
actual entries so that you can manipulate an entry consistently such as
when refiling, for instance.  Having extra time stamps on the headlines
of the tree structure would confuse things, in my opinion.

Depending on how you insert entries into a date-tree, you can try to
ensure that the entries have the relevant time stamps.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9



Re: [O] Why don't datetrees use timestamps?

2015-03-16 Thread Subhan Michael Tindall
You can use a custom capture template and have timestamps of various sorts 
inserted.
For example, I have one datetree I use that inserts a date/time stamp using %T 
(%t gives only date, not time)
See the documentation for capture (hit C-c C C  to get into the customize 
interface then scroll down)
Hope this helps!
Subhan

From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org 
[mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On Behalf Of 
Reuben Thomas
Sent: Sunday, March 15, 2015 10:36 AM
To: emacs-orgmode@gnu.org
Subject: [O] Why don't datetrees use timestamps?

I'm using orgmode 8.2.10. When I use capture, the year/month/day headers 
inserted aren't timestamps; why not? Is there a way to make them timestamps? (I 
can't find anything about this in the manual.)

--
http://rrt.sc3d.org

This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.


[O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread J. David Boyd

I have 4 files I use for work in my main org folder.  And I have a
personal.org in another folder, that is inside of Dropbox.

I created a symlink to personal.org in my main org folder.  When I start emacs
and load the agenda, it asks me

Symbolic link to Git-controlled source file; follow link? (y or n)

Is there some setting (that I can't seem to find) that will always just allow
this, rather than querying me?

Thanks,

Dave




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread Jorge A. Alfaro-Murillo

J. David Boyd writes:

I have 4 files I use for work in my main org folder.  And I have 
a personal.org in another folder, that is inside of Dropbox. 

I created a symlink to personal.org in my main org folder. When 
I start emacs and load the agenda, it asks me 

Symbolic link to Git-controlled source file; follow link? (y or 
n) 

Is there some setting (that I can't seem to find) that will 
always just allow this, rather than querying me?


#+BEGIN_SRC emacs-lisp
 (setq vc-follow-symlinks t)
#+END_SRC

BTW, I think that using dropbox in a git controlled directory 
might not be a good idea: if there are conflicts of files inside 
of the .git directory between two machines, you will never notice 
them because dropbox doesn't report them, so the actual git repos 
might be different between the two machines. I you are using git, 
why don't you clone the main org directory in the other machine 
and pull changes when you use the other machine?


Best,
--
Jorge.




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread Ken Mankoff


On 2015-03-16 at 12:05, J. David Boyd dbo...@mmm.com wrote:
 I have 4 files I use for work in my main org folder.  And I have a
 personal.org in another folder, that is inside of Dropbox.

 I created a symlink to personal.org in my main org folder.  When I start emacs
 and load the agenda, it asks me

 Symbolic link to Git-controlled source file; follow link? (y or n)

 Is there some setting (that I can't seem to find) that will always just allow
 this, rather than querying me?

I don't know of that setting, but you can have your Agenda use a main org 
folder + files elsewhere without symlinks. I have:

(setq org-agenda-files (quote (~/Documents/Org/ ~/Dropbox/shared/file.org)))

  -k.
  



[O] export code with backslashes

2015-03-16 Thread hymie!
Greetings.

I'm only asking this question because it seems that Orgmode can do
anything, although I admit that what I'm asking for is probably outside
the normal scope.

I have snips of code in my org files, denoted as ~code~.  I prefer ~code~ to
BEGIN_SRC blocks, because I don't like the big grey text boxes in my
exported documents.  Sometimes my code is very long and includes long lists
of options and arguments and such; for example:

~useradd -U -G wheel -p
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
accountname~

This is all one line.

Then I use C-c C-e t A to export this into an ascii buffer, the sole
reason being to remove the tilde characters and provide me an easy
cut-n-paste option.   I end up with this:

useradd -U -G wheel -p newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
newline
accountname newline

I would really really really like it if, in addition to the newlines that
are added, a backslash could be added as well.  Hey, this is a line
enclosed in tildes.  I'm going to add line-breaks.  Each line-break except
for the one at the end needs a backslash

useradd -U -G wheel -p \newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \newline
accountname newline

Is such a thing possible?

--hymie!




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread J. David Boyd
Ken Mankoff mank...@gmail.com writes:

 On 2015-03-16 at 12:05, J. David Boyd dbo...@mmm.com wrote:
 I have 4 files I use for work in my main org folder.  And I have a
 personal.org in another folder, that is inside of Dropbox.

 I created a symlink to personal.org in my main org folder.  When I start 
 emacs
 and load the agenda, it asks me

 Symbolic link to Git-controlled source file; follow link? (y or n)

 Is there some setting (that I can't seem to find) that will always just allow
 this, rather than querying me?

 I don't know of that setting, but you can have your Agenda use a main org
 folder + files elsewhere without symlinks. I have:

 (setq org-agenda-files (quote (~/Documents/Org/ 
 ~/Dropbox/shared/file.org)))

   -k.
   


Thanks!  I didn't realize I could mix paths and explicit filenames at the same
time.

You learn something new every day!

Dave




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread Jorge A. Alfaro-Murillo

J. David Boyd writes:

I don't need the level of versioning that git provides for the 
few config files and org files that I have there.


Have you check this: https://git-annex.branchable.com/assistant/ ? 
It is as easy as dropbox, it just keeps directories synchronized, 
but it has all the power of git in case you ever need it, you are 
not limited to the 2GB of dropbox, and it automatically encrypts 
your data in the remote.


--
Jorge.




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread J. David Boyd
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

 J. David Boyd writes:

 I have 4 files I use for work in my main org folder.  And I have 
 a personal.org in another folder, that is inside of Dropbox. 
 
 I created a symlink to personal.org in my main org folder. When 
 I start emacs and load the agenda, it asks me 
 
 Symbolic link to Git-controlled source file; follow link? (y or 
 n) 
 
 Is there some setting (that I can't seem to find) that will 
 always just allow this, rather than querying me?
  
 #+BEGIN_SRC emacs-lisp
   (setq vc-follow-symlinks t)
 #+END_SRC

 BTW, I think that using dropbox in a git controlled directory 
 might not be a good idea: if there are conflicts of files inside 
 of the .git directory between two machines, you will never notice 
 them because dropbox doesn't report them, so the actual git repos 
 might be different between the two machines. I you are using git, 
 why don't you clone the main org directory in the other machine 
 and pull changes when you use the other machine?

 Best,


Thanks for the warning.  Git is actually going to go away on a few of those
folders.  I was using that to keep synced between a few linux machines, but am
going to use dropbox instead.  I don't need the level of versioning that git
provides for the few config files and org files that I have there.

Dave




[O] Bug: columns in tables with fixed length affected by folded links

2015-03-16 Thread Randomcoder
Hi,

I've noticed that if I have a table like this:

| l30  | l85
 |
|+---|
| Question   | Answer   
 |
|+---|
|Stuff   |  
 |
|| [[http://very-long-link/][text that would 
fit the column fixed width]] |
||  
 |

And I do  C-c C-c (or M-x org-table-align) and 
org-toggle-link-display to fold the link, it still shows up as = which means
that Org-Mode has taken into consideration the actual length of the entire link
when it did the folding. Instead, I propose that it only takes
into consideration the length of the link text.

I'm not sure what part of the code is responsible for this.

I am reporting this as a bug here on the mailing list.




Re: [O] Citation syntax: a revised proposal

2015-03-16 Thread Richard Lawrence
Hi Aaron and all,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 I'll take some time this weekend to see if I can wire this together with
 the Elisp Aaron wrote for the Org exporter side.

I've had some success with this.  I would not say that my efforts are
complete yet, but I thought I should send an update to let everyone
know.  I've published a branch here:

https://github.com/wyleyr/org-mode

which derives from Aaron's wip-cite-awe branch.  Basically, what I've
been able to do so far is process citations in a document via
org-citeproc, using a bibtex database file, then insert the processed
citations and bibliography in the document during export.  (In theory,
this should work with org-bibtex too, though I think I may have
introduced a bug...the library is not producing well-formed bibtex from
org-bibtex entries for me at the moment.)  It works pretty slick, at
least for the simple cases I've tested.
 
Aaron, now that I've had time to go through your code a bit more
carefully, here are a few comments:

In general, I like the design of the org-cite library!  It was pretty
easy for me to understand what's going on, and it was also pretty easy
for me to make it use org-citeproc, just by plugging in different helper
functions.  This speaks to the modularity of the code and a
well-designed API.  I like the general approach of pre-processing
citations via org-cite-export-prepare and stashing the information on
the info plist.  I also like the extensibility of the lookup types
mechanism.

I didn't quite understand all the code surrounding citation modes and
styles.  I didn't dive into this too much, because I just wanted to get
org-citeproc to process citations and produce a bibliography using a CSL
file.  Rather than figure out how to infer a CSL file from
CITATION_STYLE and CITATION_MODE, I just added a new keyword (CSL_FILE)
to allow specifying it directly.  I am not sure which approach is
better, but I certainly found it simpler to use CSL_FILE and let
org-citeproc deal with formatting.

(One relevant issue here, as you mentioned in an earlier post, is how
much we want to worry about keeping LaTeX and non-LaTeX backends in
sync.  If it's important that they stay very close, the high-level way
of specifying citation formatting via CITATION_STYLE and _MODE is
probably the way to go.  These can be mapped to a BibLaTeX style on the
LaTeX side, and a CSL file elsewhere.  It might still be good to have
low-level keywords like CSL_FILE and, e.g., LATEX_BIB_STYLE too.  The
LaTeX vs. non-LaTeX issue is also important for dealing with
multi-cites, which are not handled in this branch.  I am waiting to hear
back about the right way to get the list of references associated with a
citation before I tackle that.)

As for the lookup types mechanism, I think this works pretty well,
though I have one suggestion: lookup functions should just be
responsible for jumping to the entry referenced by a citation in a
BIBDB, not for returning data about it.  Returning data only really
makes sense if we need to produce a new bibliography file, as in
org-cite--make-bibtex, but there are better mechanisms for that case
(see org-bibtex-export-to-kill-ring).  Jumping to the referenced entry
enables this, and makes lookup functions useful interactively.

In general, I did find that the cl-lib idioms and other stuff from
external libraries made the code more difficult for me to understand
(though that's on me), and in at least one case, I had to do without one
of the libraries you are loading (namely, let-alist) to get the code to
run in a vanilla Emacs 24.  I would personally prefer it if this library
could stay away from bleeding-edge Emacs features, as I run Org from
master, but generally on an older Emacs (my main Emacs is the one in
Debian stable).

There are just a few points where I had to modify your code, or comment
it out, to get it to run in my setup.  As a result, I might have broken
some things due to lack of understanding.  In all cases, my intent was
just to make my new code run alongside the existing code via whatever
minimal change was necessary, not to remove what was working for you.

Best,
Richard



[O] Export to google docs spreadsheet

2015-03-16 Thread Marcelo de Moraes Serpa
Hi all,

Is there a way to export an orgmode spreadsheet to a format that can be
imported by google docs?


Re: [O] export code with backslashes

2015-03-16 Thread Charles C. Berry

On Mon, 16 Mar 2015, hymie! wrote:


Greetings.

I'm only asking this question because it seems that Orgmode can do
anything, although I admit that what I'm asking for is probably outside
the normal scope.

I have snips of code in my org files, denoted as ~code~.  I prefer ~code~ to
BEGIN_SRC blocks, because I don't like the big grey text boxes in my
exported documents.  Sometimes my code is very long and includes long lists
of options and arguments and such; for example:

~useradd -U -G wheel -p
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
accountname~

This is all one line.

Then I use C-c C-e t A to export this into an ascii buffer, the sole
reason being to remove the tilde characters and provide me an easy
cut-n-paste option.   I end up with this:

useradd -U -G wheel -p newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
newline
accountname newline

I would really really really like it if, in addition to the newlines that
are added, a backslash could be added as well.  Hey, this is a line
enclosed in tildes.  I'm going to add line-breaks.  Each line-break except
for the one at the end needs a backslash

useradd -U -G wheel -p \newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \newline
accountname newline

Is such a thing possible?


Yes.

You can add a filter, see (info (org) Advanced configuration)

The line breaks come _after_ the code is processed. So you need to make 
the line breaks happen before you know can replace them. Try:


#+BEGIN_SRC emacs-lisp
  (defun org-export-ascii-filter-code (text back-end info)
  Replace `\\n' with `\\' in ascii code.
(if (eq back-end 'ascii)
(replace-regexp-in-string
 \n \\\n
 (org-babel-chomp
  (org-export-string-as text 'ascii t))
 nil t)
  text))
  (add-to-list 'org-export-filter-code-functions
   'org-export-ascii-filter-code)
#+END_SRC

with ascii export.

When I run this on your example, I get only one line break, but it is 
preceeded by a backslash.


Naturally, you will need to adapt this up for other backends as a single 
backslash might not be what is wanted.


HTH,

Chuck



Re: [O] Table of contents for just one section?

2015-03-16 Thread Rasmus
Hi,

D. C. Toedt d...@toedt.com writes:

 I see this feature is now in the beta of Org-Mode 8.3.  Excellent!   I'm
 doing several things with it in the forthcoming release of the Common Draft
 contract clause library (linked below).

 I also see that there now seems to be some reluctance by the maintainers to
 accept donations. (See http://comments.gmane.org/gmane.emacs.orgmode/83318).
 Has that been resolved?  I'd like to do a donation.

Nicolas implemented the feature you are talking about.  You could get in
touch with him.

For general donations there's a button on the main Org site.

As to the discussion you cite, I don't know.

Hope it helps,
Rasmus

-- 
I feel emotional landscapes they puzzle me




Re: [O] Table of contents for just one section?

2015-03-16 Thread Thomas S. Dye
Aloha D. C.,

D. C. Toedt d...@toedt.com writes:

 I also see that there now seems to be some reluctance by the maintainers to
 accept donations. (See http://comments.gmane.org/gmane.emacs.orgmode/83318).
 Has that been resolved?  I'd like to do a donation.

I think that was just Carsten's reluctance as he scaled back his Org
mode work.  So, yes, I believe it has been resolved.

All the best,
Tom

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



Re: [O] Why don't datetrees use timestamps?

2015-03-16 Thread Reuben Thomas
On 16 March 2015 at 16:52, Subhan Michael Tindall subh...@familycareinc.org
 wrote:

  You can use a custom capture template and have timestamps of various
 sorts inserted.

 For example, I have one datetree I use that inserts a date/time stamp
 using %T (%t gives only date, not time)

 See the documentation for capture (hit C-c C C  to get into the customize
 interface then scroll down)


​ My question was about the datetree entry headings of the form 2015-03-16
Monday. These aren't controlled by the template. I was interested to know
why these headings look very much like timestamps (and effectively are
timestamps, though at the top level they mention just a year and at the
second level just a year and a month), but aren't actual timestamps.

Eric Fraga said I don't think it would make sense for the headlines in the
date-tree to have time stamps; but my question is not why they don't have
time stamps, but why they ARE not time stamps (purely in the formal sense:
the information they contain is already effectively a time stamp, as far as
I can see).

I was hoping to discover the rationale for the design from a developer :)


Re: [O] export code with backslashes

2015-03-16 Thread hymie
Charles C. Berry writes:
On Mon, 16 Mar 2015, hymie! wrote:

 useradd -U -G wheel -p \newline
 '$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \newline
 accountname newline

 Is such a thing possible?

Yes.

#+BEGIN_SRC emacs-lisp
   (defun org-export-ascii-filter-code (text back-end info)
   Replace `\\n' with `\\' in ascii code.
 (if (eq back-end 'ascii)
 (replace-regexp-in-string
  \n \\\n
  (org-babel-chomp
   (org-export-string-as text 'ascii t))
  nil t)
   text))
   (add-to-list 'org-export-filter-code-functions
'org-export-ascii-filter-code)
#+END_SRC

Awesome -- this is perfect.  (Note that, to be perfect, the
continuation lines need at least one leading space.)

When I run this on your example, I get only one line break, but it is 
preceeded by a backslash.

My original post had a much much longer password string, but the
web-to-news gateway demanded 80 characters or less, so I trimmed the
password but left in the line breaks.

Naturally, you will need to adapt this up for other backends as a single 
backslash might not be what is wanted.

I hope my programming skills are up to the task.  But it's certainly
a great jumping-off point.

Thank you.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
My fitbit says I've walked 7009 steps today (as of 19:02).



Re: [O] Why don't datetrees use timestamps?

2015-03-16 Thread Reuben Thomas
​​
On 16 March 2015 at 16:52, Subhan Michael Tindall subh...@familycareinc.org
 wrote:

  You can use a custom capture template and have timestamps of various
 sorts inserted.

 For example, I have one datetree I use that inserts a date/time stamp
 using %T (%t gives only date, not time)

 See the documentation for capture (hit C-c C C  to get into the customize
 interface then scroll down)


​My question was about the datetree entry headings of the form 2015-03-16
Monday. These aren't controlled by the template. I was interested to know
why these headings look very much like timestamps (and effectively are
timestamps, though at the top level they mention just a year and at the
second level just a year and a month), but aren't actual timestamps.

I was hoping to discover the rationale for the design from a developer.


Re: [O] Table of contents for just one section?

2015-03-16 Thread D. C. Toedt
I see this feature is now in the beta of Org-Mode 8.3.  Excellent!   I'm
doing several things with it in the forthcoming release of the Common Draft
contract clause library (linked below).

I also see that there now seems to be some reluctance by the maintainers to
accept donations. (See http://comments.gmane.org/gmane.emacs.orgmode/83318).
Has that been resolved?  I'd like to do a donation.




*D. C. Toedt III  **(I go by D. C., which stands for Dell Charles; my** last
name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft http://www.commondraft.org/ contract clauses and
templates, with research notes
Lecturer, University of Houston Law Center
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



On Sun, Oct 26, 2014 at 6:03 AM, D. C. Toedt d...@toedt.com wrote:

 Many thanks!  I'll wait till this shows up in the package updater (I've
 toyed with Git only enough to be dangerous) but am eagerly looking forward
 to trying it.



 D. C. (Dell Charles) Toedt III  *(my** last name is pronounced Tate) *
 Attorney and neutral arbitrator -- tech contracts and intellectual property
 Lecturer, University of Houston Law Center
 ​Editor, ​​​Common Draft http://www.commondraft.org/ contract form file
 d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
   Calendar
 https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)
 O: +1 (713) 364-6545C: +1 (713) 516-8968
 ​​

 ​
 Houston, Texas (Central time zone)

 Unless expressly stated otherwise, this message is not intended
 to serve as an electronic signature nor as assent to an agreement.



 On Sun, Oct 26, 2014 at 3:15 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
 wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  The local keyword would be great.

 The following patch implements local tocs for ascii, html and odt export
 back-ends. I skipped latex because using minitoc looks too tricky to
 automate.

 Feedback welcome.


 Regards,

 --
 Nicolas Goaziou





[O] [PATCH] document D support

2015-03-16 Thread Thierry Banel
Here is a (small) patch in the documentation to add D in the list of
Babel-supported languages.

Best
Thierry


From b1b0fef633a0b54dbba20d970f1b89a04e27ee56 Mon Sep 17 00:00:00 2001
From: Thierry Banel tbanelweb...@free.fr
Date: Mon, 16 Mar 2015 22:38:05 +0100
Subject: [PATCH] D is supported by Babel

* doc/org.texi: added D in the list of Babel supported languages
---
 doc/org.texi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 0888c54..273b7c6 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -14665,10 +14665,10 @@ Code blocks in the following languages are supported.
 @item Asymptote @tab asymptote @tab Awk @tab awk
 @item Emacs Calc @tab calc @tab C @tab C
 @item C++ @tab C++ @tab Clojure @tab clojure
-@item CSS @tab css @tab ditaa @tab ditaa
-@item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp
-@item gnuplot @tab gnuplot @tab Haskell @tab haskell
-@item Java @tab java @tab @tab
+@item CSS @tab css @tab D @tab d
+@item ditaa @tab ditaa @tab Graphviz @tab dot
+@item Emacs Lisp @tab emacs-lisp @tab gnuplot @tab gnuplot
+@item Haskell @tab haskell @tab Java @tab java
 @item Javascript @tab js @tab LaTeX @tab latex
 @item Ledger @tab ledger @tab Lisp @tab lisp
 @item Lilypond @tab lilypond @tab MATLAB @tab matlab
-- 
2.1.4



Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread J. David Boyd
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

 J. David Boyd writes:

 I don't need the level of versioning that git provides for the few
 config files and org files that I have there.

 Have you check this: https://git-annex.branchable.com/assistant/ ? It
 is as easy as dropbox, it just keeps directories synchronized, but it
 has all the power of git in case you ever need it, you are not limited
 to the 2GB of dropbox, and it automatically encrypts your data in the
 remote.

Interesting, never heard of that.  I'll have to look into it.  Thanks for the
info!

Dave