[Orgmode] Makefile: update

2009-06-02 Thread Konstantin Antipin
Hi,
I have a very simple feature request.
Can we add additional target to the makefile in order to simplify
process of keeping up to date with orgmode - development?
like so:
update:
git pull
make clean
make all
sudo make install

It would be convenient...

best,
Kostya


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


Re: [Orgmode] Should 'QUOTE' turn off in-buffer mark-up?

2009-06-02 Thread Carsten Dominik


On Jun 1, 2009, at 11:38 PM, Daniel J. Sinder wrote:

I just cut-and-pasted a table from the IETF RTP RFC into orgmode as  
follows:


* QUOTE RTP Header Format
 0   1   2   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |V=2|P|X|  CC   |M| PT  |   sequence number |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   timestamp   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   synchronization source (SSRC) identifier|
 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 |contributing source (CSRC) identifiers |
 |   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The orgmode markup rules make this a bit of a mess.  Actually, at  
least the content is undisturbed here, but I've seen worse -- for  
example, an otherwise well formatted table in which the columns have  
phone numbers with country codes starting with '+'.  This leads to  
strikeout marks that actually strike through the cell contents!


So, would it make sense to turn off in-buffer markup under headings  
marked with the QUOTE keyword? Of course, prefixing every line with  
':' has the desired effect, so there is an existing work-around, but  
requiring the prefix seems to make 'QUOTE' not very powerful/useful.


Indeed, QUOTE is useless and therefore has been removed from the docs.



(I can't find 'QUOTE' in the documentation now, so maybe this  
feature has been deprecated?  But, #+BEGIN/END_EXAMPLE has the same  
problem.)


Not anymore.

- Carsten



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


Re: [Orgmode] Makefile: update

2009-06-02 Thread Carsten Dominik


On Jun 2, 2009, at 8:27 AM, Konstantin Antipin wrote:


Hi,
I have a very simple feature request.
Can we add additional target to the makefile in order to simplify
process of keeping up to date with orgmode - development?
like so:
update:
git pull
make clean
make all
sudo make install

It would be convenient...


Yes.  However, sudo make install is system dependent and may not work  
properly.


I have now added:

update:
git pull
make clean
make all

up2:
make update
sudo make install

- Carsten



best,
Kostya


___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Org protocol and new frame for remember

2009-06-02 Thread Sebastian Rose
Matthew Lundin m...@imapmail.org writes:
 My apologies for the initial post fragment. (Note to self: C-c C-c
 binding for jumping to footnote reference does not work in Gnus!)

 Let's try this again:

 Hi all,

 I've recently begun to use org-protocol. I've been using it with the
 intriguing emacs-inspired browser Conkeror.[1] With the help of a nice
 blog post by Tassilo,[2] I have worked out a basic way to send snippets
 from the browser to remember via org-protocol. The great thing about
 Conkeror is that you can invoke org-remember the same way you do in
 emacs (either with M-x org-remember or, via a custom keybinding, with
 C-c r).

 I've posted my hacks at the bottom of the org-protocol page on Worg. Any
 advice/feedback would be greatly appreciated:

 http://orgmode.org/worg/org-contrib/org-protocol.php#conkeror-setup

 (My apologies to Sebastian if these should go somewhere else -- feel
 free to move them!)


Thanks for adding this!
Maybe we'll split the page one day because of it's shear size and add
links to certain setups. But for now I'm glad to see people adding stuff
like that :)



 As I experiment with the fabulous org-protocol, I wonder whether I've
 missed a variable in org-protocol that tells the function
 org-protocol-remember to create a *temporary* new frame (i.e., one that
 pops up above the browser and then disappears after typing C-c C-c). 

 I know I can set the variable remember-in-new-frame to t, but I would
 ideally like the new frame only for org-protocol-remember and not for
 other invocations of remember. My current solution is to advise the
 function org-protocol-remember (i.e., to set remember-in-new-frame
 locally for that function). 

 But I thought it might be a nice addition to org-protocol if there were
 a variable that accomplishes this (e.g.,
 org-protocol-remember-in-new-frame). I'd be eager to know if I am
 missing a current way to do this.


Such a variable does not exist. org-protocol does nothing especially
related to  org-remember. org-protocol://remember:/ is just one of the
pre-defined statndard handlers.

But you could as well define your own handler that behaves
differently. Maybe just copying `org-protocol-remember' from
lisp/org-protocol.el as a starting point.

Reading
http://orgmode.org/worg/org-tutorials/org-protocol-custom-handler.php
should help (if it doesn't, please let us know what's missing).



Best


   Sebastian


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


Re: [Orgmode] Makefile: update

2009-06-02 Thread Konstantin Antipin
Super!
Thanks.

Kostya

On Tue, Jun 2, 2009 at 10:30 AM, Carsten Dominik
carsten.domi...@gmail.com wrote:

 On Jun 2, 2009, at 8:27 AM, Konstantin Antipin wrote:

 Hi,
 I have a very simple feature request.
 Can we add additional target to the makefile in order to simplify
 process of keeping up to date with orgmode - development?
 like so:
 update:
        git pull
        make clean
        make all
        sudo make install

 It would be convenient...

 Yes.  However, sudo make install is system dependent and may not work
 properly.

 I have now added:

 update:
        git pull
        make clean
        make all

 up2:
        make update
        sudo make install

 - Carsten


 best,
 Kostya


 ___
 Emacs-orgmode mailing list
 Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Makefile: update

2009-06-02 Thread Friedrich Delgado Friedrichs
It might seem like a nitpick, but your up2 target assumes that the
program to process makefiles is called make (and not e.g. gmake
and it's in the PATH).

I propose:

up2: update
sudo $(MAKE) install

As make sets the variable MAKE [see info (make)MAKE Variable ] and
it's simpler to just list a dependent target if we don't need a
recursive call to make.

-- 
Friedrich Delgado Friedrichs frie...@nomaden.org
 TauPan on Ircnet and Freenode ;)


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


[Orgmode] Re: Makefile: update

2009-06-02 Thread Bernt Hansen
Konstantin Antipin antipin.konstan...@googlemail.com writes:

 Hi,
 I have a very simple feature request.
 Can we add additional target to the makefile in order to simplify
 process of keeping up to date with orgmode - development?
 like so:
 update:
   git pull
   make clean
   make all
   sudo make install

 It would be convenient...

You could also do that locally as described here:

http://orgmode.org/worg/org-faq.php#keeping-local-changes-current-with-Org-mode-development

-Bernt


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


Re: [Orgmode] Makefile: update

2009-06-02 Thread Carsten Dominik

Done.

- Carsten

On Jun 2, 2009, at 1:14 PM, Friedrich Delgado Friedrichs wrote:


It might seem like a nitpick, but your up2 target assumes that the
program to process makefiles is called make (and not e.g. gmake
and it's in the PATH).

I propose:

up2: update
   sudo $(MAKE) install

As make sets the variable MAKE [see info (make)MAKE Variable ] and
it's simpler to just list a dependent target if we don't need a
recursive call to make.

--
   Friedrich Delgado Friedrichs frie...@nomaden.org
TauPan on Ircnet and Freenode ;)
___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Did Anyone Ever Get This Working ... ?

2009-06-02 Thread Jason Schadel
Looks like you received some other examples but here's how I did it:

(require 'trac-wiki)
(trac-wiki-define-project project-trac
https://trac.project.com/trac; username)
(autoload 'trac-wiki trac-wiki Trac wiki editing entry-point. t)
;;; - start orgstruct minor mode when trac-wiki is loaded.
(add-hook 'trac-wiki-mode-hook 'turn-on-orgstruct)

-Jason

On Mon, Jun 1, 2009 at 2:01 PM, Tennis Smith ten...@tripit.com wrote:
 Hi Jason,

 Do you have an example of how to run org-mode as a minor mode?  I'm trying
 to figure out how to do it. ;-)
 -T

 On Mon, Jun 1, 2009 at 6:38 AM, Jason Schadel jason.scha...@gmail.com
 wrote:

 Have you tried using trac-wiki mode with org-mode as a minor mode?
 You still have to use the wiki format but lists can be manipulated the
 org-mode way.

 On Fri, May 29, 2009 at 4:36 PM, Tennis Smith ten...@tripit.com wrote:
  Hi,
 
  Has anyone figured out a way to export from org to a trac wiki?  I've
  tried
  ascii (ugly) and html (doesn't work).
 
  Tks,
  -T
 
  ___
  Emacs-orgmode mailing list
  Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How to switch to a specific state when clocking out?

2009-06-02 Thread Manish
Hello!

Does anyone know of a counterpart to org-clock-in-switch-to-state that
can switch to a specific state when clocking out of an item?

Thanks
-- 
Manish


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


[Orgmode] Saving the *Org Edit Src Example* buffer

2009-06-02 Thread Dan Davison
Following on from the recent improvements to the *Org Edit Src Example*
buffer, I have one more proposal: I have remapped C-x C-s so that it
saves the code in the org buffer, rather than offering to save the Edit
buffer itself (as it used to be with the indirect edit buffer). I find
this essential, although I recognise that remapping C-x C-s is a rather
radical thing to do to an emacs buffer.

I am using the simple-minded approach below; it seems to work fine (I
don't even notice a flicker -- should I be surprised at that?), but if
someone can suggest an improved implementation I'd be happy to learn how
it should be done (perhaps there are buffer variables other than point
and mark that I should restore? Is there a general mechanism I should
use for this?).

Dan

(defun org-edit-src-save ()
  Update the parent org buffer with the edited source code, save
the parent org-buffer, and return to the source code edit
buffer.
  (interactive)
  (let ((p (point))
(m (mark)))
(org-edit-src-exit)
(save-buffer)
(org-edit-src-code)
(set-mark m)
(goto-char p)))

(define-key org-exit-edit-mode-map \C-x\C-s 'org-edit-src-save)



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


[Orgmode] Re: How to switch to a specific state when clocking out?

2009-06-02 Thread Manish
  On Tue, Jun 2, 2009 at 7:14 PM, Bernt Hansen wrote:
   Manish mailtomanish.sha...@gmail.com writes:
  
   Hello!
  
   Does anyone know of a counterpart to org-clock-in-switch-to-state
   that can switch to a specific state when clocking out of an item?
  
   Hi Manish!
  
   As far as I know that functionality does not exist.

Thanks Bernt.  I did notice you leaving tasks in STARTED state when
clocking out.

I do not know elisp at all but I dared to peep into org-clock.el.  It
seemed it would just require setting a variable, test for the variable
when clocking out in org-clock-out function and call org-todo with the
value of variable as ARG.  It seems it is not as simple as that.  I will
try to play some more and see if anything comes out of that.

Regards,
-- 
Manish


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


Re: [Orgmode] Did Anyone Ever Get This Working ... ?

2009-06-02 Thread Tennis Smith
Thanks! That's a big help as well. Making it automatic is my preference.

-T

On Tue, Jun 2, 2009 at 6:11 AM, Jason Schadel jason.scha...@gmail.comwrote:

 Looks like you received some other examples but here's how I did it:

 (require 'trac-wiki)
 (trac-wiki-define-project project-trac
 https://trac.project.com/trac; username)
 (autoload 'trac-wiki trac-wiki Trac wiki editing entry-point. t)
 ;;; - start orgstruct minor mode when trac-wiki is loaded.
 (add-hook 'trac-wiki-mode-hook 'turn-on-orgstruct)

 -Jason

 On Mon, Jun 1, 2009 at 2:01 PM, Tennis Smith ten...@tripit.com wrote:
  Hi Jason,
 
  Do you have an example of how to run org-mode as a minor mode?  I'm
 trying
  to figure out how to do it. ;-)
  -T
 
  On Mon, Jun 1, 2009 at 6:38 AM, Jason Schadel jason.scha...@gmail.com
  wrote:
 
  Have you tried using trac-wiki mode with org-mode as a minor mode?
  You still have to use the wiki format but lists can be manipulated the
  org-mode way.
 
  On Fri, May 29, 2009 at 4:36 PM, Tennis Smith ten...@tripit.com
 wrote:
   Hi,
  
   Has anyone figured out a way to export from org to a trac wiki?  I've
   tried
   ascii (ugly) and html (doesn't work).
  
   Tks,
   -T
  
   ___
   Emacs-orgmode mailing list
   Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org protocol and new frame for remember

2009-06-02 Thread Matthew Lundin
Sebastian Rose sebastian_r...@gmx.de writes:

 Matthew Lundin m...@imapmail.org writes:

 But I thought it might be a nice addition to org-protocol if there were
 a variable that accomplishes this (e.g.,
 org-protocol-remember-in-new-frame). I'd be eager to know if I am
 missing a current way to do this.

 Such a variable does not exist. org-protocol does nothing especially
 related to  org-remember. org-protocol://remember:/ is just one of the
 pre-defined statndard handlers.

 But you could as well define your own handler that behaves
 differently. Maybe just copying `org-protocol-remember' from
 lisp/org-protocol.el as a starting point.

 Reading
 http://orgmode.org/worg/org-tutorials/org-protocol-custom-handler.php
 should help (if it doesn't, please let us know what's missing).

Thanks for the tip. I had given cursory glance to the custom handler
page, but now have incentive for closer study.

Best,
Matt


___
Emacs-orgmode mailing list
Remember: 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 preview-latex

2009-06-02 Thread Marvin Doyley

(setq org-export-with-LaTeX-fragments t)

thanks
M
On Jun 2, 2009, at 5:46 AM, Carsten Dominik wrote:


What is your value of

org-export-with-LaTeX-fragments

??

- Carsten
On May 31, 2009, at 12:12 AM, Marvin Doyley wrote:


dvipng is installed on my system, it is included with texlive 2008
I am curious to know if anybody got this work with carbon emacs on  
the mac.


thanks
MMD
On May 30, 2009, at 9:17 AM, Carsten Dominik wrote:



On May 30, 2009, at 2:54 PM, Marvin Doyley wrote:


Hi Carsten,

I tried this but for some reason it didn't work. More  
specifically, I was unable to visualize my latex snippet. Could  
this be a limitation of carbon emacs or maybe I didn't configured  
org properly ?


Do you have dvipng installed?

- Carsten



thanks

M
On May 30, 2009, at 1:02 AM, Carsten Dominik wrote:



On May 29, 2009, at 11:51 PM, Marvin Doyley wrote:


Dear all,

Is there a way to visualize latex snippets on the fly using  
auctex's latex-preview ?


It would appear the only way to do this is select latex-mode  
once I have finished completed my notes, it would be nice to do  
this on the fly when I am drafting articles.


Not with preview-latex, but Org has a similar mechanism built-in.

http://orgmode.org/manual/Processing-LaTeX-fragments.html#Processing-LaTeX-fragments

- Carsten
















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


Re: [Orgmode] Saving the *Org Edit Src Example* buffer

2009-06-02 Thread Dan Davison
Dan Davison davi...@stats.ox.ac.uk writes:

 Following on from the recent improvements to the *Org Edit Src Example*
 buffer, I have one more proposal: I have remapped C-x C-s so that it
 saves the code in the org buffer, rather than offering to save the Edit
 buffer itself (as it used to be with the indirect edit buffer). I find
 this essential, although I recognise that remapping C-x C-s is a rather
 radical thing to do to an emacs buffer.

 I am using the simple-minded approach below; it seems to work fine (I

Hmm, well I had used that for at least a week before posting, but I have
now noticed a problem. It's a bit of a corner case. If you create extra
blank lines at the end of the source code edit buffer and leave point
down there, then do org-edit-src-exit, now back in the org buffer point
is outside the source code block. In that case, the code that I just
posted doesn't work. I suggest that org-edit-src-exit should in this
situation place point at the end of the source code block, for example
like this:


diff --git a/lisp/org.el b/lisp/org.el
index 659dfad..be459b5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6757,7 +6757,9 @@ the language, a switch telling of the content should be 
in a single line.
code)
   (goto-char (point-min))
   (if (looking-at [ \t\n]*\n) (replace-match ))
-  (if (re-search-forward \n[ \t\n]*\\' nil t) (replace-match ))
+  (when (re-search-forward \n[ \t\n]*\\' nil t)
+(replace-match )
+(setq line (min line (org-current-line
   (when (org-bound-and-true-p org-edit-src-force-single-line)
 (goto-char (point-min))
 (while (re-search-forward \n nil t)


Dan




 don't even notice a flicker -- should I be surprised at that?), but if
 someone can suggest an improved implementation I'd be happy to learn how
 it should be done (perhaps there are buffer variables other than point
 and mark that I should restore? Is there a general mechanism I should
 use for this?).

 Dan

 (defun org-edit-src-save ()
   Update the parent org buffer with the edited source code, save
 the parent org-buffer, and return to the source code edit
 buffer.
   (interactive)
   (let ((p (point))
   (m (mark)))
 (org-edit-src-exit)
 (save-buffer)
 (org-edit-src-code)
 (set-mark m)
 (goto-char p)))

 (define-key org-exit-edit-mode-map \C-x\C-s 'org-edit-src-save)



 ___
 Emacs-orgmode mailing list
 Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Cycling visibility of blocks

2009-06-02 Thread Carsten Dominik
Hello,

Isn't there something wrong with the regexp as the snippet is not
working well when #+END_SOMETHING is followed right away by a new line ?

I mean


#+BEGIN_QUOTE
Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
ehtse hntse hents
#+END_QUOTE  --- notice the space

Blah blah


is showing the expected behavior when


#+BEGIN_QUOTE
Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
ehtse hntse hents
#+END_QUOTE  ---nothing


actually results in


#+BEGIN_QUOTE
Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes...
Blah blah


There's no problem when the text within is not split across two line,
though.


-- 
Nicolas Goaziou



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


Re: [Orgmode] Cycling visibility of blocks

2009-06-02 Thread Eric Schulte
Good catch,

I'm not sure what is causing this problem, but the attached patch which
changes the regexp seems to solve it.

Thanks -- Eric


diff --git a/lisp/org.el b/lisp/org.el
index 1c3dfe5..6792bed 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5146,8 +5146,7 @@ Optional argument N means, put the headline into the Nth line of the window.
 ;;; Folding of blocks
 
 (defconst org-block-regexp
-
-  ^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_\\1
+  ^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_\\1[ \t]?
   Regular expression for hiding blocks.)
 
 (defvar org-hide-block-overlays nil




Carsten Dominik carsten.domi...@gmail.com writes:

 Hello,

 Isn't there something wrong with the regexp as the snippet is not
 working well when #+END_SOMETHING is followed right away by a new line ?

 I mean


 #+BEGIN_QUOTE
 Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
 ehtse hntse hents
 #+END_QUOTE  --- notice the space

 Blah blah


 is showing the expected behavior when


 #+BEGIN_QUOTE
 Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
 ehtse hntse hents
 #+END_QUOTE  ---nothing


 actually results in


 #+BEGIN_QUOTE
 Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes...
 Blah blah


 There's no problem when the text within is not split across two line,
 though.
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Cycling visibility of blocks

2009-06-02 Thread Nicolas Goaziou
Hum,

1. My apologies for the From: header in my previous post, I just
   realized I had messed up badly with my gnus-posting-style variable;
2. While I'm at it: two line -- two lines.

-- 
Nicolas Goaziou



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


Re: [Orgmode] Re: How to switch to a specific state when clocking out?

2009-06-02 Thread Carsten Dominik


On Jun 2, 2009, at 3:44 PM, Bernt Hansen wrote:


Manish mailtomanish.sha...@gmail.com writes:


Hello!

Does anyone know of a counterpart to org-clock-in-switch-to-state  
that

can switch to a specific state when clocking out of an item?


Hi Manish!

As far as I know that functionality does not exist.


It does now - use org-clock-out-switch-to-state.

- Carsten



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


Re: [Orgmode] Saving the *Org Edit Src Example* buffer

2009-06-02 Thread Carsten Dominik

Hi Dan,

On Jun 2, 2009, at 5:02 PM, Dan Davison wrote:

Following on from the recent improvements to the *Org Edit Src  
Example*

buffer, I have one more proposal: I have remapped C-x C-s so that it
saves the code in the org buffer, rather than offering to save the  
Edit

buffer itself (as it used to be with the indirect edit buffer). I find
this essential, although I recognise that remapping C-x C-s is a  
rather

radical thing to do to an emacs buffer.



But allowed:  From the Emacs lisp docs, under Major Mode Conventions:

 It is legitimate for a major mode to rebind a standard key
 sequence if it provides a command that does the same job in a
 way better suited to the text this mode is used for.

I'd say, your's is a perfect example for this rule.



I am using the simple-minded approach below; it seems to work fine (I
don't even notice a flicker -- should I be surprised at that?), but if
someone can suggest an improved implementation I'd be happy to learn  
how

it should be done (perhaps there are buffer variables other than point
and mark that I should restore? Is there a general mechanism I should
use for this?).

Dan

(defun org-edit-src-save ()
 Update the parent org buffer with the edited source code, save
the parent org-buffer, and return to the source code edit
buffer.
 (interactive)
 (let ((p (point))
(m (mark)))
   (org-edit-src-exit)
   (save-buffer)
   (org-edit-src-code)
   (set-mark m)
   (goto-char p)))


This is already excellent.  I have changed it only slightly,
in order to get a better message when this command finishes, and
because `push-mark' should be used here instead of `set-mark'.

(defun org-edit-src-save ()
  Save parent buffer with current state source-code buffer.
  (interactive)
  (let ((p (point)) (m (mark)) msg)
(org-edit-src-exit)
(save-buffer)
(setq msg (current-message))
(org-edit-src-code)
(push-mark m 'nomessage)
(goto-char p)
(message (or msg 

I have added your code, thanks.

- Carsten



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


Re: [Orgmode] Cycling visibility of blocks

2009-06-02 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Jun 2, 2009, at 6:47 PM, Eric Schulte wrote:


Good catch,

I'm not sure what is causing this problem, but the attached patch  
which

changes the regexp seems to solve it.

Thanks -- Eric


diff --git a/lisp/org.el b/lisp/org.el
index 1c3dfe5..6792bed 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5146,8 +5146,7 @@ Optional argument N means, put the headline  
into the Nth line of the window.

;;; Folding of blocks

(defconst org-block-regexp
-
-  ^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\ 
\)#\\+end_\\1
+  ^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\ 
\)#\\+end_\\1[ \t]?

  Regular expression for hiding blocks.)

(defvar org-hide-block-overlays nil




Carsten Dominik carsten.domi...@gmail.com writes:


Hello,

Isn't there something wrong with the regexp as the snippet is not
working well when #+END_SOMETHING is followed right away by a new  
line ?


I mean


#+BEGIN_QUOTE
   Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
   ehtse hntse hents
#+END_QUOTE  --- notice the space

Blah blah


is showing the expected behavior when


#+BEGIN_QUOTE
   Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
   ehtse hntse hents
#+END_QUOTE  ---nothing


actually results in


#+BEGIN_QUOTE
   Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes...
Blah blah


There's no problem when the text within is not split across two line,
though.




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


Re: [Orgmode] Saving the *Org Edit Src Example* buffer

2009-06-02 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Jun 2, 2009, at 5:49 PM, Dan Davison wrote:


Dan Davison davi...@stats.ox.ac.uk writes:

Following on from the recent improvements to the *Org Edit Src  
Example*

buffer, I have one more proposal: I have remapped C-x C-s so that it
saves the code in the org buffer, rather than offering to save the  
Edit
buffer itself (as it used to be with the indirect edit buffer). I  
find
this essential, although I recognise that remapping C-x C-s is a  
rather

radical thing to do to an emacs buffer.

I am using the simple-minded approach below; it seems to work fine (I


Hmm, well I had used that for at least a week before posting, but I  
have
now noticed a problem. It's a bit of a corner case. If you create  
extra

blank lines at the end of the source code edit buffer and leave point
down there, then do org-edit-src-exit, now back in the org buffer  
point

is outside the source code block. In that case, the code that I just
posted doesn't work. I suggest that org-edit-src-exit should in this
situation place point at the end of the source code block, for example
like this:


diff --git a/lisp/org.el b/lisp/org.el
index 659dfad..be459b5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6757,7 +6757,9 @@ the language, a switch telling of the content  
should be in a single line.

   code)
  (goto-char (point-min))
  (if (looking-at [ \t\n]*\n) (replace-match ))
-  (if (re-search-forward \n[ \t\n]*\\' nil t) (replace-match ))
+  (when (re-search-forward \n[ \t\n]*\\' nil t)
+(replace-match )
+(setq line (min line (org-current-line
  (when (org-bound-and-true-p org-edit-src-force-single-line)
(goto-char (point-min))
(while (re-search-forward \n nil t)


Dan




don't even notice a flicker -- should I be surprised at that?), but  
if
someone can suggest an improved implementation I'd be happy to  
learn how
it should be done (perhaps there are buffer variables other than  
point

and mark that I should restore? Is there a general mechanism I should
use for this?).

Dan

(defun org-edit-src-save ()
 Update the parent org buffer with the edited source code, save
the parent org-buffer, and return to the source code edit
buffer.
 (interactive)
 (let ((p (point))
(m (mark)))
   (org-edit-src-exit)
   (save-buffer)
   (org-edit-src-code)
   (set-mark m)
   (goto-char p)))

(define-key org-exit-edit-mode-map \C-x\C-s 'org-edit-src-save)



___
Emacs-orgmode mailing list
Remember: 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
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] problems with startup visibility, affecting agenda view

2009-06-02 Thread Eric S Fraga
Hello,

with recent org from git:

 commit a5dc9456ddfe94554996eefdaf01402800a96b67
 Author: Carsten Dominik carsten.domi...@gmail.com
 Date:   Tue Jun 2 17:01:11 2009 +0200

I am having problems opening org files and getting the default agenda
view.  The problem goes away if I set org-startup-folded to nil.  

Related to this, I can also not cycle views in an org-file (C-u TAB)
if at bob but I can if even just one character into the file's buffer.

These two (related) problems have been present since mid-day today at
least.

I still have a problem with clock-mode reporting in the agenda view,
by the way.  I get the error message org-agenda-check-type: Not
allowed in nil-type agenda buffers and am happy to give a trace etc
if helpful.

Thanks,
eric


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


Re: [Orgmode] problems with startup visibility, affecting agenda view

2009-06-02 Thread Carsten Dominik
With this little information, I cannot reproduce any of these problems  
and therefore not do anything about them.


- Carsten

On Jun 2, 2009, at 7:15 PM, Eric S Fraga wrote:


Hello,

with recent org from git:

commit a5dc9456ddfe94554996eefdaf01402800a96b67
Author: Carsten Dominik carsten.domi...@gmail.com
Date:   Tue Jun 2 17:01:11 2009 +0200

I am having problems opening org files and getting the default agenda
view.  The problem goes away if I set org-startup-folded to nil.

Related to this, I can also not cycle views in an org-file (C-u TAB)
if at bob but I can if even just one character into the file's buffer.

These two (related) problems have been present since mid-day today at
least.

I still have a problem with clock-mode reporting in the agenda view,
by the way.  I get the error message org-agenda-check-type: Not
allowed in nil-type agenda buffers and am happy to give a trace etc
if helpful.

Thanks,
eric


___
Emacs-orgmode mailing list
Remember: 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
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] A tool for creating source code files from example and src blocks in org files

2009-06-02 Thread Eric H. Neilsen, Jr.

Hi,

First, thank you Carsten and others, for putting this thing together; 
org-mode is the most useful tool I've run across in a long time.


I recently put together a few commands to create source code files from 
SRC and EXAMPLE blocks in org-mode files. The original idea is to be 
able to compile examples in my notes without needing to merge them into 
a separate source file by hand. As I was writing it I realized this is 
exactly the same tool one needs to turn org-mode into a literate 
programming tool (see http://www.literateprogramming.com/ ), so I 
adopted some of the nomenclature. (I tried literate programming a few 
years ago, and gave up in frustration with the tools. I am tempted to 
try again with org-mode.)


The two user level commands are org-tangle and org-untangle, best 
explained through example. Running org-tangle in a buffer that looks 
like this:


-- begin /tmp/test.org ---
* Some file

Some text here

#+CHUNK file1.sh 1
#+BEGIN_SRC bash
echo line 1
echo line 2
#+END_SRC

more text

** Some subsection

#+CHUNK file1.sh 2
#+BEGIN_SRC bash
echo line 5
echo line 6
#+END_SRC

blah blah blah

#+CHUNK README.txt 1
#+BEGIN_EXAMPLE
text line 1
text line 2
text line 3
#+END_EXAMPLE

foo foo bar baz

#+CHUNK file1.sh 1.5
#+BEGIN_SRC bash
echo line 3
echo line 4
#+END_SRC
-- end /tmp/test.org 

results in the creation of these two files, opened in emacs buffers:

- begin /tmp/file1.sh 
#  ORGCHUNK /tmp/test.org  1
echo line 1
echo line 2
#  ORGCHUNK /tmp/test.org  1.5
echo line 3
echo line 4
#  ORGCHUNK /tmp/test.org  2
echo line 5
echo line 6
- end /tmp/file1.sh -

and

 begin /tmp/README.txt -
text line 1
text line 2
text line 3
 end /tmp/README.txt ---

If you then edit file1.sh and run org-untangle in the buffer, changes to 
it will overwrite the literal blocks in the org-mode file from whence 
they came.


Is there any interest in this? My organization's rules for releasing 
code to open source projects are being revised, but I am likely to be 
able to do so under a BSD-like license. If there is interest, I will 
push to try and figure out how to do this, and maybe even see if I can 
do the assignment of copyright stuff needed for it to get under the main 
umbrella (although I am not optimistic).


(If anyone feels like rewriting it, that would be even better; aside 
from a fairly straightforward .emacs, this is my first ever lisp code, 
so it is likely to need cleaning and refactoring.)


   -Eric

--
Eric H. Neilsen, Jr.
http://home.fnal.gov/~neilsen



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


[Orgmode] application switching hook

2009-06-02 Thread Austin Frank
Hi all--

I'd like to extend my time tracking to some activities outside of emacs.
More specifically, I'd like to be prompted to log a note in the active
time clock block whenever I change to an application outside of emacs.
I'm trying to be honest with myself about why I move from one
application to another (the difference between needed a reference from
Zotero and got bored so went to check the score of the baseball
game).

In Mac OS X, I switch applications using the Command-Tab key sequence.
I suspect that the solution to my problem involves writing some
applescript that fires a call to emacsclient every time Command-Tab is
pressed, or perhaps every time the focused application changes.

I think the relevant command line call will be something like

  emacsclient -e (progn (org-clock-goto) (org-add-note))

But maybe other people have better ideas for this part of the solution.
Perhaps calling a remember template with the current clock as its target
(using whichever function drives `C-2 C-c C-c' in the remember buffer)
would be better?


Unfortunately, I know nothing of applescript and haven't turned up any
promising leads in web searches.  I know I've seen some applescript
posted to this list before, so someone out there must know something
about it.  Any chance one of you folks has an idea about how to
implement this functionality?

Alternatively, does emacs have something like an
`emacs-loses-focus-hook'?  I don't see anything using `M-x apropos' or
`M-x apropos-variable' for focus, but perhaps I'm looking in the wrong
place.

Thanks for any comments,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpSIoJYbN2mN.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to switch to a specific state when clocking out?

2009-06-02 Thread Manish
  On Tue, Jun 2, 2009 at 9:35 PM, Carsten Dominik wrote:
  
   On Jun 2, 2009, at 3:44 PM, Bernt Hansen wrote:
  
   Manish writes:
  
   Hello!
  
   Does anyone know of a counterpart to org-clock-in-switch-to-state that
   can switch to a specific state when clocking out of an item?
  
   Hi Manish!
  
   As far as I know that functionality does not exist.
  
   It does now - use org-clock-out-switch-to-state.

Thank you, Carsten!  Works perfectly.

I did manage to get two lines of that patch right. :)

Warm regards,
-- 
Manish


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