Re: [O] org-speed-commands and `org-beginning-of-line-tip'

2013-08-02 Thread Rainer Stengele
Am 8/1/2013 9:18 AM, schrieb Oleh:
 Hi all,
 
 I've come to rely on org-speed-commands quite a lot,
 and I wanted to share this tip with other people, who use them:
 
 (define-key org-mode-map (kbd C-a)
   (lambda()(interactive)
  (if (looking-at ^[^*])
  (re-search-backward ^*)
(org-beginning-of-line
 
 Basically, an additional C-a when already at the beginning of line takes you 
 to
 the previous heading, where speed commands are possible.
 
 Since the normal C-a would do nothing in this case, it's a straight upgrade.
 
 regards,
 Oleh
 
 
Hi, nice idea, thanks.
Rainer




[O] problems with continuous clocking

2013-08-02 Thread Hildegund Mythenmetz
Hello,

I am experiencing some problems with the continuous clocking feature of
org-mode. I created a question in stackoverflow for this (see
http://stackoverflow.com/questions/17969129/emacs-org-mode-continuous-clocking-does-not-work
)

I would be grateful, if you could help me in resolving this issue..

Below  is the  description of the problem as asked in stackoverflow


Thanks you for any help,

Andreas


I activated the option org-clock-continuously to recover gaps in my
clocking and the continuous clocking does not seem to work.

I am often fixing endtimes for clocked items, because I forgot to clock out
(using the function org-resolve-clocks and using the K option (keep x
minutes).

When I am clocking in afterwards (in the agenda view) after having fixed
the last clock, org-mode always clocks me in with the current time instead
of the last time I clocked out (according to the clock resolution).

Example:

TODO sample todo

CLOCK: [2013-07-31 Mi 12:53]

M-x org-resolve-clocks - K - 5

CLOCK: [2013-07-31 Mi 12:53]--[2013-07-31 Mi 12:58] = 0:05

agenda view: clock in on a different task

(! no question, if I want to clock in now or at last clock out time !)

** TODO sample todo 2

CLOCK: [2013-07-31 Mi 13:22]

Any ideas how to fix this or what option I have to activate in addition to
org-clock-continuously?

I am working on windows 7 Professional with GNU Emacs (GNU Emacs 24.3.1
(i386-mingw-nt6.1.7601)) and orgmode 8.0.3


[O] Publishing long jpg urls fails with org-html-handle-links: Wrong type argument: stringp, nil

2013-08-02 Thread Vijayender

Hi All

After the commit of 
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=55f4f921835bbf5d7b8e9dd82fe8dcfef2fac4e2
Looks like long urls for eg, the following doc are failing to html 
export. It happens without any customization on emacs-24.3-3


* queue to stack
  - 
http://img22.fansshare.com/celebrity/photos/934_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg

Are failing to export to html. The problem disappears on enclosing url 
with [[]] or for a jpg url which is shorter for eg: 
http://img22.fansshare.com/photos/livtyler/jtvr-armageddon-1577984889.jpg


The debug stack trace is:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(width= nil)
  org-html-handle-links(#(  - [[http://img22.fansshare.com/celebrity/photos/934_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg][http://img22.fansshare.com/celebrity/photos/934\\_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg]]; 0 3 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t) 3 4 (face org-link fontified t list-item 18 list-struct ((18 2 -  nil nil nil 119)) 
list-prevs ((18)) list-context nil) 4 6 (face org-link) 6 10 (face org-link fontified t list-item 18 list-struct ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil org-protected t org-no-description nil) 10 11 (face org-link org-protected t org-no-description nil) 11 100 (face org-link fontified t list-item 18 list-struct ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil org-protected t org-no-description nil) 
100 101 (face org-link fontified t rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) list-item 18 list-struct ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil org-protected t org-no-description nil) 101 102 (face org-link fontified t rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) list-item 18 list-struct ((18 2 - 
 nil nil nil 119)) list-prevs ((18)) list-context nil org-protected t org-no-description nil) 102 103 (face org-link) 103 104 (face org-link) 104 107 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 107 108 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 108 109 (face org-link) 109 150 
(list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 150 151 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 151 152 (face org-link) 152 153 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 153 199 (list-context nil list-prevs 
((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face org-link) 199 200 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) fontified t face org-link) 200 201 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 rear-nonsticky 
(mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) fontified t face org-link) 201 202 (face org-link) 202 203 (face org-link)) (:latex-image-options nil :exclude-tags (noexport) :select-tags (export) :publishing-directory nil :timestamp nil :expand-quoted-html t :html-table-tag table border=\2\ cellspacing=\0\ cellpadding=\6\ rules=\groups\ 
frame=\hsides\ :xml-declaration ((html . ?xml version=\1.0\ encoding=\%s\?) (php . ?php echo \?xml version=\\\1.0\\\ encoding=\\\%s\\\ ?\; ?)) :html-postamble auto :html-preamble t :html-extension html :inline-images maybe :convert-org-links t :agenda-style nil :style-extra  :style 
 :style-include-scripts t :style-include-default t :table-auto-headline t :tables t :time-stamp-file t :creator-info t :email-info nil :author-info t :email vkarnaty@localhost ...))
  byte-code(\203 .. )
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  org-export(nil)
  call-interactively(org-export nil nil)

--
Regards
Vijayender  



Re: [O] problems with continuous clocking

2013-08-02 Thread Noorul Islam K M
Hildegund Mythenmetz hildegund.mythenm...@gmail.com writes:

 Hello,

 I am experiencing some problems with the continuous clocking feature of
 org-mode. I created a question in stackoverflow for this (see
 http://stackoverflow.com/questions/17969129/emacs-org-mode-continuous-clocking-does-not-work
 )

 I would be grateful, if you could help me in resolving this issue..

 Below  is the  description of the problem as asked in stackoverflow


 Thanks you for any help,

 Andreas


 I activated the option org-clock-continuously to recover gaps in my
 clocking and the continuous clocking does not seem to work.

 I am often fixing endtimes for clocked items, because I forgot to clock out
 (using the function org-resolve-clocks and using the K option (keep x
 minutes).

 When I am clocking in afterwards (in the agenda view) after having fixed
 the last clock, org-mode always clocks me in with the current time instead
 of the last time I clocked out (according to the clock resolution).

 Example:

 TODO sample todo

 CLOCK: [2013-07-31 Mi 12:53]

 M-x org-resolve-clocks - K - 5

 CLOCK: [2013-07-31 Mi 12:53]--[2013-07-31 Mi 12:58] = 0:05

 agenda view: clock in on a different task

 (! no question, if I want to clock in now or at last clock out time !)

 ** TODO sample todo 2

 CLOCK: [2013-07-31 Mi 13:22]

 Any ideas how to fix this or what option I have to activate in addition to
 org-clock-continuously?

 I am working on windows 7 Professional with GNU Emacs (GNU Emacs 24.3.1
 (i386-mingw-nt6.1.7601)) and orgmode 8.0.3

I don't think you can work in the past. Usually I fix clock manually.

Thanks and Regards
Noorul



Re: [O] Publishing long jpg urls fails with org-html-handle-links: Wrong type argument: stringp, nil

2013-08-02 Thread Nicolas Goaziou
Hello,

Vijayender kvijayen...@gmail.com writes:

 After the commit of
 http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=55f4f921835bbf5d7b8e9dd82fe8dcfef2fac4e2
 Looks like long urls for eg, the following doc are failing to html
 export. It happens without any customization on emacs-24.3-3

 * queue to stack
   - 
 http://img22.fansshare.com/celebrity/photos/934_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg

 Are failing to export to html. The problem disappears on enclosing url
 with [[]] or for a jpg url which is shorter for eg:
 http://img22.fansshare.com/photos/livtyler/jtvr-armageddon-1577984889.jpg

It looks like the problem doesn't appear in latest Org version. You may want to 
upgrade Org, or just
wait for next Emacs release.


Regards,

-- 
Nicolas Goaziou



Re: [O] Publishing long jpg urls fails with org-html-handle-links: Wrong type argument: stringp, nil

2013-08-02 Thread Noorul Islam K M
Vijayender kvijayen...@gmail.com writes:

 Hi All

 After the commit of
 http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=55f4f921835bbf5d7b8e9dd82fe8dcfef2fac4e2
 Looks like long urls for eg, the following doc are failing to html export. It
 happens without any customization on emacs-24.3-3

 * queue to stack
   - 
 http://img22.fansshare.com/celebrity/photos/934_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg


I am not getting this stack trace.

Org-mode version 8.0.6 (release_8.0.6-377-ga3375f @ 
/home/noorul/.emacs.d/site-lisp/org-mode/lisp/)
GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2013-07-18 on noman

Thanks and Regards
Noorul

 Are failing to export to html. The problem disappears on enclosing url with 
 [[]]
 or for a jpg url which is shorter for eg:
 http://img22.fansshare.com/photos/livtyler/jtvr-armageddon-1577984889.jpg

 The debug stack trace is:

 Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   string-match(width= nil)
   org-html-handle-links(#(  - 
 [[http://img22.fansshare.com/celebrity/photos/934_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg][http://img22.fansshare.com/celebrity/photos/934\\_liv-tyler-arwen-lord-of-the-rings-2103158475.jpg]];
  0 3 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 
 119)) list-item 18 fontified t) 3 4 (face org-link fontified t list-item 18 
 list-struct ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil) 
 4 6 (face org-link) 6 10 (face org-link fontified t list-item 18 list-struct 
 ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil 
 org-protected t org-no-description nil) 10 11 (face org-link org-protected t 
 org-no-description nil) 11 100 (face org-link fontified t list-item 18 
 list-struct ((18 2 -  nil nil nil 119)) list-prevs ((18)) list-context nil 
 org-protected t org-no-description nil) 100 101 (face org-link fontified t 
 rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo 
 org-linked-text htmlize-link) list-item 18 list-struct ((18 2 -  nil nil 
 nil 119)) list-prevs ((18)) list-context nil org-protected t 
 org-no-description nil) 101 102 (face org-link fontified t rear-nonsticky 
 (mouse-face highlight keymap invisible intangible help-echo org-linked-text 
 htmlize-link) list-item 18 list-struct ((18 2 -  nil nil nil 119)) 
 list-prevs ((18)) list-context nil org-protected t org-no-description nil) 
 102 103 (face org-link) 103 104 (face org-link) 104 107 (list-context nil 
 list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 
 fontified t face org-link) 107 108 (list-context nil list-prevs ((18)) 
 list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face 
 org-link) 108 109 (face org-link) 109 150 (list-context nil list-prevs ((18)) 
 list-struct ((18 2 -  nil nil nil 119)) list-item 18 fontified t face 
 org-link) 150 151 (list-context nil list-prevs ((18)) list-struct ((18 2 -  
 nil nil nil 119)) list-item 18 fontified t face org-link) 151 152 (face 
 org-link) 152 153 (list-context nil list-prevs ((18)) list-struct ((18 2 -  
 nil nil nil 119)) list-item 18 fontified t face org-link) 153 199 
 (list-context nil list-prevs ((18)) list-struct ((18 2 -  nil nil nil 119)) 
 list-item 18 fontified t face org-link) 199 200 (list-context nil list-prevs 
 ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 rear-nonsticky 
 (mouse-face highlight keymap invisible intangible help-echo org-linked-text 
 htmlize-link) fontified t face org-link) 200 201 (list-context nil list-prevs 
 ((18)) list-struct ((18 2 -  nil nil nil 119)) list-item 18 rear-nonsticky 
 (mouse-face highlight keymap invisible intangible help-echo org-linked-text 
 htmlize-link) fontified t face org-link) 201 202 (face org-link) 202 203 
 (face org-link)) (:latex-image-options nil :exclude-tags (noexport) 
 :select-tags (export) :publishing-directory nil :timestamp nil 
 :expand-quoted-html t :html-table-tag table border=\2\ cellspacing=\0\ 
 cellpadding=\6\ rules=\groups\ frame=\hsides\ :xml-declaration 
 ((html . ?xml version=\1.0\ encoding=\%s\?) (php . ?php echo 
 \?xml version=\\\1.0\\\ encoding=\\\%s\\\ ?\; ?)) :html-postamble 
 auto :html-preamble t :html-extension html :inline-images maybe 
 :convert-org-links t :agenda-style nil :style-extra  :style  
 :style-include-scripts t :style-include-default t :table-auto-headline t 
 :tables t :time-stamp-file t :creator-info t :email-info nil :author-info t 
 :email vkarnaty@localhost ...))
   byte-code(\203 .. )
   org-export-as-html(nil)
   call-interactively(org-export-as-html)
   org-export(nil)
   call-interactively(org-export nil nil)



Re: [O] org-export-current-backend variable and org-mode 8

2013-08-02 Thread Christophe Rhodes
Christophe Rhodes cs...@cantab.net writes:

 The `by-backend' macro in Brett Viren's message upthread?  Personally I
 don't consider that sufficient, because it feels very fragile: a simple
 renaming of org-mode internal variables, or turning on lexical binding,
 and the macro will no longer work.  (If you mean some other
 `by-backend', I haven't seen it).

 In particular, I would like to have some kind of confidence that
 documents that I wrote last year will still be exportable next year with
 only minor modifications necessary, and to do that I think I need to
 convince you that this is valuable, enough that you are willing to
 commit to some stable way of accessing the information previously held
 in org-export-current-backend.

Attempting to put my money where my mouth is: find attached a patch to
restore org-export-current-backend.  I think this is a TINYCHANGE
despite the large diff -- it's almost all whitespace, and the docstring
is restored verbatim from org-mode 7.9 (I haven't updated it for the
removal of the docbook backend, for example, primarily so that it has
minimal novel information in it).

From 29d11fdda3b8302d437fdb309c195aa9e806505d Mon Sep 17 00:00:00 2001
From: Christophe Rhodes c.rho...@gold.ac.uk
Date: Fri, 2 Aug 2013 10:56:37 +0100
Subject: [PATCH] ox: restore org-export-current-backend variable

* lisp/ox.el (org-export-current-backend): new variable.
(org-export-as): bind it.

TINYCHANGE
---
 lisp/ox.el |  214 +++-
 1 file changed, 111 insertions(+), 103 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 5d28a81..8962428 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -290,6 +290,13 @@ and its CDR is a list of export options.)
 This marker will be used with `C-u C-c C-e' to make sure export repetition
 uses the same subtree if the previous command was restricted to a subtree.)
 
+(defvar org-export-current-backend nil
+  During export, this will be bound to a symbol such as 'html,
+  'latex, 'docbook, 'ascii, etc, indicating which of the export
+  backends is in use.  Otherwise it has the value nil.  Users
+  should not attempt to change the value of this variable
+  directly, but it can be used in code to test whether export is
+  in progress, and if so, what the backend is.)
 
 ;;; User-configurable Variables
 ;;
@@ -2947,109 +2954,110 @@ still inferior to file-local settings.
 Return code as a string.
   (when (symbolp backend) (setq backend (org-export-get-backend backend)))
   (org-export-barf-if-invalid-backend backend)
-  (save-excursion
-(save-restriction
-  ;; Narrow buffer to an appropriate region or subtree for
-  ;; parsing.  If parsing subtree, be sure to remove main headline
-  ;; too.
-  (cond ((org-region-active-p)
-	 (narrow-to-region (region-beginning) (region-end)))
-	(subtreep
-	 (org-narrow-to-subtree)
-	 (goto-char (point-min))
-	 (forward-line)
-	 (narrow-to-region (point) (point-max
-  ;; Initialize communication channel with original buffer
-  ;; attributes, unavailable in its copy.
-  (let* ((info (org-combine-plists
-		(list :export-options
-			  (delq nil
-(list (and subtreep 'subtree)
-  (and visible-only 'visible-only)
-  (and body-only 'body-only
-		(org-export--get-buffer-attributes)))
-	 tree)
-	;; Store default title in `org-export--default-title' so that
-	;; `org-export-get-environment' can access it from buffer's
-	;; copy and then add it properly to communication channel.
-	(org-export-store-default-title)
-	;; Update communication channel and get parse tree.  Buffer
-	;; isn't parsed directly.  Instead, a temporary copy is
-	;; created, where include keywords, macros are expanded and
-	;; code blocks are evaluated.
-	(org-export-with-buffer-copy
-	 ;; Run first hook with current back-end's name as argument.
-	 (run-hook-with-args 'org-export-before-processing-hook
-			 (org-export-backend-name backend))
-	 (org-export-expand-include-keyword)
-	 ;; Update macro templates since #+INCLUDE keywords might have
-	 ;; added some new ones.
-	 (org-macro-initialize-templates)
-	 (org-macro-replace-all org-macro-templates)
-	 (org-export-execute-babel-code)
-	 ;; Update radio targets since keyword inclusion might have
-	 ;; added some more.
-	 (org-update-radio-target-regexp)
-	 ;; Run last hook with current back-end's name as argument.
-	 (goto-char (point-min))
-	 (save-excursion
-	   (run-hook-with-args 'org-export-before-parsing-hook
-			   (org-export-backend-name backend)))
-	 ;; Update communication channel with environment.  Also
-	 ;; install user's and developer's filters.
-	 (setq info
-	   (org-export-install-filters
-		(org-combine-plists
-		 info (org-export-get-environment backend subtreep ext-plist
-	 ;; Expand export-specific set of macros: {{{author}}},
-	 ;; {{{date}}}, {{{email}}} and {{{title}}}.  It must be done
-	 ;; once regular macros have been expanded, 

Re: [O] problems with continuous clocking

2013-08-02 Thread Hildegund Mythenmetz
Hmm,

I was expecting that the functionality helps me in avoiding the need to fix
clocks manually.. Perhaps I misunderstand the feature?

If I deactivate org-clock-continuously, I get the following question when
logging in : You stopped another clock x minutes ago; start this one from
then?. If I answer with Yes the system clocks me in correctly (i.e. at
the time of the last clock out. I thought, that org-clock-continuously
automates this behaviour (basically answering yes automatically)

If org-clock-continuously does not do this, how can I achieve this?

All the best,
Andreas




2013/8/2 Noorul Islam K M noo...@noorul.com

 Hildegund Mythenmetz hildegund.mythenm...@gmail.com writes:

  Hello,
 
  I am experiencing some problems with the continuous clocking feature of
  org-mode. I created a question in stackoverflow for this (see
 
 http://stackoverflow.com/questions/17969129/emacs-org-mode-continuous-clocking-does-not-work
  )
 
  I would be grateful, if you could help me in resolving this issue..
 
  Below  is the  description of the problem as asked in stackoverflow
 
 
  Thanks you for any help,
 
  Andreas
 
 
  I activated the option org-clock-continuously to recover gaps in my
  clocking and the continuous clocking does not seem to work.
 
  I am often fixing endtimes for clocked items, because I forgot to clock
 out
  (using the function org-resolve-clocks and using the K option (keep x
  minutes).
 
  When I am clocking in afterwards (in the agenda view) after having fixed
  the last clock, org-mode always clocks me in with the current time
 instead
  of the last time I clocked out (according to the clock resolution).
 
  Example:
 
  TODO sample todo
 
  CLOCK: [2013-07-31 Mi 12:53]
 
  M-x org-resolve-clocks - K - 5
 
  CLOCK: [2013-07-31 Mi 12:53]--[2013-07-31 Mi 12:58] = 0:05
 
  agenda view: clock in on a different task
 
  (! no question, if I want to clock in now or at last clock out time !)
 
  ** TODO sample todo 2
 
  CLOCK: [2013-07-31 Mi 13:22]
 
  Any ideas how to fix this or what option I have to activate in addition
 to
  org-clock-continuously?
 
  I am working on windows 7 Professional with GNU Emacs (GNU Emacs 24.3.1
  (i386-mingw-nt6.1.7601)) and orgmode 8.0.3

 I don't think you can work in the past. Usually I fix clock manually.

 Thanks and Regards
 Noorul



Re: [O] [dev] New version of org-index.el --- A personal index for org and beyond

2013-08-02 Thread Suvayu Ali
On Thu, Aug 01, 2013 at 10:17:42PM +0200, Marc Ihm wrote:
 Hello,
 
 please find attached version 2.3 of org-index.el.
 See also http://orgmode.org/worg/code/elisp/org-index.el
 and the contrib-directory of org.
 
 The most notable feature of this version is an assistant
 which provides easy setup.
 
 A short description in its own words:
 
 ;;; org-index.el --- A personal index for org and beyond
 ;;
 ;;  Mark and find your favorite org-locations and other things easily:
 ;;  Create and update a lookup table of references and links. Frequently
 ;;  used entries bubble to the top. Entering some keywords narrows down the
 ;;  displayed results to matching entries only, so that the right one can
 ;;  be spotted easily.
 ;;
 ;;  References are essentially small numbers (e.g. R237 or -455-),
 ;;  which are created by this package; they are well suited to be used
 ;;  outside org. Links are normal org-mode links.;;
 
 
 
 Find the complete documentation at:
 
   http://orgmode.org/worg/org-contrib/org-index.html

This looks quite interesting.  I will try it over the weekend.

Thanks :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [WORG] How to ediff folded Org files?

2013-08-02 Thread Suvayu Ali
On Thu, Aug 01, 2013 at 05:09:19PM +0200, RĂ©mi Vanicat wrote:
 Ratish Punnoose rat...@gmail.com writes:

 [...chomp...chomp...chomp...]

 
 Adding this to org-mode (at least in contrib, or worg) would be really cool.

Done!

http://orgmode.org/w/worg.git?p=worg.git;a=blobdiff;f=org-hacks.org;h=26e8ab26ed0b7752a6cbee8665a64da5781f163b;hp=52a359044d98686be0ada42e0653e2a6d0993fcb;hb=09e38b9d38fc48571ec64a16e38291cd0a7a48ef;hpb=a776e543d87c14b4712a3decd359bdd4a971da38

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] possible org-insert-heading bug?

2013-08-02 Thread Bastien
Hi Simon,

Simon Thum simon.t...@gmx.de writes:

 any news on this? I'm struggling with RET C-RET during notes taking.

I'll be on vacation until August 14th, but this is high on my
todo list then.  Unless Carsten or someone else beats me on this,
of course.

-- 
 Bastien



Re: [O] Agenda in the mode-line?

2013-08-02 Thread Bastien
Hi Kyle,

Kyle Sexton k...@mocker.org writes:

 Does anyone know if there is a feature to show something like 'Tasks: 4'
 on the mode-line for tasks that are currently open?

This is the default behavior since long: hitting I to clock in a
task in the agenda or C-c C-x C-i in an Org buffer will append the
task name to the modeline, together with the time spent.

Don't you have this?  Even with emacs -Q?

HTH,

-- 
 Bastien



Re: [O] Agenda in the mode-line?

2013-08-02 Thread Kyle Sexton
Bastien b...@gnu.org writes:

 Kyle Sexton k...@mocker.org writes:

 Does anyone know if there is a feature to show something like 'Tasks: 4'
 on the mode-line for tasks that are currently open?

 This is the default behavior since long: hitting I to clock in a
 task in the agenda or C-c C-x C-i in an Org buffer will append the
 task name to the modeline, together with the time spent.

 Don't you have this?  Even with emacs -Q?


Sorry, it appears I didn't make my use case very clear.  What you are
speaking of is clocking into a task, and indeed that does show up on the
modeline.

What I am after is more of a overview of How many total TODO tasks do I
have, ideally with some function to limit or match based on tag.

Something like this in the modeline:

#+BEGIN_EXAMPLE
[Work: 3/10 Home: 2/20]
 ^--- Total number of TODOs in home.org
  ^-- Total number of TODOs due today in home.org
#+END_EXAMPLE

That way I have a constant reminder of the number of things left without
having to pull up the agenda.

--
Kyle Sexton



Re: [O] Agenda in the mode-line?

2013-08-02 Thread Nick Dokos
Kyle Sexton k...@mocker.org writes:

 Bastien b...@gnu.org writes:

 Kyle Sexton k...@mocker.org writes:

 Does anyone know if there is a feature to show something like 'Tasks: 4'
 on the mode-line for tasks that are currently open?

 This is the default behavior since long: hitting I to clock in a
 task in the agenda or C-c C-x C-i in an Org buffer will append the
 task name to the modeline, together with the time spent.

 Don't you have this?  Even with emacs -Q?


 Sorry, it appears I didn't make my use case very clear.  What you are
 speaking of is clocking into a task, and indeed that does show up on the
 modeline.

 What I am after is more of a overview of How many total TODO tasks do I
 have, ideally with some function to limit or match based on tag.

 Something like this in the modeline:

 #+BEGIN_EXAMPLE
 [Work: 3/10 Home: 2/20]
  ^--- Total number of TODOs in home.org
   ^-- Total number of TODOs due today in home.org
 #+END_EXAMPLE

 That way I have a constant reminder of the number of things left without
 having to pull up the agenda.


I don't think the feature exists but it should be buildable - although I
think it is not exactly simple.

It should be easy to write a function that uses the org mapping API to
produce a string of the form [Work: 3/10 Home: 2/20] and assign it to
a variable, say mode-line-org-tasks. The variable can be added to
mode-line-format.

The problem is to force mode-line redisplay when things change,
e.g. when you mark a TODO task DONE, or add another task to work.org.
If the file gets modified, then filenotify.el can be used, but since the
agenda files are kept open, the buffer is modified but the file is not
(until the buffer is saved) and I'm not sure how to detect such changes
and propagate them to the mode line. I thought there must be a hook to
allow this, but I haven't found one yet.

The rather yucky alternative is to poll the relevant buffers (say once a
minute) to see if they are modified and if so, run the function to set
the variable and force mode-line redisplay. 

-- 
Nick




[O] table export to same buffer

2013-08-02 Thread Rustom Mody
Is it possible to export an orgmode table not to a new file but overwriting
the org table in the same buffer?

Context is editing source code which contains a largeish table of (say)
constants.
Editing is done with orgtbl minor mode.
When done it should become back the table in the natural format of the
programming language
[For simplicity lets just say csv will do]


Re: [O] Agenda in the mode-line?

2013-08-02 Thread Kyle Sexton
Nick Dokos ndo...@gmail.com writes:

 I don't think the feature exists but it should be buildable - although I
 think it is not exactly simple.

 It should be easy to write a function that uses the org mapping API to
 produce a string of the form [Work: 3/10 Home: 2/20] and assign it to
 a variable, say mode-line-org-tasks. The variable can be added to
 mode-line-format.

That part is beyond my elisp ability, but good to know that the feature
doesn't currently exist.

 The problem is to force mode-line redisplay when things change,
 e.g. when you mark a TODO task DONE, or add another task to work.org.
 If the file gets modified, then filenotify.el can be used, but since the
 agenda files are kept open, the buffer is modified but the file is not
 (until the buffer is saved) and I'm not sure how to detect such changes
 and propagate them to the mode line. I thought there must be a hook to
 allow this, but I haven't found one yet.

 The rather yucky alternative is to poll the relevant buffers (say once a
 minute) to see if they are modified and if so, run the function to set
 the variable and force mode-line redisplay.

I already have a function for org-mobile to sync, could something like
that be hooked into?

#+BEGIN_SRC emacs-lisp
;; Push to mobile-org
;; moble sync
(defvar org-mobile-sync-timer nil)
(defvar org-mobile-sync-idle-secs (* 60 10))
(defun org-mobile-sync ()
  (interactive)
  (org-mobile-pull)
  (org-mobile-push))
(defun org-mobile-sync-enable ()
  enable mobile org idle sync
  (interactive)
  (setq org-mobile-sync-timer
(run-with-idle-timer org-mobile-sync-idle-secs t
 'org-mobile-sync)))
(defun org-mobile-sync-disable ()
  disable mobile org idle sync
  (interactive)
  (cancel-timer org-mobile-sync-timer))
(org-mobile-sync-enable)
#+END_SRC


--
Kyle Sexton



Re: [O] problems with continuous clocking

2013-08-02 Thread Sebastien Vauban
Hildegund Mythenmetz wrote:
 I am often fixing endtimes for clocked items, because I forgot to clock out
 (using the function org-resolve-clocks and using the K option (keep x
 minutes).

Do you forget to clock out when quitting Emacs?  If yes, add this to your
.emacs:

--8---cut here---start-8---
;; ask the user if they wish to clock out before killing Emacs
(defun leuven--org-query-clock-out ()
  Ask the user before clocking out.
This is a useful function for adding to `kill-emacs-query-functions'.
  (if (and (featurep 'org-clock)
   (funcall 'org-clocking-p)
   (y-or-n-p You are currently clocking time, clock out? ))
  (org-clock-out)
t)) ;; only fails on keyboard quit or error

(add-hook 'kill-emacs-query-functions 'leuven--org-query-clock-out)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] table export to same buffer

2013-08-02 Thread Sebastien Vauban
Rustom Mody wrote:
 Is it possible to export an orgmode table not to a new file but overwriting
 the org table in the same buffer?

 Context is editing source code which contains a largeish table of (say)
 constants.
 Editing is done with orgtbl minor mode.
 When done it should become back the table in the natural format of the
 programming language
 [For simplicity lets just say csv will do]

Using an Org Babel code block (which you have to write, of course) taking as
input your table, and outputting your constants in the wished format should do
what you're looking for, right?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Completion of `*' gives wrong number of arguments

2013-08-02 Thread Dieter Wilhelm, H.
Dear (),

is the completion of an asterix `*' broken in the latest org or is it
my configuration?

(I'm sorry I still can't run a pristine Emacs -Q without loading the
old org mode)

Remark: It would be wonderful if the completion of headlines would
also work within C-c C-l...

Have a nice weekend
--
Best wishes

H. Dieter Wilhelm

Darmstadt
Germany



[O] [PATCH] ox-ascii extra blank before table caption

2013-08-02 Thread Rick Frankel
ox-ascii is putting a blank line between a table and a following 
caption.

It is not doing this for listing captions so, IMHO, it is a bug.

Here is a (very small) patch which fixes the problem.

diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 59d0152..3baf4bd 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -1658,7 +1658,7 @@ contextual information.
(t (org-remove-indentation (org-element-property :value table
;; Possible add a caption string below.
(when (and caption (not org-ascii-caption-above))
-   (concat \n caption)
+   caption


rick



Re: [O] [PATCH] ox-ascii extra blank before table caption

2013-08-02 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 ox-ascii is putting a blank line between a table and a following
 caption.
 It is not doing this for listing captions so, IMHO, it is a bug.

 Here is a (very small) patch which fixes the problem.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Agenda in the mode-line?

2013-08-02 Thread Eric Abrahamsen
Kyle Sexton k...@mocker.org writes:

 Bastien b...@gnu.org writes:

 Kyle Sexton k...@mocker.org writes:

 Does anyone know if there is a feature to show something like 'Tasks: 4'
 on the mode-line for tasks that are currently open?

 This is the default behavior since long: hitting I to clock in a
 task in the agenda or C-c C-x C-i in an Org buffer will append the
 task name to the modeline, together with the time spent.

 Don't you have this?  Even with emacs -Q?


 Sorry, it appears I didn't make my use case very clear.  What you are
 speaking of is clocking into a task, and indeed that does show up on the
 modeline.

 What I am after is more of a overview of How many total TODO tasks do I
 have, ideally with some function to limit or match based on tag.

 Something like this in the modeline:

 #+BEGIN_EXAMPLE
 [Work: 3/10 Home: 2/20]
  ^--- Total number of TODOs in home.org
   ^-- Total number of TODOs due today in home.org
 #+END_EXAMPLE

 That way I have a constant reminder of the number of things left without
 having to pull up the agenda.

 --
 Kyle Sexton

A lighter-weight and easier to code version of this might be produced
directly from the current *Org Agenda* buffer. Ie, every time you call
org-agenda, or org-agenda-redo, you could build a variable that creates
this mode line, maybe in `org-agenda-finalize-hook'.

So long as you don't need separate queries for the agenda buffer and the
modeline, this seems like it would work fine. Then your timer could run
`org-agenda-redo', or you could just bind that to a key in the global or
org-mode keymaps.

Eric




Re: [O] table export to same buffer

2013-08-02 Thread Rustom Mody
Sebastien Vauban wrote

 On Fri, Aug 2, 2013 at 10:53 PM, Rustom Mody rustompm...@gmail.comwrote:

 Is it possible to export an orgmode table not to a new file but
 overwriting the org table in the same buffer?

 Context is editing source code which contains a largeish table of (say)
 constants.
 Editing is done with orgtbl minor mode.
 When done it should become back the table in the natural format of the
 programming language
 [For simplicity lets just say csv will do]



 Using an Org Babel code block (which you have to write, of course) taking as
 input your table, and outputting your constants in the wished format should do
 what you're looking for, right?


I dont think so.
The context is writing C with C mode (or haskell with haskell-mode python
with python-mode etc) ie the user is not using orgmode.  That is why I
mentioned orgtbl, ie org table editing facilities are needed but the major
mode is something else.

However here some pre and postprocessing is also probably required.
Something like an automation of the following:

1. Editing a large struct spec in C -- major mode is C-mode
2. Select the region (may even be a rectangle)
3. Paste into an org-mode buffer
4. Run C-c | on region
5. Edit table as required
6. org-table-export in desired format to a file F
7. Visit F
8. Copy/Cut F (if necessary as rectangle)
9. Go back to original C-mode buffer and paste


Re: [O] Agenda in the mode-line?

2013-08-02 Thread Nick Dokos
Kyle Sexton k...@mocker.org writes:

 Nick Dokos ndo...@gmail.com writes:

 I don't think the feature exists but it should be buildable - although I
 think it is not exactly simple.

 It should be easy to write a function that uses the org mapping API to
 produce a string of the form [Work: 3/10 Home: 2/20] and assign it to
 a variable, say mode-line-org-tasks. The variable can be added to
 mode-line-format.

 That part is beyond my elisp ability, but good to know that the feature
 doesn't currently exist.


Here is an implementation of the above. If you paste the code into a
buffer, change the paths appropriately and M-x eval-buffer, you should
get a mode line with the stats. mode-line-format is buffer-local so you
can get rid of the modified mode-line-format by just killing the buffer.

--8---cut here---start-8---
(defun org-agenda-mode-line (optional files)
  Construct a string of the form [file:todo-today/todo ...]
   for all the files in the argument list (or all the agenda files if the 
argument is nil).
  (let ((afiles))
(setq afiles
  (if (not files)
  (org-agenda-files)
files))
(concat [
(mapconcat (function org-mode-line-stats) afiles  )
])))

(defun org-count-todo ()
  If the current headline is SCHEDULED and its scheduled date is on or before 
today
   then count it in todo-today. Count it unconditionally in todo-total.
  (let ((sched (org-entry-get (point) SCHEDULED)))
(if (and sched
 (= (time-to-days (org-time-string-to-time sched)) (org-today)))
(incf todo-today))
(incf todo-total)))

(defun org-mode-line-stats (file)
  Use org-map-entries to step through the TODO headlines. Apply the 
org-count-todo
   function on each headline and return a string of the form 
file:todo-today/todo.
  (let ((buffer (get-file-buffer file))
(todo-today 0)
(todo-total 0))
(if buffer
(save-excursion
  (set-buffer buffer)
  ;; do the org mapping API dance
  (org-map-entries
   (function org-count-todo)
   /+TODO 'file)))
(concat (file-name-base file) (format :%d/%d todo-today todo-total

   
(setq mode-line-org-agenda-stats (org-agenda-mode-line 
'(/home/nick/lib/org/home.org /home/nick/lib/org/work.org)))
(nconc mode-line-format '(mode-line-org-agenda-stats))

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

The code assumes that the relevant files are already visited
(e.g. you've already done C-c a a or M-x org-agenda-list). Otherwise,
get-file-buffer will return nil and the counting will be skipped: you'll
get 0/0 values. Also, what to search for is hardwired but it should be
clear how to change it to use different criteria. 

The update problem below is still TBD.

 The problem is to force mode-line redisplay when things change,
 e.g. when you mark a TODO task DONE, or add another task to work.org.
 If the file gets modified, then filenotify.el can be used, but since the
 agenda files are kept open, the buffer is modified but the file is not
 (until the buffer is saved) and I'm not sure how to detect such changes
 and propagate them to the mode line. I thought there must be a hook to
 allow this, but I haven't found one yet.

 The rather yucky alternative is to poll the relevant buffers (say once a
 minute) to see if they are modified and if so, run the function to set
 the variable and force mode-line redisplay.

 I already have a function for org-mobile to sync, could something like
 that be hooked into?

 #+BEGIN_SRC emacs-lisp
 ;; Push to mobile-org
 ;; moble sync
 (defvar org-mobile-sync-timer nil)
 (defvar org-mobile-sync-idle-secs (* 60 10))
 (defun org-mobile-sync ()
   (interactive)
   (org-mobile-pull)
   (org-mobile-push))
 (defun org-mobile-sync-enable ()
   enable mobile org idle sync
   (interactive)
   (setq org-mobile-sync-timer
 (run-with-idle-timer org-mobile-sync-idle-secs t
  'org-mobile-sync)))
 (defun org-mobile-sync-disable ()
   disable mobile org idle sync
   (interactive)
   (cancel-timer org-mobile-sync-timer))
 (org-mobile-sync-enable)
 #+END_SRC

-- 
Nick