Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Rasmus
Hi Erik,

> I couldn’t figure out how to add a comment to my patch, so here is a 
little more
> commentary.

For long prose like this I'd just export the patch (git format-patch)
and attach it to an email like this.  But this is also fine...  Perhaps
Kyle's method is more pro.

> Right now, if you use git to sync your Org files and git annex to 
manage your
> (large) attachments, and are on a different computer from the one you 
were using
> when you added the attachment, you will typically have a dangling 
symlink to
> your attachment until you call =get annex get PATH=. (This is how git 
annex is
> intended to work.)
> 
> This patch automatically calls =git annex get PATH= when you open the 
attachment
> from Org, if the file has not been fetched already.

This is a good idea.  Though really this sounds like something that
should be done by the git annex assistant rather than per application.

Has Joey spoken for or against automatic fetching of content when
requested?

> (It would be nice to have Org do the same thing when exporting to HTML 
as well,
> if the git annex file is an image that is being exported as an 
embedded image
> link, but I can’t figure out how to do that.)

A stronger argument for for first figuring out whether it 



> +(defun org-attach-use-annex ()
> +  "Return true if we should use git annex for attachments."
> +  (let* ((dir (expand-file-name org-attach-directory))
> +  (git-dir (vc-git-root dir)))
> +(and org-attach-git-annex-cutoff
> + (or (file-exists-p (expand-file-name "annex" git-dir))
> + (file-exists-p (expand-file-name ".git/annex" git-
dir))

As Kyle points out there should be a defcustom as well to decide whether
annex should be used.

since you call (org-attach-use-annex) you should probably check this
variable here.

>  (defun org-attach-commit ()
>"Commit changes to git if `org-attach-directory' is properly 
initialized.
>  This checks for the existence of a \".git\" directory in that 
directory."
>  -279,20 +287,16  This checks for the 
existence of a \".git\" directory in that directory."
>  (when (and git-dir (executable-find "git"))
>(with-temp-buffer
>   (cd dir)
> - (let ((have-annex
> -(and org-attach-git-annex-cutoff
> - (or (file-exists-p (expand-file-name "annex" git-
dir))
> - (file-exists-p (expand-file-name ".git/annex" 
git-dir))
> -   (dolist (new-or-modified
> -(split-string
> - (shell-command-to-string
> -  "git ls-files -zmo --exclude-standard") "\0" t))
> - (if (and have-annex
> -  (>= (nth 7 (file-attributes new-or-modified))
> -  org-attach-git-annex-cutoff))
> - (call-process "git" nil nil nil "annex" "add" new-or-
modified)
> -   (call-process "git" nil nil nil "add" new-or-modified))
> - (incf changes)))
> +(dolist (new-or-modified
> + (split-string
> +  (shell-command-to-string
> +   "git ls-files -zmo --exclude-standard") "\0" t))
> +  (if (and (org-attach-use-annex)

> +   (>= (nth 7 (file-attributes new-or-modified))
> +   org-attach-git-annex-cutoff))

IMO we should get rid of org-attach-git-annex-cutoff and point to
preferred content:

  http://git-annex.branchable.com/preferred_content/

E.g. I might have a small mp3 file.  There's no point in storing it with
git rather than git annex.

When preferred content is set up, I think git annex add will do the
right thing.

> +  (call-process "git" nil nil nil "annex" "add" new-or-
modified)
> +(call-process "git" nil nil nil "add" new-or-modified))
> + (incf changes))
>   (dolist (deleted
>(split-string
> (shell-command-to-string "git ls-files -z --deleted") 
"\0" t))
>  -465,8 +469,13  If IN-EMACS is non-nil, force 
opening in Emacs."
>(file (if (= (length files) 1)
>  (car files)
>(org-icompleting-read "Open attachment: "
> -(mapcar 'list files) nil t
> -(org-open-file (expand-file-name file attach-dir) in-emacs)))
> +(mapcar 'list files) nil t)))
> + (path (expand-file-name file attach-dir)))
> +(if (and (file-symlink-p path)
> + (org-attach-use-annex)
> + (not (file-exists-p (file-symlink-p path

Can you ask annex if it's an annexed file?  A symlink in an annexed 
folder,
to a usb disk that is not attached would pass this test.  But the 
indication would be wrong.

> +(call-process "git" nil nil nil "annex" "get" path))
> +(org-open-file path in-emacs)))

Thanks,
Rasmus

Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Julien Cubizolles

Maybe it's related, but I just noted that the %^G and %^t fields
%-escapes don't work anymore: they just insert the "%^G" and "%^t"
strings instead of prompting.

Julien;




[O] Todo logging

2016-01-05 Thread Shreyas Pai
Hello,

I've been trying out org mode for a while to log my daily activities. I use
a repeated todo and logrepeat to quickly log the completion of various
activities.

The problem I have is that the log that appears contains the date when the
entry was changed and I want some record of the deadline which the is
logging. Which will look something like:

* TODO Do this!
  DEADLINE: <2016-01-06 Wed +1d>
  - State "DONE"   from "TODO"   [2016-01-05 Tue 15:31]
  - State "CANCELED"   from "TODO"   [2016-01-04 Mon 15:31] \\
Closed on Monday...

This is because I don't update my entries regularly, and then updating them
later becomes a pain as I have to keep changing the dates.

Can someone point me towards a possible solution?

Thanks,
Shreyas


Re: [O] capture template for .ics invitation in vm

2016-01-05 Thread Eric S Fraga
On Saturday, 19 Dec 2015 at 08:24, pray...@unimelb.edu.au wrote:
> I'm trying to make a capture template for turning the very frequent
> invitations I get in .ics format (I think) into org agenda items.
> The basis is the ical2org awk script maintained by Eric Fraga.
> My template is defined as follows:
> ("i" "invite" entry (file+headline "~/.org/todo.org" "Tasks")
>"* TODO %(org-capture-vm-invite)\n" :immediate-finish t)

Maybe have a look at the implementation of gnus-icalendar functions
which do what you want albeit for gnus and not vm?  gnus-icalendar.el
should be in your emacs distribution but, if not, it can be found in the
git version of gnus.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-416-g369955



[O] How exactly does "C-c ." work in an existing timestamp?

2016-01-05 Thread Jarmo Hurri

Greetings.

Consider the following org file

# --
* testing
  <2016-01-07 Thu 15:00-16:15>
# --

When I move my cursor inside the timestamp and press "C-c .", control
jumps to a minibuffer in the echo area. But when I try, in the echo
area, to modify the date in the timestamp, it gets a bit weird to me.

1. If I try to use the method specified in the documentation to bump the
   date one day forward by typing +1d, nothing sensible happens. It
   doesn't matter if I type "+1d" directly, or " +1d" with a leading
   space.

2. If I type " 8" (note leading space), the date will move to the 8th,
   that is, forward by one day. But a leading space is required.

3. If I move my cursor on top of the current date, still in the echo
   area, the start time of the meeting and the duration start jumping
   forward in the echo area. Please find attached a screenshot of what
   the situation looks like. (This at least looks like a bug, or a
   "feature.")

How exactly does modifying the timestamp with "C-c ." work? I know it is
possible to modify the timestamp with other commands, such as S-up, but
I like the idea of modifying it with "C-c .", because the latter shows
the calendar automatically.

Thanks for help in advance,

Jarmo



[O] just discovered how well NLinum-mode works with large orgmode files

2016-01-05 Thread Xebar Saram
Hi all

just wanted to share a discovery (non newbs like me probably know this
already)

for a few months i have been struggling with linum mode after it keeps
freezing emacs on large files. today i discovered this:

http://elpa.gnu.org/packages/nlinum.html

its amazing how we it works even in huge orgmode file

best

Z


Re: [O] How exactly does "C-c ." work in an existing timestamp?

2016-01-05 Thread Nick Dokos
Jarmo Hurri  writes:

> Greetings.
>
> Consider the following org file
>
> # --
> * testing
>   <2016-01-07 Thu 15:00-16:15>
> # --
>
> When I move my cursor inside the timestamp and press "C-c .", control
> jumps to a minibuffer in the echo area. But when I try, in the echo
> area, to modify the date in the timestamp, it gets a bit weird to me.
>
> 1. If I try to use the method specified in the documentation to bump the
>date one day forward by typing +1d, nothing sensible happens. It
>doesn't matter if I type "+1d" directly, or " +1d" with a leading
>space.
>

That's relative to *today*, not relative to the existing timestamp.
+1d changes it to tomorrow. Does that not work for you?

> 2. If I type " 8" (note leading space), the date will move to the 8th,
>that is, forward by one day. But a leading space is required.
>

Not here - with or without space, it changes it to next Friday
2016-01-08.

> 3. If I move my cursor on top of the current date, still in the echo
>area, the start time of the meeting and the duration start jumping
>forward in the echo area. Please find attached a screenshot of what
>the situation looks like. (This at least looks like a bug, or a
>"feature.")

Yes, that's weird - not sure what causes this.

--
Nick





[O] any intelligent workflow how to use mobileorg agendas?

2016-01-05 Thread David Belohrad
Dear All,

i'm in org-mode for already some years. However I am still struggling with how 
to setup the workflow such, that it actually works with the mobileorg agenda. 
What I need is to display

a) daily agenda
b) datetree with say next 90 days
c) show specific tags

Now, with scenario (c) there is no issue at all as mobileorg can be setup such, 
that it shows within specified files tags of your interest. I have a problem 
with scenarios (a) and (b). First, I did not find any method, how to filter 
mobileorg agendas based on something like 'today', so displaying daily agenda I 
would have to 'somehow' force org-mobile-push to add to 'today's' items a 
specific tag. Is there any better way how to set it up?

This comes to the problems of scenario (b) as well. The best for me would be, 
if I could just display 90 days datetree exactly as I produce it into the diary 
(using capture into datetree). This works, but it does not serve to the 
purpose, as the datetree is not corresponding to the actual timestamp. E.g.

on 17th Dec 2015 I have made an appointment for 1st january 2016 as such:

* 2015
** 2015-12 December
*** 2015-12-17 Thursday
 dinner with Mia
<2016-01-01 Thu 22:00-23:00>

I do not want to display on my mobileorg this particular datetree as it is 
provides misleading information. When I would enter into 2016/01/01 entry, I 
would not see that I shall meet with Mia, I would see it when entering into 
december's record.

So now the question is, how to setup the diary workflow such, that a datetree 
with correct timestamps would be actually generated? Hence what I would like to 
see in my mobileorg agenda is:

* 2016
** 2016-01 January
*** 2016-01-01 Thu
 22:00-23:00 dinner with Mia

so somebody asks me what i do on 1st january, I would dig into the datetree and 
I would see immediatelly this event? 

All that is quite confusing. At the same time, the capture workflow works 
pretty well, and especially with combination of capture widget one can capture 
the data really quickly and transport to emacs.

Or is there any other workflow, which would assure to act mobileorg as a true 
(readonly) agenda?

.d.



Re: [O] Renaming of +NAME for code blocks to in HTML export, no longer user defined

2016-01-05 Thread Adam Aviv
On Mon, Jan 4, 2016 at 1:29 PM, Nick Dokos  wrote:

> It may be a bug: the code (in org-html-src-block) looks like this
>
>   (label (let ((lbl (and (org-element-property :name src-block)
>  (org-export-get-reference src-block
> info
>(if lbl (format " id=\"%s\"" lbl) ""
>
> and I'm wondering whether the "and" should be an "or".
>

Interesting. I don't know if it is a bug, though, as this seems intentional
and matches my experience. The idea being that if you want to label
something, you use the :name tag, but this will make it so the second item
is evaluated, producing a unique identifier. The unique identifier is then
assigned instead of the :name tag. If it was an, OR, however, then every
element block would get a label, and that might be suboptimal given that
not every block is referenced later.

I would still like to be able to add my own name tags, but understand why
this might have been changed to avoid to blocks having the same label.


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] [PATCH] ox-koma-letter.el: Add support for section

2016-01-05 Thread Daniele Pizzolli
On Mon, Jan 04 2016, Rasmus  wrote:

> Hi Daniele,
>
> Daniele Pizzolli  writes:
>
>> thanks for you comment.  I try to explain my point of view better.  Now
>> the export to letter silently discard the headings text in the exported
>> tex.  This is quite bad, even if documented.  As a user I want to change
>> quite easily the export backend (text, latex, beamer, ...)  while
>> retaining most of my work.  Every backend as it's own supported
>> features, but discarding the input provided by the user does not provide
>> the best user experience to me.
>
> That's a fair point.  Nonetheless,

Hi Rasmus,
thanks for recognizing it.

>> By the way this patch does not change the final output, if there is no
>> section.lco available.  So there should be no regression and only
>> improvements.
>
>> I really prefer something that instead of discarding the user input
>> rewrite it to fit the backend features (if there is no heading/section
>> support, use something like the start of paragraph, and support section
>> only if enabled by the user) but this is beyond my coding abilities in
>> elisp, so I sent the minimal working patch with the minimal impact on
>> existing behaviour.
>
>
> Whether sections.lco is available is nontrivial.  As I remember the patch,
> it also imposed level two headings to be sections.

Not really.  With the current patch, all the headings inside the main
content (that is the first not special tagged heading) are rendered with
a section level that is one level more than expected because the first
level is taken away by the main content (because the main content is not
a section).  So there should be some work to adjust the level by adding
+1.  The behaviour of one level headings is left unchanged because of
the way ox-koma-letter works, but this can be changed, if there is a
better approach.

> If you really think this is the right approach, perhaps the "H:" option
> could be used to set the special heading level...  We’d need this since
> you can specify the opening with a heading.

I am lost here.  H: should work as expected.  We have the inverse
problem (go up to the level with sections).

 +Add [sections] to LATEX_CLASS_OPTIONS with:
 +
 +#+LATEX_CLASS_OPTIONS: [sections]
 +
 +If section.lco is unavaliable the section are exported in the tex
 +source but not rendered in the final pdf.
>>>
>>> Whether section.lco is available or not is a complicated question.  You
>>> first need to figure out what is the tex distribution (what if it’s not in
>>> PATH) and whether section.lco is available via something like kpsewhich.
>>> Note that e.g. TL also looks in the current path.
>>
>> I use org to touch as less latex as possible, I just downloaded the
>> section.lco and put in the same directory of my org file and everything
>> was working.  A little before I used apt-file search section.lco but
>> since nothing was found I quickly reverted to the manual download.  I
>> wish that everything is packaged as distro package, but I can survive
>> some manual work.
>
> This is because sections.lco is not part of KOMA-Script (like titlepage¹).
> E.g. on my system with TL:
>
>  $ kpsewhich sections.lco
>  /home/rasmus/.texmf/tex/latex/koma-script/sections.lco
>
> kpsewhich/tex also looks in the current directory, which is why you can
> just place it in the same folder.

Thanks for the info, I admit that LT and kpsewhich are unknown to me, as
I said I try to stay away from latex and tex as much as possible.  If
there is some agreement on the patch I will update the doc to add those
info.

Best,
Daniele



Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Kyle Meyer
Rasmus  writes:

[...]

>> This patch automatically calls =git annex get PATH= when you open the
>> attachment from Org, if the file has not been fetched already.
>
> This is a good idea.  Though really this sounds like something that
> should be done by the git annex assistant rather than per application.

I think a good number of people use git-annex without git-annex
assistant.  There was a question related to this on the git-annex
survey:

http://git-annex-survey.branchable.com/polls/2015/command_line_vs_assistant/

> Has Joey spoken for or against automatic fetching of content when
> requested?

I think I'm missing something.  Why would he have an issue with running
"git annex get"?

[...]

> Can you ask annex if it's an annexed file?

There's probably a better way, but the return value of "git annex find
FILE" will signal this.

-- 
Kyle



Re: [O] How exactly does "C-c ." work in an existing timestamp?

2016-01-05 Thread Jarmo Hurri
Nick Dokos  writes:

> Jarmo Hurri  writes:
>
>> # --
>> * testing
>>   <2016-01-07 Thu 15:00-16:15>
>> # --
>>
>> When I move my cursor inside the timestamp and press "C-c .", control
>> jumps to a minibuffer in the echo area. But when I try, in the echo
>> area, to modify the date in the timestamp, it gets a bit weird to me.
>>
>> 1. If I try to use the method specified in the documentation to bump the
>>date one day forward by typing +1d, nothing sensible happens. It
>>doesn't matter if I type "+1d" directly, or " +1d" with a leading
>>space.
>>
>
> That's relative to *today*, not relative to the existing timestamp.
> +1d changes it to tomorrow. Does that not work for you?

No it doesn't. What's happening...? Are you sure that you are using
_exactly_ the same timestamp I am using, with the time included in
addition to the date:

<2016-01-07 Thu 15:00-16:15>

So if you in this timestamp do "C-c ." followed by _nothing else_ than
"+1d", date switches to tomorrow?

A related thing: the documentation on timestamps says that "Org mode
will find whatever information is in there and derive anything you have
not specified from the default date and time. The default is usually the
current date and time, but when modifying an existing timestamp, or when
entering the second stamp of a range, it is taken from the stamp in the
buffer." So does this imply that "+1d" - if it would work - should
actually add one day to the given timestamp, not today?

>> 2. If I type " 8" (note leading space), the date will move to the 8th,
>>that is, forward by one day. But a leading space is required.
>>
>
> Not here - with or without space, it changes it to next Friday
> 2016-01-08.

Nope, doesn't work here without the space, using the timestamp I wrote
above. I am in GNU Emacs 24.5.1, running the latest Org from git repo.

>> 3. If I move my cursor on top of the current date, still in the echo
>>area, the start time of the meeting and the duration start jumping
>>forward in the echo area. Please find attached a screenshot of what
>>the situation looks like. (This at least looks like a bug, or a
>>"feature.")
>
> Yes, that's weird - not sure what causes this.

Ok, but it is actually a secondary - or tertiary - issue.

Jarmo




Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Rasmus
Hi Kyle,

Kyle Meyer  writes:

> Rasmus  writes:
>
> [...]
>
>>> This patch automatically calls =git annex get PATH= when you open the
>>> attachment from Org, if the file has not been fetched already.
>>
>> This is a good idea.  Though really this sounds like something that
>> should be done by the git annex assistant rather than per application.
>
> I think a good number of people use git-annex without git-annex
> assistant.  There was a question related to this on the git-annex
> survey:
>
> http://git-annex-survey.branchable.com/polls/2015/command_line_vs_assistant/

That’s a fair point.

>> Has Joey spoken for or against automatic fetching of content when
>> requested?
>
> I think I'm missing something.  Why would he have an issue with running
> "git annex get"?

I don't have anything against it, but in OP he also talks about
implementing something similar for ox-$BACKEND output...  Which doesn’t
seem like a bad request.  Why should org-attachment support git-annex
other parts of Org not?  But I don’t think we want to support annexed
files in general.  (What about LFS’ed files?  Assuming a similar feature
exists)

Perhaps I’m abstracting too much here.

Rasmus

-- 
Even a three-legged dog has three good legs to lose




Re: [O] [PATCH] ox-koma-letter.el: Add support for section

2016-01-05 Thread Rasmus
Ciao Daniele,

Daniele Pizzolli  writes:

>> Whether sections.lco is available is nontrivial.  As I remember the patch,
>> it also imposed level two headings to be sections.
>
> Not really.  With the current patch, all the headings inside the main
> content (that is the first not special tagged heading) are rendered with
> a section level that is one level more than expected because the first
> level is taken away by the main content (because the main content is not
> a section).

That’s fair.

> So there should be some work to adjust the level by adding
> +1.  The behaviour of one level headings is left unchanged because of
> the way ox-koma-letter works, but this can be changed, if there is a
> better approach.

Some notes which are probably obvious to you, but which at least I need to
think about the problem follows.

1. From above, I guess you can take the relative level of the opening
   headline plus one.

2. As I recall, there’s no limitation on the level of the opening in
   org-koma-letter--keyword-or-headline.  It simply takes the first
   headline without a special keyword.  It need not be top level.

It seems you’d have to implement the following:

  - The opening headline is at the relative top level.  /This breaks
backward-comparability/.  So perhaps only if sections are requested,
although ox-koma-letter already has WAY too many options and
configurations.
  - Sections start at (1+ (or "the opening level" "the relative top level")).
  - Bonus: How to configure the mapping of levels to section, subsection
etc.  E.g. what if I want to use \addsect in stead of sections?  (I
don’t remember if this is supported by sections.lco; IMO it’s very
reasonable to just take assumptions according to what is available in
sections.lco)
  
Some people organizes letters like this with subtree export (re previous
posts to this list).  It must work in that case.

* letter one
** to one :to:
** opening one,
   Letter 1 
* letter two
** to two :to:
** opening two,
   Letter 1 


>> If you really think this is the right approach, perhaps the "H:" option
>> could be used to set the special heading level...  We’d need this since
>> you can specify the opening with a heading.
>
> I am lost here.  H: should work as expected.  We have the inverse
> problem (go up to the level with sections).

Compare

#+options: H:2
* section
** frame

and

#+options: H:1
* section
** frame

in ox-beamer.  Perhaps it’s an overkill for ox-koma-letter.

> Thanks for the info, I admit that LT and kpsewhich are unknown to me, as
> I said I try to stay away from latex and tex as much as possible.  If
> there is some agreement on the patch I will update the doc to add those
> info.

I think it’s best to add a switch (defcustom) either per document or at
least a global variable.  It defaults to nil.  E.g. #+options: sections:t

Thanks,
Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




[O] Bug: #+begin_html.. #+end_html export bugs [8.3beta (release_8.3beta-1038-gcd7cbd @ d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)]

2016-01-05 Thread kuangdash


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


The content between #+begin_html and #+end_html is exported as "it is",
so I see the original html code in my browser. help...

regards

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-12-25
Package: Org-mode version 8.3beta (release_8.3beta-1038-gcd7cbd @ 
d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)

current state:
==
(setq
 org-src-lang-modes '(("ipython" . python) ("ocaml" . tuareg)
  ("elisp" . emacs-lisp) ("ditaa" . artist)
  ("asymptote" . asy) ("dot" . fundamental)
  ("sqlite" . sql) ("calc" . fundamental) ("C" . c)
  ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)
  ("shell" . sh) ("bash" . sh))
 org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename
 org-export-babel-evaluate nil
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-latex-classes '(("beamer"
  "\\documentclass{beamer}\n   
\\usepackage[fontset=none,UTF8,a4paper,zihao=-4]{ctex}" org-beamer-sectioning)
 ("ctexbook"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexbook}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("ctexrep"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexrep}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("ctexart"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexart}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("article" "\\documentclass[11pt]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{book}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 )
 org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex"))
("" "graphicx" t) ("" "grffile" t)
("" "longtable" nil) ("" "wrapfig" nil)
("" "rotating" nil) ("" "amsmath" t)
("" "textcomp" t) ("" "amssymb" t)
("" "capt-of" nil) ("" "hyperref" nil))
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-ref-pdf-directory "~/orgpapers/papers/"
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-format-latex-options '(:foreground default :background default :scale
1.5 :html-foreground "Black" :html-background
"T

Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Kyle Meyer
Rasmus  writes:

>>> Has Joey spoken for or against automatic fetching of content when
>>> requested?
>>
>> I think I'm missing something.  Why would he have an issue with running
>> "git annex get"?
>
> I don't have anything against it, but in OP he also talks about
> implementing something similar for ox-$BACKEND output...  Which doesn’t
> seem like a bad request.  Why should org-attachment support git-annex
> other parts of Org not?  But I don’t think we want to support annexed
> files in general.  (What about LFS’ed files?  Assuming a similar feature
> exists)

I think Joey is a vim user, so I doubt he's said anything about an Emacs
program choosing to call "git annex get" :)

But yeah, that's a good point about which parts of Org should support or
care about annexed files.  IMO export and nearly all parts of Org should
not.  I see org-attach as an exception because it is focused on managing
external files and already has some support for doing so with git and
git-annex.  (I think it would be fine for org-attach to support other
ways of storing files, should someone care to implement it.)  But I
don't actually use org-attach, so I may be off the mark here.

-- 
Kyle



[O] Bug: Wrong Categories in Agenda (Last category in file) [8.3.2 (8.3.2-52-g6d0af5-elpa @ /Users/calvin/.emacs.d/elpa/org-20151228/)]

2016-01-05 Thread Calvin Beck
Hello, in my agenda view I have a problem where the last category in a
file is used for ALL categories in my agenda view. For instance when
using the todo.org template found here:

http://newartisans.com/2007/08/using-org-mode-as-a-day-planner/

All of my categories in the weekly agenda show up as "Birthday"

Any suggestions or help would be welcome! Thanks.

Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin15.0.0)
 of 2015-09-13 on elcapitanvm.local
Package: Org-mode version 8.3.2 (8.3.2-52-g6d0af5-elpa @
/Users/calvin/.emacs.d/elpa/org-20151228/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-reverse-note-order t
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-agenda-start-on-weekday nil
 org-log-done 'time
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-skip-scheduled-if-done t
 org-agenda-custom-commands '(("d" todo "DELEGATED" nil) ("c" todo
"DONE|DEFERRED|CANCELLED" nil)
  ("w" todo "WAITING" nil) ("W" agenda ""
((org-agenda-ndays 21)))
  ("A" agenda ""
   ((org-agenda-skip-function
 (lambda nil (org-agenda-skip-entry-if
(quote notregexp) "\\=.*\\[#A\\]")))
(org-agenda-ndays 1)
(org-agenda-overriding-header "Today's
Priority #A tasks: "))
   )
  ("u" alltodo ""
   ((org-agenda-skip-function
 (lambda nil
  (org-agenda-skip-entry-if (quote
scheduled) (quote deadline) (quote regexp)
   "\n]+>")
  )
 )
(org-agenda-overriding-header "Unscheduled
TODO entries: "))
   )
  )
 org-default-notes-file "~/org/notes.org"
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
turn-on-flyspell)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-ndays 7
 org-fast-tag-selection-single-key 'expert
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-skip-deadline-if-done t
 org-agenda-files '("~/org/todo.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )


-- 
Calvin Beck

PGP key: http://webdocs.cs.ualberta.ca/~hobbes/hobbes_pub.gpg-key


[O] Bug: Args out of range on Java include [8.3.2 (8.3.2-dist @ /Users/dmusican/.emacs.d/org-8.3.2/lisp/)]

2016-01-05 Thread Dave Musicant

I've got an org-mode file with a single line in it:

#+INCLUDE: "Temp.java" src java

That file, in turn, is including a Java file with a single line in it:

import java.util.abcde.*;

When I try to export the org file to HTML, it results in an Args out of
range error. This error does not happen if the import statement is
simpler, such as

import java.util.*;

Worse yet, this error isn't consistent. If I fix the Java file (as
above), then go back to the org file and try to export again, it works;
after that, if I _then_ put the longer import back into the Temp.java,
the org file still exports correctly. After some inconclusive amount of 
screwing around with it, exports will start failing again. But it seems 
to reliably fail when Emacs and the org file are first opened.


Any thoughts? This is a real problem for me; I'm trying to include a
Java program into an org file, and it's choking on the import line.

Thanks!

--
Dave Musicant


Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, NS 
apple-appkit-1348.17)

 of 2015-08-26 on dmusican56252.mathcs.carleton.edu
Package: Org-mode version 8.3.2 (8.3.2-dist @ 
/Users/dmusican/.emacs.d/org-8.3.2/lisp/)


current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-babel-hide-result-toggle-maybe

  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function

 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-startup-folded nil
 org-support-shift-select t
 org-latex-format-headline-function 
'org-latex-format-headline-default-function

 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp "\\"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil
  (define-key org-mode-map (kbd "M-p") (quote 
org-html-export-to-html)))

 (lambda nil
  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all)

   (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append) 
(quote local))

  )
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)

 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-babel-tangle-lang-exts '(("java" . "java") ("emacs-lisp" . "el") 
("elisp" . "el"))

 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 
'org-html-format-headline-default-function

 org-babel-load-languages '((java . t) (emacs-lisp . t))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function

 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] How exactly does "C-c ." work in an existing timestamp?

2016-01-05 Thread Nick Dokos
Jarmo Hurri  writes:

> Nick Dokos  writes:
>
>> Jarmo Hurri  writes:
>>
>>> # --
>>> * testing
>>>   <2016-01-07 Thu 15:00-16:15>
>>> # --
>>>
>>> When I move my cursor inside the timestamp and press "C-c .", control
>>> jumps to a minibuffer in the echo area. But when I try, in the echo
>>> area, to modify the date in the timestamp, it gets a bit weird to me.
>>>
>>> 1. If I try to use the method specified in the documentation to bump the
>>>date one day forward by typing +1d, nothing sensible happens. It
>>>doesn't matter if I type "+1d" directly, or " +1d" with a leading
>>>space.
>>>
>>
>> That's relative to *today*, not relative to the existing timestamp.
>> +1d changes it to tomorrow. Does that not work for you?
>
> No it doesn't. What's happening...? Are you sure that you are using
> _exactly_ the same timestamp I am using, with the time included in
> addition to the date:
>
> <2016-01-07 Thu 15:00-16:15>
>
> So if you in this timestamp do "C-c ." followed by _nothing else_ than
> "+1d", date switches to tomorrow?
>

As you guessed, I wasn't using your timestamp. The problem is that there
is junk in the minibuffer already (the 15:00-16:15 part) and the cursor
is left right after that without a space. I guess that causes parsing
errors and the date is left unchanged unless you add the space manually
(using the 8 spec, not the +1d spec - the latter does not change
anything, but I haven't chased it through to see if it gets an error in
parsing or there is something else going on).

OTOH, doing a C-a and then entering either "8 " or "+1d " (the space is
necessary to separate the days part from the hour:minutes part)
works. The point is that the time part has to follow the date part.

> A related thing: the documentation on timestamps says that "Org mode
> will find whatever information is in there and derive anything you have
> not specified from the default date and time. The default is usually the
> current date and time, but when modifying an existing timestamp, or when
> entering the second stamp of a range, it is taken from the stamp in the
> buffer." So does this imply that "+1d" - if it would work - should
> actually add one day to the given timestamp, not today?
>

Maybe.

>>> 2. If I type " 8" (note leading space), the date will move to the 8th,
>>>that is, forward by one day. But a leading space is required.
>>>
>>
>> Not here - with or without space, it changes it to next Friday
>> 2016-01-08.
>
> Nope, doesn't work here without the space, using the timestamp I wrote
> above. I am in GNU Emacs 24.5.1, running the latest Org from git repo.
>
>>> 3. If I move my cursor on top of the current date, still in the echo
>>>area, the start time of the meeting and the duration start jumping
>>>forward in the echo area. Please find attached a screenshot of what
>>>the situation looks like. (This at least looks like a bug, or a
>>>"feature.")
>>
>> Yes, that's weird - not sure what causes this.
>
> Ok, but it is actually a secondary - or tertiary - issue.
>
> Jarmo
>
>
>

-- 
Nick




Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Nicolas Goaziou
Hello,

Julien Cubizolles  writes:

> Maybe it's related, but I just noted that the %^G and %^t fields
> %-escapes don't work anymore: they just insert the "%^G" and "%^t"
> strings instead of prompting.

Could you provide a template where those fail?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Wrong Categories in Agenda (Last category in file) [8.3.2 (8.3.2-52-g6d0af5-elpa @ /Users/calvin/.emacs.d/elpa/org-20151228/)]

2016-01-05 Thread Nicolas Goaziou
Hello,

Calvin Beck  writes:

> Hello, in my agenda view I have a problem where the last category in a
> file is used for ALL categories in my agenda view. For instance when
> using the todo.org template found here:
>
> http://newartisans.com/2007/08/using-org-mode-as-a-day-planner/
>
> All of my categories in the weekly agenda show up as "Birthday"
>
> Any suggestions or help would be welcome! Thanks.

This document uses a very outdated syntax. See

  (info "(org) Categories")

In a nutshell, #+CATEGORY are buffer-wide, like any other keyword. You
need to use properties for specific entries.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: #+begin_html.. #+end_html export bugs [8.3beta (release_8.3beta-1038-gcd7cbd @ d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)]

2016-01-05 Thread Nicolas Goaziou
Hello,

 writes:

> The content between #+begin_html and #+end_html is exported as "it is",
> so I see the original html code in my browser. help...

You probably need to use

  #+begin_export html
  ...
  #+end_export


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Julien Cubizolles
Nicolas Goaziou  writes:

> Hello,
>
> Julien Cubizolles  writes:
>
>> Maybe it's related, but I just noted that the %^G and %^t fields
>> %-escapes don't work anymore: they just insert the "%^G" and "%^t"
>> strings instead of prompting.
>
> Could you provide a template where those fail?

Sure:

--8<---cut here---start->8---
("t" "todo" entry (fileheadline "~/org/orgfiles/refile.org" "Tâches") "* TODO  
%? %^G\n DEADLINE: %^t" :clock-resume t :kill-buffer t)--8<---cut 
here---end--->8---





Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Rasmus
Kyle Meyer  writes:

> Rasmus  writes:
>
 Has Joey spoken for or against automatic fetching of content when
 requested?
>>>
>>> I think I'm missing something.  Why would he have an issue with running
>>> "git annex get"?
>>
>> I don't have anything against it, but in OP he also talks about
>> implementing something similar for ox-$BACKEND output...  Which doesn’t
>> seem like a bad request.  Why should org-attachment support git-annex
>> other parts of Org not?  But I don’t think we want to support annexed
>> files in general.  (What about LFS’ed files?  Assuming a similar feature
>> exists)
>
> I think Joey is a vim user, so I doubt he's said anything about an Emacs
> program choosing to call "git annex get" :)

I want to know if e.g. the git annex (assistant?) could support
transparently getting files.  That is once I try to open file X, which is
annexed and stored somewhere else, X will automatically be fetched
/without/ the need to call "git annex get" first.

I don’t know enough about annex, or file systems, to make a guess.  [And I
always just call "git annex get ." in the root of the annexed folder].

> But yeah, that's a good point about which parts of Org should support or
> care about annexed files.  IMO export and nearly all parts of Org should
> not.  I see org-attach as an exception because it is focused on managing
> external files and already has some support for doing so with git and
> git-annex.  (I think it would be fine for org-attach to support other
> ways of storing files, should someone care to implement it.)  But I
> don't actually use org-attach, so I may be off the mark here.

The problem sounds like an Upstream Problemᵀᴹ (IMO), and I’d be happy to
get rid of org-attach-git-annex-cutoff, i.e. cutting back on the
"explicit" support (in favor of the better tools for this problem built
into git annex).

Rasmus

-- 
Together we will make the possible totay impossible!




[O] How to call org-set-property from a function

2016-01-05 Thread Julien Cubizolles
I have the following function to automate the creation of a new entry:

#+begin_src emacs-lisp
  (interactive)
  (save-excursion
(org-beamer-select-environment)
(org-set-tags-command)
)
#+end_src

I'd like to add the possibility to set some properties through
(org-set-property) but I can't figure out how to call it in its
interactive way, so that it prompts me for a property and value ? Of
course adding (org-set-property) or (interactive (org-set-property))
doesn't work.

Also, I will sometimes need to include several different
properties. What would be the right way to run a loop where a new
property is set until the user answers something like C-return at the
prompt ?

Julien.




Re: [O] How to call org-set-property from a function

2016-01-05 Thread Marcin Borkowski

On 2016-01-05, at 23:14, Julien Cubizolles  wrote:

> I have the following function to automate the creation of a new entry:
>
> #+begin_src emacs-lisp
>   (interactive)
>   (save-excursion
> (org-beamer-select-environment)
> (org-set-tags-command)
> )
> #+end_src
>
> I'd like to add the possibility to set some properties through
> (org-set-property) but I can't figure out how to call it in its
> interactive way, so that it prompts me for a property and value? Of
> course adding (org-set-property) or (interactive (org-set-property))
> doesn't work.

What about call-interactively?

> Also, I will sometimes need to include several different
> properties. What would be the right way to run a loop where a new
> property is set until the user answers something like C-return at the
> prompt?

That I don't know.

> Julien.

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] How to call org-set-property from a function

2016-01-05 Thread Rasmus
Hi Julien,


Julien Cubizolles  writes:

> I have the following function to automate the creation of a new entry:
>
> #+begin_src emacs-lisp
>   (interactive)
>   (save-excursion
> (org-beamer-select-environment)
> (org-set-tags-command)
> )
> #+end_src
>
> I'd like to add the possibility to set some properties through
> (org-set-property) but I can't figure out how to call it in its
> interactive way, so that it prompts me for a property and value ? Of
> course adding (org-set-property) or (interactive (org-set-property))
> doesn't work.

Does this do what you want:

 (call-interactively 'org-set-property) 

> Also, I will sometimes need to include several different
> properties. What would be the right way to run a loop where a new
> property is set until the user answers something like C-return at the
> prompt ?

Here's naive approach.  Probably you can find a more elegant way.

(condition-case nil
(while t
  (call-interactively 'org-set-property))
  (quit nil))

Rasmus

-- 
Spil noget med Slayer!




Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Nicolas Goaziou
Hello,

Charles Millar  writes:

> Until recently given the following capture template
>
> "* APPOINTMENT %?%^{BeginTimeDuration}T %^{Location} %^{Reason}"
>
> When prompted for the BeginTimeDuration and entered 2/29 09:00+1:00,  etc
>
> would result in
>
> * APPOINTMENT <2016-02-29 Mon 09:00-10:00> Location Reason
>
> it now results in
>
> ** APPOINTMENT <2016-02-29 Mon (system time when capture made)>
> Location Reason
>
> If no duration is given, the date and time as entered into the
> template are correctly captured
>
> * APPOINTMENT <2016-02-29 Mon 09:00> Location Reason
>
> Same error if I use 13:00-14:00 or 13:00--14:00 for duration, the
> start and end time still results in the system time when I C-c C-c the
> capture.

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Nicolas Goaziou
Julien Cubizolles  writes:

> --8<---cut here---start->8---
> ("t" "todo" entry (fileheadline "~/org/orgfiles/refile.org" "Tâches")
> "* TODO  %? %^G\n DEADLINE: %^t" :clock-resume t :kill-buffer
> t)--8<---cut here---end--->8---

I do not see any error. Could you update Org and try again?


Regards,



Re: [O] Bug: Args out of range on Java include [8.3.2 (8.3.2-dist @ /Users/dmusican/.emacs.d/org-8.3.2/lisp/)]

2016-01-05 Thread Nicolas Goaziou
Hello,

Dave Musicant  writes:

> I've got an org-mode file with a single line in it:
>
> #+INCLUDE: "Temp.java" src java
>
> That file, in turn, is including a Java file with a single line in it:
>
> import java.util.abcde.*;
>
> When I try to export the org file to HTML, it results in an Args out of
> range error. This error does not happen if the import statement is
> simpler, such as
>
> import java.util.*;
>
> Worse yet, this error isn't consistent. If I fix the Java file (as
> above), then go back to the org file and try to export again, it works;
> after that, if I _then_ put the longer import back into the Temp.java,
> the org file still exports correctly. After some inconclusive amount of 
> screwing around with it, exports will start failing again. But it seems 
> to reliably fail when Emacs and the org file are first opened.
>
> Any thoughts? This is a real problem for me; I'm trying to include a
> Java program into an org file, and it's choking on the import line.

Could you try development version and try again? If that fails, could
you provide a backtrace of the error ?

Regards,

-- 
Nicolas Goaziou



Re: [O] How to call org-set-property from a function

2016-01-05 Thread Julien Cubizolles
Marcin Borkowski  writes:


> What about call-interactively?
Thanks, that's the way to do it:

#+begin_src emacs-lisp
  (interactive)
  (save-excursion
(org-beamer-select-environment)
(org-set-tags-command)
  (call-interactively 'org-set-property)
)
#+end_src

>> Also, I will sometimes need to include several different
>> properties. What would be the right way to run a loop where a new
>> property is set until the user answers something like C-return at the
>> prompt?
>
> That I don't know.

I can still run C-x-p afterwards, I've already saved many keystrokes.

Julien.




Re: [O] Bug: Asychronous export fails [8.3.2 (8.3.2-52-g6d0af5-elpa @ /home/rrt/.emacs.d/elpa/org-20151228/)]

2016-01-05 Thread Nicolas Goaziou
Reuben Thomas  writes:

> I don't get an Emacs error in my Emacs, just "Process `org-export-process'
> exited abnormally"; the error is in the child Emacs process. How do I get a
> backtrace from that? (I checked the Org Manual, but it doesn't seem to
> cover this case.)

In an Org buffer C-u C-u C-c C-e will pop up the async export stack. You
can select the topmost line to enter the buffer, which should be called
*Org Export Process*.

Regards,



Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Julien Cubizolles
Nicolas Goaziou  writes:

> Julien Cubizolles  writes:
>
>> --8<---cut here---start->8---
>> ("t" "todo" entry (fileheadline "~/org/orgfiles/refile.org" "Tâches")
>> "* TODO  %? %^G\n DEADLINE: %^t" :clock-resume t :kill-buffer
>> t)--8<---cut here---end--->8---
>
> I do not see any error. Could you update Org and try again?

I can't reproduce the error now, don't know how I messed it up
before. Sorry for the noise.

Julien.




[O] command to skip the :PROPERTIES: drawer

2016-01-05 Thread Julien Cubizolles

Let's say you have an entry like the followin, with the point in the
Entry line. Is there an org command to put the mark on a newline after
:END: ? At the moment, I have too many C-n to type for my taste :-)

--8<---cut here---start->8---
*** Entry   :B_action:
:PROPERTIES:
:BEAMER_env: action
:BEAMER_COL: 0.6
:END:
--8<---cut here---end--->8---

Julien.




Re: [O] command to skip the :PROPERTIES: drawer

2016-01-05 Thread Nicolas Goaziou
Hello,

Julien Cubizolles  writes:

> Let's say you have an entry like the followin, with the point in the
> Entry line. Is there an org command to put the mark on a newline after
> :END: ? At the moment, I have too many C-n to type for my taste :-)
>
> *** Entry   :B_action:
> :PROPERTIES:
> :BEAMER_env: action
> :BEAMER_COL: 0.6
> :END:

See `org-end-of-meta-data'.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to call org-set-property from a function

2016-01-05 Thread Julien Cubizolles
Rasmus  writes:


> Does this do what you want:
>
>  (call-interactively 'org-set-property) 

Thanks, indeed it does, Marcin beat you to it though :-)

>> Also, I will sometimes need to include several different
>> properties. What would be the right way to run a loop where a new
>> property is set until the user answers something like C-return at the
>> prompt ?
>
> Here's naive approach.  Probably you can find a more elegant way.
>
> (condition-case nil
> (while t
>   (call-interactively 'org-set-property))
>   (quit nil))

That's working, I'm breaking out of the loop with C-g, is that what you
intended ?

Julien.





[O] Tags v. PROPERTIES for noexport and ignoreheadings

2016-01-05 Thread Ken Mankoff
Hi List,

I'm trying to figure out when I should be using tags and when I should be using 
properties, for the cases of "noexport" and "ignoringheading".

I think I began using Org before either of these features were supported. Then 
people provide code snippets that added this functionality based on tags. About 
a month ago I think I learned that there is now a PROPERTY drawer keyword. I 
switched to that at the time, but now I cannot find the message that suggested 
this change, nor can I find the correct keyword I invoke (org-set-property).

Thanks,

  -k.




Re: [O] command to skip the :PROPERTIES: drawer

2016-01-05 Thread Julien Cubizolles
Nicolas Goaziou  writes:

> Hello,
>
> Julien Cubizolles  writes:
>
>> Let's say you have an entry like the followin, with the point in the
>> Entry line. Is there an org command to put the mark on a newline after
>> :END: ? At the moment, I have too many C-n to type for my taste :-)
>>
>> *** Entry   :B_action:
>> :PROPERTIES:
>> :BEAMER_env: action
>> :BEAMER_COL: 0.6
>> :END:
>
> See `org-end-of-meta-data'.

Thanks, the following works.

#+begin_src emacs-lisp
(define-key org-mode-map "\C-ct" (lambda () (interactive) 
(org-end-of-meta-data)))
#+end_src

I'm curious as to why this isn't an interactive function. My workflow is
usually

1. create an entry by C-return and eventually M-right or M-left
2. add the required properties
3. type the text in the entry

Without org-end-of-meta-data, going fro 2m to 3 is not straightforward.

Julien.







Re: [O] Tags v. PROPERTIES for noexport and ignoreheadings

2016-01-05 Thread Rasmus
Ken Mankoff  writes:

> Hi List,
>
> I'm trying to figure out when I should be using tags and when I should
> be using properties, for the cases of "noexport" and
> "ignoringheading".

If you are working on a patch to be submitted to org, you should use a
property unless you have good reasons not to (IMO).  If you are working on
a hack do whatever you want...

Rasmus

-- 
Together we'll stand, divided we'll fall




Re: [O] How to call org-set-property from a function

2016-01-05 Thread Rasmus
Julien Cubizolles  writes:

> Rasmus  writes:
>
>
>> Does this do what you want:
>>
>>  (call-interactively 'org-set-property) 
>
> Thanks, indeed it does, Marcin beat you to it though :-)
>
>>> Also, I will sometimes need to include several different
>>> properties. What would be the right way to run a loop where a new
>>> property is set until the user answers something like C-return at the
>>> prompt ?
>>
>> Here's naive approach.  Probably you can find a more elegant way.
>>
>> (condition-case nil
>> (while t
>>   (call-interactively 'org-set-property))
>>   (quit nil))
>
> That's working, I'm breaking out of the loop with C-g, is that what you
> intended ?

Yes.

When you enter no value (C-j when ido is enabled) it insert :: VALUE.

For more fine grained control you probably need to write something akin to
org-set-property and check the actual values (e.g. to signal quit if an
empty quote is returned).

Rasmus

-- 
And when I’m finished thinking, I have to die a lot




Re: [O] Org campture recursively expands %-escapes

2016-01-05 Thread Nicolas Goaziou
Michael Brand  writes:

> When you evaluate
>
> (progn
>   (require 'org-feed)
>   (org-feed-format-entry
>'(:title "5 % less (see\n item \"3)\" somewhere)"  ; %h
>  :link "http://ORGMODE.org";  ; %a
>  :pubDate "Sat, 02 Jan 2016 12:00:00 +")  ; %u
>"%(capitalize \"%h\n of\") THE %(downcase \"%a\") %u"
>nil))
>
> do you get the expected "Lisp error: (void-function
> org-capture-expand-embedded-elisp)" like me on
> release_8.3.2-350-gbd3a2cb and today's release_8.3.2-441-ga87dea3 ?

I do. Somehow, I didn't see this before. This is because I renamed
`org-capture-expand-embedded-elisp' into
`org-capture--expand-embedded-elisp'.

However, ISTM there is some code duplication between
`org-feed-format-entry' and `org-capture-fill-template'. Is calling
`org-capture-expand-embedded-elisp' from the former the right thing to
do?

Regards,



Re: [O] Tags v. PROPERTIES for noexport and ignoreheadings

2016-01-05 Thread Ken Mankoff

On 2016-01-05 at 18:29, Rasmus  wrote:
> Ken Mankoff  writes:
>> I'm trying to figure out when I should be using tags and when I
>> should be using properties, for the cases of "noexport" and
>> "ignoringheading".
>
> If you are working on a patch to be submitted to org, you should use a
> property unless you have good reasons not to (IMO). If you are working
> on a hack do whatever you want...

I'm asking as an end-user writing a document. I'd rather use an official 
solution than a hack. I've been using the hacked tag solution but thought that 
there was a recent official change.

  -k.



Re: [O] Tags v. PROPERTIES for noexport and ignoreheadings

2016-01-05 Thread Rasmus
Ken Mankoff  writes:

> On 2016-01-05 at 18:29, Rasmus  wrote:
>> Ken Mankoff  writes:
>>> I'm trying to figure out when I should be using tags and when I
>
>>> should be using properties, for the cases of "noexport" and
>>> "ignoringheading".
>>
>> If you are working on a patch to be submitted to org, you should use a
>> property unless you have good reasons not to (IMO). If you are working
>> on a hack do whatever you want...
>
> I'm asking as an end-user writing a document. I'd rather use an
> official solution than a hack. I've been using the hacked tag solution
> but thought that there was a recent official change.

There’s no consensus.  As you mentioned there's noexport tags.
ox-koma-letter relies heavily on tags as well.  UNNUMBERED is a
property...

There’s no official way to use ignoreheadings.  The closes thing is the
ox-extra in contrib where Aaron curates a couple of hacks (the
ignoreheadings one by was first posted by Eric Schulte, I think when he
wrote about his thesis in Org).  That filter also uses a tag ("ignore"),
but it would be trivial to change to a property, if you prefer.

Eventually, it would be nice to add a ignoreheading property and a
"insert-just-before-heading" property (e.g. for @@latex:\clearpage@@) in
ox.  We are not there yet.

Rasmus

-- 
Vote for proprietary math!



Re: [O] Remaining time in effort estimates

2016-01-05 Thread Myles English
Hello Michael,

I did something like this a while ago but there was not much interest
at the time and I don't use it anymore:

http://thread.gmane.org/gmane.emacs.orgmode/61459/focus=61555

It would probably need updating but I hope it is useful to you.

Myles

Michael Gummelt writes:

> Hi,
>
> I set effort estimates on a list of subtasks.  I can sum those estimates as
> described here: http://orgmode.org/manual/Effort-estimates.html
>
> What I'd like to do is see the remaining effort estimate time in the
> supertask.  For example, if I have a supertask with 10 subtasks, and I mark
> 3 of them complete, I'd like to see the sum of the 7 incomplete tasks.  The
> link above shows how you can view a CLOCKSUM, but that is a different value.
>
> Knowing how long is remaining on a supertask seems to be a fundamental
> feature for project management.  Is there any solution in org mode?
>
> Thanks,
> Michael Gummelt




Re: [O] Bug: time duration in capture template broken

2016-01-05 Thread Charles Millar

Hi,

On 01/05/2016 05:31 PM, Nicolas Goaziou wrote:

Hello,

Charles Millar  writes:


Until recently given the following capture template

"* APPOINTMENT %?%^{BeginTimeDuration}T %^{Location} %^{Reason}"

When prompted for the BeginTimeDuration and entered 2/29 09:00+1:00,  etc

would result in

* APPOINTMENT <2016-02-29 Mon 09:00-10:00> Location Reason

it now results in

** APPOINTMENT <2016-02-29 Mon (system time when capture made)>
Location Reason

If no duration is given, the date and time as entered into the
template are correctly captured

* APPOINTMENT <2016-02-29 Mon 09:00> Location Reason

Same error if I use 13:00-14:00 or 13:00--14:00 for duration, the
start and end time still results in the system time when I C-c C-c the
capture.

Fixed. Thank you.

Works now. Thank you.



Re: [O] How to call org-set-property from a function

2016-01-05 Thread Julien Cubizolles
Rasmus  writes:


> When you enter no value (C-j when ido is enabled) 

or C-return with helm.

> it insert :: VALUE.

But then you end up with a malformed drawer, so C-g is better for the
moment.

> For more fine grained control you probably need to write something akin to
> org-set-property and check the actual values (e.g. to signal quit if an
> empty quote is returned).

I'll give it a try someday.

Thanks for your help,

Julien.




Re: [O] How to call org-set-property from a function

2016-01-05 Thread Julien Cubizolles
Rasmus  writes:


> For more fine grained control you probably need to write something akin to
> org-set-property and check the actual values (e.g. to signal quit if an
> empty quote is returned).

Actually, shouldn't org-set-property check for an empty quote for the
property name since it will result :: ie a malformed drawer ?

Julien.




Re: [O] How to call org-set-property from a function

2016-01-05 Thread Rasmus
Julien Cubizolles  writes:

> Rasmus  writes:
>
>
>> For more fine grained control you probably need to write something akin to
>> org-set-property and check the actual values (e.g. to signal quit if an
>> empty quote is returned).
>
> Actually, shouldn't org-set-property check for an empty quote for the
> property name since it will result :: ie a malformed drawer 

It's a bug.

 http://orgmode.org/worg/dev/org-syntax.html#Node_Properties

Please start a new thread, and feel free to suggest a patch.

Thanks,
Rasmus

-- 
One thing that is clear: it's all down hill from here 




Re: [O] just discovered how well NLinum-mode works with large orgmode files

2016-01-05 Thread Grant Rettke
On Tue, Jan 5, 2016 at 9:13 AM, Xebar Saram  wrote:
> just wanted to share a discovery (non newbs like me probably know this
> already)
>
> for a few months i have been struggling with linum mode after it keeps
> freezing emacs on large files. today i discovered this:
>
> http://elpa.gnu.org/packages/nlinum.html
>
> its amazing how we it works even in huge orgmode file

Thank you.

Now I can expand and collapse all of the headings in my favorite 6063
Org-Mode file with only a little slowdown; with linum it was
impossible.



Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Erik Hetzner
Thanks for the feedback, Kyle! I will make these changes and resubmit.

And thanks for the pointer to =git annex find PATH=. I think I can use that to
check if a file needs to be fetched.

(more below)

On Mon, 04 Jan 2016 22:21:41 -0800,
Kyle Meyer  wrote:
> 
> Thanks for the patch.
>
> […]
> 
> > + (org-attach-use-annex)
> > + (not (file-exists-p (file-symlink-p path
> > +(call-process "git" nil nil nil "annex" "get" path))
> 
> - Should this display a message before calling "git annex get" to let the
>   user know what's happening in case fetching the file takes some time?

That would make sense. I’ll change it.

> - Should there be a setting the controls whether attachments are
>   automatically fetched?

I don’t see why. If a file is managed in git annex and the user is trying to
open it, I can’t imagine why they wouldn’t want it fetched.

best, Erik
--
Sent from my free software system .



Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Erik Hetzner
Hi Rasmus,

On Tue, 05 Jan 2016 01:56:39 -0800,
Rasmus  wrote:
> 
> Hi Erik,
> 
> 
> For long prose like this I'd just export the patch (git format-patch)
> and attach it to an email like this.  But this is also fine...  Perhaps
> Kyle's method is more pro.

Thanks! I’m not sure which seems better either.

> […]
> 
> This is a good idea.  Though really this sounds like something that
> should be done by the git annex assistant rather than per application.
> 
> Has Joey spoken for or against automatic fetching of content when
> requested?

If a user prefers to use git annex assistant or preferred content that shouldn’t
interfere with this. But to my mind, opening an attachment is a pretty clear
indication of the user’s desire to fetch the file from git annex, so it would be
nice to do it.

> > (It would be nice to have Org do the same thing when exporting to HTML 
> as well,
> > if the git annex file is an image that is being exported as an 
> embedded image
> > link, but I can’t figure out how to do that.)
> 
> A stronger argument for for first figuring out whether it 

Well, I think it would have been nice, but the “preferred content” feature you
reference below seems like it could cover most of this. And, while I think that
trying to open an attachment is a pretty clear indication that the user wants to
fetch the file from git annex, exporting is much less clear. I’m pretty
convinced that Kyle is right that git annex support belongs in org-attach, but
not elsewhere.

> […]
> 
> IMO we should get rid of org-attach-git-annex-cutoff and point to
> preferred content:
> 
>   http://git-annex.branchable.com/preferred_content/
> 
> E.g. I might have a small mp3 file.  There's no point in storing it with
> git rather than git annex.
> 
> When preferred content is set up, I think git annex add will do the
> right thing.

I’m not certain how preferred content works, but it doesn’t seem to apply to
which content is added to git annex (as opposed to added to the git repo
itself), which is what org-attach-git-annex-cutoff does.

> Can you ask annex if it's an annexed file?  A symlink in an annexed 
> folder,
> to a usb disk that is not attached would pass this test.  But the 
> indication would be wrong.

Thanks! I’m going to use Kyle’s suggestion here, to use =git annex find PATH=.

best, Erik
--
Sent from my free software system .



Re: [O] [PATCH] org-attach.el: Fetch attachments from git annex

2016-01-05 Thread Kyle Meyer
Rasmus  writes:

> I want to know if e.g. the git annex (assistant?) could support
> transparently getting files.  That is once I try to open file X, which is
> annexed and stored somewhere else, X will automatically be fetched
> /without/ the need to call "git annex get" first.

No, I don't think git-annex has a feature like this, though it seems a
"git annex open" command was requested a while back:

  https://git-annex.branchable.com/todo/git_annex_open/

--
Kyle



Re: [O] Org campture recursively expands %-escapes

2016-01-05 Thread Michael Brand
Hi Nicolas

On Wed, Jan 6, 2016 at 12:39 AM, Nicolas Goaziou 
wrote:
> I do. Somehow, I didn't see this before. This is because I renamed
> `org-capture-expand-embedded-elisp' into
> `org-capture--expand-embedded-elisp'.
>
> However, ISTM there is some code duplication between
> `org-feed-format-entry' and `org-capture-fill-template'. Is calling
> `org-capture-expand-embedded-elisp' from the former the right thing to
> do?

I don't really know. It was only my choice of how to avoid code
duplication between `org-feed-format-entry' and
`org-capture-fill-template' according to
http://thread.gmane.org/gmane.emacs.orgmode/56991/focus=57265
and with lack of better knowledge from my side. If there is a better
solution please go ahead.

Michael


[O] Bug: #+begin_html.. #+end_html export bugs [8.3beta (release_8.3beta-1038-gcd7cbd @ d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)]

2016-01-05 Thread tyuuni
 

 

Remember to cover the basics, that is, what you expected to happen and

what in fact did happen.  You don't know how to make a good report?  See

 

 http://orgmode.org/manual/Feedback.html#Feedback

 

Your bug report will be posted to the Org-mode mailing list.



 

The content between #+begin_html and #+end_html is exported as "it is",

so I see the original html code in my browser. help...

 

regards

 

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)

of 2015-12-25

Package: Org-mode version 8.3beta (release_8.3beta-1038-gcd7cbd @ 
d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)

 

current state:

==

(setq

org-src-lang-modes '(("ipython" . python) ("ocaml" . tuareg)

  ("elisp" . emacs-lisp) ("ditaa" . artist)

  ("asymptote" . asy) ("dot" . fundamental)

  ("sqlite" . sql) ("calc" . fundamental) ("C" . c)

  ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)

  ("shell" . sh) ("bash" . sh))

org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename

org-export-babel-evaluate nil

org-tab-first-hook '(org-hide-block-toggle-maybe

  org-babel-hide-result-toggle-maybe

  org-babel-header-arg-expand)

org-latex-classes '(("beamer"

  "\\documentclass{beamer}\n   
\\usepackage[fontset=none,UTF8,a4paper,zihao=-4]{ctex}" org-beamer-sectioning)

 ("ctexbook"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexbook}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("ctexrep"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexrep}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("ctexart"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexart}"

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")

  ("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

 ("article" "\\documentclass[11pt]{article}"

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")

  ("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

 ("report" "\\documentclass[11pt]{report}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("book" "\\documentclass[11pt]{book}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 )

org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex"))

("T1" "fontenc" t ("pdflatex"))

("" "graphicx" t) ("" "grffile" t)

("" "longtable" nil) ("" "wrapfig" nil)

("" "rotating" nil) ("" "amsmath" t)

("" "textcomp" t) ("" "amssymb" t)

("" "capt-of" nil) ("" "hyperref" nil))

org-speed-command-hook '(org-speed-command-default-hook

  org-babel-speed-command-hook)

org-ref-pdf-directory "~/orgpapers/papers/"

org-occur-hook '(org-first-headline-recenter)

org-metaup-hook '(org-babel-load-in-session-maybe)

org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]

org-format-latex-options '(:foreground default :background default :scale


[O] Bug: #+begin_html.. #+end_html export bugs [8.3beta (release_8.3beta-1038-gcd7cbd @ d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)]

2016-01-05 Thread tyuuni
 

 

Remember to cover the basics, that is, what you expected to happen and

what in fact did happen.  You don't know how to make a good report?  See

 

 http://orgmode.org/manual/Feedback.html#Feedback

 

Your bug report will be posted to the Org-mode mailing list.



 

The content between #+begin_html and #+end_html is exported as "it is",

so I see the original html code in my browser. help...

 

regards

 

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)

of 2015-12-25

Package: Org-mode version 8.3beta (release_8.3beta-1038-gcd7cbd @ 
d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)

 

current state:

==

(setq

org-src-lang-modes '(("ipython" . python) ("ocaml" . tuareg)

  ("elisp" . emacs-lisp) ("ditaa" . artist)

  ("asymptote" . asy) ("dot" . fundamental)

  ("sqlite" . sql) ("calc" . fundamental) ("C" . c)

  ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)

  ("shell" . sh) ("bash" . sh))

org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename

org-export-babel-evaluate nil

org-tab-first-hook '(org-hide-block-toggle-maybe

  org-babel-hide-result-toggle-maybe

  org-babel-header-arg-expand)

org-latex-classes '(("beamer"

  "\\documentclass{beamer}\n   
\\usepackage[fontset=none,UTF8,a4paper,zihao=-4]{ctex}" org-beamer-sectioning)

 ("ctexbook"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexbook}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("ctexrep"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexrep}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("ctexart"

  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexart}"

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")

  ("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

 ("article" "\\documentclass[11pt]{article}"

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")

  ("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

 ("report" "\\documentclass[11pt]{report}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 ("book" "\\documentclass[11pt]{book}"

  ("\\part{%s}" . "\\part*{%s}")

  ("\\chapter{%s}" . "\\chapter*{%s}")

  ("\\section{%s}" . "\\section*{%s}")

  ("\\subsection{%s}" . "\\subsection*{%s}")

  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 )

org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex"))

("T1" "fontenc" t ("pdflatex"))

("" "graphicx" t) ("" "grffile" t)

("" "longtable" nil) ("" "wrapfig" nil)

("" "rotating" nil) ("" "amsmath" t)

("" "textcomp" t) ("" "amssymb" t)

("" "capt-of" nil) ("" "hyperref" nil))

org-speed-command-hook '(org-speed-command-default-hook

  org-babel-speed-command-hook)

org-ref-pdf-directory "~/orgpapers/papers/"

org-occur-hook '(org-first-headline-recenter)

org-metaup-hook '(org-babel-load-in-session-maybe)

org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]

org-format-latex-options '(:foreground default :background default :scale