Re: [O] how to use :options-alist in org-export-define-derived-backend ?

2014-06-15 Thread Nicolas Goaziou
Bastien  writes:

> Okay, but what is the benefit of not using a default title?

It removes a hack. But there are other reasons at
http://permalink.gmane.org/gmane.emacs.orgmode/86442 (e.g., a default
title hardly makes sense anyway).


Regards,

-- 
Nicolas Goaziou



Re: [O] babel python example not reproducible

2014-06-15 Thread Shiyuan
The two setting doesn't seem to have effect.
(setq python-shell-interpreter "ipython")
(setq python-shell-interpreter-args "--pylab")
When I did `C-c C-c` on the SRC block to execute the code, emacs created a
buffer with the interior python process. When I switched to the process, I
saw it is python 2.5.3, not ipython.

Also, it looks like the problem is with the shell interpreter. If I enter
command directly in the shell buffer, the shell buffer will echo command
itself and then the result.

>>> print "Hello"
print "Hello"
Hello.

Is there any setting to control this shell behavior? Can I make the python
shell not echo the command? Thanks.


On Wed, Jun 11, 2014 at 12:48 AM, Doyley, Marvin 
wrote:

> Works for me, see example below
> #+BEGIN_SRC python :results output :session foo
>
> x=100
> print "hello"
> 2
> print "bye"
> #+END_SRC
>
> #+RESULTS:
> :
> : >>> hello
> : 2
> : bye
>
> #+BEGIN_SRC python :results output :session foo
>
> print "hello good bye"
> print "Printing value from previous session", x
> #+END_SRC
>
> #+RESULTS:
> :
> : hello good bye
> : Printing value from previous session 100
>
> The only difference is that I like to give my session a name and for
> what it is worth I am using ipython (don't think this will make a
> difference). You can do this including the
> following statement in your .emacs file
>
> (setq python-shell-interpreter "ipython")
> (setq python-shell-interpreter-args "--pylab")
>
> Hope this help.
> Cheers,
> M
>
>
>


Re: [O] How do you capture the intent never to tangle or weave a headline or its children?

2014-06-15 Thread Charles Berry
Grant Rettke  wisdomandwonder.com> writes:

> 
> Good evening,
> 
> For both performance and cognitive reasons, sometimes I specifically
> never want to tangle or weave a headline or any of
> its children. I still value it though, so it belongs in that document,
> and it wouldn't make sense for it to be linked as an
> external document. For performance reasons, I suspect that it would
> speed up tangling, but I need to verify this.
> 
> Thus far I just add something like this, so at least it is obvious to
> *me* what is my intent:
> 
> # INTENT: never weave or tangle this headline or its children
>   :PROPERTIES:
>   :exports: none
>   :tangle: no
>   :END:
> 

You want this:

http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html#Header-arguments-in-Org-mode-properties

i.e. :header-args: :exports none :tangle no

HTH,

Chuck




Re: [O] Capturing outgoing gnus e-mail

2014-06-15 Thread Esben Stien
Eric Abrahamsen  writes:

> [1]: https://github.com/girzel/gnorb

"Some way to create a TODO for an outgoing mail, saying 'this mail needs
a response, check in N days to see if we’ve got one.'"

That's really cool and I've been looking for ages for something like that;)

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



[O] Link to Top Most Heading

2014-06-15 Thread Esben Stien
I'm trying to figure out how I can get a link to the top most heading
without actually moving point up there and doing C-c C-l.

Is there some function to do that?

If I try using the function outline-previous-heading, how can I know
when I've reached the top as it seems to just bang its head in the roof
of the file when it reaches the top. It also finds stuff above the
topmost heading, like lines beginning with "#". 

Any pointers as to what I can try?

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] proposal to have ignoreheading tags/properties

2014-06-15 Thread Eric Schulte
Hi,

Nicolas Goaziou  writes:

> Hello,
>
> Eric Schulte  writes:
>
>> Why TODO types rather than a tag?  IMO using a TODO type would conflate
>> task management and document structuring.  What do you think about the
>> attached patch which should add this functionality to the core.
>
> Thank you. Unfortunately, in many cases this code will make the parse
> tree invalid. Consider the example below:
>
>   * H1
> Text1
>   ** H2 :inline:
> Text2
>
> A simplified version of the parse tree is:
>
>   (headline
>(section
> (paragraph "Text1"))
>(headline
> (section
>  (paragraph "Text2"
>
> With your function, it becomes
>
>   (headline
>(section
> (paragraph "Text1"))
>(section
> (paragraph "Text2")))
>
> which is invalid, as a given headline is not expected to have more than
> one section.
>
> Of course, it is possible to add code in order to merge both sections
> and get
>
>   (headline
>(section
> (paragraph "Text1")
> (paragraph "Text2")))
>
> which is exactly what you obtain in the first answer of the FAQ, along
> with its limitations (see the :noexport: example in the same question).
>
> Actually, the problem is deeper than that. This :inline: tag is just
> a convoluted way to ask for a positive answer to another FAQ: « Can
> I close an outline section without starting a new section? »
> (http://orgmode.org/worg/org-faq.html#closing-outline-sections). Indeed,
> allowing :include: tags is equivalent to allowing to close sections
> before the next one, at least at the export level:
>
>   * Section one
>
>   Some text
>
>   ** Subsection one
>
>   Some text
>
>   ** Subsection two
>
>   Some text
>
>   ** end Subsection Two 
> :inline:
>
>   Continue text in section one.
>
> This is not possible and goes against so many assumptions in Org that it
> will always introduce problems, as your function does.
>

Thanks Nicolas.  Point clearly stated.  All of the structural issues
hinge upon the inclusion of the contents of an inlined (ignored)
headline, so the solution is to change the behavior s.t. the non-subtree
contents of ignored headlines are also removed from export.  This is
implemented below.

>
> Since it cannot work in the general case, I do not think it should go in
> core. Fortunately, a simple function in `org-export-before-parsing-hook'
> provides a decent solution already. Users requiring more sophistication
> can always implement their own function and add it to that hook.
>
> OTOH, the situation could be improved wrt :export: and :noexport: tags.
> We could allow nesting :export: tags within :noexport: tags with the
> following rule: the :export: headline with the lowest level within
> the :noexport: tree gets promoted to the root of the tree.
> Other :export: headlines have their level set relatively to this one.
> Thus:
>
>   Text before first headline
>   * H1
>   Body1
>   ** H2 :noexport:
>   Body2
>   *** H3
>   Body3
>   *** H4 :export:
>   Body4
>    H5
>   Body5
>
> will be seen as
>
>   Text before first headline
>   * H1
>   Body1
>   ** H4
>   Body4
>   *** H5
>   Body5
>

In my opinion the manual interleaving of "noexport" and "export" tags is
overly cumbersome and is non-obvious.  The obscure nature of this
solution is evidenced by multiple discussions and implementations of
filter functions to handle situations which could be covered by this
noexport/export pattern.

I think the attached patch should be applied to the core.  It includes
the following.

- a single new export function which removes the headlines and contents
  (the "section" element) of headlines tagged "ignoreexport", then
  retains and promotes all sub-headlines contained therein.

- a single new export tag named "ignoreexport" (ignore seems to be the
  crowd favorite, and adding "export" reduces possible conflicts with
  existing personal tags)

- some tests protecting this new functionality

- I'd like to add documentation of this tag to the manual to improve
  visibility beyond the existing FAQ entries (which have failed to
  prevent multiple on list discussions and re-implementations of this
  feature).  It is not clear where to document such a tag.  The "export"
  and "noexport" tags are only documented as a side effect of
  documentation for the SELECT_TAGS keyword.  I think it would be
  beneficial to add a "selective export" section or paragraph (which
  existed in the old manual) to the new manual.

>From the included tests, the effect of this patch is to convert a tree
like the following,

,
| * H1
| Text1
| ** H2  :ignoreexport:
| Text2
| *** H3
| Text3
|  H4
| Text4
| *** H5
| Text5
|  H6:ignoreexport:
| Text6
| * H7
| Text7
| * H8
| Text8
`

on export to a tree like the following.

,
| 1 H1
| 
| 
|   Text1
| 
| 1.1 H3
| ~~
| 
|   Text3
| 
| 1.1

[O] How do you capture the intent never to tangle or weave a headline or its children?

2014-06-15 Thread Grant Rettke
Good evening,

For both performance and cognitive reasons, sometimes I specifically
never want to tangle or weave a headline or any of
its children. I still value it though, so it belongs in that document,
and it wouldn't make sense for it to be linked as an
external document. For performance reasons, I suspect that it would
speed up tangling, but I need to verify this.

Thus far I just add something like this, so at least it is obvious to
*me* what is my intent:

# INTENT: never weave or tangle this headline or its children
  :PROPERTIES:
  :exports: none
  :tangle: no
  :END:

Kind regards,

Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] how to use :options-alist in org-export-define-derived-backend ?

2014-06-15 Thread Bastien
Hi Nicolas,

Nicolas Goaziou  writes:

> Implemented in the following patch. WDYT?

Okay, but what is the benefit of not using a default title?

-- 
 Bastien



Re: [O] how to use :options-alist in org-export-define-derived-backend ?

2014-06-15 Thread Nicolas Goaziou
Completing myself,

Nicolas Goaziou  writes:

> Automatically set document's title to file name or buffer name when no
> TITLE keyword is provided.

Implemented in the following patch. WDYT?

-- 
Nicolas Goaziou
>From 7e917e97f99bf9e9266b64f5066bfaa5f8ca98ee Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Sun, 15 Jun 2014 22:39:29 +0200
Subject: [PATCH] ox: Title fallbacks to nil instead of file name

* lisp/ox.el (org-export--get-inbuffer-options):
(org-export-as): Remove title default value handling.
(org-export--get-buffer-attributes): Remove unnecessary property.

* doc/org.texi (Document title):
(Export settings):
* doc/orgguide.texi (Export options): Update documentation.

* testing/lisp/test-ox.el (test-org-export/set-title): Update tests
  according to new specifications.
---
 doc/org.texi|  7 +
 doc/orgguide.texi   |  2 +-
 lisp/ox.el  | 24 ++--
 testing/lisp/test-ox.el | 76 +++--
 4 files changed, 47 insertions(+), 62 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 441b08c..dcb5a9c 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -9595,10 +9595,6 @@ The title of the exported document is taken from the special line
 #+TITLE: This is the title of the document
 @end example
 
-@noindent
-If this line does not exist, the title will be the name of the file
-associated with the buffer, without extension, or the buffer name.
-
 @cindex property, EXPORT_TITLE
 If you are exporting only a subtree, its heading will become the title of the
 document.  If the subtree has a property @code{EXPORT_TITLE}, that will take
@@ -10580,8 +10576,7 @@ be executed during export even though the subtree is not exported.
 
 @item TITLE
 @cindex #+TITLE
-The title to be shown (otherwise derived from buffer's name).  You can use
-several such keywords for long titles.
+The title to be shown.  You can use several such keywords for long titles.
 @end table
 
 The @code{#+OPTIONS} keyword is a compact@footnote{If you want to configure
diff --git a/doc/orgguide.texi b/doc/orgguide.texi
index ab856e9..6842592 100644
--- a/doc/orgguide.texi
+++ b/doc/orgguide.texi
@@ -2324,7 +2324,7 @@ Insert template with export options, see example below.
 @end table
 
 @smallexample
-#+TITLE:   the title to be shown (default is the buffer name)
+#+TITLE:   the title to be shown
 #+AUTHOR:  the author (default taken from @code{user-full-name})
 #+DATE:a date, fixed, or an Org timestamp
 #+EMAIL:   his/her email address (default from @code{user-mail-address})
diff --git a/lisp/ox.el b/lisp/ox.el
index 4bfef52..605c5a4 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1343,10 +1343,6 @@ The back-end could then be called with, for example:
 ;;   - category :: tree
 ;;   - type :: list of elements and objects
 ;;
-;; + `:input-buffer' :: Original buffer name.
-;;   - category :: option
-;;   - type :: string
-;;
 ;; + `:input-file' :: Full path to input file, if any.
 ;;   - category :: option
 ;;   - type :: string or nil
@@ -1794,19 +1790,13 @@ Assume buffer is in Org mode.  Narrowing, if any, is ignored."
 	  (when (stringp value)
 	(setq plist
 		  (plist-put plist property
-			 (or (org-element-parse-secondary-string
-  value (org-element-restriction 'keyword))
- ;; When TITLE keyword sets an empty
- ;; string, make sure it doesn't
- ;; appear as nil in the plist.
- (and (eq property :title) ""))
+			 (org-element-parse-secondary-string
+			  value (org-element-restriction 'keyword))
 
 (defun org-export--get-buffer-attributes ()
   "Return properties related to buffer attributes, as a plist."
   ;; Store full path of input file name, or nil.  For internal use.
-  (let ((visited-file (buffer-file-name (buffer-base-buffer
-(list :input-file visited-file
-	  :input-buffer (buffer-name (buffer-base-buffer)
+  (list :input-file (buffer-file-name (buffer-base-buffer
 
 (defun org-export--get-global-options (&optional backend)
   "Return global export options as a plist.
@@ -3098,14 +3088,6 @@ Return code as a string."
 	   (org-export-install-filters
 		(org-combine-plists
 		 info (org-export-get-environment backend subtreep ext-plist
-	 ;; Special case: provide original file name or buffer name as
-	 ;; default value for :title property.
-	 (unless (plist-get info :title)
-	   (plist-put
-	info :title
-	(let ((file (plist-get info :input-file)))
-	  (if file (file-name-sans-extension (file-name-nondirectory file))
-		(plist-get info :input-buffer)
 	 ;; Expand export-specific set of macros: {{{author}}},
 	 ;; {{{date}}}, {{{email}}} and {{{title}}}.  It must be done
 	 ;; once regular macros have been expanded, since document
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 234032e..664891e 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -270,58 +270,66 @@ Paragraph"
 
 (ert-deftest test-org-

Re: [O] Insert #+BEAMER_HEADER_EXTRA before \begin{document}?

2014-06-15 Thread Nicolas Goaziou


Hello,

Sebastien Vauban 
writes:

> But the whole point is that is DOES NOT even WORK for a couple of
> things, such as modifying base colors of a theme:
>
> #+BEAMER_HEADER: \setbeamercolor{frametitle}{bg=blue}
>
> won't work because of the misplacement of the BEAMER_HEADER placeholder
> regarding to the (color) theme: the above line will be placed before the
> choice of the theme... TOO EARLY.
>
> On the contrary, adding it in the above title command (already in the
> LaTeX document, that is) is TOO LATE.

I do not see how to solve this without either adding a new keyword or
extending `org-latex-classes' to support another location (e.g.
"[BEAMER-THEME]"). Actually, both may be needed.

About the keyword, my only concern is that #+LATEX_HEADER_EXTRA has
already a specific meaning, which is different from the one we're going
to implement. So, #+BEAMER_HEADER_EXTRA might be confusing. OTOH
I cannot think of anything much better.

WDYT?


Regards,

-- 
Nicolas Goaziou




Re: [O] Single Search Hit and Quick Jump

2014-06-15 Thread Sacha Chua
Esben Stien  writes:

Hello, Esben!

(Digging up old thread, sorry!)

> Now, If I f.ex do C-c a s corge, I get multiple hits, but I really only
> search for level 3 items always. Is there any way to restrict the search
> to only level 3 items?

Would you consider defining org-refile-targets and then using C-u M-x
org-refile (which you can bind to a handy keyboard shortcut, of
course)? org-refile-targets lets you specify the level or maxlevel to
consider, and C-u for org-refile jumps instead of refiling.

> Also, when I find a result, I want to jump to the last item in that
> tree, so if I search for "corge", I want to end up with point on the
> level 4 item " garply"

Something like (org-end-of-subtree) and (org-back-to-heading), maybe
in a custom function or in a hook?

Sacha




Re: [O] Display only latest sub notes in agenda

2014-06-15 Thread Sacha Chua
Steffen Heilmann  writes:

Hello, Steffen, all!

> I am looking for an easy way to see when I had the last interaction
> with everybody (preferably sorted by date). I want to use this to
> quickly see whom I have not contacted for some time and then can
> reach-out to them.

Something like this, maybe?

(defun sacha/org-update-with-last-meeting ()
  (interactive)
  (goto-char (point-max))
  (let (last-meeting)
(while (re-search-backward
(concat "\\(" org-outline-regexp "\\)\\|\\("
org-maybe-keyword-time-regexp "\\)") nil t)
  (cond
   ((and (match-string 1)
 (= (nth 1 (save-match-data (org-heading-components))) 1)
 last-meeting)
;; heading
(save-excursion (org-set-property "LASTMEETING" last-meeting))
(setq last-meeting nil))
   ((and (match-string 2))
(if (or (null last-meeting) (string< last-meeting (match-string 2)))
(setq last-meeting (match-string 2

It turns:

* John Smith
** DONE Conversation
[2014-01-20]
** DONE E-mail
[2014-01-15]
* Jane Smith
** DONE Conversation
[2014-01-07]

into:

* John Smith
  :PROPERTIES:
  :LASTMEETING: [2014-01-20]
  :END:
** DONE E-mail
[2014-01-15]
** DONE Conversation
[2014-01-20]
* Someone without a meeting
* Jane Smith
  :PROPERTIES:
  :LASTMEETING: [2014-01-07]
  :END:
** DONE Conversation
[2014-01-07]

You can then use something like:

#+COLUMNS: %25ITEM %LASTMEETING %TAGS %PRIORITY %TODO

#+BEGIN: columnview :maxlevel 1
| ITEM| LASTMEETING  | TAGS | PRIORITY | TODO |
|-+--+--+--+--|
| * John Smith| [2014-01-20] |  |  |  |
| * Someone without a meeting |  |  |  |  |
| * Jane Smith| <2014-01-07> |  |  |  |
#+END:

or even sort the entries by the LASTMEETING property (R will
reverse-sort by property).

Sacha




Re: [O] navigation broken - occur, org-babel-goto-named-src-block, etc fail

2014-06-15 Thread Nicolas Richard
Hello Charles,

"Charles C. Berry"  writes:
> On Sun, 15 Jun 2014, Nicolas Richard wrote:
>
>> Charles Berry  writes:
>>
>>> Start with emacs -q, then load today's org-mode.
>>
>> A glitch in 30220ff was quickly fixed in feca87b (three hours ago).
>> Maybe that's what you see ?
>>
>
> The ECM still fails.
>
> Did it work for you?

Unfortunately I didn't have the time to test, but it seemed very similar
to what I had experienced between these two commits, hence my suggestion
to look into them. I'll try later (and a few hours later...) M-a M-k Let me
try that now.

TL;DR: see near the end.

Ok, so here's what I think I have understood of the problem: In
org-fix-ellipsis-at-bol, we now do
(set-window-start (selected-window) (window-start))
which I thought would be a noop. But it is not, and to understand why
here's a simpler way of reproducing the funny result:

In some buffer with a few screenful of lines, when I do :
M-: (progn (forward-line 55) (set-window-start (selected-window) 
(window-start)))
(assuming point was at beginning of the buffer) I end up at line 22
(instead of 1+55 = 56) on my current frame/window configurations. (The
number 55 is chosen so that it is beyond the last line of the buffer.)

Now if I try this:
(progn (forward-line 55) (redisplay) (set-window-start (selected-window) 
(window-start)))
then it works perfectly fine.

So my conclusion is that in the first version, the command loop of emacs
doesn't redraw/recompute the window start position before the end of the
command, i.e. we have the following actions :

(progn
  ;; let's assume point is a position 1.
  (forward-line 55)
  ;; now point is at line 56, but (window-start) is still at 1.
  ;; if we used (redisplay) now, then (window-start) would be recomputed.
  (set-window-start
   (selected-window)
   (window-start)))
;; at this point, the command loop was instructed to make the window start at
;; position 1. But point is at line 56, which is out of the window,
;; hence emacs moves point to put it back in the window (namely, in its
;; center).

See (info "(elisp) Window Start and End") for more info on how
set-window-start works when point ends up out of the window.

TL;DR begins here: Hence we could either use the optional arg "NOFORCE"
or force (redisplay) before set-window-start. Both would probably the
bug you're seeing, but I'm not sure any of those is TRT in
org-fix-ellipsis-at-bol.

(BTW if you try to fix org-fix-ellipsis-at-bol in a running emacs, be
sure to re-eval the definition of its callers because it's a defsubst
and IIUC that gets inlined automatically.)

-- 
Nico.



Re: [O] [FR] fill caption

2014-06-15 Thread Daniele Pizzolli

On 06/15/2014 12:34 AM, Aaron Ecay wrote:

Hi Daniele,

2014ko ekainak 14an, Daniele Pizzolli-ek idatzi zuen:


Hello @ll,

I noticed that multi line caption works as expected, but there is no
way to fill it (at least to my knowledge).


[]


I have the following function in my org-mode-hook:


Hello Aaron,

Nice, since I do not use short caption, this could be really a
viable solution.

How I am supposed to set it up?

I added it as:

(add-hook 'org-mode-hook (lambda () (awe-org-setup-fill-hook)))

When pressing M-q it does nothing on #+caption: lines.

If I enable the debug (fill-adapt-debug) I can see (org-message) in
the status bar and "#+caption: " becomes highlighted.  But again M-q
does nothing.

I am using: org 8.2.7.


If you use ispell’s facility for adding to LocalWords (pressing A
(i.e. shift+a) at the spelling correction prompt, or “Accept (buffer)”
in the context menu), it will handle breaking the LocalWords lines for
you.


Yes, but do not re-fill the previous lines (eg: if you change
fill-column).  But that is a minor annoyance, let’s drop it now.


Hope this is useful,


Sure!  Thanks,
Daniele




Re: [O] [FR] fill caption

2014-06-15 Thread Daniele Pizzolli

On 06/14/2014 08:04 PM, Nicolas Goaziou wrote:

Hello,

Daniele Pizzolli writes:


I noticed that multi line caption works as expected, but there is no
way to fill it (at least to my knowledge).


[]


This was requested before.

In a nutshell, this can be done, but there are some caveats (see
http://permalink.gmane.org/gmane.emacs.orgmode/82083).


Thanks Nicolas,

I missed it, I double checked only:
http://orgmode.org/worg/org-issues.html

Next time will do a search on the mailing list before submitting
a feature request.

Best,
Daniele



Re: [O] How do disallow editing of source blocks while inside of org-mode?

2014-06-15 Thread Thorsten Jolitz
Grant Rettke  writes:

Hi,

> Where might I set out exploring how to implement such a thing if it
> does not? My first thought is to see if an edit is occurring within a
> source block that has a language immediately to jump to the buffer
> that C-' would have created for me.

maybe here

,
| (defun org-self-insert-command (N)
|   (interactive "p")
|   (org-check-before-invisible-edit 'insert)
|   (cond
|((and org-use-speed-commands ...)
|((and (org-table-p) ...)
`

adding a case like 

  ,-
  | ((and (org-in-src-block-p) ...))
  `-

?

-- 
cheers,
Thorsten




[O] How do disallow editing of source blocks while inside of org-mode?

2014-06-15 Thread Grant Rettke
Hi,

Working on a large org document with a lot of source blocks, sometimes
I get lazy and modify the
contents of source blocks while in org-mode. Rather than utilize C-',
which takes me to the proper
mode, I just make changes directly. Then, I break stuff. It is my
fault, totally.

What I would like to do, is make it so that source blocks are
immutable when displayed inside of org-mode, and only allow changes
after going to the proper buffer via C-'. This will save lots of
headaches.

Does this already exist?

Where might I set out exploring how to implement such a thing if it
does not? My first thought is to see if an edit is occurring within a
source block that has a language immediately to jump to the buffer
that C-' would have created for me.

Kind regards,

Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] navigation broken - occur, org-babel-goto-named-src-block, etc fail

2014-06-15 Thread Charles C. Berry

On Sun, 15 Jun 2014, Nicolas Richard wrote:


Charles Berry  writes:


Start with emacs -q, then load today's org-mode.


A glitch in 30220ff was quickly fixed in feca87b (three hours ago).
Maybe that's what you see ?



The ECM still fails.

Did it work for you?

FWIW, this has been around for a few days at least.

Chuck




[O] customizable C, C++, D, Java, Groovy compilers

2014-06-15 Thread Thierry Banel
Hi all

Here is a patch to make compilers customizable
  (by typing M-x customize-group org-babel).
It applies to C, C++, D, Java, Groovy.
This is consistent with customizations for R, Python, Ditaa and others
languages.

Have fun
Thierry


>From 933f50c3fbebefec14b5df8ebff0cebaf3e45922 Mon Sep 17 00:00:00 2001
From: Thierry Banel 
Date: Sun, 15 Jun 2014 14:53:34 +0200
Subject: [PATCH] 	Make C, C++, D, Java, Groovy compilers customizable

	* ob-C.el (org-babel-C-compiler):
	(org-babel-C++-compiler):
	(org-babel-D-compiler): changed defvar to defcustom
	* ob-java.el (org-babel-java-command):
	(org-babel-java-compiler): changed defvar to defcustom
	* ob-groovy.el (org-babel-groovy-command):
	changed defvar to defcustom
---
 lisp/ob-C.el  |   36 ++--
 lisp/ob-groovy.el |   10 --
 lisp/ob-java.el   |   22 +-
 3 files changed, 51 insertions(+), 17 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 505b290..2e146d4 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -46,16 +46,32 @@
 
 (defvar org-babel-default-header-args:C '())
 
-(defvar org-babel-C-compiler "gcc"
-  "Command used to compile a C source code file into an
-executable.")
-
-(defvar org-babel-C++-compiler "g++"
-  "Command used to compile a C++ source code file into an
-executable.")
-
-(defvar org-babel-D-compiler "rdmd"
-  "Command used to compile and execute a D source code file.")
+(defcustom org-babel-C-compiler "gcc"
+  "Command used to compile a C source code file into an executable.
+May be either a command in the path, like gcc
+or an absolute path name, like /usr/local/bin/gcc
+parameter may be used, like gcc -v"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
+
+(defcustom org-babel-C++-compiler "g++"
+  "Command used to compile a C++ source code file into an executable.
+May be either a command in the path, like g++
+or an absolute path name, like /usr/local/bin/g++
+parameter may be used, like g++ -v"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
+
+(defcustom org-babel-D-compiler "rdmd"
+  "Command used to compile and execute a D source code file.
+May be either a command in the path, like rdmd
+or an absolute path name, like /usr/local/bin/rdmd
+parameter may be used, like rdmd --chatty"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
 
 (defvar org-babel-c-variant nil
   "Internal variable used to hold which type of C (e.g. C or C++ or D)
diff --git a/lisp/ob-groovy.el b/lisp/ob-groovy.el
index 9bb17e6..0068df9 100644
--- a/lisp/ob-groovy.el
+++ b/lisp/ob-groovy.el
@@ -36,8 +36,14 @@
 (defvar org-babel-tangle-lang-exts) ;; Autoloaded
 (add-to-list 'org-babel-tangle-lang-exts '("groovy" . "groovy"))
 (defvar org-babel-default-header-args:groovy '())
-(defvar org-babel-groovy-command "groovy"
-  "Name of the command to use for executing Groovy code.")
+(defcustom org-babel-groovy-command "groovy"
+  "Name of the command to use for executing Groovy code.
+May be either a command in the path, like groovy
+or an absolute path name, like /usr/local/bin/groovy
+parameters may be used, like groovy -v"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
 
 (defun org-babel-execute:groovy (body params)
   "Execute a block of Groovy code with org-babel.  This function is
diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 22f8785..8c64171 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -32,11 +32,23 @@
 (defvar org-babel-tangle-lang-exts)
 (add-to-list 'org-babel-tangle-lang-exts '("java" . "java"))
 
-(defvar org-babel-java-command "java"
-  "Name of the java command.")
-
-(defvar org-babel-java-compiler "javac"
-  "Name of the java compiler.")
+(defcustom org-babel-java-command "java"
+  "Name of the java command.
+May be either a command in the path, like java
+or an absolute path name, like /usr/local/bin/java
+parameters may be used, like java -verbose"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
+
+(defcustom org-babel-java-compiler "javac"
+  "Name of the java compiler.
+May be either a command in the path, like javac
+or an absolute path name, like /usr/local/bin/javac
+parameters may be used, like javac -verbose"
+  :group 'org-babel
+  :version "24.3"
+  :type 'string)
 
 (defun org-babel-execute:java (body params)
   (let* ((classname (or (cdr (assoc :classname params))
-- 
1.7.9.5



Re: [O] navigation broken - occur, org-babel-goto-named-src-block, etc fail

2014-06-15 Thread Nicolas Richard
Nicolas Richard  writes:
> A glitch in 30220ff was quickly fixed in feca87b (three hours ago).

I meant "three hours later".

-- 
Nico.



Re: [O] navigation broken - occur, org-babel-goto-named-src-block, etc fail

2014-06-15 Thread Nicolas Richard
Charles Berry  writes:

> Start with emacs -q, then load today's org-mode.

A glitch in 30220ff was quickly fixed in feca87b (three hours ago).
Maybe that's what you see ?

> Org-mode version 8.2.7 (release_8.2.7-1096-g23496c [...]
> GNU Emacs 24.3.1 [...]

I don't have a commit g23496c in my repo, so I can't tell if it is
affected by the problem.

-- 
Nico.



Re: [O] org-weather for openweathermap.org

2014-06-15 Thread Thorsten Jolitz
Chris Raschl  writes:

Hi Chris,

> first of all, thanks for your suggestions, I really appreciate it.

thanks to you for this nice library

> I improved result processing a little bit and added a formatting string
> (org-weather-format). You can now also add different temperature fields,
> as well as humidity, pressure and wind speed.

and for your improvements

  ,--
  | City: Weather: broken clouds, 11-22°C, 1028hpa, 75%, 3m/s
  `--

this fits my needs perfectly (living in a city right now). 

PS
Coming from a coastal area, I know that high tide, low tide, water temp
as well as moon phase are also very important for "fishermen" and
friends (just like wind speed and direction). 

This would probably make a nice accompagnient library for yours,
displaying something like this below the line above in the agenda:

,--
| Coast: high: 06:43/19:25 low: 13:12/02:30 water: 18°C moon:  wind: SE
`--

with moon:  meaning 4/4 visible (full-moon), moon: ++ meaning 2/4
visible (half-moon), moon: - meaning 0/4 visible (no moon), and wind: SE
meaning South-East.

Maybe someday if I need it again and have time ;-)

Not sure though if this data (except the moon phase) is as universally
and easily available as the data you display  Sunset and rise would
be interesting too of course. 

-- 
cheers,
Thorsten




Re: [O] org-weather for openweathermap.org

2014-06-15 Thread Chris Raschl

Hi Thorsten,
first of all, thanks for your suggestions, I really appreciate it.

tjol...@gmail.com writes:

> Chris Raschl  writes:
>
>> Hi everybody,
>>
>> recently I wanted to add a weather forecast to my org-agenda. I found
>> org-google-weather, but this package is obsolete since 2012, because the
>> API is not available any more. So I wrote my own version which is backed
>> by the openweathermap.org API.
>>
>> I implemented the minimal usecase which works for me, if somebody else
>> dares to use it, its available here:
>>
>> https://github.com/kautsig/org-weather
>
> Nice, thank you, never made org-google-weather, but this works
> out-of-the-box:
>
>   ,-
>   | City: Weather: light rain, 10.43°C - 17.58°C
>   `-
>
> A few suggestions wrt

[...]

> - why not use (round ...) for the temperature data, 10-17°C would be
>   more than accurate enough?

I added this. Additionally I removed the temperature unit being
displayed twice, this was unnecessary and looks much nicer in the format
you suggested.

> - why not include city/country info in the weather string? I added
>
>   * Weather
> :PROPERTIES:
> :CATEGORY: City
> :END:
>   %%(org-weather)
>
>   to get the above, but it would be much better to take the return
>   values for city/country and include them in the weather string, to
>   make sure one did not mess up the configuration and gets the weather
>   from another place than expected.

Also thought about this, but I think I will go with the method which was
also used in org-google-weather. It looks like:

* Weather
%%(org-google-weather "New York")

This is much simpler for me, as I'm not so familiar with lisp and the
org-mode api. But I'll have to change the data structure for caching the
data a bit, so it might take a while.

> - maybe make the whole thing a bit customizable by adding a few
>   defcustoms, so the user can decide which info he wants to print in the
>   agenda
>
>   the return string looks like this, there are many options:

[...]

I improved result processing a little bit and added a formatting string
(org-weather-format). You can now also add different temperature fields,
as well as humidity, pressure and wind speed.

Regards,
Chris



Re: [O] Bug: Commit cece23 'fix'-ed call to 'type' breaks my agenda sorting [8.2.7 (8.2.7-elpa @ /home/trevor/.emacs.d/elpa/org-20140613/)]

2014-06-15 Thread Bastien
Hi Trevor,

this is now fixed, thanks for reporting this!

-- 
 Bastien



Re: [O] org-hidden-keywords not working

2014-06-15 Thread Bastien
Hi,

this is now fixed in the maint branch, thanks,

-- 
 Bastien



[O] org-hidden-keywords not working

2014-06-15 Thread Leu Zhe
I found that by using the org-hidden-keywords can hide the #+titile:, which
is a sweet feature.
However, since I set the variable to t as  '(org-hidden-keywords (quote
(author date email title))) in custom file, but it does not work.
Did anyone meet this kind of issue?

Leu


Re: [O] [PATCH] Add DEVONthink Pro to Org Mac Link

2014-06-15 Thread Bastien
Anthony Lander  writes:

> And thank you Bastien for taking care of applying the patch.

You're welcome!

-- 
 Bastien



Re: [O] [PATCH 2/2] Keep window position in agenda when changing todo states

2014-06-15 Thread Bastien
Bernt Hansen  writes:

> Please disregard this patch.

Done -- thanks for double-checking,

-- 
 Bastien



Re: [O] [PATCH] Remove restriction when locating markers

2014-06-15 Thread Nicolas Goaziou
Hello,

Bernt Hansen  writes:

> * org-macs.el: Remove restriction when locating markers
>
> Allows org-with-point-at to locate point outside the current
> restriction.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou