Re: [O] Display image in current section

2014-12-02 Thread Leu Zhe
Dear John,

Thanks very much, it works perfect.

On Tue, Dec 2, 2014 at 4:19 AM, John Kitchin jkitc...@andrew.cmu.edu
wrote:

 Leu Zhe lzhe...@gmail.com writes:

 (defun show-images-subtree ()
  (interactive)
  (save-restriction
   (org-narrow-to-subtree)
   (org-display-inline-images nil t (point-min) (point-max


 Should do the trick.
  Hi everyone
 
  I current use org-mode to organise lots of images in different
  sections.
 
  Sometimes i just would like to display the image in current section,
  not all the image, because it takes some time to show them all.
  Any solution?
 
  Thanks in advance.
 
  llcc
 

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



[O] gnupg-2.1.0-4 Breaks Encryption in Emacs.

2014-12-02 Thread Ian Barton
This happened to me yesterday. Thought I would re-post here as there is 
a potential loss of data and I use org-mode in my encrypted files.


Symptoms are errors like:

Opening output file: [pub f 1024 17 3B6F8AF143C21F3B 1320594077 
1509822256 nil u nil ...], 15


The error only happens when you change the content and try to save the 
file. Sometimes the file will be deleted (thank goodness for git).


Bug report here: https://bugs.archlinux.org/task/42972

Ian.



Re: [O] gnupg-2.1.0-4 Breaks Encryption in Emacs.

2014-12-02 Thread Eric Abrahamsen
Ian Barton li...@wilkesley.net writes:

 This happened to me yesterday. Thought I would re-post here as there
 is a potential loss of data and I use org-mode in my encrypted files.

 Symptoms are errors like:

 Opening output file: [pub f 1024 17 3B6F8AF143C21F3B 1320594077
 1509822256 nil u nil ...], 15

 The error only happens when you change the content and try to save the
 file. Sometimes the file will be deleted (thank goodness for git).

 Bug report here: https://bugs.archlinux.org/task/42972

 Ian.

Thanks for this! I'd noted it broke, but didn't realize data loss was a
possibility...

E




Re: [O] how to export to HTML keeping the whitespaces

2014-12-02 Thread Nicolas Goaziou
Hello,

jenia.iv...@gmail.com (jenia.ivlev) writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 jenia.iv...@gmail.com (jenia.ivlev) writes:

 Hello:

 I want to export to HTML and keep the white spaces.
 Normally, I have to do skip a line (two newline characters) or use 
 #+begin_verse... #+end_verse. 
 Which is not optimal. The two new lines take up too much space, and the
 begin/end verse don't export in the same to way to HTML as it does to
 text. 
 To HTML it keep the indentation corresponding to its location in the
 tree, and to text it has a constant indentation (indentation it gives to
 verse i think). 
 So what is the proper way to do this? How do I instruct org-export to
 keep the whitespaces?

 Thanks very much in advnace for your time and kind help.

 Take a look at the docstring for the org-export-preserve-breaks
 variable. That ought to do it, and you can set it per-file in the export
 options.

 Eric


 Thanks. 
 I set (org-export-preserve-breaks t) in .emacs file and it does preserve
 the breaks, but not the white spaces: it doesnt indent depending on the
 nesting in the org-tree, and it doesnt indent if I press
 space. The text is shown to the left mode of the
 screen. 

 Is there a way to change that?

You can try

  (defun my-html-nobreak-space-filter (text backend info)
(and (org-export-derived-backend-p backend 'html)
 (replace-regexp-in-string   nbsp; text)))

  (add-to-list 'org-export-filter-plain-text-functions
   #'my-html-nobreak-space-filter)


Regards,

-- 
Nicolas Goaziou



Re: [O] timezone in org-mode events?

2014-12-02 Thread Nicolas Goaziou
Hello,

Benjamin Slade sl...@jnanam.net writes:

 As far as I can tell, org-mode (at least out-of-the-box) doesn't seem to
 support any sort of timezone information in events (deadlines etc.).
 There are certainly events for which it would be useful to establish the
 absolute time (e.g. for conference abstract submission deadlines) either
 in terms of timezone abbreviations or UTC+/-N format. Is this sort of
 feature enableable as an option somewhere in org-mode?

This feature isn't implemented in Org yet.

However, adding optional timezone information to Org timestamps is, IMO,
important, and patches are welcome.


Regards,

-- 
Nicolas Goaziou



Re: [O] Customizing Timestamps in html Export.

2014-12-02 Thread Nicolas Goaziou
Hello,

Ian Barton li...@wilkesley.net writes:

 However, the using the minimal.el:

 #+begin_src emacs-lisp
 ;; activate debugging
 (setq debug-on-error t)
 (setq debug-on-quit t)

 (add-to-list 'load-path ~/.emacs.d/src/lisp)
 (require 'org)

 ;; The following lines are always needed.  Choose your own keys.
   (add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
   (global-set-key \C-cl 'org-store-link)
   (global-set-key \C-ca 'org-agenda)
   (global-set-key \C-cb 'org-iswitchb)

 (setq org-html-metadata-timestamp-format %a %d %B %Y )
 (setq org-time-stamp-custom-formats  %a %d %B %Y )

 #+end_src

 and the following test.org:

 #+begin_src

 The date: [2014-12-01 Mon]

 #+end_src

 gives the following result with C-c C-x C-t

 The date: [2014-12-01 Mon]

 Since nobody else has reported this, I imagine it's a case of user 
 stupidity, rather than a bug.

 Can anyone point out my error?

You need to set `org-display-custom-times' to a non-nil value, too. If
you need this feature only during export, you could use a BIND keyword:

  #+BIND: org-display-custom-times t

assuming `org-export-allow-bind-keywords' is also non-nil.


Regards,

-- 
Nicolas Goaziou



Re: [O] gnupg-2.1.0-4 Breaks Encryption in Emacs.

2014-12-02 Thread Christian Kruse
Hi,

At Tue, 02 Dec 2014 08:55:29 +, Ian Barton wrote:
 This happened to me yesterday. Thought I would re-post here as there
 is a potential loss of data and I use org-mode in my encrypted files.
 
 Symptoms are errors like:
 
 Opening output file: [pub f 1024 17 3B6F8AF143C21F3B 1320594077
 1509822256 nil u nil ...], 15

This totally explains why I can't sign or encrypt mails
anymore. Thanks for the pointer!

Best regards,
-- 
Christian Kruse
http://ck.kennt-wayne.de/



Re: [O] Bug: org-timer loses track of running timer [8.3beta (release_8.3beta-582-g40f2b8 @ mixed installation! /home/rbsmith/.emacs.d/el-get/org-mode/contrib/lisp/ and /home/rbsmith/.emacs.d/el-get/o

2014-12-02 Thread Nicolas Goaziou
Hello,

Randy Smith perlstal...@gmail.com writes:

 I'm using org-mode 8.3beta with emacs 24.4.1. I can start a timer using
 org-mode-start but when I try to stop it with org-mode-stop, emacs
 reports back No running timer.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



[O] Problem with pretty entities and subscript

2014-12-02 Thread Thomas Holst
Hello,

super- and subscript display does not work as expected anymore. (At
least for me :-) )

I have `org-pretty-entities' set to t. And in most of my files I have an
options line which contains:

#+OPTIONS: ^:{}

So super- and subscripts should only be displayed when there are curly
braces oround the text.

But text is always displayed subscripted after a `_' even if there are
no curly braces around the text after `_'.

Git bisecting showed that it works prior to:

61a241f0dc07aef5a3a5c2bd037a197236bde2e6 is the first bad commit
commit 61a241f0dc07aef5a3a5c2bd037a197236bde2e6
Author: Nicolas Goaziou m...@nicolasgoaziou.fr
Date:   Tue Oct 14 10:53:29 2014 +0200

Rewrite setup keywords initialization

* lisp/org-table.el (org-table-set-constants): Remove function.
* lisp/org.el (org-set-regexps-and-options): Rewrite function.  Merge
  it with `org-set-regexps-and-options-for-tags'.
(org-set-regexps-and-options-for-tags): Remove function
(org--setup-collect-keywords, org--setup-process-tags): New functions.
(org-mode): Remove `org-set-regexps-and-options-for-tags' call.
(org-agenda-prepare-buffers): Use optimized setup for tags in all
cases.  Improve docstring.
(org-make-options-regexp): Make returned regexp more efficient.

as expected.

^:t   subscript is always displayed
^:{}  subscript is only displayd when surounded by curly braces.
^:nil text is never displayed subscripted

I have tested this with a minimal setup:

: emacs -Q 

and:

#+begin_src elisp
  ;; set path to git repo
  (add-to-list 'load-path ~/git-emacs/site-lisp)
  (add-to-list 'load-path ~/git-emacs/org-mode/lisp)

  (require 'org)
  (setq org-pretty-entities t)

  (find-file ~/emacs/tst-pretty-entities/entities-tst.org)
#+end_src

#+begin_src org
  #+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:{} arch:headline author:t c:nil
  #+OPTIONS: creator:comment d:(not LOGBOOK) date:t e:t email:nil f:t 
inline:t num:t
  #+OPTIONS: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t timestamp:t 
toc:t
  #+OPTIONS: todo:t |:t
  #+TITLE: entities-tst
  #+DATE: 2014-12-02 Di
  #+AUTHOR: Thomas Holst
  #+EMAIL: thomas.ho...@de.bosch.com
  #+DESCRIPTION:
  #+KEYWORDS:
  #+LANGUAGE: en
  #+SELECT_TAGS: export
  #+EXCLUDE_TAGS: noexport
  #+CREATOR: Emacs 24.3.1 (Org mode 8.3beta)


  \Delta
  tst_ding_ding
  =tst_ding=
#+end_src

Org-mode version 8.3beta
  (release_8.3beta-595-g5945be @
  c:/daten/users/DE_hts2fe/git-emacs/org-mode/lisp/)
  
GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
Win7

Thanks for looking into this
-- 
Mit freundlichen Grüßen / Best regards 

Thomas Holst 
DGS-EC/ESE4

Tel.   +49 (711) 811-40681
PC-Fax +49 (711) 811-5182208



Re: [O] Warning about section named Footnotes

2014-12-02 Thread Nicolas Goaziou
Arni Magnusson arn...@hafro.is writes:

 The location of the second patch (in orgguide.texi) is line 348:

Thanks for the patch.

 @ vindex org-footnote-section
 @ noindent Note that the headline @samp{Footnotes} is a @emph{reserved}
 name. A subtree with this headline will be silently ignored by exporting
 functions, unless the value of @code{org-footnote-section} is
modified.

I think we should emphasize `org-footnote-section' over Footnotes
which is but its default value. E.g.,

  Note that a headline named after `org-footnote-section', which defaults
  to @samp{Footnotes}, is considered as special...

Also, Texinfo requires two spaces after a sentence.

Enventually, could you provide the patch with a proper commit message,
using git format-patch? You need to add TINYCHANGE at the end of the
message if you haven't signed FSF papers yet.


Regards,



[O] Suggestion about :session

2014-12-02 Thread abonnements

Hello everybody,
reading the manual (Release 8.2.10), I wonder if the syntax of 
:session header may not be changed in the way of  :tangle or 
:noweb (sorry for the frenchy expression). I mean :


 * :session yes (now :session)
 * :session no  (now :session none)
 * :session name (now :session name)

It seems to be more homogeneous.

THierry

PS: Of course the old syntax must be supported.


[O] How to send a patch of a patch...

2014-12-02 Thread abonnements

Hello,
 yesterday I made some change in doc/org.texi and (thanks to 
Bastien) I sent the diff patch (obtained by C-x v =) that I send here.


Today, I made some other changes on the same file, but C-x v = give 
me only the diff between my version of yesterday and the one of today.


As I think (may be wrongly) that a patch must always be given 
between the original file and the latest newer version what is the right 
method to do so?

Thanks.
Thierry

PS: I managed to get what I want in recloning org-mode.git but it seems 
not to be the right way.






[O] Why is ox-gfm.el missing from the org-plus-contrib elpa package?

2014-12-02 Thread William Henney
Hi

I have org-plus-contrib-20141201 installed from http://orgmode.org/elpa/,
which as far as I can tell is the latest version.  I was expecting to find
the Github-Flavoured Markdown exporter ox-gfm.el to be included because it
is listed in the contrib/ directory (e.g.,
http://orgmode.org/cgit.cgi/org-mode.git/tree/contrib/lisp/ox-gfm.el).
However, it doesn't seem to be there and it is not mentioned anywhere in
http://orgmode.org/elpa/build-org-pkg.txt

Is this deliberate?  I can always install it by hand, but it just seemed a
bit odd that it was missing.

Will

P.S. There is also a broken link in the docs at http://orgmode.org/elpa.html.
Instead of http://orgmode.org/build-org-pkg.txt, it should be changed to
http://orgmode.org/elpa/build-org-pkg.txt


-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] Suggestion about :session

2014-12-02 Thread Rainer M Krug
abonnements abonneme...@thierry-pelle.eu writes:

 Hello everybody,
 reading the manual (Release 8.2.10), I wonder if the syntax of
 :session header may not be changed in the way of  :tangle or
 :noweb (sorry for the frenchy expression). I mean :

  * :session yes (now :session)
  * :session no  (now :session none)
  * :session name (now :session name)

 It seems to be more homogeneous.

+1

Consistency would be a big plus.


 THierry

 PS: Of course the old syntax must be supported.

This would mean, that

| new syntax| old syntax|
|---+---|
| :session yes  | :session  |
| :session none | :session no   |
| :session whatever | :session whatever |
|   |   |

Am I correct?

I think that should not cause any problems. 

Cheers,

Rainer

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Suggestion about :session

2014-12-02 Thread abonnements



Hello everybody,
 reading the manual (Release 8.2.10), I wonder if the syntax of
:session header may not be changed in the way of  :tangle or
:noweb (sorry for the frenchy expression). I mean :

  * :session yes (now :session)
  * :session no  (now :session none)
  * :session name (now :session name)

It seems to be more homogeneous.

+1

Consistency would be a big plus.


THierry

PS: Of course the old syntax must be supported.

This would mean, that

| new syntax| old syntax|
|---+---|
| :session yes  | :session  |
| :session none | :session no   |
| :session whatever | :session whatever |
|   |   |

Am I correct?

Good for me.

I think that should not cause any problems.

Cheers,

Rainer






Re: [O] Hidden files from beamer export, not cleaned up by org

2014-12-02 Thread James Harkins
Nick Dokos ndokos at gmail.com writes:

 Somewhere but probably not in org - it can't clean up what it does not
 know about. What system is this? Does this have anything to do with
 
 http://en.wikipedia.org/wiki/Filesystem_in_Userspace
 
 perhaps?

That's probably it. I set up my machine to dual-boot Windows and Ubuntu (I'd
happily do without Windows, but I have to teach some Windows-only software),
and (as far as I recall) I'm seeing this only on an NTFS partition mounted
into the /media directory. It makes sense for Fuse to be involved in that case.

I won't worry about it, then, or maybe hack up a post-export hook.

Thanks for clarifying,
hjh




[O] [RFC/PATCH] Fixes for org-timer

2014-12-02 Thread Kyle Meyer
Hello,

I've attached a few patches for org-timer.el.

Some additional comments on two of the patches:

[PATCH 1/4] org-timer.el (org-timer): Recognize double prefix

This patch makes org-timer behave as described in the docstring when
it is given a double prefix argument.  However, I'd actually be in
favor of removing this functionality from org-timer (and
org-timer-start) since it's already available directly through the
interactive command org-timer-change-times-in-region.

[PATCH 4/4] org-timer.el: Isolate commands of different timers

This patch fixes several issues that were caused by executing a
relative timer command when the countdown timer was running, or vice
versa (see log message for details).  Perhaps it would also be
helpful to make it clearer which commands belong to the two
different timers.  This is clear in the manual (the relative and
countdown timer have different documentation pages), but what do you
think about renaming countdown timer commands to have 'countdown'
after 'org-timer' (e.g., org-timer-countdown-set-timer)?

Thanks.

--
Kyle

From 1f4dd0e57401558a0cace1b421b1d37bca37fd15 Mon Sep 17 00:00:00 2001
From: Kyle Meyer k...@kyleam.com
Date: Mon, 1 Dec 2014 02:02:19 -0500
Subject: [PATCH 1/4] org-timer.el (org-timer): Recognize double prefix

* lisp/org-timer.el (org-timer): Follow the behavior described in the
docstring for a double prefix argument.
---
 lisp/org-timer.el | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index d02362c..c9710ca 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -177,11 +177,13 @@ (defun org-timer (optional restart no-insert-p)
 If NO-INSERT-P is non-nil, return the string instead of inserting
 it in the buffer.
   (interactive P)
-  (when (or (equal restart '(4)) (not org-timer-start-time))
-(org-timer-start))
-  (if no-insert-p
-  (org-timer-value-string)
-(insert (org-timer-value-string
+  (if (equal restart '(16))
+  (org-timer-start restart)
+(when (or (equal restart '(4)) (not org-timer-start-time))
+  (org-timer-start))
+(if no-insert-p
+	(org-timer-value-string)
+  (insert (org-timer-value-string)
 
 (defun org-timer-value-string ()
   Set the timer string.
-- 
2.1.3

From 96b50113f8ddba96488bac8eefdc90e31df23415 Mon Sep 17 00:00:00 2001
From: Kyle Meyer k...@kyleam.com
Date: Tue, 2 Dec 2014 22:05:08 -0500
Subject: [PATCH 2/4] org-timer.el (org-timer-start): Reset on pause

* lisp/org-timer.el (org-timer-start): Reset to correct state when called
with a paused timer.

Since org-timer-pause-time was not returned to nil, the modeline
remained stuck at the paused time.
---
 lisp/org-timer.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index c9710ca..1c4153c 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -124,6 +124,7 @@ (defun org-timer-start (optional offset)
 	(setq org-timer-start-time
 	  (seconds-to-time
 	   (- (org-float-time) delta
+  (setq org-timer-pause-time nil)
   (org-timer-set-mode-line 'on)
   (message Timer start time set to %s, current value is %s
 	   (format-time-string %T org-timer-start-time)
-- 
2.1.3

From 9914c187c3b5ff1dcabfd15a4588e7dbb676231d Mon Sep 17 00:00:00 2001
From: Kyle Meyer k...@kyleam.com
Date: Tue, 2 Dec 2014 23:35:49 -0500
Subject: [PATCH 3/4] org-timer.el: Reset properly after countdown timer

* lisp/org-timer.el (org-timer-set-timer): Reset org-timer-start-time
after countdown completes.

* lisp/org-timer.el (org-timer-cancel-timer): Reset org-timer-start-time
when canceling countdown timer.
---
 lisp/org-timer.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index 1c4153c..6cecd7e 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -359,6 +359,7 @@ (defun org-timer-cancel-timer ()
 (run-hooks 'org-timer-cancel-hook)
 (cancel-timer org-timer-current-timer)
 (setq org-timer-current-timer nil
+	  org-timer-start-time nil
 	  org-timer-timer-is-countdown nil)
 (org-timer-set-mode-line 'off)
 (message Last timer canceled)))
@@ -446,6 +447,7 @@ (defun org-timer-set-timer (optional opt)
 		(run-with-timer
 		 secs nil `(lambda ()
  (setq org-timer-current-timer nil)
+ (setq org-timer-start-time nil)
  (org-notify ,(format %s: time out hl) ,org-clock-sound)
  (setq org-timer-timer-is-countdown nil)
  (org-timer-set-mode-line 'off)
-- 
2.1.3

From 573fd67baaf17a5344fe0827641e5edb271dd599 Mon Sep 17 00:00:00 2001
From: Kyle Meyer k...@kyleam.com
Date: Tue, 2 Dec 2014 01:34:38 -0500
Subject: [PATCH 4/4] org-timer.el: Isolate commands of different timers

* lisp/org-timer.el: Fix timer bugs resulting from crosstalk between
commands for relative and countdown timers.

Several issues were caused by relative timer functions trying to work
with countdown timers.

- 

[O] SCHEDULED in a comment line is not ignored by sparse-tree

2014-12-02 Thread James Harkins
This appears to be buggy behavior, but I'm asking here first in case it might 
already have been fixed.

A couple of months ago, I was trying to create a repeating timestamp for two 
different days of the week. First I tried a diary-sexp, but that wasn't 
compatible with habits, so I gave that up. But I didn't want to throw away the 
string completely, because it took some digging to figure it out. So I put #  
at the beginning of the SCHEDULED line and thought that would be the end of it. 
(In the source block, # has two spaces before it. These come from C-c ' 
editing. In my original file, the # for the comment is flush left.)

#+BEGIN_SRC org
  ,** TODO Update lesson grades 2 :Comp:
 SCHEDULED: 2014-12-06 Sat 23:59 .+1w
 :PROPERTIES:
 :STYLE:habit
 :LOGGING:  TODO MAYBE INPROG MTG | DONE(!) POSTPONED CANCELED
 :END:
  #   SCHEDULED: %%(memq (calendar-day-of-week date) '(3 6))
#+END_SRC

Just now, I tried to open a sparse-tree view with a scheduled date range -- C-c 
/ c c D (set range) -- and got the message:

byte-code: Bad timestamp `%%(memq (calendar-day-of-week date) '(3 6))'
Error was: (Not a standard Org-mode time string: %%(memq (calendar-day-of-week 
date) '(3 6)))

This is the only occurrence of memq anywhere in this org file, so it *must* be 
coming from this line. So, whatever regexp is handling scheduled timestamp 
searches doesn't check whether the line is a comment or not.

There may be a valid reason for this behavior, but I tend to think a comment 
should always be a comment.

hjh