Re: [O] [feature request] org-insert-heading

2012-02-12 Thread Nicolas Goaziou
Hello,

Achim Gratz strom...@nexgo.de writes:

 I actually like the ability to split lines with M-RET, especially since
 there doesn't seem to be a sane way to tell org that yes I want to
 split the line this time.  What I want is that point at EOL is
 recognized as a special situation, much like point at BOL already
 is.

Excepted that, unlike to headlines, EOL is _not_ a special position in
an item. Remember that an headline has to fit on a single line, whereas
an item may span over multiple paragraphs, tables, and even plain lists.

Look at the following example:

#+begin_src org
- first line of the first item

  another paragraph in the item

  one last paragraph

- second item
#+end_src

If I use M-RET with point between first and item, I get (| being
the point):

#+begin_src org
- first line of the first

- |item

  another paragraph in the item

  one last paragraph

- second item
#+end_src

If I use M-RET with point a word further, that is after item,
I logically have:

#+begin_src org
- first line of the first item

- |

  another paragraph in the item

  one last paragraph

- second item
#+end_src

It will be the same if I use M-RET before another. I can also go on
with point after another:

#+begin_src org
- first line of the first item

  another

- |paragraph in the item

  one last paragraph

- second item
#+end_src

It is very predictable, isn't it?

On the other hand, it isn't consistent to allow, at every EOL in the
item, to jump below contents and add a new item there.

Now, perhaps the variable's name is misleading, as it isn't really about
splitting lines, which make no sense in items, but splitting contents.

Note that you can easily obtain what you want with M-RET M-DOWN at
beginning of item, or even write a function to do with even less
keystrokes.


Regards,

-- 
Nicolas Goaziou



Re: [O] Wrapping of e-mail address in table when exporting to pdf through latex

2012-02-12 Thread Johnny
Tim Burt tcb...@rochester.rr.com writes:

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 Johnny yggdra...@gmx.co.uk writes:

 Hi,

 I have some e-mail addresses in a table that I want to export to pdf
 thorugh latex. However, the e-mail addresses do not wrap nicely (not at
 all) in the table, is there any way to make the latex export from org
 enable wrapping?

 Example:

#+ATTR_LaTeX: align=llp{2cm}
   | ITEM| Comment| e-mail   |
   |-++--|
   | Listed item | Some text here | this.email@shouldbe.wrapped  |
   | ||  |

 Thanks!

 As you are alluding, this is more a latex problem than an org
 one.  Getting an email address to wrap is difficult.  The only solution
 I can think of is to suggest a hyphenation point in each email address
 you have in the table.

 You can suggest hyphenation points using \-, as in:

   | Listed item | Some text here | this.email@\-shouldbe.wrapped |

 This works, but is not pretty...  but I don't think you have much in the
 way of alternative options!

 HTH,
 eric

 The hyperref package provides a LaTeX solution, the briefest of which is 
 the \url{} command (and the \nolinkurl{} variant).
#+ATTR_LaTeX: align=llp{2cm}
   | ITEM | Comment   | e-mail 
  |
   
 |--+---+-|
   | ~url~ cmd| e-mail is a dead link | 
 \url{this.email@shouldbe.wrapped}   |
   | ~nolinkurl~ cmd  | e-mail is just text   | 
 \nolinkurl{this.email@shouldbe.wrapped} |
   | ~mailto:~ syntax | e-mail is an mailto: link | 
 mailto:this.email@shouldbe.wrapped  |

 *** Notes for the mailto syntax
 For the ~mailto:~ syntax to work the variable
 ~org-export-latex-href-format~ needs to use the ~url~ command instead of
 ~href~ 
 (http://article.gmane.org/gmane.emacs.orgmode/44911/match=href+latex+link+url)
 : (setq org-export-latex-href-format \url{%s}) 

 While I prefer the ~mailto:~ syntax as more the `orgmode way', there are
 two possible issues:
  - config :: It requires a change to *all* LaTeX link exports
  - display :: The ~mailto:~ string is also exported
 I do not know what other solutions are currently possible to resolve those
 issues.

I have now had the time to set this up to enable the mailto:; syntax. I
agree that the export of the mailto:; string as well would be nice to
suppress, but this is a minor quirk. Both \url and \nolinkurl are good
options as well to avoid that.

I also learned that the backslash in the setq must be escaped to avoid
raising an error, i.e. i put in my init.el:

: (setq org-export-latex-href-format \\url{%s}) 

Many thanks!
-- 
Johnny



Re: [O] Changing [X] by something else

2012-02-12 Thread François Pinard
Jambunathan K kjambunat...@gmail.com writes:

 Ctrl-S being turned into a rectangle is mysterious.  Is it the
 standard way for Emacs to tell about a non-printable character?

 You can see the tick mark if you follow this link:
 http://article.gmane.org/gmane.emacs.orgmode/52281

Oops, indeed!

Checking more closely on the message you originally sent to me (with a
Cc: to the mailing list)...  There were two check marks in the message.
If I open the message raw in Gnus (`C-u g' in the summary buffer), I see
both of them coded as =E2=9C=93.  But if I let Gnus to render the
message, while the first check mark is OK, the second gets mangled into
a Ctrl-S.  Could it be a problem with the Gnus rendering mechanics for
whatever sits between #+begin_src and #+end_src?

 If the above command doesn't yield a tick mark the issue is with your
 setup.

Changing the Ctrl-S by the check mark, within ~/.emacs, now makes much
more sense!  I'm getting exactly what I wanted through this writing,
inspired from yours (thanks, Jambunathan!):


(font-lock-add-keywords
 'org-mode
 '((\\[\\(X\\)\\]
(0 (progn (compose-region (match-beginning 1) (match-end 1) ✔) nil)))
   ))


I'm being lucky here, as I only barely understand what the incantation
means! :-)

François




Re: [O] ?? While taking note, capture a note with reciprocal links to/from current location

2012-02-12 Thread John Hendy
On Sun, Feb 12, 2012 at 12:50 AM, Russell Adams
rlad...@adamsinfoserv.com wrote:
 On Sat, Feb 11, 2012 at 07:54:03PM -0800, lngn...@gmail.com wrote:

   I am studying some text in an org file, some comments from a colleague
   on a research project.  I need to do a little google search about a
   term (something that happens quite often).  It would be convenient to
   produce a note elsewhere, perhaps in a different file, or perhaps
   under a different top-level heading in the same file, with a note to
   the term where the cursor is (let's say I've selected it as the
   region).   I want to capture some notes, perhaps some quite copious
   notes, and when done I would like reciprocal links to bind these
   bits.  Then I can take some good notes on the terms or the topic in
   my colleague's notes, and return, and so forth.

   I could do this, and it's not too difficult.  However, it would be
   *very* helpful to do this with one capture event.  Does a facility
   exist for this?

   Let me say that I think it does, and it relates to the %a element of a
   template.  However, I would like permanent links, say of the
   current region to the note resulting from the capture event, and vise
   versa.

   I thought of footnotes, but this footnote could end up being a whole
   chapter, or a small section, in a report!

   Thank you for any suggestions.  I apologize in advance, because I'm
   sure this is no challenge for the gurus on this list.

   Alan Davis



 Org-capture. It's a great feature, press a key and take a note to a
 known location and the template can store date, time, and where you
 were when the note occurred.


But he's also asking for reciprocal links (bi-directional, I take
it). This doesn't exist that I know of, though strangely it *just*
came up last week, though for refiling and creating a bi-directional
link. Pretty much the same idea. Send something new or existing to a
new location and have a two way link in both places.
-- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg51480.html

John


 --
 Russell Adams                            rlad...@adamsinfoserv.com

 PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

 Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3




[O] Error exporting a project

2012-02-12 Thread Leandro Noferini
Ciao a tutti,

I am using org-mode 7.8.03 coming with emacs  24.0.93.1
(x86_64-pc-linux-gnu, GTK+ Version 3.2.3) from debian package.

I defined a project like this for my little blog:

(setq org-publish-project-alist
  '((Blog
 :base-directory ~/Documenti/org/
 :publishing-directory ~/Documenti/Personali/Blog/
 :base-extension org
 :section-numbers nil
 :table-of-contents nil
 :include blog.org
 :tasks nil
 :author Leandro Noferini
 :email lnofe...@cybervalley.org

but when I try to export to html I get this error (in Messages buffer)

mapc: Wrong type argument: sequencep, 98

What's wrong?

P.S.: I am not subscribed to this list and I will read your kind answers
via gmane.

-- 
Ciao
leandro
http://oivabkctz4ajdnwa.onion/blog/
gpg fingerprint: 54A4 2612 FD50 0313 7FED  6A91 DA5C 1552 E7A4 D6C2
\/
    The only ASCII history possible
/\


pgpo3wPxtd6ao.pgp
Description: PGP signature


Re: [O] Error exporting a project

2012-02-12 Thread Nick Dokos
Leandro Noferini lnofe...@cybervalley.org wrote:

 Ciao a tutti,
 
 I am using org-mode 7.8.03 coming with emacs  24.0.93.1
 (x86_64-pc-linux-gnu, GTK+ Version 3.2.3) from debian package.
 
 I defined a project like this for my little blog:
 
 (setq org-publish-project-alist
   '((Blog
:base-directory ~/Documenti/org/
:publishing-directory ~/Documenti/Personali/Blog/
:base-extension org
:section-numbers nil
:table-of-contents nil
:include blog.org
:tasks nil
:author Leandro Noferini
:email lnofe...@cybervalley.org
 

This is incomplete - please send the complete entry.

 but when I try to export to html I get this error (in Messages buffer)
 
 mapc: Wrong type argument: sequencep, 98
 
 What's wrong?
 

M-x toggle-debug-on-error RET and then try to publish. You should
get a backtrace: post the full backtrace to this list.

Nick




Re: [O] Buffer-wide header arguments

2012-02-12 Thread Darlan Cavalcante Moreira

Remember to also press C-c C-c in the property line after writing it.

--
Darlan

At Fri, 10 Feb 2012 11:35:06 -1000,
t...@tsdye.com (Thomas S. Dye) wrote:
 
 Peng Zhang pczh...@gmail.com writes:
 
  Dear all,
 
  I have followed the manual and put
  #+PROPERTY: session *R*
  #+PROPERTY: exports none
  at the beginning of the document.
 
  However, it does not have any effects?
 
  Could somebody instruct me how to debug and see what goes wrong? Thanks!
 
  I am running Arch linux with emacs-23.4 and org-mode 7.8.03
 
  Best,
  Peng
 
 Aloha Peng,
 
 Please try this (note the colon with :session and :exports)
 
 #+PROPERTY: :session *R*
 #+PROPERTY: :exports none
 
 hth,
 Tom
 -- 
 Thomas S. Dye
 http://www.tsdye.com
 



Re: [O] Buffer-wide header arguments

2012-02-12 Thread Peng Zhang

that does the trick!

Thanks,
Peng

On 02/12/2012 10:35 AM, Darlan Cavalcante Moreira wrote:

Remember to also press C-c C-c in the property line after writing it.

--
Darlan

At Fri, 10 Feb 2012 11:35:06 -1000,
t...@tsdye.com (Thomas S. Dye) wrote:

Peng Zhangpczh...@gmail.com  writes:


Dear all,

I have followed the manual and put
#+PROPERTY: session *R*
#+PROPERTY: exports none
at the beginning of the document.

However, it does not have any effects?

Could somebody instruct me how to debug and see what goes wrong? Thanks!

I am running Arch linux with emacs-23.4 and org-mode 7.8.03

Best,
Peng


Aloha Peng,

Please try this (note the colon with :session and :exports)

#+PROPERTY: :session *R*
#+PROPERTY: :exports none

hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com





Re: [O] Error exporting a project

2012-02-12 Thread Leandro Noferini
Nick Dokos nicholas.do...@hp.com writes:


[...]

 (setq org-publish-project-alist
   '((Blog
   :base-directory ~/Documenti/org/
   :publishing-directory ~/Documenti/Personali/Blog/
   :base-extension org
   :section-numbers nil
   :table-of-contents nil
   :include blog.org
   :tasks nil
   :author Leandro Noferini
   :email lnofe...@cybervalley.org
 

 This is incomplete - please send the complete entry.

It lacks only the three closing parenthesis.

 but when I try to export to html I get this error (in Messages buffer)
 
 mapc: Wrong type argument: sequencep, 98
 
 What's wrong?
 

 M-x toggle-debug-on-error RET and then try to publish. You should
 get a backtrace: post the full backtrace to this list.

I did not remember how to have the debug, thanks!

This is the Backtrace:

Debugger entered--Lisp error: (wrong-type-argument sequencep 98)
  #[(f) \304  P!\305\n\\203\202\nB\211)\207 [base-dir f x 
org-publish-temp-files expand-file-name memql] 3](98)
  mapc(#[(f) \304 P!\305\n\\203\202\nB\211)\207 [base-dir f x 
org-publish-temp-files expand-file-name memql] 3] blog.org)
  org-publish-get-base-files((Blog :base-directory ~/Documenti/org/ 
:publishing-directory ~/Documenti/Personali/Blog/ :base-extension org 
:section-numbers nil :table-of-contents nil :include blog.org :tasks nil 
:author Leandro Noferini :email lnofe...@cybervalley.org) nil)
  #[(project) \306@!\210A\307\310\\307  \311\\307  
\312\\206\313\307 \314\\206#\315\307 \316\\206- \307  
\317\\2068!\\307 \320\\307 
\321\\322\n\#\323$\203X\324\325!\210\203a
\f\\210#\211A#@\211$\203x\326$\327#\210\202a\307 \330\\203\222\331\307  
\332\!\210\326\333\334\307 \332\\\327#\210\203\233\324\335!\210\336 
.\207 [project project-plist exclude-regexp sitemap-p sitemap-filename 
sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap 
:sitemap-filename sitemap.org :sitemap-function org-publish-org-sitemap 
:sitemap-date-format :sitemap-file-entry-format :preparation-function 
:completion-function org-publish-get-base-files nil run-hooks 
preparation-function org-publish-file t :makeindex 
org-publish-index-generate-theindex :base-directory expand-file-name 
theindex.org completion-function org-publish-write-cache-file 
org-publish-sitemap-date-format org-sitemap-date-format 
org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 
6]((Blog :base-directory ~/Documenti/org/ :publishing-directory 
~/Documenti/Personali/Blog/ :base-extension org :section-numbers nil 
:table-of-contents nil :include blog.org :tasks nil :author Leandro 
Noferini :email lnofe...@cybervalley.org))
  mapc(#[(project) \306@!\210A\307   \310\\307  \311\\307  
\312\\206\313\307 \314\\206#\315\307 \316\\206- \307  
\317\\2068!\\307 \320\\307 
\321\\322\n\#\323$\203X\324\325!\210\203a
\f\\210#\211A#@\211$\203x\326$\327#\210\202a\307 \330\\203\222\331\307  
\332\!\210\326\333\334\307 \332\\\327#\210\203\233\324\335!\210\336 
.\207 [project project-plist exclude-regexp sitemap-p sitemap-filename 
sitemap-function org-publish-initialize-cache plist-get :exclude :auto-sitemap 
:sitemap-filename sitemap.org :sitemap-function org-publish-org-sitemap 
:sitemap-date-format :sitemap-file-entry-format :preparation-function 
:completion-function org-publish-get-base-files nil run-hooks 
preparation-function org-publish-file t :makeindex 
org-publish-index-generate-theindex :base-directory expand-file-name 
theindex.org completion-function org-publish-write-cache-file 
org-publish-sitemap-date-format org-sitemap-date-format 
org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files file] 
6] ((Blog :base-directory ~/Documenti/org/ :publishing-directory 
~/Documenti/Personali/Blog/ :base-extension org :section-numbers nil 
:table-of-contents nil :include blog.org :tasks nil :author Leandro 
Noferini :email lnofe...@cybervalley.org)))
  org-publish-projects(((Blog :base-directory ~/Documenti/org/ 
:publishing-directory ~/Documenti/Personali/Blog/ :base-extension org 
:section-numbers nil :table-of-contents nil :include blog.org :tasks nil 
:author Leandro Noferini :email lnofe...@cybervalley.org)))
  org-publish((Blog :base-directory ~/Documenti/org/ :publishing-directory 
~/Documenti/Personali/Blog/ :base-extension org :section-numbers nil 
:table-of-contents nil :include blog.org :tasks nil :author Leandro 
Noferini :email lnofe...@cybervalley.org) nil)
  call-interactively(org-publish)
  org-export(nil)
  call-interactively(org-export nil nil)

What should I look for?

-- 
Ciao
leandro
http://oivabkctz4ajdnwa.onion/blog/
gpg fingerprint: 54A4 2612 FD50 0313 7FED  6A91 DA5C 1552 E7A4 D6C2
\/
    The only ASCII history possible
/\


pgp55L2vjgsps.pgp
Description: PGP signature


Re: [O] Error exporting a project

2012-02-12 Thread Nick Dokos
Leandro Noferini lnofe...@cybervalley.org wrote:

 Nick Dokos nicholas.do...@hp.com writes:
 
 
 [...]
 
  (setq org-publish-project-alist
'((Blog
  :base-directory ~/Documenti/org/
  :publishing-directory ~/Documenti/Personali/Blog/
  :base-extension org
  :section-numbers nil
  :table-of-contents nil
  :include blog.org
  :tasks nil
  :author Leandro Noferini
  :email lnofe...@cybervalley.org
  
 
  This is incomplete - please send the complete entry.
 
 It lacks only the three closing parenthesis.
 
  but when I try to export to html I get this error (in Messages buffer)
  
  mapc: Wrong type argument: sequencep, 98
  
  What's wrong?
  
 
  M-x toggle-debug-on-error RET and then try to publish. You should
  get a backtrace: post the full backtrace to this list.
 
 I did not remember how to have the debug, thanks!
 
 This is the Backtrace:
 
 Debugger entered--Lisp error: (wrong-type-argument sequencep 98)
   #[(f) \304P!\305\n\\203map-function 
 org-publish-initialize-cache plist-get :exclude :auto-sitemap 
 :sitemap-filename sitemap.org :sitemap-function org-publish-org-sitemap 
 :sitemap-date-format :sitemap-file-entry-format :preparation-function 
 :completion-function org-publish-get-base-files nil run-hooks 
 preparation-function org-publish-file t :makeindex 
 org-publish-index-generate-theindex :base-directory expand-file-name 
 theindex.org completion-function org-publish-write-cache-file 
 org-publish-sitemap-date-format org-sitemap-date-format 
 org-publish-sitemap-file-entry-format org-sitemap-file-entry-format files 
 file] 6] ((Blog :base-directory ~/Documenti/org/ :publishing-directory 
 ~/Documenti/Personali/Blog/ :base-extension org :section-numbers nil 
 :table-of-contents nil :include blog.org :tasks nil :author Leandro 
 Noferini :email lnofe...@cybervalley.org)))
   org-publish-projects(((Blog :base-directory ~/Documenti/org/ 
 :publishing-directory ~/Documenti/Personali/Blog/ :base-extension org 
 :section-numbers nil :table-of-contents nil :include blog.org :tasks nil 
 :author Leandro Noferini :email lnofe...@cybervalley.org)))
   org-publish((Blog :base-directory ~/Documenti/org/ 
 :publishing-directory ~/Documenti/Personali/Blog/ :base-extension org 
 :section-numbers nil :table-of-contents nil :include blog.org :tasks nil 
 :author Leandro Noferini :email lnofe...@cybervalley.org) nil)
   call-interactively(org-publish)
   org-export(nil)
   call-interactively(org-export nil nil)
 
 What should I look for?
 
 -- 
 Ciao
 leandro
 http://oivabkctz4ajdnwa.onion/blog/
 gpg fingerprint: 54A4 2612 FD50 0313 7FED  6A91 DA5C 1552 E7A4 D6C2
 \/
     The only ASCII history possible
 /\



Re: [O] Error exporting a project

2012-02-12 Thread Nick Dokos
[OK - let me try this again. Not sure what happened.]

Leandro Noferini lnofe...@cybervalley.org wrote:


  :include blog.org

 Debugger entered--Lisp error: (wrong-type-argument sequencep 98)
   #[(f) \304P!\305\n\\203



Re: [O] Error exporting a project

2012-02-12 Thread Nick Dokos
[AAARGH - third attempt - not having much luck]

Leandro Noferini lnofe...@cybervalley.org wrote:


  :include blog.org
  
  mapc: Wrong type argument: sequencep, 98
  
  What's wrong?
  
 
  M-x toggle-debug-on-error RET and then try to publish. You should
  get a backtrace: post the full backtrace to this list.
 
 I did not remember how to have the debug, thanks!
 
 This is the Backtrace:
 

:include takes a list of files as argument. The mapc iterates over
the list. Here it iterates over the string and chokes on the first
letter (b = 98 in ascii)

Try

:include (blog.org)

Nick

PS If this doesn't go through unscathed, I'll give up and go take a nap.





Re: [O] Error exporting a project

2012-02-12 Thread Leandro Noferini
Nick Dokos nicholas.do...@hp.com writes:

 [AAARGH - third attempt - not having much luck]

This was the right one!

;-)

[...]

 :include blog.org
  
  mapc: Wrong type argument: sequencep, 98
  
  What's wrong?
  
 
  M-x toggle-debug-on-error RET and then try to publish. You should
  get a backtrace: post the full backtrace to this list.
 
 I did not remember how to have the debug, thanks!
 
 This is the Backtrace:
 

 :include takes a list of files as argument. The mapc iterates over
 the list. Here it iterates over the string and chokes on the first
 letter (b = 98 in ascii)

 Try

 :include (blog.org)

Now the error disapperead but now it exports every file of the directory
defined in the :base-directory variable.

 PS If this doesn't go through unscathed, I'll give up and go take a
 nap.

No no, please: this was the right answer!

:-)

-- 
Ciao
leandro
http://oivabkctz4ajdnwa.onion/blog/
gpg fingerprint: 54A4 2612 FD50 0313 7FED  6A91 DA5C 1552 E7A4 D6C2
\/
    The only ASCII history possible
/\


pgpHkr8YN3goM.pgp
Description: PGP signature


Re: [O] Error exporting a project

2012-02-12 Thread Nick Dokos
Leandro Noferini lnofe...@cybervalley.org wrote:

  Try
 
  :include (blog.org)
 
 Now the error disapperead but now it exports every file of the directory
 defined in the :base-directory variable.
 

Every org file perhaps but not every file surely.  Section 13.1.3,
Selecting files, of the the Org manual should be useful.

You can use (untested)

:exclude .*
:include (blog.org)

to exclude everything and include just your blog.org. Or move all
the other .org files away from that base directory.

Nick

  PS If this doesn't go through unscathed, I'll give up and go take a
  nap.
 
 No no, please: this was the right answer!
 

I still need a nap...



Re: [O] [BUG] tags sparse tree broken

2012-02-12 Thread David Maus
At Thu, 9 Feb 2012 03:22:55 +0100,
Suvayu Ali wrote:

 [1  text/plain; UTF-8 (quoted-printable)]
 Hi,

 I believe the sparse tree search is broken. It has been broken for a
 while I think. Searching for tags returns no matches. I get the
 following backtrace with debug enabled on a minimal emacs on using
 `next-error' after a tag search which should return a positive result.

I pushed a patch to master that should fix the problem. Sparse tree
search for a tag as outlined in the example works now in current
master the same way it did in Org 7.7.

It was not the matching that was broken, but the highlighting of the
matches.

Could you check if this problem is fixed for you?

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de

pgpuufOWRdzef.pgp
Description: PGP signature


[O] [Accepted] Fix J in agenda when clock out hook clocks in again

2012-02-12 Thread David Maus
Patch 1160 (http://patchwork.newartisans.com/patch/1160/) is now Accepted.

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1328809420-31933-1-git-send-email-bernt%40norang.ca%3E

Here is the original message containing the patch:

 Content-Type: text/plain; charset=utf-8
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
 Subject: [O] Fix J in agenda when clock out hook clocks in again
 Date: Thu, 09 Feb 2012 22:43:40 -
 From: Bernt Hansen be...@norang.ca
 X-Patchwork-Id: 1160
 Message-Id: 1328809420-31933-1-git-send-email-be...@norang.ca
 To: emacs-orgmode@gnu.org
 Cc: Bernt Hansen be...@norang.ca
 
 * org-clock.el (org-clock-out): Do not delete the current clocking task
 when org-clock-out-hook clocks in another task
 
 My clock out hook keeps the clock running by automatically clocking in
 a new task (the parent task, or the default task).  This sets a new
 clocking task which was then clobbered at the end of org-clock-out
 so that J in the agenda would return
 
 No running clock, use `C-c C-x C-j' to jump to the most recent one
 
 We now detect that another task is clocked in and skip clearing the
 org-clock-current-task variable used by the agenda to determine if
 the clock is currently running.
 
 ---
 lisp/org-clock.el |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
 
 diff --git a/lisp/org-clock.el b/lisp/org-clock.el
 index a1df776..7dff094 100644
 --- a/lisp/org-clock.el
 +++ b/lisp/org-clock.el
 @@ -1387,7 +1387,8 @@ If there is no running clock, throw an error, unless 
 FAIL-QUIETLY is set.
 (message (concat Clock stopped at %s after HH:MM =  
 org-time-clocksum-format %s) te h m
  (if remove  = LINE REMOVED ))
(run-hooks 'org-clock-out-hook)
 -   (org-clock-delete-current))
 +   (unless (org-clocking-p)
 + (org-clock-delete-current)))
  
  (add-hook 'org-clock-out-hook 'org-clock-remove-empty-clock-drawer)
  
 



Re: [O] [BUG] tags sparse tree broken

2012-02-12 Thread suvayu ali
Hi David,

On Sun, Feb 12, 2012 at 19:41, David Maus dm...@ictsoc.de wrote:
 I pushed a patch to master that should fix the problem. Sparse tree
 search for a tag as outlined in the example works now in current
 master the same way it did in Org 7.7.

 It was not the matching that was broken, but the highlighting of the
 matches.

 Could you check if this problem is fixed for you?

Your patch fixes the problem. Thanks a lot. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Error exporting a project

2012-02-12 Thread Leandro Noferini
Nick Dokos nicholas.do...@hp.com writes:


[...]

  :include (blog.org)
 
 Now the error disapperead but now it exports every file of the directory
 defined in the :base-directory variable.
 

 Every org file perhaps but not every file surely.  Section 13.1.3,
 Selecting files, of the the Org manual should be useful.

 You can use (untested)

 :exclude .*
 :include (blog.org)

 to exclude everything and include just your blog.org. Or move all
 the other .org files away from that base directory.

Ok, this works!

  PS If this doesn't go through unscathed, I'll give up and go take a
  nap.
 
 No no, please: this was the right answer!
 

 I still need a nap...

Have a good rest!

:-)

Thanks a lot!

-- 
Ciao
leandro
http://oivabkctz4ajdnwa.onion/blog/
gpg fingerprint: 54A4 2612 FD50 0313 7FED  6A91 DA5C 1552 E7A4 D6C2
\/
    The only ASCII history possible
/\


pgpaQsQgoi7Ro.pgp
Description: PGP signature


[O] [PATCH] Fix org-agenda-skip-if bug

2012-02-12 Thread Toby Cubitt
There appears to be a bug in how org-agenda-skip-if parses the list of
CONDITIONS supplied to it.

The combination '(nottodo todo) is a valid condition, matching todo items
whose state isn't a todo-type keyword (according to the keyword types
defined in `org-todo-keywords'). But `org-agenda-skip-if' tests first for
conditions of the form '(todo x) using (memq 'todo conditions), which
mistakenly picks up '(nottodo todo) as well.

Simply reversing the order of the memq tests for 'todo and 'nottodo fixes
this particular case, which is what the attached patch does.


Note that there's still a slightly different issue with combinations of
multiple todo tests, which this patch does not fix. The docstring
suggests that CONDITIONS is allowed to be a list of multiple
tests. E.g. '(nottodo CANCELLED todo done) should match any done state
except CANCELLED. But, faced with this combination,
`organ-agenda-skip-if' will only apply the first '(nottodo CANCELLED)
test, and ignores the second.

However, it's not clear to me whether this is a problem with the code or
the docstring. Perhaps it was never intended to support combinations of
multiple todo tests.

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ts...@cantab.net
web:   www.dr-qubit.org
From 3eb5cd877ca48a2c0d2e907cf4ab7adf32520020 Mon Sep 17 00:00:00 2001
From: Toby S. Cubitt ts...@cantab.net
Date: Sat, 28 Jan 2012 18:21:52 +0100
Subject: [PATCH 1/2] Agenda: Fix bug that broke '(nottodo todo) skip condition

* lisp/org-agenda.el (org-agenda-skip-if): Fix bug in test for
'(nottodo todo) skip condition.

Note: certain combinations of multiple conditions may still be broken.
---
 lisp/org-agenda.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 38fd589..ad706eb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4285,8 +4285,8 @@ that can be put into `org-agenda-skip-function' for the 
duration of a command.
   (stringp (nth 1 m))
   (not (re-search-forward (nth 1 m) end t)))
   (and (or
-   (setq m (memq 'todo conditions))
-   (setq m (memq 'nottodo conditions)))
+   (setq m (memq 'nottodo conditions))
+   (setq m (memq 'todo conditions)))
   (org-agenda-skip-if-todo m end)))
  end)))
 
-- 
1.7.3.4



[O] [PATCH] Add new '[not]todo-unblocked tests to org-agenda-skip-if

2012-02-12 Thread Toby Cubitt
This patch adds two new tests to `org-agenda-skip-if': 'todo-unblocked
and 'nottodo-unblocked. These match like 'todo and 'nottodo, but only on
unblocked todo items. This type of test is useful when compiling custom
agenda views containing lists of currently actionable todo items.

Whilst it's possible to code such tests in `org-agenda-custom-commands'
directly (well, Elisp is Turing-complete: you can in principle code
anything!), it's far less convenient than a simple `org-agenda-skip-if'
test which can reuse much of the existing machinery.

Note that the attached patch applies on top of my other Fix
org-agenda-skip-if bug patch, though this new feature is independent of
that bug-fix.

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ts...@cantab.net
web:   www.dr-qubit.org
From 4e52c8c724f57c981206db18c95f9fe285af Mon Sep 17 00:00:00 2001
From: Toby S. Cubitt ts...@cantab.net
Date: Sat, 28 Jan 2012 18:26:21 +0100
Subject: [PATCH 2/2] Agenda: Add new todo-unblocked and nottodo-unblocked skip conditions

* lisp/org-agenda.el (org-agenda-skip-if, org-agenda-skip-if-todo):
Add new todo-unblocked and nottodo-unblocked skip conditions. These
match as for todo and nottodo, but only for unblocked todo items.
---
 lisp/org-agenda.el |   26 --
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ad706eb..d411732 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4286,15 +4286,18 @@ that can be put into `org-agenda-skip-function' for the duration of a command.
 	   (not (re-search-forward (nth 1 m) end t)))
   (and (or
 	(setq m (memq 'nottodo conditions))
+	(setq m (memq 'todo-unblocked conditions))
+	(setq m (memq 'nottodo-unblocked conditions))
 	(setq m (memq 'todo conditions)))
 	   (org-agenda-skip-if-todo m end)))
  end)))
 
 (defun org-agenda-skip-if-todo (args end)
   Helper function for `org-agenda-skip-if', do not use it directly.
-ARGS is a list with first element either `todo' or `nottodo'.
-The remainder is either a list of TODO keywords, or a state symbol
-`todo' or `done' or `any'.
+ARGS is a list with first element either `todo', `nottodo',
+`todo-unblocked' or `nottodo-unblocked'. The remainder is either
+a list of TODO keywords, or a state symbol `todo' or `done' or
+`any'.
   (let ((kw (car args))
 	(arg (cadr args))
 	todo-wds todo-re)
@@ -4318,9 +4321,20 @@ The remainder is either a list of TODO keywords, or a state symbol
 	  (concat ^\\*+[ \t]+(
 		  (mapconcat 'identity todo-wds  \\|)
 		  \\)\\))
-(if (eq kw 'todo)
-	(re-search-forward todo-re end t)
-  (not (re-search-forward todo-re end t)
+(cond
+ ((eq kw 'todo) (re-search-forward todo-re end t))
+ ((eq kw 'nottodo) (not (re-search-forward todo-re end t)))
+ ((eq kw 'todo-unblocked)
+  (catch 'unblocked
+	(while (re-search-forward todo-re end t)
+	  (or (org-entry-blocked-p) (throw 'unblocked t)))
+	nil))
+ ((eq kw 'nottodo-unblocked)
+  (catch 'unblocked
+	(while (re-search-forward todo-re end t)
+	  (or (org-entry-blocked-p) (throw 'unblocked nil)))
+	t))
+ )))
 
 ;;;###autoload
 (defun org-agenda-list-stuck-projects (rest ignore)
-- 
1.7.3.4



Re: [O] [PATCH] narrowing in agenda file

2012-02-12 Thread Bernt Hansen
Hi Sergey,

I've applied this patch but I still can't generate agenda log reports
using 'R' in the agenda with this patch applied.

The clock reports seem to be generated and inserted directly in my org
files (corrupting data a bit) instead of being inserted in my agenda.

I've dropped this patch for now.

Regards,
Bernt


Litvinov Sergey slitvi...@gmail.com writes:

 This must be a cumulative patch against master.
 From f95e9e89b47b35d5198ecaff7ee20ffb3e63b066 Mon Sep 17 00:00:00 2001
 From: Litvinov Sergey slitvi...@gmail.com
 Date: Thu, 2 Feb 2012 08:15:56 +0100
 Subject: [PATCH] Make narrowing of the agenda file survive (org-agenda-redo)

 * lisp/org.el (org-prepare-agenda-buffers): move '(save-excursion
   (save-restriction' construction
 * testing/examples/org-agenda-test.org: add examples
 ---
  lisp/org.el  |   65 +
  testing/examples/org-agenda-test.org |   21 +++
  2 files changed, 54 insertions(+), 32 deletions(-)
  create mode 100644 testing/examples/org-agenda-test.org

 diff --git a/lisp/org.el b/lisp/org.el
 index dc9e653..2f08579 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -16575,39 +16575,40 @@ When a buffer is unmodified, it is just killed.  
 When modified, it is saved
   (set-buffer file)
 (org-check-agenda-file file)
 (set-buffer (org-get-agenda-file-buffer file)))
 - (widen)
 - (setq bmp (buffer-modified-p))
 - (org-refresh-category-properties)
 - (setq org-todo-keywords-for-agenda
 -   (append org-todo-keywords-for-agenda org-todo-keywords-1))
 - (setq org-done-keywords-for-agenda
 -   (append org-done-keywords-for-agenda org-done-keywords))
 - (setq org-todo-keyword-alist-for-agenda
 -   (append org-todo-keyword-alist-for-agenda org-todo-key-alist))
 - (setq org-drawers-for-agenda
 -   (append org-drawers-for-agenda org-drawers))
 - (setq org-tag-alist-for-agenda
 -   (append org-tag-alist-for-agenda org-tag-alist))
 -
   (save-excursion
 -   (remove-text-properties (point-min) (point-max) pall)
 -   (when org-agenda-skip-archived-trees
 - (goto-char (point-min))
 - (while (re-search-forward rea nil t)
 -   (if (org-at-heading-p t)
 -   (add-text-properties (point-at-bol) (org-end-of-subtree 
 t) pa
 -   (goto-char (point-min))
 -   (setq re (format org-heading-keyword-regexp-format
 -org-comment-string))
 -   (while (re-search-forward re nil t)
 - (add-text-properties
 -  (match-beginning 0) (org-end-of-subtree t) pc)))
 - (set-buffer-modified-p bmp)
 -(setq org-todo-keywords-for-agenda
 -  (org-uniquify org-todo-keywords-for-agenda))
 -(setq org-todo-keyword-alist-for-agenda
 -   (org-uniquify org-todo-keyword-alist-for-agenda)
 -   org-tag-alist-for-agenda (org-uniquify org-tag-alist-for-agenda
 +   (save-restriction
 + (widen)
 + (setq bmp (buffer-modified-p))
 + (org-refresh-category-properties)
 + (setq org-todo-keywords-for-agenda
 +   (append org-todo-keywords-for-agenda org-todo-keywords-1))
 + (setq org-done-keywords-for-agenda
 +   (append org-done-keywords-for-agenda org-done-keywords))
 + (setq org-todo-keyword-alist-for-agenda
 +   (append org-todo-keyword-alist-for-agenda 
 org-todo-key-alist))
 + (setq org-drawers-for-agenda
 +   (append org-drawers-for-agenda org-drawers))
 + (setq org-tag-alist-for-agenda
 +   (append org-tag-alist-for-agenda org-tag-alist))
 + (save-excursion
 +   (remove-text-properties (point-min) (point-max) pall)
 +   (when org-agenda-skip-archived-trees
 + (goto-char (point-min))
 + (while (re-search-forward rea nil t)
 +   (if (org-at-heading-p t)
 +   (add-text-properties (point-at-bol) 
 (org-end-of-subtree t) pa
 +   (goto-char (point-min))
 +   (setq re (format org-heading-keyword-regexp-format
 +org-comment-string))
 +   (while (re-search-forward re nil t)
 + (add-text-properties
 +  (match-beginning 0) (org-end-of-subtree t) pc)))
 + (set-buffer-modified-p bmp)))
 + (setq org-todo-keywords-for-agenda
 +   (org-uniquify org-todo-keywords-for-agenda))
 + (setq org-todo-keyword-alist-for-agenda
 +   (org-uniquify org-todo-keyword-alist-for-agenda)
 +   org-tag-alist-for-agenda (org-uniquify 
 org-tag-alist-for-agenda
  
   Embedded LaTeX
  
 diff --git 

[O] R export graphics

2012-02-12 Thread Riccardo Romoli

Hi, I have some trouble exporting figures from an R-org-babel session.

The code I use to generate the figure is:

#+name: my figure
#+headers: :results graphics :file /Users/riccardoromoli/Documents/ 
Dropbox/PhD/myFigure.pdf

#+begin_src R :session *R* :exports results
...
#+end_src

So, if I use : file /User/riccardoromoli/Documents/, all works  
right, but, if I use ~/Documents/. the R console says:
 Error in pdf(file = ~/Dropbox/PhD/myFigure.pdf) : cannot open file  
'~/Dropbox/PhD/myFigure.pdf'


I usually work in the DropBox folder because at work I have a linux  
machine instead at my home I have an OsX machine, so if I could use  
~, I should not change the code every time I switch between the two  
different computer.


Best
Riccardo



Re: [O] R export graphics

2012-02-12 Thread Thomas S. Dye
Riccardo Romoli ric.rom...@gmail.com writes:

 Hi, I have some trouble exporting figures from an R-org-babel session.

 The code I use to generate the figure is:

 #+name: my figure
 #+headers: :results graphics :file /Users/riccardoromoli/Documents/
 Dropbox/PhD/myFigure.pdf
 #+begin_src R :session *R* :exports results
 ...
 #+end_src

 So, if I use : file /User/riccardoromoli/Documents/, all works
 right, but, if I use ~/Documents/. the R console says:
  Error in pdf(file = ~/Dropbox/PhD/myFigure.pdf) : cannot open file
 ~/Dropbox/PhD/myFigure.pdf'

 I usually work in the DropBox folder because at work I have a linux
 machine instead at my home I have an OsX machine, so if I could use
 ~, I should not change the code every time I switch between the two
 different computer.

 Best
 Riccardo

Aloha Riccardo,

If you work in your Dropbox/PhD folder (your .org files are there), then
you should be able to do :file myFigure.pdf on both systems.

hth,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [PATCH] org-goto before headline

2012-02-12 Thread Andrea Crotti

On 02/10/2012 02:42 PM, Toby Cubitt wrote:

On Fri, Feb 10, 2012 at 02:19:27PM +, Andrea Crotti wrote:

What is exactly the reason for org-goto to need to be at least in the
first headline to work?

I always get this error when I just try to jump in the first line:
byte-code: Before first headline at position 1 in buffer ..

Do you by any chance have `org-goto-interface' set to
outline-path-completion (or are you using org-goto with a prefix
argument)?

If so, I've also come across this problem. I think it's a bug in
org-goto, which should pass NO-EXCLUDE to org-refile-get-location (but
doesn't). The attached patch fixes this for me (or you can pull the
org-goto branch from http://www.dr-qubit.org/git/org-mode.git).

HTH,

Toby

Is the patch already pushed to master then?
Just to check, it would be sad if it gets lost in the way..



[O] How to activate pre.src in org-babel html output? Can only get class=example

2012-02-12 Thread Giovanni Moretti
Using org-babel, I'm wanting to output Python fragments along with the resultant 
output to HTML.


That bit's easy, and the following works as expected:

   #+options: toc:nil num:nil
   * Using Python interactively
   Any commands typed into the console executed immediately.

   #+begin_src python :results output :exports both
   print 355/113

   print 17/2
   print 17/2.0
   #+end_src python

However, although I find references to various styling mechanisms (e.g 
*pre.src*) in the orgmode documentation, I can't find any way to get any more 
CSS selectors on both the src and output blocks. The only one that ever appears 
is example as shown here:


   pre class=exampleprint 355/113
   print 17/2
   print 17/2.0
   /pre
   pre class=example
  3
  8
  8.5
   /pre
   /div

If I can find out how to make pre.src appear (hopefully only on the source 
block) , then I can change the background colours or fonts to make the output 
visibly distinct from the source code.


The full HTML output I get is at 
http://dl.dropbox.com/u/2671560/org-py-babel.html contains lots of CSS 
selectors, and I can easily include my my own using #+STYLE lines, but I need 
some way to differentiate the two blocks.


I'm using Emacs 23.1.50.1 and the lastest orgmode  commit 
b5082974c83a3a4838db86025edce857b11e5847 (Fri Feb 3 15:18:05 2012 +0100)


Any tips?

Thanks
Giovanni

--
==
Dr Giovanni Moretti | School of Engineering and Advanced Technology
Senior Lecturer | Massey University, Palmerston North, New Zealand
Computer Science| Ph +64-6-3505799x2474  Fax +64-6-3502259 - ZL2GX
==
http://seat.massey.ac.nz/morettig.more...@massey.ac.nz