[Orgmode] Re: double entries in my diary / not identifying exisiting entries probably

2011-02-15 Thread Detlef Steuer

On Tue, 15 Feb 2011 06:08:27 +0100
Bastien bastien.gue...@wikimedia.fr wrote:

 Hi Detlef,
 
 Detlef Steuer detlef.ste...@gmx.de writes:
 
  Before (having just entered  the office):
  ** 2011-02 Februar
  *** 2011-02-14 Montag
  [2011-02-14 Mo 08:20]--
 
  Hitting C-c a a i j a second time:
  ** 2011-02 Februar
  *** 2011-02-14 Montag
  [2011-02-14 Mo 08:20]--
  ** 2011-02 Februar
  *** 2011-02-14 Montag
 
 Fixed, thanks for reporting this.


Thank you!

Detlef


 
 -- 
  Bastien
 
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] Suggestions: GRASS GIS und Lilypond

2011-02-15 Thread Thorsten
John Hendy jw.he...@gmail.com writes:

 I've used Lilypond and think it's amazing. But... what advantage is
 having it in org? Just curious... integration in foldable headlines
 and src blocks? For my uses, I can't think of a purpose unless, I
 guess, I was doing in-document scores or bars like in a wedding
 program or something. What was your idea -- I'm interested.

 John

I thought about writing a music book with the typesetting done by LaTex
and Lilypond. I know it should work just like combining R and LaTex with
Sweave, but the last time I tried I had problems - integration in Org
could make it easy. And, since nowadays books are shared on the web for
free and the author starves, one might want to reuse the content in the
setting of an online music school. Orgmode's html export would make this
easy.

Thorsten











___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [CRASH] org-pretty-entities causes emacs to take 100% CPU

2011-02-15 Thread Vladimir Alexiev
I've isolated it by running clean emacs (emacs -q) with this setup:

(setq org-entities-user ; name latex math-p html ascii latin1 utf8
  '((ok nil nil font color='green'#x2714;/font OK OK ✔)
(nok nil nil font color='red'#x2718;/font NOK NOK ✘))
  org-pretty-entities t)

And this small org file:

#+STARTUP:   showall indent
* Deployment Options
- \ok Deploy on

Observations:
- The crash DOES NOT happen with noident
- Moving up from the mark, I get this in *Messages*
  line-move-visual: Args out of range: 3, 3 
  (the number varies according to where the line is)
- it doesn't matter whether visual-line-mode is on or off


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Open HTML link in other window?

2011-02-15 Thread Vladimir Alexiev
 I don't think this is really necessary.

IN web presentations (eg s5.org) each section is one slide (screen).
If you click on an external link, it replaces the presentation,
and when you go back to it, you lose the current slide.

Setting some global HTML_ATTR may also be useful for images,
eg if I want all my images on the right.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [bug] Invalid format character in html-postamble-format

2011-02-15 Thread Sébastien Vauban
Hi,

When exporting to HTML (with lastest Git), I now have this error occurring:

--8---cut here---start-8---
Debugger entered--Lisp error: (error Invalid format character: `%v')
  signal(error (Invalid format character: `%v'))
  error(Invalid format character: `%%%c' 118)
--8---cut here---end---8---

I could spot the bad character in:

--8---cut here---start-8---
html-postamble-format's value is 
p class=\author\Author: %a (%e)/p\np class=\date\Date: %d/p\np 
class=\creator\Generated by %c/p\np class=\xhtml-validation\%v/p\n

Documentation:
Not documented as a variable.
--8---cut here---end---8---

But I don't know what was intended...

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] ASCII export: Fixed a bug.

2011-02-15 Thread Valentin Wüstholz
Hi Bastien,

I just noticed that the call to 'car' is missing:

-- lisp/org-ascii.el --
index 3cc95e6..dd6f69b 100644
@@ -656 +656 @@ publishing directory.
-(last org-export-ascii-underline)))
+(car (last org-export-ascii-underline


Best regards,

Valentin


On Tue, Feb 15, 2011 at 7:58 AM, Valentin Wüstholz wuesth...@gmail.com wrote:
 On Tue, Feb 15, 2011 at 5:31 AM, Bastien bastien.gue...@wikimedia.fr wrote:
 Hi Valentin,

 Valentin Wüstholz wuesth...@gmail.com writes:

 thanks. Is there a reason for keeping the 'reverse' operation? The
 documentation for org-export-ascii-underline states that the
 characters are ordered by level (1, 2, ...). Why should they be
 accessed in reverse order then?

 The docstring didn't match the default value for the defcustom: now it
 does.  I also simplified `org-ascii-level-start' so that it use the
 right level char.

 Sounds good!

 Thanks,

 Valentin


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] Suggestions: GRASS GIS und Lilypond

2011-02-15 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/15/2011 02:02 AM, Thorsten wrote:
 Hello Babel developers, 
 just two suggestions for new languages: 
 1. GRASS GIS
 As far as I know there is no grass-mode in emacs, but some expert people are
 successful running grass processes together with R processes in ESS.
 Since GRASS and R are natural allies, it would be great to use the GRASS
 engine in an org-file to retrieve spatial data and then analyse the data
 with R in the same file - would make Org a kind of emacs-grassmode
 replacement.  

I second that - but what would be really needed to make this work
nicely, is syntax highlighting for grass commands.

And in addition, GRASS scripts are shell scripts - so one should be able
to use a combination of :session and sh code blocks to run GRASS
commands without problems (haven't tried it yet, but nice idea).

The only question would be on how can I start a shell, in which I start
GRASS in which I run the R shell? Well - what I did was to start GRASS
in xterm, in GRASS start emacs with  and when I started R in emacs, it
was running in GRASS.

Is this what you mean, or am I missing here something?

Rainer

 2. Lilypond
 A nice to have for all the music lovers in the org community. 
 Regards
 Thorsten
 
 
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1aQzAACgkQoYgNqgF2egr0mQCfXqXrPJ8So4ImFsDJr2VRWkSw
i9sAnRO099FuJ8ymXJNfF6HDPBKbDkH7
=Mb70
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] iCalendar selective export

2011-02-15 Thread Juraj Kubelka
Hi Bastien,

thank you for the implementation!

Juraj

On Fri, Feb 11, 2011 at 12:04 PM, Bastien bastien.gue...@wikimedia.frwrote:

 Hi Juraj,

 Juraj Kubelka juraj.kube...@gmail.com writes:

  I found out that exporting agenda files to iCalendar
  (org-export-icalendar-all-agenda-files) ignore
  variable org-export-exclude-tags. Is it right? And is it wanted? I do
  not want to see some tasks in my external calendar (mobile phone).

 You now set ̀org-icalendar-honor-noexport-tag' to t to prevent export of
 entries with a :noexport: tag.

 Thanks for this idea,

 --
  Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Feature request: another Org file for anniversary entries

2011-02-15 Thread Juraj Kubelka
Hi Bastien,

I may mixed two thinks I supposed to achieve.

1. to be able to export anniversaries in a separate .ics file. As you posted
recently, in a new org-mode release, it will be possible to use
`org-icalendar-honor-noexport-tag' customization. I have not tried yet, but
it should work. So, this is likely not the case right now.

2. I have a lot of anniversaries and I want to store new items (by pressing
i a in Org Agenda buffer) to a different .org file. I do not want to have
them in the same file as the other diary entries (by pressing i d o i
b). Are there any settings I can use for the purpose? Maybe I missed
something.

Thank you in advance,
Juraj

On Fri, Feb 11, 2011 at 1:25 PM, Bastien bastien.gue...@wikimedia.frwrote:

 Hi Juraj,

 thanks for the patch and the explanations.

 Juraj Kubelka juraj.kube...@gmail.com writes:

  So, my regular diary events are stored in main.org file and
  anniversaries in anniversary.org file.

 Which lets you have two separate .ics files, one containing
 anniversaries, the other one not containing them.

 I still fail to understand what is needed that cannot be taken
 care of by your settings.

 Thanks,

 --
  Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-mode and readmine

2011-02-15 Thread Yuri Goncharov
Is there way to integrate org-mode and readmine?
At least export from readmine to org-mode.

-- 
С уважением
Юрий Гончаров
Системный администратор
Highlink Ltd. St-Peterburg, Russia
+7 812 3341212
http://www.hl.ru

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] ASCII export: Fixed a bug.

2011-02-15 Thread Bastien
Hi Valentin,

Valentin Wüstholz wuesth...@gmail.com writes:

 I just noticed that the call to 'car' is missing:

 -- lisp/org-ascii.el 
 --
 index 3cc95e6..dd6f69b 100644
 @@ -656 +656 @@ publishing directory.
 -  (last org-export-ascii-underline)))

 +  (car (last org-export-ascii-underline

Argh, right, fixed again.

Thanks!

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] Invalid format character in html-postamble-format

2011-02-15 Thread Bastien
Hi Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 When exporting to HTML (with lastest Git), I now have this error occurring:

 Debugger entered--Lisp error: (error Invalid format character: `%v')
   signal(error (Invalid format character: `%v'))
   error(Invalid format character: `%%%c' 118)

Certainly because your `org-export-html-validation-link' is set to nil.

Please try to set it to  and tell me if that cures your problem.

Thanks,

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] Suggestions: GRASS GIS und Lilypond

2011-02-15 Thread Christian Moe

Earlier thread on Lilypond:
http://comments.gmane.org/gmane.emacs.orgmode/31324

CM

On 2/15/11 2:02 AM, Thorsten wrote:

Hello Babel developers,
just two suggestions for new languages:
1. GRASS GIS
As far as I know there is no grass-mode in emacs, but some expert people are
successful running grass processes together with R processes in ESS.
Since GRASS and R are natural allies, it would be great to use the GRASS
engine in an org-file to retrieve spatial data and then analyse the data
with R in the same file - would make Org a kind of emacs-grassmode
replacement.
2. Lilypond
A nice to have for all the music lovers in the org community.
Regards
Thorsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] Suggestions: GRASS GIS und Lilypond

2011-02-15 Thread Bastien
Christian Moe m...@christianmoe.com writes:

 Earlier thread on Lilypond:
 http://comments.gmane.org/gmane.emacs.orgmode/31324

Yes.  I had the opportunity to discuss this with Stefan at FOSDEM...
it's something that may happen at sometimes :)

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and readmine

2011-02-15 Thread Bastien
Hi Yuri,

Yuri Goncharov g...@hl.ru writes:

 Is there way to integrate org-mode and readmine?

Not yet.

 At least export from readmine to org-mode.

Perhaps you can use org-feed to import redmine's RSS feeds?

HTH,

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [bug] Invalid format character in html-postamble-format

2011-02-15 Thread Bastien
Hi Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Please try to set it to  and tell me if that cures your problem.

 1. Setting it to  solves the problem.
 2. Setting it back to nil makes the problem reappear.
 3. Setting it to  solves it again.

... and it go on and on ;)

 So, yes, it is because of that. Thanks.

 Maybe some kind of error catching should be added, still?

That's right, I've done that now.

Thanks for reporting this!

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [bug] Invalid format character in html-postamble-format

2011-02-15 Thread Sébastien Vauban
Bastien,

Bastien wrote:
 Maybe some kind of error catching should be added, still?

 That's right, I've done that now.

Thanks!

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] Preserve trailing blank lines

2011-02-15 Thread Jason Dunsmore
Bastien bastien.gue...@wikimedia.fr writes:

 However, with your patch, I get a weird behavior.

 Config:

 ,
 | (setq org-blank-before-new-entry '((heading . nil)
 |(plain-list-item . nil)))
 `

 Test file:

 ,
 | * Section
 | 
 | ** Subsection 1
 | Body
 | 
 | ** Subsection 2
 | Body
 `

 Trying to move Subsection 1 down (with org-metadown):

 ,
 | * Section
 | Body   ??
 | 
 | ** Subsection 2
 | 
 | ** Subsection 1
 | Body
 `

 Are you able to reproduce this?  

I finally had a chance to test this out with the latest Org from git and
a vanilla Emacs config, and I was unable to reproduce the behavior you
saw.  Here is what I did:


$ git clone git://orgmode.org/org-mode.git

$ emacs23 -Q 

(Edit org.el to re-introduce patch.)

$ cd org-mode/

$ git diff
diff --git a/lisp/org.el b/lisp/org.el
index 164081c..4329def 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18507,10 +18507,10 @@ Taken from `count' in cl-seq.el with all keyword argum
   Move backwards over whitespace, to the beginning of the first empty line.
 Returns the number of empty lines passed.
   (let ((pos (point)))
-(skip-chars-backward  \t\n\r)
-;; (if (cdr (assoc 'heading org-blank-before-new-entry))
-;;(skip-chars-backward  \t\n\r)
-;;   (forward-line -1))
+;;(skip-chars-backward  \t\n\r)
+(if (cdr (assoc 'heading org-blank-before-new-entry))
+   (skip-chars-backward  \t\n\r)
+  (forward-line -1))
 (beginning-of-line 2)
 (goto-char (min (point) pos))
 (count-lines (point) pos)))


Then I evaluated the following in Emacs:


(delete /usr/share/emacs/23.2/lisp/org/ load-path)
(add-to-list 'load-path ~/tmp/org-mode/lisp)
(require 'org-install)
(setq org-blank-before-new-entry '((heading . nil)
   (plain-list-item . nil)))


You can see what happened on my screen with the following:


wget http://98.129.169.48/tmp/emacs-testing.time
wget http://98.129.169.48/tmp/emacs-testing.script
scriptreplay emacs-testing.time emacs-testing.script


Would you mind testing it out again?

Regards,
Jason

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Status google calendar sync

2011-02-15 Thread Marcelo de Moraes Serpa
I had just that very idea yesterday but thought it would be too crazy;
A new startup? :D

Marcelo.



On Tue, Feb 15, 2011 at 1:18 AM, Konrad Hinsen
konrad.hin...@fastmail.net wrote:
 On 14 Feb 2011, at 22:39, Marcelo de Moraes Serpa wrote:

 This would be awesome, and I think this is the path the emacs
 developers should take -- separating emacs into two, the GUI and the
 core elisp interpreter. I'm sure this wouldn't be easy, but imagine

 Emacs already has a batch mode, and very different GUI layers (terminal,
 X11, Mac, Windows), so I'd suspect that a no GUI version that can be
 compiled anywhere would not be so difficult. It may be more difficult to
 make a separate GUI layer, but that wouldn't be very important either from a
 practical point of view.

 BTW, another Emacs GUI I'd like to see is a Web-based one. Imagine
 connecting to your home machine from a Web browser and getting access to a
 copy of Emacs running there!

 Konrad.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Status google calendar sync

2011-02-15 Thread Marcelo de Moraes Serpa
Anyway, I'd like to see the development of org go towards decoupling
it from the emacs GUI and allowing the core logic to be used from
other languages; I'd say the easiest way would be to provide a
JSON-like HTTP protocol; not sure how easy/hard would it be to develop
a HTTP server and run it from the headless emacs as a daemon.

Marcelo.

On Tue, Feb 15, 2011 at 10:37 AM, Marcelo de Moraes Serpa
celose...@gmail.com wrote:
 I had just that very idea yesterday but thought it would be too crazy;
 A new startup? :D

 Marcelo.



 On Tue, Feb 15, 2011 at 1:18 AM, Konrad Hinsen
 konrad.hin...@fastmail.net wrote:
 On 14 Feb 2011, at 22:39, Marcelo de Moraes Serpa wrote:

 This would be awesome, and I think this is the path the emacs
 developers should take -- separating emacs into two, the GUI and the
 core elisp interpreter. I'm sure this wouldn't be easy, but imagine

 Emacs already has a batch mode, and very different GUI layers (terminal,
 X11, Mac, Windows), so I'd suspect that a no GUI version that can be
 compiled anywhere would not be so difficult. It may be more difficult to
 make a separate GUI layer, but that wouldn't be very important either from a
 practical point of view.

 BTW, another Emacs GUI I'd like to see is a Web-based one. Imagine
 connecting to your home machine from a Web browser and getting access to a
 copy of Emacs running there!

 Konrad.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [Feature request] org-backup

2011-02-15 Thread Marcelo de Moraes Serpa
Ah, yeah, subdirs. I had misunderstood you.

Cheers,

Marcelo.

On Mon, Feb 14, 2011 at 4:56 PM, Dan Davison dandavis...@gmail.com wrote:
 Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hi Dan,

 I don't think I understood -- AFAIK, git repos are per directory and I
 can't add something from another directory to it ?

 Hi Marcelo,

 Let's say the base directory of a git repo is the one in which you
 issued git init and which contains a hidden .git subdirectory. You
 can add files from anywhere in the directory tree rooted at the base
 directory. In other words, if you make a git repo in your home directory

 cd ~
 git init

 you can add files from any subdirectory of your home directory. Just an
 idea.

 Dan


 Symlinking could be a possibility, like keeping everything inside
 ~/org and symlink to another dirs.

 Cheers,

 Marcelo.

 On Mon, Feb 14, 2011 at 6:38 AM, Dan Davison dandavis...@gmail.com wrote:
 Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hi Dan!

 I already do this, but sometimes the files are spread around *many*
 directories. I.e, the model of having everything in a
 version-controlled directory is unpractical, so that's why I think it
 would be useful.

 A couple of possibilities:

 A git repo doesn't have to be limited to a single directory. You could
 have a git repo in your home directory, and git add org files, wherever
 they may be located using a command something like
 find . -type f -name '*.org' -exec git add '{}' \;

 You could use symlinks where posible, so that your org files are all in
 one directory, and project directories contain symlinks to those org
 files.

 Dan


 Marcelo.

 On Sun, Feb 13, 2011 at 3:49 PM, Dan Davison dandavis...@gmail.com wrote:
 Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hi list,

 Although I try to keep all my org files inside a ~/org directory, I
 often find myself creating org files outside of this directory
 context, for example, as a bucket for a new project I'm working on, to
 keep notes, todos, etc.

 It'd be nice if we had a org-backup function that would fetch all
 files from the agenda + linked files and create a compressed backup of
 them. What do you think?

 Hi Marcelo,

 I think backing up text files is a job for other tools; not emacs. I'd
 recommend using a version control tool such as git for this.

 Dan


 Cheers,

 Marcelo.

 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Help with translating the new variable `org-clock-clocktable-language-setup'

2011-02-15 Thread peter . frings
(nl Bestand N Tijdstip Taak Duur ALLES Totale duur Duur 
bestand)

Note: the translation for Heading is similar to the french translation: it 
means task. A literal translation would be Kop or Hoofding.

Also note that a two-character code may not be enough to express the 
differences between similar languages such as dutch and flemish, UK english and 
US british, French and Canadian frenchs, ... Not that it matters that much...


Cheers,
Peter.
-- 
PROGRAMMEUR 
Onbegrepen persoon die op een onbegrijpelijke manier een onbegrijpelijk 
probleem oplost, dat enkel door een programmeur gecreëerd kon worden.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-15 Thread Stefan Monnier
 Maybe an example is better to explain what I need, imagine that I have
 the following two paragraphs:
[...]
 Where I assumed that alineas are separated by either an empty line or a
 tailing `\\' while paragraphs are separated by just an empty line.

An important question here is: is it important for M-} to ignore those \\?

 What you say (making distinct separation of paragraph for motion and of
 fillable-region) is more than what I needed, because I assumed that
 alineas and paragraphs are not completely separate things, as an alinea
 is always a subset of a paragraph.

Yes, that's usually the case.  But it's more trouble for the code to
enforce that fill-forward-paragraph-function only moves within the
current paragraph, so the extra power comes at no cost and you don't
have to use it.

 Concerning EUPP, after more thinking, I realized that alineas are not
 the good approach: actually I don't need any special filling but rather
 to disable filling in some occasions, and for that using the
 fill-paragraph-function is a better approach.

Of course fill-paragraph-function sucks because it only applies to
fill-paragraph and not to fill-region.

 So, for Org I will just install emacs-24 --- or at least the fill
 package, is it backward compatible with an emacs-23 ?

No idea.  It's likely, but I really can't guarantee it.


Stefan

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Help with translating the new variable `org-clock-clocktable-language-setup'

2011-02-15 Thread Juan Pechiar
Spanish:

(es Archivo N Fecha y hora Tarea Tiempo TODO Tiempo total 
Tiempo archivo)

I hope the TODO coincidence doesn't send org-mode into orbit.

On Sun, Feb 13, 2011 at 02:03:49PM +0100, Bastien wrote:
 I've pushed a fix which introduces a new custom variable
 `org-clock-clocktable-language-setup' - current value is:

 ((en File L Timestamp Headline Time ALL Total time File 
 time)
  (fr Fichier N Horodatage Tâche Durée TOUT Durée totale 
 Durée fichier))

 Could people from various countries help with the translations of these
 strings?

 The format of each list in this alist is this:

 en : the two-characters language code
   File : For the _file_ column
  L : For the _level_ of the heading
  Timestamp : For the timestamp
   Headline : For the headline
   Time : For the time spent on the task
ALL : Well, for all.
 Total time : For the total time of the clocktable
  File time : For the time spent on a task in a file

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-babel issue with source blocks and latex block

2011-02-15 Thread Kieran Healy
Hi, 

I have org-babel set up to use minted to format code blocks and it's terrific. 
I was wondering whether I could also get it to wrap the results it outputs 
using minted instead of verbatim environments (it seems not right now) when I 
noticed the following strange behavior. Here's a minimal example. This org file 
exports to latex as expected, with the src block in a minted environment and 
the results block as a verbatim environment: (As I say, wanting the results 
block wrapped by minted was what prompted this issue ...)

Org-mode file:
--
#+TITLE: Working with Org-Babel
#+AUTHOR: Kieran Healy
#+OPTIONS: toc:nil num:nil

** An Example

#+source: r-example-1
#+begin_src R :exports both
  2 + 1 + (5-2) * 5
#+end_src

The end.
--

Relevant bit of Latex file output:
--
\begin{document}

\title{Working with Org-Babel}
\author{Kieran Healy}
\date{15 February 2011}
\maketitle

\section*{An Example}
\label{sec-1}

\begin{minted}[]{R}
2 + 1 + (5-2) * 5
\end{minted}

\begin{verbatim}
 18
\end{verbatim}

The end.

\end{document}
--

But now if I insert a latex-specific section, which causes org-mode no trouble 
in the normal course of things, R is not called and the export only includes 
the source block and not the results:

Org-mode file:
--
#+TITLE: Working with Org-Babel
#+AUTHOR: Kieran Healy
#+OPTIONS: toc:nil num:nil

#+BEGIN_LaTeX
Anything can go here. 
#+END_LaTeX

** An Example

#+source: r-example-1
#+begin_src R :exports both
  2 + 1 + (5-2) * 5
#+end_src

The end.
--

Latex output:
--
\begin{document}

\title{Working with Org-Babel}
\author{Kieran Healy}
\date{15 February 2011}
\maketitle

Anything can go here. 

\section*{An Example}
\label{sec-1}

\begin{minted}[]{R}
2 + 1 + (5-2) * 5
\end{minted}

The end.

\end{document}
--

Is this behavior expected? 

Kieran

--
Kieran Healy :: http://www.kieranhealy.org








___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: Bugs with inline src_* blocks

2011-02-15 Thread Eric Schulte
Paul Sexton psex...@xnet.co.nz writes:

 I am experiencing a couple of significant bugs with inline src blocks in 
 org-babel -- ie blocks of the form src_LANG{EXPRESSION}. I am using the
 development version of org, checked out a few days ago. 

 Pressing C-c C-c with the cursor on such a block is supposed to evaluate it 
 and 
 echo the result to the minibuffer. However in recent versions of org (the 
 last 
 3 months or so) this behaviour has become broken, at least for me.

 The following is an example file.

 --start---
 #+BABEL: :session s1 :exports value latex :results raw

 #+BEGIN_SRC R :results none :exports none 
 1+2+3
 #+END_SRC


 src_R{1+1}
 --end

 Pressing C-c C-c with the cursor on the inline block produces the error:

   'R' is not recognized as an internal or external command,
   operable program or batch file.

 This happens even if the session named s1 is already running. However, if I
 first evaluate the BEGIN_SRC ... END_SRC block, using
 org-babel-execute-src-block, and then reattempt to evaluate the inline block, 
 it
 will work. If I then press C-c C-c on the '#+BABEL:' line at the start of the
 file, the inline block goes back to producing the error.


I just tried your example from above, and I can not reproduce this
error.  Maybe as Suvayu suggested you should try grabbing the latest
version of Org-mode and see if that fixes this issue.


 The second, and more aggravating, error is do with the consequences of
 evaluating inline blocks. Formerly the result would be echoed in the 
 minibuffer, and the document itself would not be altered. Now org has taken 
 to 
 inserting the result after the block, the same behaviour as a non-inline 
 block. 
 The header arguments used for this insertion seem to carry over either from 
 the 
 previous non-inline block, or possibly the global settings (BABEL: line). 

 So for example, if I press C-c C-c on the src_R{1+1} above, I get:

 ---
 src_R{1+1} #+BEGIN_LaTeX
 2#+END_LaTeX

 ---

 I want inline code blocks to replace themselves with their result when 
 exporting the document to latex etc. I *never* want them to paste their 
 results
 into the document while editing - that is what non-inline blocks are for.


Hi, I agree with your intuition here, but I changed the default inline
header argument so that others would be able to use inline code blocks
and have the results inserted.  To regain the behavior you describe,
simply adjust the value of `org-babel-default-inline-header-args' as
follows in your .emacs file.

#+begin_src emacs-lisp
  (setf org-babel-default-inline-header-args
'((:session . none)
  (:results . silent)
  (:exports . results)))
#+end_src

Best -- Eric


 Is this change in behaviour intentional? If so is there a setting that will
 revert to the old behaviour?

 Paul





 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [BABEL] ob-rec.el and some questions

2011-02-15 Thread Eric Schulte
jema...@gnu.org (Jose E. Marchesi) writes:

 Hi.

 I have been playing a bit with org babel, the goal being to be able to
 query a recfile[1] and insert the result as a rec table.  Thanks to the
 superb design of org-babel and the existing examples, I quickly wrote
 the attached little hack.

 The hack allows to query a rec file 'foo.rec' as follows:

 #+begin_src rec :data hackers.rec :fields Name,Email :type Hacker
 Papers = 'requested'  CreatedAt  '01 January 2011'
 #+end_src


Very cool!  Now is the time when I ask, would you consider adding this
to the Org-mode core, which requires filling out the FSF copyright
assignment form?  http://orgmode.org/worg/org-contribute.html#sec-2


 Where :data points to the recfile (or list of files), :fields is a
 comma-separated list of fields (allowing subscripts) and :type selects
 the record set where to make the query. :cmdline can also be used to
 specify any other command line option to recsel.  All parameters but
 :data are optional.

 The selection expression can be any expression allowed by recsel in the
 -e command line option.

 Of course you have to install the recutils for it to work.

 It roughly works and I want to add more functionality, but due to my
 lack of experience with org-babel I would like to ask some questions
 before continuing working on it.

 - Is there a way to execute empty code blocks?  It would be quite common
   to require all the records stored in a record set, e.g.

   #+begin_src rec :data inventory.rec
   #+end_src

   C-cC-c in that block echoes Local setup has been refreshed and
   nothing happens.  A workaround would be to use a selection expression
   that always evaluates to true, such as:


With my attached version of ob-rec.el it is possible to have a mostly
empty body as follows, however, currently `org-babel-get-src-block-info'
*does* require that there be at least 1 character as well as a newline
in the body.  This could be changed, however I'd want to do some local
testing before pushing up such a change, as I fear it may break existing
code blocks.

#+begin_src rec :data book.rec :fields Title,Author
  
#+end_src

#+results:
| Title...
| GNU Emacs Manual...


   #+begin_src rec :data inventory.rec
   1
   #+end_src

   but it would be nice to avoid it.

 - Is there a way to dinamically change the value of the :results
   parameter in the org-babel-execute:rec function?  I would like to add
   a :template parameter containing a template for recfmt, and in that
   case the default value raw would not be appropriate.


Please see my attached revision of ob-rec.el.  I do not believe that the
default value of raw is appropriate currently as Babel should know when
the returned results are a table.  I've slightly modified your existing
code so that raw is no longer the default value, and so that tables are
passed back as tables.  Does this change subsume your format question?



Also, it sounds like there is currently only support for selecting
records *from* a .rec file, do you plan on adding support for inserting
records *into* a .rec file?

Thanks for sharing! -- Eric



ob-rec.el
Description: application/emacs-lisp


 Thanks in advance :)

 [1] http://www.gnu.org/software/recutils
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] Suggestions: GRASS GIS und Lilypond

2011-02-15 Thread Eric Schulte
I am happy to answer questions and provide suggestions for anyone who is
interested in developing support for these (or any other) additional
languages.  I would recommend looking at existing languages which are
similar to the new language for guidance/examples.

In the case of GRASS, it sounds as though GRASS is a sub[super]-set of
R?  Would it be possible to simply use the existing R support in babel
only specify a non-R command to be run to start interactive sessions?

Best -- Eric

Thorsten  gruenderteam.ber...@googlemail.com writes:

 Hello Babel developers, 
 just two suggestions for new languages: 
 1. GRASS GIS
 As far as I know there is no grass-mode in emacs, but some expert people are
 successful running grass processes together with R processes in ESS.
 Since GRASS and R are natural allies, it would be great to use the GRASS
 engine in an org-file to retrieve spatial data and then analyse the data
 with R in the same file - would make Org a kind of emacs-grassmode
 replacement.  
 2. Lilypond
 A nice to have for all the music lovers in the org community. 
 Regards
 Thorsten


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel issue with source blocks and latex block

2011-02-15 Thread Eric Schulte
Kieran Healy kjhe...@gmail.com writes:

 Hi, 

 I have org-babel set up to use minted to format code blocks and it's
 terrific. I was wondering whether I could also get it to wrap the
 results it outputs using minted instead of verbatim environments (it
 seems not right now) when I noticed the following strange
 behavior. Here's a minimal example. This org file exports to latex as
 expected, with the src block in a minted environment and the results
 block as a verbatim environment: (As I say, wanting the results block
 wrapped by minted was what prompted this issue ...)


Hi Kieran,

This may be possible through the use of the :results src header
argument e.g., the following minimal code block

#+begin_src R :results code
  8
#+end_src

evaluates to the following

#+results:
#+BEGIN_SRC R
8
#+END_SRC

which should be exported using minted.

Hope this helps -- Eric

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-git-link does not support locational information within file

2011-02-15 Thread Gregor Kappler
Hi Bastien,

Thanks for your answer. I was surprised and glad to hear so much interest in 
my particular problem.

On Fri, 11 Feb 2011 18:17:58 +0100, Bastien bastien.gue...@wikimedia.fr wrote:
   2. use git versioned files transparently, i.e. org-git-store-link
  should support search (org-ids and text files) in linked git
  revisions of files.
 
 I've look into this.  We could code things to add a search string:
 
   [[git:~/my.org::master@{2011-02-07}::Org code]]
  ^^
 
 ... but I'm reluctant to change the general syntax of links, even 
 if that's just for git links.

It might be better to stick to org-mode's convention of storing the location 
within the file after ::, a convention your current syntax is not adhering 
to.
I think you could stay consistent with the current general syntax of orgmode by 
switching from

[[git:~/my.org::master@{2011-02-11}::Org code]]

to

[[git:~/my.org@master{2011-02-11}::Org code]]
or 
[[git:~/my.org?master{2011-02-11}::Org code]]

This would fully break existing links.
Achim Gratz contributed some good points about changing the git-link syntax and 
made a more founded proposal for a changed syntax though. Achim seems to focus 
strongly on machine readability. For me, I like to be able to read links easily.


[[git:repository or file?revision information::location in file]]
revision information can be
- a date+time value (for me, time is important here)
- a SHA
- HEAD

 
   3. define an interactive function that can update the revision
  information of a link at mark to the current branch head of the
  file (so I can update all links to new FS folder structure.)
 
 You mean update
 
   [[git:~/my.org::master@{2011-02-07}::Org code]]
 
 to 
 
   [[git:~/my.org::master@{2011-02-11}::Org code]]
 
 ?
 
 Can you provide an explicit example?

Let the function be of name org-git-link-update-to-head.
I will adhere to the syntax in your post. 
I guess all scenarios can be made explicit by two conditions:

1. The file is still of the same name. Calling org-git-link-update-to-head on 

   [[git:~/my.org::master@{2011-02-11}::Org code]]

   would change the link to

   [[git:~/my.org::master@{2011-02-15}::Org code]]

   (today being the 15th)

2. more interesting is the case that the file was moved by e.g by

   git mv my.org your.org

   Then optimally git would be queried for the actual location of a newer 
version in HEAD (if unique). 
   (I am actually not sure how to do this with git, but should be viable)

   The link should be rewritten by org-git-link-update-to-head to
   [[git:~/your.org::master@{2011-02-15}::Org code]]


   This file might have been edited meanwhile by e.g. 

   echo * annoying tail heading  your.org  git add your.org  git commit 
-m 

   Still the new link should become
   [[git:~/your.org::master@{2011-02-14}::Org code]]

If HEAD would be added to the possible revision definition, 
org-git-link-update-to-head cannot identify the file after moving. On the other 
hand, having this function one would not want to point to head.

Another possibility would be not to rewrite links but to resolve the
current revision as outlined on the fly in org-open-at-point.

  I am still lame at elisp - so my implementation skills are
  limited. With the great work in org-git-link all backend stuff seems
  there, only needing more glue. Any hints how to achieve this would be
  very welcome!
 
 org-git-link.el is quite readable, and I'd welcome ideas on how to
 extend it to fulfill your wishes without extending Org's link syntax 
 too much...

I try to learn elisp bit by bit. Found a good tutorial finally.
I got busy times around me - need to constrain fiddle-time.


Cheers and thanks,

Gregor

-- 
--

Dr. Gregor Kappler

Fakultät für Psychologie 
Institut für Entwicklungspsychologie und 
Psychologische Diagnostik
http://www.univie.ac.at/Psychologie

Universität Wien
Liebiggasse 5
A-1010 Wien
mail: gregor.kapp...@univie.ac.at
tel: +43 1 4277 47866

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-git-link does not support locational information within file

2011-02-15 Thread Gregor Kappler
Hi Leo,

 However, I think the bigger problem with org-git-link in its current
 incarnation is that it forces me to use git:// links for all files
 under version control, which is NOT what I want to do 90% of the time.
  I have a quick hack to deal with this -- namely, commenting out
 
 ;; (add-hook 'org-store-link-functions 'org-git-store-link t)
 
 and using a separate keybinding for storing git links using the
 following function:
 
 (defun org-git-store-link-interactively (arg)
   Store git link to current file.
   (interactive P)
   (let ((org-store-link-functions (cons 'org-git-store-link
 org-store-link-functions)))
 (call-interactively 'org-store-link arg)
 ))

Thanks a lot for this!

 
 
 In addition, I'm not crazy about using the branch@{date} format for
 storing links by default, so I hacked something that uses SHA1
 instead...  I could post a patch if anyone is curious.
I would be interested, and I think SHA1 should be supported as it is so
common with git.

Cheers,
Gregor

-- 
--

Dr. Gregor Kappler

Fakultät für Psychologie 
Institut für Entwicklungspsychologie und 
Psychologische Diagnostik
http://www.univie.ac.at/Psychologie

Universität Wien
Liebiggasse 5
A-1010 Wien
mail: gregor.kapp...@univie.ac.at
tel: +43 1 4277 47866

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [BABEL] ob-rec.el and some questions

2011-02-15 Thread Jose E. Marchesi

 Extracting the records from org tables or raw rec data, you mean?  It
 would be easy to use csv2rec and recins to implement a recins block:


Yes, I was thinking of something like the following.  Rather than create
a new block type, simply add a header argument (or body content) that
(somehow) indicates that we are writing not reading.  So for example
writing an Org-mode table into a fresh .rec file would look like the
following.

#+tblname: org-data
| Foo | Bar |
|-+-|
|   1 | a   |
|   2 | b   |
|   3 | c   |
|   4 | d   |

#+begin_src rec :data something.rec :var data=org-data :write
  some rec code to dump data into the rec file...
#+end_src

I like that approach, but I would put the raw rec code into the src
block:

#+begin_src rec :data something.rec :write
Foo: 1
Bar: a

Foo: 2
Bar: b

...  
#+end_src

Then use a :table parameter in case we want to insert the contents of a
table:

#+begin_src rec :data something.rec :write :table org-data
  
#+end_src

I will work on this and will be back as soon as I have something
working.  Many thanks for the feedback :)

-- 
Jose E. Marchesijema...@gnu.org
GNU Project http://www.gnu.org

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel issue with source blocks and latex block

2011-02-15 Thread Kieran Healy
Hi Eric, 

On Feb 15, 2011, at 1:49 PM, Eric Schulte wrote:

 This may be possible through the use of the :results src header
 argument e.g., the following minimal code block
 
 #+begin_src R :results code
  8
 #+end_src
 
 evaluates to the following
 
 #+results:
 #+BEGIN_SRC R
 8
 #+END_SRC

That does work — thank you. But while experimenting with this I found that 
while doing

#+begin_src R :results value code :exports both
   x - c(1:10)
  mean(x)
#+end_src

works as expected, with both code and result wrapped in a minted environment, 
replacing mean(x) with summary(x)

#+begin_src R :results value code :exports both
  x - c(1:10)
  summary(x)
#+end_src

gives this garbled output:

 \begin{minted}[]{R}
 x - c(1:10)
 summary(x)
 \end{minted}
 
 \end{SRC}
 \begin{SRC}R

This also fails in HTML export, where the corresponding reversed/garbled bit is 

 p
 /div
 div class=SRC R
 /p


Finally, it's still the case that if the code block is preceded by a 
#+BEGIN_LaTeX block, e.g., 

 #+BEGIN_LaTeX
 \thispagestyle{kjhgit} % but anything will do it
 #+END_LaTeX

Then R is not called at all and I just get the src block in the exported .tex 
or .html file, and no results. 

Kieran


--
Kieran Healy :: http://www.kieranhealy.org








___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Can I input multiline in a cell?

2011-02-15 Thread Wang Coeus
Hi all,
I am using org-mode for some note, there is a table and I need to input
a lot text in one cell, is there possible that I input multiline and
output also show as multiline?
-- 
Coeus
In the middle of every difficulty lies opportunity.
-- Albert Einstein


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Can I input multiline in a cell?

2011-02-15 Thread suvayu ali
On Tue, Feb 15, 2011 at 1:10 PM, Wang Coeus wangco...@gmail.com wrote:
 Hi all,
 I am using org-mode for some note, there is a table and I need to input
 a lot text in one cell, is there possible that I input multiline and
 output also show as multiline?

org-mode tables doesn't support multi-line cells. For that you have to
use table.el tables. As far as I recall there is an option for that in
the Org main menu.

 --
 Coeus

GL

-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-babel: Bugs with inline src_* blocks

2011-02-15 Thread Dan Davison
Paul Sexton psex...@xnet.co.nz writes:

 Eric Schulte schulte.eric at gmail.com writes:
 Hi, I agree with your intuition here, but I changed the default inline
 header argument so that others would be able to use inline code blocks
 and have the results inserted.  To regain the behavior you describe,
 simply adjust the value of `org-babel-default-inline-header-args' as
 follows in your .emacs file.
 
 #+begin_src emacs-lisp
   (setf org-babel-default-inline-header-args
 '((:session . none)
   (:results . silent)
   (:exports . results)))
 #+end_src

 Thanks Eric. The 'default' behaviour I experienced where inline blocks
 were inheriting behaviour from elsewhere seems odd however.

Hi Paul, Eric,

Paul -- I do agree with you. I've had to manually delete unwanted inline
src output a few times in the last few days.

I think we did have the behaviour we want before -- replacement during
export but no modification of the buffer in interactive use. Could we
make the default behave so that it does replace during export and
silent during normal interactive evaluation? (Or some similar change
to ob-exp.el?)

Dan


 Is it intended
 to work this way?

 Paul



 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Context-sensitive word count in org mode (elisp)

2011-02-15 Thread Paul Sexton
I am trying to reduce the word count in a document I am writing. The
existing word count functionality for emacs is surprisingly lacking.
I wanted a word count function for org mode which excluded tables and 
comments, and ended up writing one myself. 

If this function is called with a region highlighted, it counts the words in
the region. Otherwise it counts words in the whole buffer.

It ignores commented lines and tables. LaTeX-style macros such as 
\foo{bar,baz} are counted as 1 word, as a compromise (more often than not 
they should count as 0, but they do sometimes expand to 1 or more words
in the final document). 

Limitations:
- Does not ignore BEGIN_SRC/END_SRC or inline src_* blocks (babel).
  Should be easy enough to add however.
- There is probably a better way of identifying latex macros
  than my 'latex-macro-regexp' below.
- Ignores all org links. I couldn't figure out how to extract description
  text from links, but I didn't look very hard.

Improvements welcome.

Paul



(defun in-comment-p ()
  Return non-nil if point is in a comment.
  (if (or (null comment-start-skip)
  (eq (preceding-char) ?\r))
  nil
(save-excursion
  (let ((pos (point)))
(re-search-backward ^\\|\r nil t)
(or (looking-at comment-start-skip)
(re-search-forward comment-start-skip pos t))

(defun in-org-table-p ()
  Return non-nil if point is in an org-mode table.
  (if (or (not (boundp 'org-table-any-line-regexp))
  (null org-table-any-line-regexp)
  (eq (preceding-char) ?\r))
  nil
(save-excursion
  (let ((pos (point)))
(re-search-backward ^\\|\r nil t)
(looking-at org-table-any-line-regexp)


(defvar latex-macro-regexp [A-Za-z]+\\(\\[[^]]*\\]\\|\\){\\([^}]*\\)})


(defun org-word-count (beg end)
  (interactive r)
  (unless mark-active
(setf beg (point-min)
  end (point-max)))
  (let ((wc 0))
(save-excursion
  (goto-char beg)
  (while ( (point) end)
(re-search-forward \\w+\\W*)
(cond
 ((or (in-comment-p) (in-org-table-p))
  nil)
 ((looking-at org-any-link-re)
  (goto-char (match-end 0)))
 ((save-excursion
(backward-char)
(looking-at latex-macro-regexp))
  (goto-char (match-end 0))
  (setf wc (+ 2 wc)))
 (t
  (incf wc)
(message (format %d words in %s. wc
 (if mark-active region buffer)



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Can I input multiline in a cell?

2011-02-15 Thread Wang Coeus
suvayu ali fatkasuvayu+li...@gmail.com writes:

 On Tue, Feb 15, 2011 at 1:10 PM, Wang Coeus wangco...@gmail.com wrote:
 Hi all,
 I am using org-mode for some note, there is a table and I need to input
 a lot text in one cell, is there possible that I input multiline and
 output also show as multiline?

 org-mode tables doesn't support multi-line cells. For that you have to
 use table.el tables. As far as I recall there is an option for that in
 the Org main menu.

 --
 Coeus

 GL
Will org consider to support this in future? I just think org table is
more convenient than table.el. Thanks a lot for the help.

-- 
Coeus
In the middle of every difficulty lies opportunity.
-- Albert Einstein


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-15 Thread Vincent Belaïche
 Maybe an example is better to explain what I need, imagine that I have
 the following two paragraphs:
[...]
 Where I assumed that alineas are separated by either an empty line or a
 tailing `\\' while paragraphs are separated by just an empty line.
 
An important question here is: is it important for M-} to ignore those \\?
 

I guess so, this is the current default Org behaviour anyhow. as far as
I understand, it would be anyhow possible to move point on an
alinea-by-alinea basis just by configuring the tailing \\ as anohter
paragraph separator.

I usually use alinea as follows:

---
John Foo (2011-02-16T07:36:02) said:\\
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah

Mikaël Bar (2011-02-15T16:28:16) said:\\
gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk
gronk gronk gronk gronk
---

I don't want M-} to recognize alineas as separate paragraphs because
the first alinea of each paragraph is just one line.

[...]

 Of course fill-paragraph-function sucks because it only applies to
 fill-paragraph and not to fill-region.

Do you mean that `fill-paragraph-function' is some kind of obsolete
feature and that people should use another kind of hook, and if so which
one?

[...]
 
 
 
Stefan

  Vincent.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode