Re: [O] Emacs Prelude

2011-12-05 Thread Eric S Fraga
Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hi Tom,

 I'm very interested in the vi emulation in emacs subject. I've tried
 viper-mode but it's quite slow with org, so I gave up on it. What's evil
 and how's the vi emulation it provides? Could you elaborate on it? I'd
 appreciate it, a lot.

 Thanks,

 Marcelo.

Marcelo,

I've been using evil (with org but also more generally) for a few months
now.  It provides a very good vi emulation and, more importantly,
strives to stay out of the way when necessary.  From the commentary in
the evil.el file:

,
| ;; Evil is an extensible vi layer for Emacs. It emulates the main
| ;; features of Vim, and provides facilities for writing custom
| ;; extensions.
| ;;
| ;; Evil lives in a Git repository. To obtain Evil, do
| ;;
| ;;  git clone git://gitorious.org/evil/evil.git
| ;;
| ;; Evil is discussed at implementations-list at lists.ourproject.org,
| ;; a mailing list you can subscribe to at:
| ;;
| ;; http://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
| ;;
| ;; Subscription is not required; we usually reply within a few days
| ;; and CC our replies back to you.
`

If you want modal editing and less cumbersome keystrokes for common
commands, without losing the power that Emacs provides, evil is
definitely worth considering.  I could not go back to vanilla emacs...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.7 (release_7.7.620.g7e49b)



[O] Bug: 2nd, 3rd,... ext link in normal text NOT exported [7.7]

2011-12-05 Thread M. Bauer
Hi,

as in the last paragraph of the Org v7.7 manual section 4.3 about
external links, Org also finds external links in the normal text
and activates them as links.  While editing, this completely
works as expected.

But when it comes to exporting, Org will *not* recognize the
second, third, etc. external link in normal text if it is *not*
marked by square brackets.  See below for some tests that will
fail in ASCII, UTF8, and HTML export.

Can you please consider this issue for one of the next versions
of Org?

Many thanks in advance,
Mathias

text to be exported
* One pure external link (i.e. w/o brackets) per line
OK: foo http://ok.com bar
OK: foo file:/bin/true bar

* Two pure external links (i.e. w/o brackets) per line
FAIL: foo http://ok.com bar http://fail.com baz
FAIL: foo file:/bin/sh bar http://fail.com baz

* One external link (with brackets) per line
OK: foo [[http://ok.com]] bar
OK: foo [[file:/bin/true]] bar

* Two external links (with brackets) per line
OK: foo [[http://ok.com]] bar [[file:/bin/true]] baz
OK: foo [[file:/bin/true]] bar [[http://ok.com]] baz

* One external link (with description) per line
OK: foo [[http://ok.com][OK]] bar
OK: foo [[file:/bin/true][true]] bar

* Two external links (with description) per line
OK: foo [[http://ok.com][OK]] bar [[file:/bin/true][true]] baz
OK: foo [[file:/bin/true][true]] bar [[http://ok.com][OK]] baz

* Mixing several forms of external links in one line
FAIL: http://ok.com bar http://fail.com baz
OK: foo http://ok.com bar [[http://ok.com]] baz
OK: foo http://ok.com bar [[http://ok.com][OK]] baz

FAIL: foo [[http://ok.com]] bar http://fail.com baz
OK: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz

FAIL: foo [[http://ok.com][OK]] bar http://fail.com baz
OK: foo [[http://ok.com][OK]] bar [[http://ok.com]] baz

FAIL: foo http://ok.com bar [[http://ok.com]] baz http://fail.com foo
FAIL: foo http://ok.com bar [[http://ok.com][OK]] baz http://fail.com foo
FAIL: foo [[http://ok.com][OK]] bar http://fail.com baz [[http://ok.com]] foo
FAIL: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz http://fail.com foo

* Mixing several forms and types of external links in one line
FAIL: foo http://ok.com bar [[http://ok.com]] baz file:/bin/false foo
FAIL: foo http://ok.com bar [[http://ok.com][OK]] baz file:/bin/false foo
FAIL: foo [[http://ok.com][OK]] bar file:/bin/false baz [[http://ok.com]] foo
FAIL: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz file:/bin/false foo
text to be exported

Emacs  : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian

Package: Org-mode version 7.7

Configuration: defaults from standard distribution



Re: [O] M-RET and C-RET

2011-12-05 Thread Greg Troxel

Please keep in mind that C-ret is not an ascii or 8-bit character (or
even a character, really), so people using emacs in an xterm (rather
than via X) do not have C-ret available.  In general I find that org
mode becomes a little awkward in a terminal due to usage of
ungeneratable characters.



pgpCicp38AtwY.pgp
Description: PGP signature


Re: [O] [OT] The joy of elisp

2011-12-05 Thread Marcelo de Moraes Serpa
Here's a new version:

(defun find-wiki-by-tags (tags)
  (interactive sEnter tags: )
(shell-command (format cd ~/org;  ack \\\* tags.*(%s).*\ --all tags)
mybuf)
(set-buffer mybuf)
(beginning-of-buffer)
(ignore-errors
  (while (search-forward-regexp \\(.*?\\):)
(replace-match [[~/org/\\1]] )
))
(org-mode)
)

Problems:

1) It's slow, not sure where the bottleneck is (ack in itself is fast, I
suppose the problem lies in elisp's side)
2) The regexp is not optmized, and I'm getting some trash, although it
lists the files for me so it works well enough now.

- Marcelo.




On Mon, Dec 5, 2011 at 12:08 AM, Marcelo de Moraes Serpa 
celose...@gmail.com wrote:

 Hi list!

 I decided to finally get my hands dirty and build a small function to
 improve my org-based productivity system.

 Let me explain:

 I have a subdirectory under ~/org which has a bunch of files named after
 different subjects. Originally it was supposed to model a wiki, but in
 practice, I create a file there whenever I start studying a new (often
 complex) subject and that I know I will come back often and edit / improve.
 It's indeed like a wiki.

 However, I don't keep those files in the agenda. It would slow it down a
 lot. To keep the organization as organic as possible, I simply use tags to
 bring them together semantically. So, I have other files with items that
 are tagged, say, business, and I have a wiki file with a headline like
 this:

 * tags :business:

 contents

 I use the tags headline to tag those files.

 Now, what I wanted was to get a list of files related to say, the business
 tag. It's quite useful to find myself in the (good) chaos of tagged wiki
 files, I came up with a small elisp function that does just that!

 (progn
 (shell-command cd ~/org;  ack \\\* tags.*(business).*\ --all mybuf)
 (set-buffer mybuf)
 (beginning-of-buffer)
 (ignore-errors
   (while (search-forward-regexp \\(.*?\\):)
 (replace-match [[~/org/\\1]] )
 ))
 (org-mode)
 )

 Bear in mind this is my first elisp program ever. It's not even a function
 yet, actually. But it works pretty well for what I want :)

 Took me around 1 hour to bring it up.

 The joy of breaking your head on something!

 Cheers!

 (Suggestions on how to improve it welcome!)

 Marcelo.



Re: [O] Bug: 2nd, 3rd, ... ext link in normal text NOT exported [7.7]

2011-12-05 Thread David Maus
At Mon, 5 Dec 2011 17:19:29 +0100,
M. Bauer wrote:

 Hi,

 as in the last paragraph of the Org v7.7 manual section 4.3 about
 external links, Org also finds external links in the normal text
 and activates them as links.  While editing, this completely
 works as expected.

 But when it comes to exporting, Org will *not* recognize the
 second, third, etc. external link in normal text if it is *not*
 marked by square brackets.  See below for some tests that will
 fail in ASCII, UTF8, and HTML export.

 Can you please consider this issue for one of the next versions
 of Org?

I can confirm this bug for

Org-mode version 7.7 (release_7.7.619.g3aaa5)

on

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of
2010-12-11 on raven, modified by Debian

Down in `org-export-normalize-links' Org skips the entire line if
there is a bracket link /anywhere/ on the line.

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


pgpMB9SwuttZg.pgp
Description: PGP signature


Re: [O] Different face for org-table fields with formulas

2011-12-05 Thread Dov Grobgeld
I had a look at the org-mode sources and found that this was quite trivial
to implement on the source level. E.g. the following patch embeds the
output of an org formula in ~~ to make it org-verbatim. This is easily
changed to another couple of characters that may then be set in
org-emphasis-alist to whatever formatting I fancy.

index edcdbe1..9ad01d4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2572,7 +2572,7 @@ $1-%s\n orig formula form0 form))
 (message )))
 (if (listp ev) (setq fmt nil ev #ERROR))
 (org-table-justify-field-maybe
- (if fmt (format fmt (string-to-number ev)) ev))
+ (format ~%s~ (if fmt (format fmt (string-to-number ev)) ev)))
 (if (and down ( ndown 0) (looking-at .*\n[ \t]*|[^-]))
 (call-interactively 'org-return)
   (setq ndown 0)))



On Sun, Dec 4, 2011 at 09:15, Dov Grobgeld dov.grobg...@gmail.com wrote:

 Has anyone hacked up the use of using a different face for org-table
 fields with formulas. This would be useful for quickly realizing what are
 inputs and outputs in a org spreadsheet. Currently I do this by adding the
 formatting ;~%.4f~ to my formulas. But it would be nicer if this was a
 settable property.

 Thanks!
 Dov




[O] Bug: Multiple external links in normal text NOT exported [7.7]

2011-12-05 Thread M. Bauer
Hi,

as in the last paragraph of the Org v7.7 manual's section 4.3
about external links, Org also finds external links in the
normal text and activates them as links.  While editing, this
completely works as described.

But when it comes to exporting, Org will *not* recognize the
second, third, etc. external link in normal text if it is *not*
marked by square brackets.  See below for some tests that will
fail in ASCII, UTF8, and HTML export.

Can you please consider this issue for one of the next versions
of Org?

Many thanks in advance,
Mathias

text to be exported
* One pure external link (i.e. w/o brackets) per line
OK: foo http://ok.com bar
OK: foo file:/bin/true bar

* Two pure external links (i.e. w/o brackets) per line
FAIL: foo http://ok.com bar http://fail.com baz
FAIL: foo file:/bin/sh bar http://fail.com baz

* One external link (with brackets) per line
OK: foo [[http://ok.com]] bar
OK: foo [[file:/bin/true]] bar

* Two external links (with brackets) per line
OK: foo [[http://ok.com]] bar [[file:/bin/true]] baz
OK: foo [[file:/bin/true]] bar [[http://ok.com]] baz

* One external link (with description) per line
OK: foo [[http://ok.com][OK]] bar
OK: foo [[file:/bin/true][true]] bar

* Two external links (with description) per line
OK: foo [[http://ok.com][OK]] bar [[file:/bin/true][true]] baz
OK: foo [[file:/bin/true][true]] bar [[http://ok.com][OK]] baz

* Mixing several forms of external links in one line
FAIL: http://ok.com bar http://fail.com baz
OK: foo http://ok.com bar [[http://ok.com]] baz
OK: foo http://ok.com bar [[http://ok.com][OK]] baz

FAIL: foo [[http://ok.com]] bar http://fail.com baz
OK: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz

FAIL: foo [[http://ok.com][OK]] bar http://fail.com baz
OK: foo [[http://ok.com][OK]] bar [[http://ok.com]] baz

FAIL: foo http://ok.com bar [[http://ok.com]] baz http://fail.com foo
FAIL: foo http://ok.com bar [[http://ok.com][OK]] baz http://fail.com foo
FAIL: foo [[http://ok.com][OK]] bar http://fail.com baz [[http://ok.com]] foo
FAIL: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz http://fail.com foo

* Mixing several forms and types of external links in one line
FAIL: foo http://ok.com bar [[http://ok.com]] baz file:/bin/false foo
FAIL: foo http://ok.com bar [[http://ok.com][OK]] baz file:/bin/false foo
FAIL: foo [[http://ok.com][OK]] bar file:/bin/false baz [[http://ok.com]] foo
FAIL: foo [[http://ok.com]] bar [[http://ok.com][OK]] baz file:/bin/false foo
text to be exported

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


Emacs  : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian
Package: Org-mode version 7.7

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append
local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
  (src org-babel-exp-inline-src-blocks))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
  

[O] Exportation langage

2011-12-05 Thread Steve Prud'Homme
Hi,
when i export something with orgmode everything is find now with
latex. I don't have accent problem thanks...
I have an other problem. How can I change Table of content to Table
des matières in french. Author for Auteur, etc.
Can i change the output langage in orgmode.
Thanks

-- 
Posté par Steve Prud'Homme
sprud...@gmail.com
514 466-3951



[O] org-capture-templates file+datetree+prompt question

2011-12-05 Thread Erik Hetzner
Hi all,

I would like to use a capture template to capture calendar entries 
file them to a date tree organized calendar.org file.

Specifically, what I want to happen is this: the template prompts me
for a date, then prompts me for headline. The date should be used for
the datetree  used as a datestamp in the headline.

I have tried the following template:

  (setq org-capture-templates
'((c Calendar entry (file+datetree+prompt ~/s/notes/calendar.org)
   * %^{What?}\n%t\n%?)))

What happens with this is that I get prompted for a date, which is
used to file the entry in the datetree, but the date in the headline
is always today’s date.

If I use `k c` in the agenda (org-agenda-action) this works as
expected, with no prompting for a date, the entry filed properly in
the datetree, and the date in the headline set properly.

Any thoughts on how to fix this?

best, Erik
Sent from my free software system http://fsf.org/.


Re: [O] org-capture-templates file+datetree+prompt question

2011-12-05 Thread Erik Hetzner
At Mon, 05 Dec 2011 22:04:33 -0800,
Erik Hetzner wrote:
 
 Hi all,
 
 I would like to use a capture template to capture calendar entries 
 file them to a date tree organized calendar.org file.

Sorry, this is with org-mode 7.7, emacs 23.2.1, Ubuntu 11.04.

best, Erik
Sent from my free software system http://fsf.org/.


Re: [O] org-capture-templates file+datetree+prompt question

2011-12-05 Thread Carsten Dominik

On 6.12.2011, at 07:04, Erik Hetzner wrote:

 Hi all,
 
 I would like to use a capture template to capture calendar entries 
 file them to a date tree organized calendar.org file.
 
 Specifically, what I want to happen is this: the template prompts me
 for a date, then prompts me for headline. The date should be used for
 the datetree  used as a datestamp in the headline.
 
 I have tried the following template:
 
  (setq org-capture-templates
'((c Calendar entry (file+datetree+prompt ~/s/notes/calendar.org)
   * %^{What?}\n%t\n%?)))
 
 What happens with this is that I get prompted for a date, which is
 used to file the entry in the datetree, but the date in the headline
 is always today’s date.

I tried to reproduce this.  When I do this and enter the date two
days into the future (8 December), I get

* 2011
** 2011-12 Dezember
*** 2011-12-08 Donnerstag
 Test
 2011-12-06 Di

So the headline uses in fact the date that was entered at the prompt,
only the %t is replaced by the current date.  I would think this
all works as expected.  Maybe I am missing something?

I see that when I do k c from the agenda, then indeed also the %t
is replaced with the cursor date.  So indeed, this is a bit
inconsistent.  What would be the right behavior?

- Carsten



 
 If I use `k c` in the agenda (org-agenda-action) this works as
 expected, with no prompting for a date, the entry filed properly in
 the datetree, and the date in the headline set properly.
 
 Any thoughts on how to fix this?
 
 best, Erik
 Sent from my free software system http://fsf.org/.