[O] Tag background color overridden by hl-line in the agenda

2015-04-28 Thread Sebastien Vauban
Hello,

Could it be possible to make the behavior for the tag colors the same as
for priority cookies when `hl-line-mode' is enabled?

At http://screencast.com/t/T0n1x6L93f, you can easily see what I mean:
the background of #A is not overridden by the highlighting of the
current line while it is for the tag FLAGGED -- quite unreadable when
one chooses a light foreground for the tags. 

Minimal settings:

--8---cut here---start-8---
(setq org-tag-alist '((FLAGGED . ??)))

(setq org-tag-faces
  '((FLAGGED
 (:weight bold :slant italic
  :foreground white :background #DB2D27

(setq org-priority-faces
  '((?A . (:weight bold :foreground #5F3731 :background #EFC4C0))
(?B . (:foreground #475443 :background #D5E1D0))
(?C . (:foreground #2D373F :background #C9DBE3
--8---cut here---end---8---

ECM:

--8---cut here---start-8---
#+TITLE: Example of Tasks

* Work:work:

** TODO [#A] Plan conference in Boston :FLAGGED:
   DEADLINE: 2015-04-13 lun.

** TODO [#B] Launch advertisement
   DEADLINE: 2015-04-06 lun.

* Personal   :perso:

** TODO Go to the dentist
   SCHEDULED: 2015-04-11 sam.
--8---cut here---end---8---

PS- Note that the background of #A is well overridden by the hl-line
in the Org source buffer. Not the same behavior as within the
agenda... See http://screencast.com/t/KzyM78xP.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Title/Author missing in Markdown export?

2015-04-28 Thread Andreas Hilboll
Using the current git master, any exported Markdown doesn't include
title, author, and date information.  Is this desired behaviour, or is
it a bug?

-- Andreas.



Re: [O] Title/Author missing in Markdown export?

2015-04-28 Thread Rasmus
Andreas Hilboll li...@hilboll.de writes:

 Using the current git master, any exported Markdown doesn't include
 title, author, and date information.  Is this desired behaviour, or is
 it a bug?

AFAIK it's a feature.

-- 
⠠⠵




Re: [O] Marking/highlighting text temporarily

2015-04-28 Thread Eric Abrahamsen
John Kitchin jkitc...@andrew.cmu.edu writes:

 Hi Eric,

 I added some functions in the attachment. they colorize the comments,
 add an org-comment menu to the org-menu, and some functions for pop to
 and delete comments from the list mode, and a hydra for commands to
 insert comments. Do you want to get this up on github to facilitate
 developing it?

Okay, either way, it's on Github now:

https://github.com/girzel/org-comment.git

I didn't realize you could use markers as ids in tabular list mode, that
made things a lot easier. I've removed the hydra stuff for now, and also
am not automatically turning on the highlighting. I'm still considering
a minor mode or something, or at least install it as an Org mode hook.

Eric

 Eric Abrahamsen writes:

 Eric Abrahamsen


  e...@ericabrahamsen.net writes:

 Vikas Rawal vikasli...@agrarianresearch.org writes:

 On 25-Apr-2015, at 6:22 am, John Kitchin jkitc...@andrew.cmu.edu
 wrote:

 Inspired by this conversation, I hacked up this functional comment
 link:

 
 http://kitchingroup.cheme.cmu.edu/blog/2015/04/24/Commenting-in-org-files/


 It has a custom link type that exports in html and latex, and when
 you click on it, it asks if you want to delete the comment.

 Nice. One small issue is that when I highlight a text and add comment
 to it, and then delete the comment, one space following the last word
 is removed.

 Also, it would be good to make the comment stand out in LaTeX (and
 other) exports, preferably by pushing it to the margin (so it does not
 move everything else).

 Hang on a bit, I'm wasting my afternoon expanding this...

 Okay, this is as far as I got today. I changed some behavior from John's
 implementation: when following the links, it seemed like displaying the
 comment text would be more useful than deleting it -- I think many of us
 have delete-org-link functions lying around. I also couldn't get the
 add-comment thing to work, as it complained when there was no region, so
 I changed how that works.

 Lastly, I spent most of my time learning how tabular list mode works,
 and haven't actually tested the export. Will save that for tomorrow.
 Otherwise, here's the introduction from the Commentary. Comments and
 suggestions very welcome!



 Provides a new link type for Org that allows you to create comments
 on arbitrary chunks of text.  The link prefix is comment:.

 Add comments with `org-comment-add-comment'.  Following the link
 will display the text of the comment in a pop-up buffer.  The
 buffer is in special-mode, hit q to dismiss it.

 Call `org-comment-display-comments' to see all comments in a buffer.

 See the `org-comment-[backend]-export-style' options for ways to
 format comments in export.

 TODO:

 1. Better export customization options.
 2. What does the ODT comment XML look like?
 3. More functions in the display comment buffer: copy as
 kill... what else?
 4. More functions in the comments list buffer, to display, pop to,
 delete, and edit comment text.
 5. Is it possible to have multi-line filled tabular list items?
 Long comments are not very useful if you can't see the whole thing.
 5. Allow multiple comment list buffers attached to different Org
 buffers.
 6. Maybe a minor mode for ease of manipulating comments?

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




Re: [O] BUG: org-block face not working

2015-04-28 Thread Nicolas Goaziou
Hello,

Michal Koval koval.m...@gmail.com writes:

 recently I switched from maint to master (release_8.3beta-1091-g96c533)
 and noticed that org-block face defined in my theme does not work anymore.

 What could be of some help is that when I type s TAB, I see a code block
 #+BEGIN_SRC

 #+END_SRC

 with the correct background face in the block specified in my theme.
 But, when I type in a language (typing one non-blank character after
 BEGIN_SRC is enough), the face inside the block changes to the Emacs
 default one.
 e.g.
 #+BEGIN_SRC python

 #+END_SRC

I don't think src blocks ever got `org-block' face. There used to be
a `org-block-background' face for an overlay, however, but it was
removed in commit f8b42e8ebeeecdef59a8a7cbc4324264a5162197.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org-lint and #+call lines

2015-04-28 Thread Thomas S. Dye
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 Org-lint gives this warning:

 ,--
 | 31 low   Unknown value no-export for header :eval
 `--

 But, ob-core.el appears to know the value:

 ,
 | ob-core.el: (,eval-no-export (and ,export (or (equal ,eval 
 no-export)
 `

 Is this a false positive?

 Yes, this was an omission in ob-core.el. I fixed it in master. You'll
 need to rebase wip-lint against it.

Another false positive, I think:

  1360 low   Unknown value no for header :eval

Also, after I run org-lint I sometimes lose the cursor.  The frame
around the *Org Lint* window flickers a bit, as if *Org Lint* is being
refreshed over and over.  Apologies in advance for such a vague report.
I'm not sure where to start debugging something like this.

All the best,
Tom

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



[O] Mystery appt

2015-04-28 Thread Jared Travis
Hi all,

I log hours per Bernt Hansen's method. I sign out for lunch every day by
pointing my clock to a journal/diary entry called lunch.

My issue is when I return from lunch and sign back into my task, org-mode
is convinced that I have appointments which I don't have. The appointments
aren't listed in the agenda, appt-delete sees no appointments . . . I see
no indication as to the source of these appointments. When I close org-mode
and restart it, I receive no more appointment notifications. The mystery
appt(s) is generated when I log time to the diary for lunch.

Any ideas?

I'm running org-mode 8.2.6 on Windows.

--Jared


Re: [O] org-latex question

2015-04-28 Thread Nick Dokos
Vikas Rawal vikasli...@agrarianresearch.org writes:

 You have num:2, so subsubsections are not TOC'ed, so they don't get
 the alternative. If you set it to 3, all should work.

 That is what we have been discussing. There are situations where you
 do not want a headline to appear in TOC, but still want the ALT_TITLE
 used. It is now possible in org-mode, but there was some bug because
 of which it did not always work.


I figured I was missing something, but I have a question (which means
I'm still missing something :-) : what are ALT_TITLEs good for if not
for the TOC?

Thanks,
Nick




Re: [O] #+LINK abbrevs possible in #+INCLUDEs ?

2015-04-28 Thread Detlef Steuer
 
  Set-up (e.g., link abbreviations) is not refreshed after expanding
  INCLUDE keywords. I cannot remember why, tho. Maybe for (dubious)
  efficiency reasons.
 
  If you don't remember, may be it would be possible to try it out?
  Would love it and as a feature it looks natural for an included
  file!
 
 I agree. I added this in 2965f8fb0c048a20b52ba90627e7cca6fe706c93.
 Thank you.
 

Fantastic! Works like expected now!

Detlef



Re: [O] BUG: org-block face not working

2015-04-28 Thread Michal Koval
Hello,

On 04/28/15 22:06 PM, Nicolas Goaziou wrote:
 Hello,

 Michal Koval koval.m...@gmail.com writes:

 recently I switched from maint to master (release_8.3beta-1091-g96c533)
 and noticed that org-block face defined in my theme does not work anymore.

 I don't think src blocks ever got `org-block' face. There used to be
 a `org-block-background' face for an overlay, however, but it was
 removed in commit f8b42e8ebeeecdef59a8a7cbc4324264a5162197.


I see `(defface org-block' in org-faces.el and I see it used it in org.el
`org-fontify-meta-lines-and-blocks-1' where the bug probably is.

Best regards,

Michal






[O] BUG: org-block face not working

2015-04-28 Thread Michal Koval
Hello,

recently I switched from maint to master (release_8.3beta-1091-g96c533)
and noticed that org-block face defined in my theme does not work anymore.

What could be of some help is that when I type s TAB, I see a code block
#+BEGIN_SRC

#+END_SRC

with the correct background face in the block specified in my theme.
But, when I type in a language (typing one non-blank character after
BEGIN_SRC is enough), the face inside the block changes to the Emacs
default one.
e.g.
#+BEGIN_SRC python

#+END_SRC

I got the same behavior with emacs -q.

Regards,

Michal



Re: [O] org-latex question

2015-04-28 Thread Thomas S. Dye
Nick Dokos ndo...@gmail.com writes:

 Vikas Rawal vikasli...@agrarianresearch.org writes:

 You have num:2, so subsubsections are not TOC'ed, so they don't get
 the alternative. If you set it to 3, all should work.

 That is what we have been discussing. There are situations where you
 do not want a headline to appear in TOC, but still want the ALT_TITLE
 used. It is now possible in org-mode, but there was some bug because
 of which it did not always work.


 I figured I was missing something, but I have a question (which means
 I'm still missing something :-) : what are ALT_TITLEs good for if not
 for the TOC?

I think some styles put them in the header, regardless of TOC.

All the best,
Tom

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



Re: [O] Org-lint and #+call lines

2015-04-28 Thread Nicolas Goaziou
t...@tsdye.com (Thomas S. Dye) writes:

 Another false positive, I think:

   1360 low   Unknown value no for header :eval

Fixed too, and also cherry-picked from wip-lint.

 Also, after I run org-lint I sometimes lose the cursor.  The frame
 around the *Org Lint* window flickers a bit, as if *Org Lint* is being
 refreshed over and over.

It should only refresh if you press `g' in lint buffer.

 Apologies in advance for such a vague report. I'm not sure where to
 start debugging something like this.

You can debug `org-lint--generate-reports'. It is the function
responsible for refreshing the buffer. It should only be called once
after M-x org-lint and every time *Org Lint* buffer is refreshed
(i.e., with `g').


Regards,



Re: [O] org-mode and python pandas

2015-04-28 Thread Dov Grobgeld
I returned to this issue recently and tried to get the ob-python to output
a table with a header, but didn't manage. Here is the code:

#+BEGIN_SRC python :colnames true
return [['','A','B','C'],
[0,0.628365,0.424279,0.619791],
[1,0.799666,0.527572,0.132928]]
#+END_SRC

#+RESULTS:
|   |A |B |C |
| 0 | 0.628365 | 0.424279 | 0.619791 |
| 1 | 0.799666 | 0.527572 | 0.132928 |

What I want is:

|   |A |B |C |
|---+--+--+--|
| 0 | 0.628365 | 0.424279 | 0.619791 |
| 1 | 0.799666 | 0.527572 | 0.132928 |

Is there any way to do that besides using the :results raw option?

Thanks!
Dov


On Wed, Jul 3, 2013 at 5:09 PM, Eric Schulte schulte.e...@gmail.com wrote:

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Thanks for the answers, but there is still something missing in order
  to get it to work. Part of it seems to be connected to the python
  parsing. E.g. the following translation of Eric's sh example doesn't
  output correctly with python:
 
 
  #+BEGIN_SRC python :results output
  print ,A,B,C
  0,0.628365,0.424279,0.619791
  1,0.799666,0.527572,0.132928
  2,0.837255,0.138906,0.408233
  3,0.388080,0.146212,0.575346
  
  #+END_SRC
 
  #+RESULTS:
  : ,A,B,C
  : 0,0.628365,0.424279,0.619791
  : 1,0.799666,0.527572,0.132928
  : 2,0.837255,0.138906,0.408233
  : 3,0.388080,0.146212,0.575346
 
 
  #+BEGIN_SRC python :results table
  return ,A,B,C
  0,0.628365,0.424279,0.619791
  1,0.799666,0.527572,0.132928
  2,0.837255,0.138906,0.408233
  3,0.388080,0.146212,0.575346
  
  #+END_SRC
 
  #+RESULTS:
  |
 ,A,B,C\n\n0,0.628365,0.424279,0.619791\n\n1,0.799666,0.527572,0.132928\n\n2,0.837255,0.138906,0.408233\n\n3,0.388080,0.146212,0.575346
  |
 
  It seems that the only way to get a table from python is by outputting
  a two dimensional python structure:
 
  #+BEGIN_SRC python
  return [[0,0.628365,0.424279,0.619791],
  [1,0.799666,0.527572,0.132928]]
  #+END_SRC
 
  #+RESULTS:
  | 0 | 0.628365 | 0.424279 | 0.619791 |
  | 1 | 0.799666 | 0.527572 | 0.132928 |
 
  This seems quite limiting
 

 In most cases this is what one wants when returning data from python
 code.  The following elisp defined a panda code block, which is just
 like python, only it assumes that the results will be these sort of
 human readable strings instead of python code.

 ;; -*- emacs-lisp -*-
 (defun org-babel-execute:panda (body params)
   (let ((results
  (org-babel-execute:python
   body (org-babel-merge-params '((:results . scalar))
 params
 (org-babel-result-cond (cdr (assoc :result-params params))
   results
   (let ((tmp-file (org-babel-temp-file sh-)))
 (with-temp-file tmp-file (insert results))
 (org-babel-import-elisp-from-file tmp-file)

 With the above evaluated the following works

 #+BEGIN_SRC panda
 return ,A,B,C
 0,0.628365,0.424279,0.619791
 1,0.799666,0.527572,0.132928
 2,0.837255,0.138906,0.408233
 3,0.388080,0.146212,0.575346
 
 #+END_SRC

 #+RESULTS:
 |   |A |B |C |
 | 0 | 0.628365 | 0.424279 | 0.619791 |
 | 1 | 0.799666 | 0.527572 | 0.132928 |
 | 2 | 0.837255 | 0.138906 | 0.408233 |
 | 3 |  0.38808 | 0.146212 | 0.575346 |

 
  Another related question is if there is any support for header tables?
  I.e. instead of this:
 
  |   |A |B |C |
  | 0 | 0.827817 | 0.664009 | 0.089161 |
  | 1 | 0.170031 | 0.729214 | 0.110918 |
  | 2 | 0.575918 | 0.863924 | 0.757536 |
  | 3 | 0.682722 | 0.774445 | 0.992041 |
 
  I want this:
 
  |   |A |B |C |
  |---+--+--+--|
  | 0 | 0.827817 | 0.664009 | 0.089161 |
  | 1 | 0.170031 | 0.729214 | 0.110918 |
  | 2 | 0.575918 | 0.863924 | 0.757536 |
  | 3 | 0.682722 | 0.774445 | 0.992041 |
 
  I guess that if I start playing around with the python ob module, it
  should be possible to get this working?
 

 See the :colnames header argument in the manual.

 Best,

 
  Regards,
  Dov
 
  On Mon, Jul 1, 2013 at 8:04 PM, Rasmus ras...@gmx.us wrote:
  Achim Gratz strom...@nexgo.de writes:
 
  2. Add to pandas the option of globally influencing the text
  formatting so that it outputs something more parsable by org-mode.
 
  This sounds promising, if pandas support csv output that will be
  correctly parsed by Org-mode.
 
  The package already has CSV export, so one could use that.  I don't
 know
  if you could echo the result directly to the output, all examples
  revolve around putting the CSV into a file.  For Org, TSV output would
  be more natural.
 
  Something like:
 
  from pandas import DataFrame
  from numpy.random import rand
  from sys import stdout
  df = DataFrame(rand(10,3), columns = list('abc'))
  df
  df.to_csv(stdout, sep=\t, header = True, cols=(1,2))
 
  I was completely unable to get ob-python working this morning, so I
  haven't tested it.  I'm 

Re: [O] Tangled Latex code gives error

2015-04-28 Thread e.fraga
On Monday, 27 Apr 2015 at 07:58, Lawrence Bottorff wrote:

[...]

 will result in both the * Introduction blurb as well as the stuff
 between
 the tatex structural elements being exported. With latex babel I can
 tangle and get only what I want. This is handy if I want to throw
 around a
 lot of chatter and extraneous stuff that ultimately I won't want in my
 final document. We might call this annotations a la orgmode. But,
 yes,
 then I don't get the built-in orgmode latex support that comes with a
 regular latex export. Please advise if I'm wrong on this
 understanding.

No, your understanding is spot on.  What you can do is have sections in
your org file which do not get exported, using either the :noexport: tag
or by commenting out individual headlines (C-c ;).  However, this is not
quite what you have illustrated in your email.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-790-gb719c1.dirty



Re: [O] [PATCH] Fix `org-refresh-category-properties'

2015-04-28 Thread Samuel Loury
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Samuel Loury konubi...@gmail.com writes:

 Samuel Loury konubi...@gmail.com writes:

 Dear Nicolas,

 [...]

 --8---cut here---start-8---
 #+CATEGORY: c
 * foo
   :PROPERTIES:
   :CATEGORY: a
   :END:
 ** bar
:PROPERTIES:
:CATEGORY: b
:END:

 --8---cut here---end---8---

 `org-get-category' in the bar headline returns 'a', while I would expect
 it to return 'b'.

 [...]

 I don't understand why one would want to remove this behavior. Does it
 raise a technical issue?

 No, it's a bug.

 After a quick look at the code, I wonder if this new behavior is a
 technical choice or hopefully a simple mistake.

 The latter.

 Please find attached a patch that restores the behavior of taking into
 account the CATEGORY keyword in sub-trees also.
 

 Applied, with an additional test. Thank you.

Thank you for the fast answer.

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] custom agenda view not possible?

2015-04-28 Thread Sebastien Vauban
Traycer Bullet wrote:
 This doesn't work because tags-todo excludes 'DONE' status tasks:
 (add-to-list 'org-agenda-custom-commands
  '(J Completed Recently tags-todo CLOSED=\-2d\))

Use `tags' instead of `tags-todo':

--8---cut here---start-8---
  (add-to-list 'org-agenda-custom-commands
  '(J Completed Recently
((tags CLOSED=\-2d\))) t)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug, org] footnote-action broken with narrowed buffer

2015-04-28 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 To have a defcustom that let you choose preferred method.  Whether the
 default should be changed I don't know.

We don't need a defcustom if we can assign a different keybinding to
each of them.

 This is not possible ATM because it doesn't handle inline footnotes at
 all (this requires some work in org-src.el, since
 `org-src--edit-element' wasn't designed to edit inline objects), and,

 There's no need IMO.  ATM it moves to the second colon and I don't see
 other logical ways to handle it.

You can reference inline footnotes too:

  [fn:label] refers to [fn:label:definition]

and you may want to edit definition from [fn:label].

 C-c C-c would then depend on a defcustom, I guess.  At least it's a pity
 if C-c C-c only works in some cases, e.g. if not narrowed.

If remote editing is improved, it can become the default for C-c C-c
when on a footnote reference. C-c C-o can jump between the definition
and the reference. We can remove C-c '.

WDYT?


Regards,



Re: [O] [bug, org] footnote-action broken with narrowed buffer

2015-04-28 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 To have a defcustom that let you choose preferred method.  Whether the
 default should be changed I don't know.

 We don't need a defcustom if we can assign a different keybinding to
 each of them.

Perhaps.  Unless C-c C-c should reflect my preferred method.

 This is not possible ATM because it doesn't handle inline footnotes at
 all (this requires some work in org-src.el, since
 `org-src--edit-element' wasn't designed to edit inline objects), and,

 There's no need IMO.  ATM it moves to the second colon and I don't see
 other logical ways to handle it.

 You can reference inline footnotes too:

   [fn:label] refers to [fn:label:definition]

 and you may want to edit definition from [fn:label].

Right.  I had not thought of that.

 C-c C-c would then depend on a defcustom, I guess.  At least it's a pity
 if C-c C-c only works in some cases, e.g. if not narrowed.

 If remote editing is improved, it can become the default for C-c C-c
 when on a footnote reference. C-c C-o can jump between the definition
 and the reference. We can remove C-c '.

I guess that's fine.  Still, someone who never uses narrows may find jump
better, especially for short documents.  If the org-src window can be
configured to show less than a fullscreen I guess I would have no concerns
with this proposal.

Thanks,
Rasmus

-- 
There are known knowns; there are things we know that we know



[O] [PATCH] Fix `org-refresh-category-properties' (was: `org-get-category' and `org-entry-get' do not return the same value)

2015-04-28 Thread Samuel Loury
Samuel Loury konubi...@gmail.com writes:

 Dear Nicolas,

[...]

 --8---cut here---start-8---
 #+CATEGORY: c
 * foo
   :PROPERTIES:
   :CATEGORY: a
   :END:
 ** bar
:PROPERTIES:
:CATEGORY: b
:END:

 --8---cut here---end---8---

 `org-get-category' in the bar headline returns 'a', while I would expect
 it to return 'b'.

[...]

 I don't understand why one would want to remove this behavior. Does it
 raise a technical issue?

After a quick look at the code, I wonder if this new behavior is a
technical choice or hopefully a simple mistake.

Please find attached a patch that restores the behavior of taking into
account the CATEGORY keyword in sub-trees also.

From 9de5161d4bf8a3a3be2fa91d48667d676233e1a4 Mon Sep 17 00:00:00 2001
From: Konubinix konubi...@gmail.com
Date: Tue, 28 Apr 2015 08:55:10 +0200
Subject: [PATCH] Fix `org-refresh-category-properties'

* lisp/org.el (org-refresh-category-properties): Prevent the `put-text-property'
  to change the point in order to take into account the CATEGORY keyword
  property in subtrees also.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index e52bf53..5b1dded 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9568,7 +9568,7 @@ The refresh happens only for the current tree (not subtree).
 	(when (org-at-property-p)
 	  (put-text-property
 	   (save-excursion (org-back-to-heading t) (point))
-	   (org-end-of-subtree t t)
+	   (save-excursion (org-end-of-subtree t t) (point))
 	   'org-category
 	   value)
 
-- 
2.1.4

Best regards,
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] navigate between source code blocks

2015-04-28 Thread Oleh Krehel
Hi Zhihao,

 I’ve got a simple question: how to speed up jumping
 between code blocks?

You might be interested in https://github.com/abo-abo/worf.
It allows you to traverse anything that starts with * or #+ with
just hjkl keys.
See the docs here: http://oremacs.com/worf/README.html.

regards,
Oleh



Re: [O] `org-get-category' and `org-entry-get' do not return the same value

2015-04-28 Thread Samuel Loury
Dear Nicolas,
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Samuel Loury konubi...@gmail.com writes:

 I use the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of
 org-mode.

 Let's say I have a file looking like this:

 #+CATEGORY: c
 * foo
   :PROPERTIES:
   :CATEGORY: a
   :END:
 ** bar
:PROPERTIES:
:CREATED:  [2015-01-30 Fri 08:37]
:END:

 With the point on bar, `org-get-category' returns a while
 (org-entry-get (point) CATEGORY t) returns c. Notice that it returns
 c even if the third argument is INHERIT.

 This should be fixed. Thank you.

Thank you for taking the time to fix the problem.

I just fetched the last version of the sources and realized the CATEGORY
handling still strange. The CATEGORY keyword is taken into account only
at the upper level in the headline hierarchy.

I will illustrate the in the same example as above with a small
modification:

--8---cut here---start-8---
#+CATEGORY: c
* foo
  :PROPERTIES:
  :CATEGORY: a
  :END:
** bar
   :PROPERTIES:
   :CATEGORY: b
   :END:

--8---cut here---end---8---

`org-get-category' in the bar headline returns 'a', while I would expect
it to return 'b'.

I realized that this change was introduced in the following commit:

--8---cut here---start-8---
commit 80bccca4e249cbb5812963863ccffbdcf4b25edd
Author: Nicolas Goaziou m...@nicolasgoaziou.fr
Date:   Tue Mar 31 16:22:10 2015 +0200

Fix `org-refresh-category-properties'

* lisp/org.el (org-refresh-category-properties): Ignore false
  positives when setting category.  Also, deprecate old CATEGORY
  keyword behaviour: new keywords override old ones.
--8---cut here---end---8---

Most of my work flow with org-mode relies on this old behavior.

I searched through the sources, the git history and the mailing list to
find out why this behavior was changed but found nothing.

I don't understand why one would want to remove this behavior. Does it
raise a technical issue?

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] Resolving conflicts with ediff and folding

2015-04-28 Thread Sebastien Vauban
J. David Boyd wrote:
 Charles C. Berry ccbe...@ucsd.edu writes:
 On Tue, 21 Apr 2015, Suvayu Ali wrote:

 Something that has been bugging me for many years now, everytime
 I resolve conflicts in Org files with ediff, it's a pain.  All the
 buffers keep folding the outlines, hiding the conflicts.  I keep
 going to the buffers manually (which can be somewhat of a pain in
 a text terminal), and unfolding them manually.  But of course the
 PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded!

 And then after I have jumped through hoops, and resolved the
 conflicts, I realise I could have just switched to text-mode before
 invoking ediff!

 Is there a way where I don't have to remember to switch the major
 mode before invoking ediff[1]?  Or maybe an ediff experience where
 the buffers are forced to unhide text.  I guess it should be
 possible to just temporarily remove all overlays or invisible
 properties.

 Any thoughts, ideas?

 Did you see this thread:
 http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html
 ??

 That't what I was going to say.  I added that to my setup long ago,
 and it has been working fine since then.  I don't ediff all that
 often, but when I do it certainly helps.

The only (tiny) problem is that the `truncate-lines' and `visible-mode'
settings stay in the buffer after the Ediff session -- while one would
love to get back to the original settings of the buffer.c

Best regards,
  Seb

-- 
Sebastien Vauban



Re: [O] Bug: Priority #B in Agenda causes invalid face reference [8.2.1 (8.2.1-15-ge5cecc-elpa @ /Users/Paul/.emacs.d/elpa/org-20131021/)]

2015-04-28 Thread Nicolas Goaziou
Hello,

Renato renatof...@gmail.com writes:

 I'm using release_8.2.10 and experienced the same problem.

 The problem seems to be the function org-agenda-fontify-priorities which
 calls:
 (org-face-from-face-or-color
  'priority nil
  (cdr (assoc p org-priority-faces)))

 which expects a face to inherit from. When org-priority-faces is nil or
 color or even does not specify the priority(e.g. B) it inherits from
 nil and causes the message.

AFAIU, this isn't right. If (assoc p org-priority-faces) is nil, so is
its cdr and `org-face-from-face-or-color' returns nil, too. The `cond'
moves to the next branch.

 Setting it to something like 
(quote
 ((65 . org-level-1)
  (66 . org-level-2)
  (67 . org-level-3)
  (68 . org-level-4

 is a workaround to the problem.

It is. But it hides where the real problem is.

Do you have an ECM?

Regards,

-- 
Nicolas Goaziou



Re: [O] Marking/highlighting text temporarily

2015-04-28 Thread John Kitchin

Eric Abrahamsen writes:

 John Kitchin jkitc...@andrew.cmu.edu writes:

 Hi Eric,

 I added some functions in the attachment. they colorize the comments,
 add an org-comment menu to the org-menu, and some functions for pop to
 and delete comments from the list mode, and a hydra for commands to
 insert comments. Do you want to get this up on github to facilitate
 developing it?

 Oh great! Thanks a lot. We are duplicating effort a bit here (but only a
 bit, I'd also written display/delete functions for the list buffer), so
 yes, it would be good to coordinate development.

 I suppose it depends a bit on where this is going to end up: I'm
 assuming either org/contrib/lisp, or else as an Elpa package. I don't
 see much difference, except in terms of accessibility to contributors --
 I don't have access to the Org repo, but putting it there might get more
 contributors on balance. As a package only I would have direct access.
 What do you think?

I think on github you can give others direct access, or respond to pull
requests. Either way works.


 The hydra thing is interesting -- I wasn't aware of that package. Better
 not to require it unconditionally though, right?

You could make this conditional if hydra is installed. It is
sufficiently simple that you could leave it out too.


 Thanks,
 Eric

 Eric Abrahamsen writes:

 Eric Abrahamsen


  e...@ericabrahamsen.net writes:

 Vikas Rawal vikasli...@agrarianresearch.org writes:

 On 25-Apr-2015, at 6:22 am, John Kitchin jkitc...@andrew.cmu.edu
 wrote:

 Inspired by this conversation, I hacked up this functional comment
 link:

 
 http://kitchingroup.cheme.cmu.edu/blog/2015/04/24/Commenting-in-org-files/


 It has a custom link type that exports in html and latex, and when
 you click on it, it asks if you want to delete the comment.

 Nice. One small issue is that when I highlight a text and add comment
 to it, and then delete the comment, one space following the last word
 is removed.

 Also, it would be good to make the comment stand out in LaTeX (and
 other) exports, preferably by pushing it to the margin (so it does not
 move everything else).

 Hang on a bit, I'm wasting my afternoon expanding this...

 Okay, this is as far as I got today. I changed some behavior from John's
 implementation: when following the links, it seemed like displaying the
 comment text would be more useful than deleting it -- I think many of us
 have delete-org-link functions lying around. I also couldn't get the
 add-comment thing to work, as it complained when there was no region, so
 I changed how that works.

 Lastly, I spent most of my time learning how tabular list mode works,
 and haven't actually tested the export. Will save that for tomorrow.
 Otherwise, here's the introduction from the Commentary. Comments and
 suggestions very welcome!



 Provides a new link type for Org that allows you to create comments
 on arbitrary chunks of text.  The link prefix is comment:.

 Add comments with `org-comment-add-comment'.  Following the link
 will display the text of the comment in a pop-up buffer.  The
 buffer is in special-mode, hit q to dismiss it.

 Call `org-comment-display-comments' to see all comments in a buffer.

 See the `org-comment-[backend]-export-style' options for ways to
 format comments in export.

 TODO:

 1. Better export customization options.
 2. What does the ODT comment XML look like?
 3. More functions in the display comment buffer: copy as
 kill... what else?
 4. More functions in the comments list buffer, to display, pop to,
 delete, and edit comment text.
 5. Is it possible to have multi-line filled tabular list items?
 Long comments are not very useful if you can't see the whole thing.
 5. Allow multiple comment list buffers attached to different Org
 buffers.
 6. Maybe a minor mode for ease of manipulating comments?

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

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



Re: [O] [PATCH] Fix `org-refresh-category-properties'

2015-04-28 Thread Nicolas Goaziou
Hello,

Samuel Loury konubi...@gmail.com writes:

 Samuel Loury konubi...@gmail.com writes:

 Dear Nicolas,

 [...]

 --8---cut here---start-8---
 #+CATEGORY: c
 * foo
   :PROPERTIES:
   :CATEGORY: a
   :END:
 ** bar
:PROPERTIES:
:CATEGORY: b
:END:

 --8---cut here---end---8---

 `org-get-category' in the bar headline returns 'a', while I would expect
 it to return 'b'.

 [...]

 I don't understand why one would want to remove this behavior. Does it
 raise a technical issue?

No, it's a bug.

 After a quick look at the code, I wonder if this new behavior is a
 technical choice or hopefully a simple mistake.

The latter.

 Please find attached a patch that restores the behavior of taking into
 account the CATEGORY keyword in sub-trees also.


Applied, with an additional test. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-latex question

2015-04-28 Thread Nicolas Goaziou
Vikas Rawal vikasli...@agrarianresearch.org writes:

  [fn:3] aksjd kajshd kahsd

 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.



 The second and third headings are getting exported as:

 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

 I do not think the * should be there.

I don't follow you. You want an unnumbered subsection (per H:2 option),
which, according to `org-latex-classes' translates into
\subsection*{%s}. So, what the expected output, then?

Regards,



Re: [O] org-latex question

2015-04-28 Thread Vikas Rawal

 On 28-Apr-2015, at 1:16 pm, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Vikas Rawal vikasli...@agrarianresearch.org writes:
 
 [fn:3] aksjd kajshd kahsd
 
 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.
 
 
 
 The second and third headings are getting exported as:
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 I do not think the * should be there.
 
 I don't follow you. You want an unnumbered subsection (per H:2 option),
 which, according to `org-latex-classes' translates into
 \subsection*{%s}. So, what the expected output, then?
 

\subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

should be

\subsection[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

In the example file, the first heading with ALT_TITLE is corrected exported.

Vikas




Re: [O] org-latex question

2015-04-28 Thread Vikas Rawal

 On 28-Apr-2015, at 1:17 pm, Vikas Rawal vikasli...@agrarianresearch.org 
 wrote:
 
 
 On 28-Apr-2015, at 1:16 pm, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Vikas Rawal vikasli...@agrarianresearch.org writes:
 
 [fn:3] aksjd kajshd kahsd
 
 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.
 
 
 
 The second and third headings are getting exported as:
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 I do not think the * should be there.
 
 I don't follow you. You want an unnumbered subsection (per H:2 option),
 which, according to `org-latex-classes' translates into
 \subsection*{%s}. So, what the expected output, then?
 
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 should be
 
 \subsection[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 In the example file, the first heading with ALT_TITLE is corrected exported.
 

My apologies. What you have done is right. Took me a moment to understand.

Now let me figure out how to use it in my case.

Sorry, please ignore the previous email.

Vikas








Re: [O] Org-lint and #+call lines

2015-04-28 Thread Nicolas Goaziou
t...@tsdye.com (Thomas S. Dye) writes:

 Org-lint gives this warning:

 ,--
 | 31 low   Unknown value no-export for header :eval
 `--

 But, ob-core.el appears to know the value:

 ,
 | ob-core.el: (,eval-no-export (and ,export (or (equal ,eval 
 no-export)
 `

 Is this a false positive?

Yes, this was an omission in ob-core.el. I fixed it in master. You'll
need to rebase wip-lint against it.

Thank you.

Regards,



Re: [O] Cannot use unknown latex back-end

2015-04-28 Thread Sebastien Vauban
Hello Thomas,

Thomas S. Dye wrote:
 I pulled from master this morning, refreshed Org mode, and got this
 error message in *Messages*:

 Loading /Users/dk/.emacs.d/src/org-mode/contrib/lisp/ox-koma-letter.el 
 (source)...
 org-export-register-backend: Cannot use unknown latex back-end as a parent

Don't you have, maybe, to add:

--8---cut here---start-8---
  (add-to-list 'org-babel-load-languages '(latex . t))
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Restart tablenote numbering by section?

2015-04-28 Thread Jacob Gerlach
Hello,

Latex export explicitly specifies the footnote number when using
\footnotetext for a footnote in a table:
---
| One[fn:1] |
* Footnotes
[fn:1] Footnote in the table
---
becomes:
---
\begin{center}
\begin{tabular}{l}
One\footnotemark\\
\end{tabular}
\end{center}\footnotetext[1]{Footnote in the table}
---

My latex class restarts footnote numbering in each chapter (org top level
headlines), so in a real document the resulting numbering is incorrect (the
tablenote is numbered according to it's overall sequence in the entire org
document, as opposed to the chapter).

Am I stuck manually tweaking the exported latex or is there a solution to
get correct numbering from within org?

Regards,
Jake