Re: [Orgmode] Re: Questions about org-capture templates and usage

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote:

I am at much greater ease due to these two messages.  They solve  
several of my befuddlements about capture.


On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen  wrote:
I visit newly captured items all the time.  If you capture something  
(I
have C-M-r bound to org-capture) and store it with C-c C-c you can  
visit

it immediately with a double prefix  C-u C-u C-M-r as stated in the
org-capture docstring:

This is exactly what I was looking for in the manual.


Wow, I cannot believe I forgot to put these into the manual!  Crazy.
They are in not (git version).


In fact, I think my comment about the manual was partly a response  
to being unable to find this item in the   manual, when I know I had  
seen reference to it somewhere.  Maybe in my request for items to be  
included in the manual, the docstrings in org-capture.el would be  
scanned.  I missed this on my cursory search of that file.  I will  
search for it myself, and work on (believe it or not) org-help.org,  
that I use as a helpmate.


I have org-capture assigned to C-c, so C-u C-u C-c c goes straight  
to the last stored item.  Perfect.


|
| (org-capture &optional GOTO KEYS)
|
I THINK I understand that GOTO here refers to the prefix C-u ?  And  
C-u C-u circumvents this?


| When called interactively with a C-u prefix argument GOTO, don't  
capture

| anything, just go to the file/headline where the selected template
| stores its notes.  With a double prefix argument C-u C-u, go to  
the last note
 
^^

| stored.
 ^^

This is it! What I was looking for.

I think, thought it may seem crazy, I would like to still have a way  
to specify in the template that one would remain with the newly  
captured item in its environment, after finalizing.   Just the same,  
thinking about that it's an indirect buffer, it makes more sense how  
it works now...


You can just widen during capture if you wish: C-x n w will show you  
the entire buffer.

You still need to finalize at some point with C-c C-c though.



Awe, heck, these two methods solve my problem well enough...

|
| When called with a `C-0' (zero) prefix, insert a template at point.
|

This is a great feature...

| Lisp programs can set KEYS to a string associated with a template in
| `org-capture-templates'.  In this case, interactive selection will  
be

| bypassed.
`

This is something I'd like to see an example of.


(defun my-capture-k ()
  (interactive)
  (org-capture nil "k"))

will directly get you into capture template k.

- Carsten


___
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: Questions about org-capture templates and usage

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote:

I am at much greater ease due to these two messages.  They solve  
several of my befuddlements about capture.


On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen  wrote:
I visit newly captured items all the time.  If you capture something  
(I
have C-M-r bound to org-capture) and store it with C-c C-c you can  
visit

it immediately with a double prefix  C-u C-u C-M-r as stated in the
org-capture docstring:

This is exactly what I was looking for in the manual.  In fact, I  
think my comment about the manual was partly a response to being  
unable to find this item in the   manual, when I know I had seen  
reference to it somewhere.  Maybe in my request for items to be  
included in the manual, the docstrings in org-capture.el would be  
scanned.  I missed this on my cursory search of that file.  I will  
search for it myself, and work on (believe it or not) org-help.org,  
that I use as a helpmate.


I have org-capture assigned to C-c, so C-u C-u C-c c goes straight  
to the last stored item.  Perfect.


|
| (org-capture &optional GOTO KEYS)
|
I THINK I understand that GOTO here refers to the prefix C-u ?  And  
C-u C-u circumvents this?


| When called interactively with a C-u prefix argument GOTO, don't  
capture

| anything, just go to the file/headline where the selected template
| stores its notes.  With a double prefix argument C-u C-u, go to  
the last note
 
^^

| stored.
 ^^

This is it! What I was looking for.

I think, thought it may seem crazy, I would like to still have a way  
to specify in the template that one would remain with the newly  
captured item in its environment, after finalizing.   Just the same,  
thinking about that it's an indirect buffer, it makes more sense how  
it works now...


You can now finalize with C-u C-c C-c to go to the captured item if  
you want.


- Carsten



Awe, heck, these two methods solve my problem well enough...

|
| When called with a `C-0' (zero) prefix, insert a template at point.
|

This is a great feature...

| Lisp programs can set KEYS to a string associated with a template in
| `org-capture-templates'.  In this case, interactive selection will  
be

| bypassed.
`

This is something I'd like to see an example of.

Thank you again, and again,

Alan Davis

"Pollution is nothing but the resources we are not harvesting. We  
allow them to disperse because we've been ignorant of their value."
   --- R 
. Buckminster Fuller



___
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


- Carsten




___
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 & [PATCH]: org-clone-subtree-with-time-shift doesn't clean empty property drawers in entire subtree

2010-12-06 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Dec 4, 2010, at 6:59 PM, Mike McLean wrote:


If using org-clone, C-c C-x c, on a subtree instead of a single item,
the loop to call org-remove-empty-drawer-at isn't executing on every
item of the subtree. Changing the re-search-forward seems to do the  
trick.


Mike



---
lisp/org.el |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 66514a2..e5a20d3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7603,7 +7603,7 @@ and still retain the repeater to cover future
instances of the task."
(and idprop (if org-clone-delete-id
(org-entry-delete nil "ID")
  (org-id-get-create t)))
-(while (re-search-forward org-property-drawer-re nil t)
+(while (re-search-forward org-property-start-re nil t)
  (org-remove-empty-drawer-at "PROPERTIES" (point)))
(goto-char (point-min))
(when doshift
--
1.7.3.2








___
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


- Carsten




___
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


[Accepted] [Orgmode] Allow user to limit amount of context stored in file link search strings

2010-12-06 Thread Carsten Dominik
Patch 440 (http://patchwork.newartisans.com/patch/440/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87y6843wiu.fsf%40fastmail.fm%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Allow user to limit amount of context stored in file link
>   search strings
> Date: Sun, 05 Dec 2010 23:24:13 -
> From: Matt Lundin 
> X-Patchwork-Id: 440
> Message-Id: <87y6843wiu@fastmail.fm>
> To: Org Mode 
> 
> * lisp/org.el: (org-make-heading-search-string) Optionally limit
>   number of lines stored in file link search strings.
>   (org-context-in-file-links) Add option to set to integer specifying
>   number of lines.
> 
> ---
> lisp/org.el |   19 +++
>  1 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 66514a2..2d769be 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -1385,12 +1385,15 @@ nil   Never use an ID to make a link, instead link 
> using a text search for
>  (defcustom org-context-in-file-links t
>"Non-nil means file links from `org-store-link' contain context.
>  A search string will be added to the file name with :: as separator and
> -used to find the context when the link is activated by the command
> -`org-open-at-point'.
> +used to find the context when the link is activated by the command 
> +`org-open-at-point'. When this option is t, the entire active region 
> +will be placed in the search string of the file link. If set to a 
> +positive integer, only the first n lines of context will be stored.
> +
>  Using a prefix arg to the command \\[org-store-link] (`org-store-link')
>  negates this setting for the duration of the command."
>:group 'org-link-store
> -  :type 'boolean)
> +  :type '(choice boolean integer))
>  
>  (defcustom org-keep-stored-link-after-insertion nil
>"Non-nil means keep link in list for entire session.
> @@ -8501,7 +8504,8 @@ according to FMT (default from 
> `org-email-link-description-format')."
>  (defun org-make-org-heading-search-string (&optional string heading)
>"Make search string for STRING or current headline."
>(interactive)
> -  (let ((s (or string (org-get-heading
> +  (let ((s (or string (org-get-heading)))
> + (lines org-context-in-file-links))
>  (unless (and string (not heading))
>;; We are using a headline, clean up garbage in there.
>(if (string-match org-todo-regexp s)
> @@ -8515,6 +8519,13 @@ according to FMT (default from 
> `org-email-link-description-format')."
>(while (string-match org-ts-regexp s)
>   (setq s (replace-match "" t t s
>  (or string (setq s (concat "*" s)))  ; Add * for headlines
> +(when (and string (integerp lines) (> lines 0))
> +  (let ((slines (org-split-string s "\n")))
> + (when (< lines (length slines))
> +   (setq s (mapconcat 
> +'identity
> +(reverse (nthcdr (- (length slines) lines) 
> + (reverse slines))) "\n")
>  (mapconcat 'identity (org-split-string s "[ \t]+") " ")))
>  
>  (defun org-make-link (&rest strings)
> 

___
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] Revert "Fix :VISIBILITY: handling of nested "folded" properties"

2010-12-06 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Dec 6, 2010, at 5:45 AM, Matt Lundin wrote:


This reverts commit 383802d063a9f2dd959d5574b226fa8ec7f8be41.

The commit had org-mode process the headlines from bottom to top,  
which

meant that any changes to the visibility of lower headlines were
overridden/modified by changes higher up the tree. Reverting the  
commit

causes VISIBILITY to work correctly.
---
lisp/org.el |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 66514a2..4b39c9c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6073,8 +6073,8 @@ With a numeric prefix, show all headlines up  
to that level."

  (interactive)
  (let (org-show-entry-below state)
(save-excursion
-  (goto-char (point-max))
-  (while (re-search-backward
+  (goto-char (point-min))
+  (while (re-search-forward
  "^[ \t]*:VISIBILITY:[ \t]+\\([a-z]+\\)"
  nil t)
(setq state (match-string 1))
--
1.7.3.2


___
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


- Carsten




___
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


[Accepted] [Orgmode] org-velocity templates

2010-12-06 Thread Carsten Dominik
Patch 442 (http://patchwork.newartisans.com/patch/442/) is now "Accepted".

Maintainer comment: Looks great, thanks

This relates to the following submission:

http://mid.gmane.org/%3C8762v7jvf7.fsf%40gmail.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-velocity templates
> Date: Mon, 06 Dec 2010 10:57:00 -
> From: Paul M. Rodriguez 
> X-Patchwork-Id: 442
> Message-Id: <8762v7jvf7@gmail.com>
> To: emacs-orgmode@gnu.org
> 
> This patch allows full customization of org-remember or org-capture
> templates for use with org-velocity.
> 
> Paul Rodriguez.
> 
> 
> diff --git a/contrib/lisp/org-velocity.el b/contrib/lisp/org-velocity.el
> index 2a1f41b..b3d4006 100644
> --- a/contrib/lisp/org-velocity.el
> +++ b/contrib/lisp/org-velocity.el
> @@ -4,7 +4,7 @@
>  
>  ;; Author: Paul M. Rodriguez 
>  ;; Created: 2010-05-05
> -;; Version: 2.2
> +;; Version: 2.3
>  
>  ;; This file is not part of GNU Emacs.
>  
> @@ -64,8 +64,8 @@
>  ;; preferring `org-capture'.  Otherwise the user is simply taken to a
>  ;; new heading at the end of the file.
>  
> -;; Thanks to Richard Riley, Carsten Dominik, and Bastien Guerry for
> -;; their suggestions.
> +;; Thanks to Richard Riley, Carsten Dominik, Bastien Guerry, and Jeff
> +;; Horn for their suggestions.
>  
>  ;;; Usage:
>  ;; (require 'org-velocity)
> @@ -125,6 +125,32 @@
>:group 'org-velocity
>:type 'boolean)
>  
> +(defcustom org-velocity-remember-templates
> +  '(("Velocity entry"
> + ?v
> + "* %:search\n\n%i%?"
> + nil
> + bottom))
> +  "Use these templates with `org-remember'.
> +Meanwhile `org-default-notes-file' is bound to `org-velocity-use-file'.
> +The keyword :search inserts the current search.
> +See the documentation for `org-remember-templates'."
> +  :group 'org-velocity
> +  :type (or (get 'org-remember-templates 'custom-type) 'list))
> +
> +(defcustom org-velocity-capture-templates
> +  '(("v"
> + "Velocity entry"
> + entry
> + (file "")
> + "* %:search\n\n%i%?"))
> +  "Use these template with `org-capture'.
> +Meanwhile `org-default-notes-file' is bound to `org-velocity-use-file'.
> +The keyword :search inserts the current search.
> +See the documentation for `org-capture-templates'."
> +  :group 'org-velocity
> +  :type (or (get 'org-capture-templates 'custom-type) 'list))
> +
>  (defstruct (org-velocity-heading
>   (:constructor org-velocity-make-heading)
>   (:type list))
> @@ -139,23 +165,39 @@
> (number-sequence 65 90))) ;uppercase letters
>"List of chars for indexing results.")
>  
> +(defconst org-velocity-display-buffer-name "*Velocity headings*")
> +
> +(defvar org-velocity-search nil
> +  "Variable to bind to current search.")
> +
> +(defsubst org-velocity-buffer-file-name (&optional buffer)
> +  "Return the name of the file BUFFER saves to.
> +Same as function `buffer-file-name' unless BUFFER is an
> +indirect buffer."
> +  (buffer-file-name
> +   (or (buffer-base-buffer buffer)
> +   buffer)))
> +
>  (defun org-velocity-use-file ()
>"Return the proper file for Org-Velocity to search.
>  If `org-velocity-always-use-bucket' is t, use bucket file; complain
>  if missing.  Otherwise if this is an Org file, use it."
> -  (let ((org-velocity-bucket
> -  (and org-velocity-bucket (expand-file-name org-velocity-bucket
> -(if org-velocity-always-use-bucket
> - (or org-velocity-bucket (error "Bucket required but not defined"))
> -  (if (and (eq major-mode 'org-mode)
> -(buffer-file-name))
> -   (buffer-file-name)
> - (or org-velocity-bucket
> - (error "No bucket and not an Org file"))
> +  (or
> +   ;; In remember and capture buffers the target should be used.
> +   (and org-remember-mode org-default-notes-file)
> +   (let ((org-velocity-bucket
> +   (and org-velocity-bucket (expand-file-name org-velocity-bucket
> + (if org-velocity-always-use-bucket
> +  (or org-velocity-bucket (error "Bucket required but not defined"))
> +   (if (and (eq major-mode 'org-mode)
> + (org-velocity-buffer-file-name))
> +(org-velocity-buffer-file-name)
> +  (or org-velocity-bucket
> +  (error "No bucket and not an Org file")))
>  
>  (defsubst org-velocity-display-buffer ()
>"Return the proper buffer for Org-Velocity to display in."
> -  (get-buffer-create "*Velocity headings*"))
> +  (get-buffer-create org-velocity-display-buffer-name))
>  
>  (defsubst org-velocity-bucket-buffer ()
>"Return proper buffer for bucket operations."
> @@ -232,29 +274,18 @@ If there is no last heading, return nil."
>  'action action))
>(newline))
>  
> -(defun org-velocity-remember (heading &optional region)
> -  "Use `org-remember' to record a note to HEADING.
> -If there is a REGION that will be inserted."
> +(defun org-velocity-remember ()
> +  "Use `or

[Orgmode] Orgmode and Unicode characters

2010-12-06 Thread Dov Grobgeld
Even though this announcement looks very cool, this again reminded me of
something I've been thinking off when using orgmode. And that is the use of
unicode characters. With the latest versions of emacs that support unicode
and with rich fonts such as DejaVu Monospace, it is as easy to use unicode
characters as ascii. What I was thinking of is that the current ascii
graphics of e.g. tables could automatically be switched to box drawing
characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
pressing C-c or Tab. Other characters that could be used are automatic
replacement of leading asterisks to various bullets. Each indentation level
could be given a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure that
arrows and various brackets may also be useful for various contexts.

Of course the use of these characters would be configurable and would be
turned off automatically for buffers that are not UTF-8 encoded.

Perhaps I'll one day learn the inner workings of org-mode sufficiently to do
this myself, but if there is someone who meanwhile wants to pick up the
idea, you're welcome!

Regards,
Dov

On Mon, Dec 6, 2010 at 09:05, Nathan Neff  wrote:

> Much easier to read, and I love the nesting/indenting of
> sub-headings.
>
> http://nateneff.com/   - Need to understand 
> org-mode-clockreport-rules.html
>
> --Nate
>
> ___
> 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] Shared subtrees?

2010-12-06 Thread Samium Gromoff
Good day folks,

Did anybody ever have a desire to have Org operate not just on a tree,
but on a partial order, effectively allowing shared subtrees?

Since we cannot use plain text to directly represent partial orders in
general, we would have to store each shared subnode multiple times,
in each place it is referenced, and to maintain the equivalence
across the set of these "treeification points" of the partial order.

-- 
regards,
  Samium Gromoff
--
"Actually I made up the term 'object-oriented', and I can tell you I
did not have C++ in mind." - Alan Kay (OOPSLA 1997 Keynote)

___
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, Python and UTF-8

2010-12-06 Thread Dan Davison
"Eric Schulte"  writes:

> Vincent Beffara  writes:
>
>> Hi,
>>
 (and it would be excellent to allow for a code block as a preamble,
 instead of a string in the header or as an alternative, because
 preambles once they are allowed tend to grow uncontrollably ;->)
>>>
>>> This is currently possible using the `sbe' function.  Arbitrary emacs
>>> lisp can be placed inside of header arguments, and the `sbe' take the
>>> name of a code block and returns its result.

This makes me think of another good use of the sbe ("src block eval")
function. I'm often seeing Org documents with a src block like this,

#+source: essential-document-config
#+begin_src emacs-lisp
 ;; some essential document-specific configuration
#+end_src

and some instructions saying something like "To use this document, first
evaluate this code block".

This can be automated by using sbe in a local variables line at the end
of the Org file:

# Local variables:
# eval:(sbe "essential-document-config")
# End:

When the file is first opened, Emacs will evaluate the set-up blocks
(after asking for confirmation).

This isn't restricted to configuration of Emacs variables with
emacs-lisp blocks; eval lines could reference blocks in any language,
for example to start an ESS session and run some preparatory code, etc,
e.g.

#+source: document-config
#+begin_src emacs-lisp
(set (make-local-variable 'org-edit-src-content-indentation) 0)
#+end_src

#+source: start-ess
#+begin_src R :session *R session*
  a <- 1
#+end_src

# Local variables:
# eval:(sbe "document-config")
# eval:(sbe "start-ess")
# End:


Dan

>>
>> Very cool ! That does all I want, thanks for the info. For multi-line it
>> is a bit heavy to write, with lots of \n and preamble .= "lskjd", but I
>> can live with that. Unless there is a way already to write something
>> like this ?
>>
>> #+source: my-preamble
>> #+begin_src python :return preamble
>>   # -*- coding: utf-8 -*-"
>>   import os,sys,whatever
>> #+end_src
>>
>> #+begin_src python :preamble (org-babel-get-and-expand-source-code-body 
>> my-preamble) :return s
>>   s = "é"
>> #+end_src
>>
>> There is org-babel-get-src-block-info but it looks at the block around
>> (point), not by name ... so I guess it would not be too hard to write
>> the extraction method, but it might be somewhere in the code already.
>>
>
> Yes, the following uses an internal Babel function, but is probably much
> simpler
>
> #+results: my-preamble
> : # -*- coding: utf-8 -*-
> : import os,sys,whatever
>
> #+begin_src python :preamble (org-babel-ref-resolve "my-preamble") :return s
> s = ""
> #+end_src
>
> Note that as written this will return the following python error
>
> Traceback (most recent call last):
>   File "", line 2, in 
> ImportError: No module named whatever
>
>>
 One naive question : why is the code path different for tangling and
 evaluation ? One would think that a natural way for evaluation would be
 to tangle the current block (plus included noweb stuff etc) into a
 temporary file and eval that file ... and that would enable shebang for
 evaluation as well. There must be something I am missing here.
>>>
>>> Tangling works for *any* programming language, even those which have yet
>>> to be created and have no explicit Emacs or Org-mode support, this is
>>> because on tangling the code block is simply treated as text.
>>
>> As far as I understood from testing, tangling does adapt to the language
>> (at least to implement :var in a suitable way), so I was under the
>> impression that evaluating could be implemented as some kind of wrapping
>> around the tangled output - and obviously the wrapping would have to be
>> language-specific even if for the most part the tanglong is not.
>>
>
> Yes, some language specific features (e.g. variable expansion) can be
> used by the tangling mechanisms if such features are defined for the
> language in question, however tangling can be done in the absence of any
> language specific features and thus works for any arbitrary language.
>
> That shebang and preamble should remain separate for the other reasons
> mentioned in my previous email.
>
>>
>> I am just discovering all of this, sorry if I have horrible
>> misconceptions about the thing ...
>>
>
> No problem, it is a fairly (but I don't think overly) complex system.
>
>>
>> Regards,
>>
>> /v
>>
>>
>> ___
>> 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] specifying priority with template expansion

2010-12-06 Thread Carsten Dominik


On Dec 3, 2010, at 11:42 PM, David A. Thompson wrote:


On 12/03/2010 12:40 PM, Jeff Horn wrote:

Can you give us a better idea of the use case? As I understand,
unprioritzed todos count as "B" by default. Since most of my tasks
have a priority of B, I've never found setting priorities to be
helpful until I sit down to review my work for the day.

I prioritize items that are important (or urgent) with A at the
beginning of the day (no more than a couple, usually). Most items are
"B" and rarely more than half of those get done.

If I want to "sink" an item but keep it scheduled, it gets a  
priority of "C".


Most of my todos are neither associated with deadlines nor are they  
scheduled. Schedules and deadlines have seemed a more time-intensive  
way to go relative to setting priorities (but perhaps this is a  
'Green Eggs and Ham' thing?)



These are often things I do not know when recording an item.


I guess the main difference is that I generally am typically able to  
recognize, when recording a todo, whether it's in the 'urgent/asap'  
pile (A), the 'try-and-get-it-done-sometime-soon' pile (B), or in a  
'sure-would-be-nice-to-get-it-done' pile (C). Given that, it seemed  
both logical and more efficient to immediately prioritize the item  
rather than going back later and prioritizing the item.


You might want to consider to make separate templates with two-key  
access for these different priorities.  Then you could uce


C-c c t a   for priority A
C-c c t b   for priority B

etc.

Might be more efficient in your case then reading and responding to a  
prompt.


But my intuition would also be to just assume B (which is the same as  
giving NO priority at all), and changing it to A or C with S-up and S- 
down on the headline while editing the template.


HTH

- Carsten

___
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] Pass ahref in ATTR_HTML?

2010-12-06 Thread Eric S Fraga
Saptarshi Guha  writes:

> Hello,
>
> One more question, the following did work in 6.33, I upgraded to 7.3
> and now the a href is not parsed and
> the entire text appears
>
> #+CAPTION: Image obtained via FFound and Tumblr. Access it
> #+CAPTION:  href='http://community.livejournal.com/laceandflora/1781082.html?style=mine'>here
> #+ATTR_HTML: alt="windmill sans haircut" title="From tumblr" class="bordered"
> [[./img/out-1.jpg]]
>
>
> Something I've missed here?
>
> Regard
> Joy

This may not be the issue but shouldn't the quotes around the anchor
reference be double quotes (") and not single quotes (') according to
the HTML standard...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.211.g6388.dirty)

___
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] Including current time in agenda

2010-12-06 Thread Eric S Fraga
suvayu ali  writes:

> Hi,
>
> I have been attempting this for a few days now. I want to have an
> entry for the current time in today's agenda. That way I can keep
> track of how much time I have left until my next appointment.
>
> So far what ever I try, it shows up as an entry without a timestamp as
> shown below.
>
> Monday  6 December 2010 W49
>8:00.. 
>   10:00.. 
>   12:00.. 
>   14:00.. 
>   thoughts:   15:30-17:30 W' meeting
>   16:00.. 
>   18:00.. 
>   20:00.. 
>   thoughts:   Currrent time
>   thoughts:   TODO Hostel Room Change
>
>
> So far my attempts have been some variation of `<%%(format-time-string
> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
> wrong way? Is this not supported by the diary library?
>
> Thanks for any thoughts/suggestions.

If I understand things correctly, Emacs Diary expressions simply return
t or nil to indicate whether an entry should be displayed for the
particular date.  They do not return a string and, more to the point,
they do not take the time into account.  In Emacs Diary, the time has to
be part of the text outside the sexp.

However, it would be nice if the agenda view could highlight the current
time, much as it is possible to highlight the current day in a week
view, for instance... so this could be a good "feature request"!  I have
no idea how hard it would be to implement, mind you...

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.211.g6388.dirty)

___
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: Babel, Python and UTF-8

2010-12-06 Thread Eric S Fraga
Dan Davison  writes:
> This makes me think of another good use of the sbe ("src block eval")
> function. I'm often seeing Org documents with a src block like this,
>
> #+source: essential-document-config
> #+begin_src emacs-lisp
>  ;; some essential document-specific configuration
> #+end_src
>
> and some instructions saying something like "To use this document, first
> evaluate this code block".
>
> This can be automated by using sbe in a local variables line at the end
> of the Org file:
>
> # Local variables:
> # eval:(sbe "essential-document-config")
> # End:

This is *really* nice.  Thanks!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.211.g6388.dirty)

___
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] Including current time in agenda

2010-12-06 Thread suvayu ali
Hi Eric,

On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga  wrote:
> suvayu ali  writes:
>
>> Hi,
>>
>> I have been attempting this for a few days now. I want to have an
>> entry for the current time in today's agenda. That way I can keep
>> track of how much time I have left until my next appointment.
>>
>> So far what ever I try, it shows up as an entry without a timestamp as
>> shown below.
>>
>> Monday      6 December 2010 W49
>>                8:00.. 
>>               10:00.. 
>>               12:00.. 
>>               14:00.. 
>>   thoughts:   15:30-17:30 W' meeting
>>               16:00.. 
>>               18:00.. 
>>               20:00.. 
>>   thoughts:   Currrent time
>>   thoughts:   TODO Hostel Room Change
>>
>>
>> So far my attempts have been some variation of `<%%(format-time-string
>> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
>> wrong way? Is this not supported by the diary library?
>>
>> Thanks for any thoughts/suggestions.
>
> If I understand things correctly, Emacs Diary expressions simply return
> t or nil to indicate whether an entry should be displayed for the
> particular date.  They do not return a string and, more to the point,
> they do not take the time into account.  In Emacs Diary, the time has to
> be part of the text outside the sexp.
>

Thank you for clarifying that. I was incorrectly expecting it returns
a text. Should have checked more closely.

> However, it would be nice if the agenda view could highlight the current
> time, much as it is possible to highlight the current day in a week
> view, for instance... so this could be a good "feature request"!  I have
> no idea how hard it would be to implement, mind you...
>

Would you have any idea where I could look to get started with
implementing something like this?

> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
> : using Org-mode version 7.3 (release_7.3.211.g6388.dirty)
>

Thanks a lot for your response.

-- 
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


Re: [Orgmode] Including current time in agenda

2010-12-06 Thread Eric S Fraga
suvayu ali  writes:

> Hi Eric,
>
> On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga  wrote:

[...]

>> However, it would be nice if the agenda view could highlight the current
>> time, much as it is possible to highlight the current day in a week
>> view, for instance... so this could be a good "feature request"!  I have
>> no idea how hard it would be to implement, mind you...
>>
>
> Would you have any idea where I could look to get started with
> implementing something like this?

Sorry, not a clue.  All I can suggest is you look at org-agenda.el.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.211.g6388.dirty)

___
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] Including current time in agenda

2010-12-06 Thread suvayu ali
On Mon, Dec 6, 2010 at 1:08 PM, Eric S Fraga  wrote:
>> Would you have any idea where I could look to get started with
>> implementing something like this?
>
> Sorry, not a clue.  All I can suggest is you look at org-agenda.el.
>

Okay thanks. I'll see what I can find out, if I do succeed this would
be my first contribution. :)

-- 
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: Refile to a different Org file?

2010-12-06 Thread Matt Lundin
Hi Raymond,

"Raymond Zeitler"  writes:

> Thank you Sebastien.  (Sorry about the Americanized spelling of your name.)
>
> I added (setq org-refile-use-outline-path 'file) and switched to a maxlevel
> of 2.  Now I have a working solution.  That was one "point" to my post.
>
> Org-agenda-refile still doesn't find the categories within other files.  And
> now completion is broken for categories even within the main todo file.  But
> this a viable alternative because:

>>  BTW, I use unique category names across all files using this
>> structure:
>>
>> * Tasks
>> #+CATEGORY: DM_Tasks

Could you clarify what you mean by categories in this context? Are you
expecting to find individual headlines such as "Tasks," or are you
looking for the category name ("DM_TASKS") in the prompt? AFAIK, the
latter is not possible.

(As an aside, the method of adding categories above has been deprecated.
Using the :CATEGORY: property is a safer method.)

For reference, here are my org-refile settings:

--8<---cut here---start->8---
(setq org-refile-allow-creating-parent-nodes 'confirm)
(setq org-outline-path-complete-in-steps t)
(setq org-completion-use-ido nil)
(setq org-refile-use-outline-path 'file)

(setq org-refile-targets '((org-agenda-files :maxlevel . 2)
   (nil :maxlevel . 3)))
--8<---cut here---end--->8---

With these settings, org-refile allows completion of targets
sequentially: e.g., "file.org/" or "file.org/headling" or
"file.org/headling/subheading".

HTH,
Matt

___
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] Including current time in agenda

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 1:08 PM, Eric S Fraga wrote:


suvayu ali  writes:


Hi Eric,

On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga   
wrote:


[...]

However, it would be nice if the agenda view could highlight the  
current

time, much as it is possible to highlight the current day in a week
view, for instance... so this could be a good "feature request"!   
I have

no idea how hard it would be to implement, mind you...



Would you have any idea where I could look to get started with
implementing something like this?


Sorry, not a clue.  All I can suggest is you look at org-agenda.el.


Take a look at the function org-agenda-add-time-grid-maybe.

There is a loop over the gridtimes.  Just before the

   (while (setq time (pop gridtimes))

you could add something like

  (setq time (format-time-string "%H%M"))
  (push (org-format-agenda-item
 nil "--- now --- now --- now --- now --- now --- " "" nil
 (concat (substring time 0 -2) ":" (substring time -2)))
new)
  (put-text-property
   2 (length (car new)) 'face 'org-time-grid (car new))

You may still play with the string to be used (here "now --- now  
--- ..."),
you might want to add a different face, and the whole thing should be  
configurable

with some variable - plenty of work and testing left for you :)

- Carsten


___
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] Including current time in agenda

2010-12-06 Thread suvayu ali
On Mon, Dec 6, 2010 at 2:00 PM, Carsten Dominik
 wrote:
>
> On Dec 6, 2010, at 1:08 PM, Eric S Fraga wrote:
>
>> suvayu ali  writes:
>>
>>> Hi Eric,
>>>
>>> On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga  wrote:
>>
>> [...]
>>
 However, it would be nice if the agenda view could highlight the current
 time, much as it is possible to highlight the current day in a week
 view, for instance... so this could be a good "feature request"!  I have
 no idea how hard it would be to implement, mind you...

>>>
>>> Would you have any idea where I could look to get started with
>>> implementing something like this?
>>
>> Sorry, not a clue.  All I can suggest is you look at org-agenda.el.
>
> Take a look at the function org-agenda-add-time-grid-maybe.
>
> There is a loop over the gridtimes.  Just before the
>
>   (while (setq time (pop gridtimes))
>
> you could add something like
>
>          (setq time (format-time-string "%H%M"))
>          (push (org-format-agenda-item
>                 nil "--- now --- now --- now --- now --- now --- " "" nil
>                 (concat (substring time 0 -2) ":" (substring time -2)))
>                new)
>          (put-text-property
>           2 (length (car new)) 'face 'org-time-grid (car new))
>
> You may still play with the string to be used (here "now --- now --- ..."),
> you might want to add a different face, and the whole thing should be
> configurable
> with some variable - plenty of work and testing left for you :)
>

Thanks a lot Carsten! I'll post back to the list in case I succeed or
if I get stuck. :)

> - Carsten
>
>



-- 
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


Re: [Orgmode] Pass ahref in ATTR_HTML?

2010-12-06 Thread Christian Moe


Try this (sans line wrap):

#+CAPTION: Image obtained via FFound and Tumblr. Access it @href='http://community.livejournal.com/laceandflora/1781082.html?style=mine'>here@
#+ATTR_HTML: alt="windmill sans haircut" title="From tumblr" 
class="bordered"

[[./img/out-1.jpg]]

The secret's in the @'s.

Mind you, that's not passing a href in ATTR_HTML. Neither was your 
example.


cm


On 12/6/10 8:49 AM, Saptarshi Guha wrote:

Hello,

One more question, the following did work in 6.33, I upgraded to 7.3
and now the a href is not parsed and
the entire text appears

#+CAPTION: Image obtained via FFound and Tumblr. Access it
#+CAPTION:here
#+ATTR_HTML: alt="windmill sans haircut" title="From tumblr" class="bordered"
[[./img/out-1.jpg]]


Something I've missed here?

Regard
Joy

___
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: [Accepted] [Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-06 Thread Julien Danjou
On Fri, Dec 03 2010, Carsten Dominik wrote:

> Maintainer comment: I still fixed the commit message to contain your
> original explanation.

Sorry, I misunderstand you, and had no idea I was allowed to add more
text beside the Emacs-formatted-changelog-entry part. I'll know for
the next time! :)

-- 
Julien Danjou
// ᐰhttp://julien.danjou.info


pgpEwFDkgqcjl.pgp
Description: 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] Including current time in agenda

2010-12-06 Thread Julien Danjou
On Mon, Dec 06 2010, suvayu ali wrote:
> So far my attempts have been some variation of `<%%(format-time-string
> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
> wrong way? Is this not supported by the diary library?
>
> Thanks for any thoughts/suggestions.

(defun jd:org-current-time ()
  "Return current-time if date is today."
  (when (equal date (calendar-current-date))
(format-time-string "%H:%M Current time" (current-time

And use %%(jd:org-current-time) in an entry.

I think this is what you want?

-- 
Julien Danjou
// ᐰhttp://julien.danjou.info


pgp8rhLcxz8JN.pgp
Description: 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] Including current time in agenda

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 2:38 PM, Julien Danjou wrote:


On Mon, Dec 06 2010, suvayu ali wrote:
So far my attempts have been some variation of `<%%(format-time- 
string

"%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
wrong way? Is this not supported by the diary library?

Thanks for any thoughts/suggestions.


(defun jd:org-current-time ()
 "Return current-time if date is today."
 (when (equal date (calendar-current-date))
   (format-time-string "%H:%M Current time" (current-time

And use %%(jd:org-current-time) in an entry.


Wow, I overlooked this possibility.  Great.

- Carsten



I think this is what you want?

--
Julien Danjou
// ᐰhttp://julien.danjou.info
___
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


- Carsten




___
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: Questions about org-capture templates and usage

2010-12-06 Thread Bernt Hansen
"Alan E. Davis"  writes:

> |
> | (org-capture &optional GOTO KEYS)
> |
>
> I THINK I understand that GOTO here refers to the prefix C-u ?  And C-u C-u 
> circumvents this?

GOTO is the value of the prefix.  C-u has a value of 4

For C-u C-M-r   GOTO is set to 4 (due to the single prefix)
For C-u C-u C-M-r   GOTO is set to 16 (due to the double prefix)

The code for org-capture looks for specific prefix values and changes
the behaviour of the function accordingly.

,[ code from org-capture ]
|((equal goto '(4)) (org-capture-goto-target))
|((equal goto '(16)) (org-capture-goto-last-stored))
`

-Bernt

___
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] correct doc typos

2010-12-06 Thread Carsten Dominik


On Nov 25, 2010, at 6:46 PM, Brian Gough wrote:


Hi

Here is a patch for some proofreading corrections for the Org manual.
This is just an sample to check if it is in suitable format.  We have
a lot more corrections to come.

Because there are more than 20 lines affected I'm assuming we will
need to do copyright assignments.  If not I can send all the patches
now.  Alternatively would you prefer us to wait until the assignment
is done?

I haven't included a changelog entry since these are just for typos
etc and don't make any major changes to the meaning of the text.

Credit to my colleague Barry Gidden for the proofreading, he did the
real work on this.



Hi Brain,

thanks for the corrections - after applying them, the acknowledgement
section now carries credits to Barry for proofreading and to you
for turning this into a book (a bit premature - but hopefully not for  
long!)


- Carsten



--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/


From 03619e889bf061607785f092481dbfe36bcee9be Mon Sep 17 00:00:00 2001
From: Brian Gough 
Date: Thu, 25 Nov 2010 17:02:38 +
Subject: [PATCH] correct doc typos

---
doc/org.texi |   90 +++ 
+-

1 files changed, 44 insertions(+), 46 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index f391e84..a0b1b0b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -1482,7 +1482,7 @@ as bullets.
@emph{Ordered} list items start with a numeral followed by either a  
period or
a right parenthe...@footnote{you can filter out any of them by  
configuring

@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or
-...@samp{1)}.  If you want a list to start a different value (e.g.  
20), start
+...@samp{1)}.  If you want a list to start with a different value  
(e.g. 20), start
the text of the item with @code{[@@2...@footnote{if there's a  
checkbox in the
item, the cookie must be put @emph{before} the checkbox.}.  Those  
constructs

can be used in any item of the list in order to enforce a particular
@@ -1537,7 +1537,7 @@ XEmacs, you should use Kyle E. Jones'  
@file{filladapt.el}.  To turn this on,
put into @file{.emacs}: @code{(require 'filladapt)}}, and by  
exporting them

properly (@pxref{Exporting}).  Since indentation is what governs the
structure of these lists, many structural constructs like @code{# 
+BEGIN_...}
-blocks can be indented to signal that they should be considered of  
a list
+blocks can be indented to signal that they should be considered as  
a list

item.

@vindex org-list-demote-modify-bullet
@@ -1548,7 +1548,7 @@ the current list-level) improves readability,  
customize the variable

@vindex org-list-automatic-rules
The following commands act on items when the cursor is in the first  
line of

an item (the line with the bullet or number).  Some of them imply the
-application of automatic rules to keep list structure in tact.  If  
some of
+application of automatic rules to keep list structure intact.  If  
some of
these actions get in your way, configure @code{org-list-automatic- 
rules}

to disable them individually.

@@ -1569,7 +1569,7 @@ heading (@pxref{Structure editing}).  If this  
command is used in the middle
of a line, the line is @emph{split} and the rest of the line becomes  
the new
i...@footnote{if you do not want the line to be split, customize the  
variable
@code{org-M-RET-may-split-line}.}.  If this command is executed  
@emph{before
-item's body}, the new item is created @emph{before} the current  
item.  If the
+an item's body}, the new item is created @emph{before} the current  
item.  If the
command is executed in the white space before the text that is part  
of an
item but does not contain the bullet, a bullet is added to the  
current line.


@@ -1581,7 +1581,7 @@ the structure, or return an error.
Insert a new item with a checkbox (@pxref{Checkboxes}).
@orgc...@key{tab},org-cycle}
In a new item with no text yet, the first @key{TAB} demotes the item  
to
-become a child of the previous one.  Subsequents @key{TAB} move the  
item to
+become a child of the previous one.  Subsequent @key{TAB}s move the  
item to
meaningful levels in the list and eventually get it back to its  
initial

position.
@kindex s...@key{down}
@@ -1687,8 +1687,7 @@ press @key{TAB} there.  Org-mode uses the  
@code{PROPERTIES} drawer for
storing properties (@pxref{Properties and Columns}), and you can  
also arrange
for state change notes (@pxref{Tracking TODO state changes}) and  
clock times
(@pxref{Clocking work time}) to be stored in a drawer  
@code{LOGBOOK}.  If you
-want to store a quick note in the LOGBOOK drawer, in a similar way  
as this is

-done by state changes, use
+want to store a quick note in the LOGBOOK drawer, in a similar way  
to state changes, use


@table @kbd
@kindex C-c C-z
@@ -1843,7 +1842,7 @@ When this mode is active and the cursor is on  
a line that looks to Org like a
headline or the first line of a list i

[Orgmode] [Babel] Better messages for code block execution

2010-12-06 Thread Sébastien Vauban
Hi,

Here are a couple of better (IMHO) messages for what occurs during source
block execution:

diff --git a/lisp/ob.el b/lisp/ob.el
index dd285db..05bb320 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1504,9 +1504,9 @@ code  the results are extracted in the syntax of the source
 	  (indent-rigidly beg end indent
 (if (= (length result) 0)
 	(if (member "value" result-params)
-	(message "No result returned by source block")
-	  (message "Source block produced no output"))
-  (message "finished"
+	(message "Source block returned no value.")
+	  (message "Source block produced no output."))
+  (message "Inserted results of source block execution."
 
 (defun org-babel-remove-result (&optional info)
   "Remove the result of the current source block."

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] Including current time in agenda

2010-12-06 Thread Suvayu Ali

Hi Julien,

On 06/12/10 03:03 PM, Carsten Dominik wrote:

On Dec 6, 2010, at 2:38 PM, Julien Danjou wrote:


On Mon, Dec 06 2010, suvayu ali wrote:

So far my attempts have been some variation of `<%%(format-time-string
"%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
wrong way? Is this not supported by the diary library?

Thanks for any thoughts/suggestions.


(defun jd:org-current-time ()
 "Return current-time if date is today."
 (when (equal date (calendar-current-date))
   (format-time-string "%H:%M Current time" (current-time

And use %%(jd:org-current-time) in an entry.


Wow, I overlooked this possibility.  Great.


That is exactly the information I want to have, but this only inserts an
entry in today's agenda without any timestamps.

I think the problem, as Eric explained earlier, is that the diary sexp
method only expects t or nil. So the string your function returns is
treated as true and a corresponding entry is inserted in the agenda
buffer for today. I think I would still need to insert the current time
in the time-grid as Carsten suggested earlier.

A weakly related question, how does one check/debug diary sexps?
Evaluating in the scratch buffer always gives me a "void variable date"
error. Replacing `date' with `(calendar-current-date)' however works
fine in the scratch buffer.

Thanks for all the suggestions. :)

--
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


Re: [Orgmode] Re: Questions about org-capture templates and usage

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 9:20 AM, Carsten Dominik wrote:



On Dec 6, 2010, at 6:02 AM, Alan E. Davis wrote:

I am at much greater ease due to these two messages.  They solve  
several of my befuddlements about capture.


On Mon, Dec 6, 2010 at 1:59 PM, Bernt Hansen  wrote:
I visit newly captured items all the time.  If you capture  
something (I
have C-M-r bound to org-capture) and store it with C-c C-c you can  
visit

it immediately with a double prefix  C-u C-u C-M-r as stated in the
org-capture docstring:

This is exactly what I was looking for in the manual.


Wow, I cannot believe I forgot to put these into the manual!  Crazy.
They are in not (git version).


Sigh, one of my many standard typos:  They are in NOW.

- Carsten





In fact, I think my comment about the manual was partly a response  
to being unable to find this item in the   manual, when I know I  
had seen reference to it somewhere.  Maybe in my request for items  
to be included in the manual, the docstrings in org-capture.el  
would be scanned.  I missed this on my cursory search of that  
file.  I will search for it myself, and work on (believe it or not)  
org-help.org, that I use as a helpmate.


I have org-capture assigned to C-c, so C-u C-u C-c c goes straight  
to the last stored item.  Perfect.


|
| (org-capture &optional GOTO KEYS)
|
I THINK I understand that GOTO here refers to the prefix C-u ?  And  
C-u C-u circumvents this?


| When called interactively with a C-u prefix argument GOTO, don't  
capture

| anything, just go to the file/headline where the selected template
| stores its notes.  With a double prefix argument C-u C-u, go to  
the last note

^^

| stored.
^^

This is it! What I was looking for.

I think, thought it may seem crazy, I would like to still have a  
way to specify in the template that one would remain with the newly  
captured item in its environment, after finalizing.   Just the  
same, thinking about that it's an indirect buffer, it makes more  
sense how it works now...


You can just widen during capture if you wish: C-x n w will show you  
the entire buffer.

You still need to finalize at some point with C-c C-c though.



Awe, heck, these two methods solve my problem well enough...

|
| When called with a `C-0' (zero) prefix, insert a template at point.
|

This is a great feature...

| Lisp programs can set KEYS to a string associated with a template  
in
| `org-capture-templates'.  In this case, interactive selection  
will be

| bypassed.
`

This is something I'd like to see an example of.


(defun my-capture-k ()
 (interactive)
 (org-capture nil "k"))

will directly get you into capture template k.

- Carsten



- Carsten




___
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] Including current time in agenda

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 3:30 PM, Suvayu Ali wrote:


Hi Julien,

On 06/12/10 03:03 PM, Carsten Dominik wrote:

On Dec 6, 2010, at 2:38 PM, Julien Danjou wrote:


On Mon, Dec 06 2010, suvayu ali wrote:
So far my attempts have been some variation of `<%%(format-time- 
string
"%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this  
the

wrong way? Is this not supported by the diary library?

Thanks for any thoughts/suggestions.


(defun jd:org-current-time ()
"Return current-time if date is today."
(when (equal date (calendar-current-date))
  (format-time-string "%H:%M Current time" (current-time

And use %%(jd:org-current-time) in an entry.


Wow, I overlooked this possibility.  Great.


That is exactly the information I want to have, but this only  
inserts an

entry in today's agenda without any timestamps.


This does actually fully work for me, so something in your setup must
cause a problem.  Have you changed the configuration for the time grid?

- Carsten



I think the problem, as Eric explained earlier, is that the diary sexp
method only expects t or nil. So the string your function returns is
treated as true and a corresponding entry is inserted in the agenda
buffer for today. I think I would still need to insert the current  
time

in the time-grid as Carsten suggested earlier.

A weakly related question, how does one check/debug diary sexps?
Evaluating in the scratch buffer always gives me a "void variable  
date"

error. Replacing `date' with `(calendar-current-date)' however works
fine in the scratch buffer.

Thanks for all the suggestions. :)

--
Suvayu

Open source is the future. It sets us free.


- Carsten




___
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] Orgmode and Unicode characters

2010-12-06 Thread Darlan Cavalcante Moreira

If changing the actual character in the file is be the best option (maybe
it could cause problems for the exporters), then an approach similar to
org-pretty-entities could be used for this.

--
Darlan

At Mon, 6 Dec 2010 11:19:55 +0200,
Dov Grobgeld  wrote:
> 
> Even though this announcement looks very cool, this again reminded me of
> something I've been thinking off when using orgmode. And that is the use of
> unicode characters. With the latest versions of emacs that support unicode
> and with rich fonts such as DejaVu Monospace, it is as easy to use unicode
> characters as ascii. What I was thinking of is that the current ascii
> graphics of e.g. tables could automatically be switched to box drawing
> characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
> pressing C-c or Tab. Other characters that could be used are automatic
> replacement of leading asterisks to various bullets. Each indentation level
> could be given a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure that
> arrows and various brackets may also be useful for various contexts.
> 
> Of course the use of these characters would be configurable and would be
> turned off automatically for buffers that are not UTF-8 encoded.
> 
> Perhaps I'll one day learn the inner workings of org-mode sufficiently to do
> this myself, but if there is someone who meanwhile wants to pick up the
> idea, you're welcome!
> 
> Regards,
> Dov
> 
> On Mon, Dec 6, 2010 at 09:05, Nathan Neff  wrote:
> 
> > Much easier to read, and I love the nesting/indenting of
> > sub-headings.
> >
> > http://nateneff.com/   - Need to understand 
> > org-mode-clockreport-rules.html
> >
> > --Nate
> >
> > ___
> > 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] [Babel] Better messages for code block execution

2010-12-06 Thread Sébastien Vauban
Hi,

Here are a couple of better (IMHO) messages for what occurs during source
block execution:

diff --git a/lisp/ob.el b/lisp/ob.el
index dd285db..05bb320 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1504,9 +1504,9 @@ code  the results are extracted in the syntax of the source
 	  (indent-rigidly beg end indent
 (if (= (length result) 0)
 	(if (member "value" result-params)
-	(message "No result returned by source block")
-	  (message "Source block produced no output"))
-  (message "finished"
+	(message "Source block returned no value.")
+	  (message "Source block produced no output."))
+  (message "Inserted results of source block execution."
 
 (defun org-babel-remove-result (&optional info)
   "Remove the result of the current source block."

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] Including current time in agenda

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 3:53 PM, Suvayu Ali wrote:


Hi Carsten,

On 06/12/10 03:45 PM, Carsten Dominik wrote:

This does actually fully work for me, so something in your setup must
cause a problem.  Have you changed the configuration for the time  
grid?




No I haven't changed anything yet.

In my agenda file I have an entry like this,

* Currrent time
 <%%(jd:org-current-time)>


This is not correct.

Use this instead, in any of your agenda files:

* Currrent time
  :PROPERTIES:
  :CATEGORY: NOW
  :END:

%%(jd:org-current-time)

HTH

- Carsten





After I start Emacs I evaluate Julien's function in the scratch  
buffer,
then I call `org-agenda' with `C-c a a'. This gives me an agenda  
buffer

with the following entries.

Monday  6 December 2010 W49
  8:00.. 
 10:00.. 
 12:00.. 
 14:00.. 
 thoughts:   15:30-17:30 W' meeting
 16:00.. 
 18:00.. 
 20:00.. 
 thoughts:   Currrent time
 thoughts:   TODO Hostel Room Change


- Carsten



--
Suvayu

Open source is the future. It sets us free.


- Carsten




___
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] Including current time in agenda

2010-12-06 Thread Suvayu Ali

Hi Carsten,

On 06/12/10 03:45 PM, Carsten Dominik wrote:

This does actually fully work for me, so something in your setup must
cause a problem.  Have you changed the configuration for the time grid?



No I haven't changed anything yet.

In my agenda file I have an entry like this,

* Currrent time
  <%%(jd:org-current-time)>

After I start Emacs I evaluate Julien's function in the scratch buffer,
then I call `org-agenda' with `C-c a a'. This gives me an agenda buffer
with the following entries.

Monday  6 December 2010 W49
   8:00.. 
  10:00.. 
  12:00.. 
  14:00.. 
  thoughts:   15:30-17:30 W' meeting
  16:00.. 
  18:00.. 
  20:00.. 
  thoughts:   Currrent time
  thoughts:   TODO Hostel Room Change


- Carsten



--
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: Including current time in agenda

2010-12-06 Thread Rémi Vanicat
Suvayu Ali  writes:

>>>
>>> (defun jd:org-current-time ()
>>>  "Return current-time if date is today."
>>>  (when (equal date (calendar-current-date))
>>>(format-time-string "%H:%M Current time" (current-time
>>>
>>> And use %%(jd:org-current-time) in an entry.
>>
>> Wow, I overlooked this possibility.  Great.
>
> That is exactly the information I want to have, but this only inserts an
> entry in today's agenda without any timestamps.

you need to put the %%(jd:org-current-time) at the beginning of line,
with no space before it whatsoever.
-- 
Rémi Vanicat


___
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: Questions about org-capture templates and usage

2010-12-06 Thread Nick Dokos
Alan E. Davis  wrote:

> 
> I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the 
> last stored item.  Perfect.  

I presume the first `C-c' above is a typo and that the bindind is `C-c
c', as the second instance indicates. Rebinding C-c to a command would
be a disaster, but even C-c c is generally not a good idea: see the Key
Binding Conventions in the Emacs Lisp manual - if you have the manual
locally, evaluate the following

(info "(elisp)Key Binding Conventions")

otherwise it's available online at


http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions

Nick


___
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] Including current time in agenda

2010-12-06 Thread Julien Danjou
On Mon, Dec 06 2010, Suvayu Ali wrote:

> That is exactly the information I want to have, but this only inserts an
> entry in today's agenda without any timestamps.

You are wrong. It does insert an entry with a timestamp.

-- 
Julien Danjou
// ᐰhttp://julien.danjou.info


pgp2KUXy5wZWB.pgp
Description: 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] [Babel] Better messages for code block execution

2010-12-06 Thread Eric Schulte
Hi Seb,

Thanks for the suggestion, I've just applied a slight alteration of
these improved messages.

#+begin_src diff
  diff --git a/lisp/ob.el b/lisp/ob.el
  index dd285db..fe392d9 100644
  --- a/lisp/ob.el
  +++ b/lisp/ob.el
  @@ -1504,9 +1504,9 @@ code  the results are extracted in the syntax of 
the source
(indent-rigidly beg end indent
   (if (= (length result) 0)
  (if (member "value" result-params)
  - (message "No result returned by source block")
  -   (message "Source block produced no output"))
  -  (message "finished"
  + (message "Code block returned no value.")
  +   (message "Code block produced no output."))
  +  (message "Code block evaluation complete."

   (defun org-babel-remove-result (&optional info)
 "Remove the result of the current source block."
#+end_src

Best -- Eric

Sébastien Vauban  writes:

> Hi,
>
> Here are a couple of better (IMHO) messages for what occurs during source
> block execution:
>
> diff --git a/lisp/ob.el b/lisp/ob.el
> index dd285db..05bb320 100644
> --- a/lisp/ob.el
> +++ b/lisp/ob.el
> @@ -1504,9 +1504,9 @@ code  the results are extracted in the syntax of 
> the source
> (indent-rigidly beg end indent
>  (if (= (length result) 0)
>   (if (member "value" result-params)
> - (message "No result returned by source block")
> -   (message "Source block produced no output"))
> -  (message "finished"
> + (message "Source block returned no value.")
> +   (message "Source block produced no output."))
> +  (message "Inserted results of source block execution."
>  
>  (defun org-babel-remove-result (&optional info)
>"Remove the result of the current source block."
>
> Best regards,
>   Seb

___
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] Orgmode and Unicode characters

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 10:19 AM, Dov Grobgeld wrote:


Even though this announcement looks very cool,


What does "this announcement" refer to, Dov?

- Carsten

this again reminded me of something I've been thinking off when  
using orgmode. And that is the use of unicode characters. With the  
latest versions of emacs that support unicode and with rich fonts  
such as DejaVu Monospace, it is as easy to use unicode characters as  
ascii. What I was thinking of is that the current ascii graphics of  
e.g. tables could automatically be switched to box drawing  
characters (http://en.wikipedia.org/wiki/Box-drawing_characters)  
when pressing C-c or Tab. Other characters that could be used are  
automatic replacement of leading asterisks to various bullets. Each  
indentation level could be given a different bullets. E.g. "*"==▸,  
"**"==●, etc. I'm sure that arrows and various brackets may also be  
useful for various contexts.


Of course the use of these characters would be configurable and  
would be turned off automatically for buffers that are not UTF-8  
encoded.


Perhaps I'll one day learn the inner workings of org-mode  
sufficiently to do this myself, but if there is someone who  
meanwhile wants to pick up the idea, you're welcome!


Regards,
Dov

On Mon, Dec 6, 2010 at 09:05, Nathan Neff   
wrote:

Much easier to read, and I love the nesting/indenting of
sub-headings.

http://nateneff.com/   - Need to understand org-mode-clockreport- 
rules.html


--Nate

___
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


- Carsten




___
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] Orgmode and Unicode characters

2010-12-06 Thread Eric Schulte
My only worry on this front is that I know how to type "|" and "-" for
tables, and how to type "*" for headings, but I don't have an easy way
to type utf8 characters.

If Org-mode starts using exotic utf8 characters which can not easily be
typed from outside of Org-mode then it loses some of the "it's all plain
text" appeal.

I agree with Darlan that something using Emacs display functionality
(like used by org-pretty-entities) could be preferable because it would
preserve the underlying text.

Best -- Eric

Darlan Cavalcante Moreira  writes:

> If changing the actual character in the file is be the best option (maybe
> it could cause problems for the exporters), then an approach similar to
> org-pretty-entities could be used for this.
>
> --
> Darlan
>
> At Mon, 6 Dec 2010 11:19:55 +0200,
> Dov Grobgeld  wrote:
>> 
>> Even though this announcement looks very cool, this again reminded me of
>> something I've been thinking off when using orgmode. And that is the use of
>> unicode characters. With the latest versions of emacs that support unicode
>> and with rich fonts such as DejaVu Monospace, it is as easy to use unicode
>> characters as ascii. What I was thinking of is that the current ascii
>> graphics of e.g. tables could automatically be switched to box drawing
>> characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
>> pressing C-c or Tab. Other characters that could be used are automatic
>> replacement of leading asterisks to various bullets. Each indentation level
>> could be given a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure that
>> arrows and various brackets may also be useful for various contexts.
>> 
>> Of course the use of these characters would be configurable and would be
>> turned off automatically for buffers that are not UTF-8 encoded.
>> 
>> Perhaps I'll one day learn the inner workings of org-mode sufficiently to do
>> this myself, but if there is someone who meanwhile wants to pick up the
>> idea, you're welcome!
>> 
>> Regards,
>> Dov
>> 
>> On Mon, Dec 6, 2010 at 09:05, Nathan Neff  wrote:
>> 
>> > Much easier to read, and I love the nesting/indenting of
>> > sub-headings.
>> >
>> > http://nateneff.com/   - Need to understand 
>> > org-mode-clockreport-rules.html
>> >
>> > --Nate
>> >
>> > ___
>> > 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] Re: Including current time in agenda

2010-12-06 Thread suvayu ali
Hi Rémi and Carsten,

On Mon, Dec 6, 2010 at 3:59 PM, Rémi Vanicat  wrote:
> Suvayu Ali  writes:
>

 (defun jd:org-current-time ()
  "Return current-time if date is today."
  (when (equal date (calendar-current-date))
    (format-time-string "%H:%M Current time" (current-time

 And use %%(jd:org-current-time) in an entry.
>>>
>>> Wow, I overlooked this possibility.  Great.
>>
>> That is exactly the information I want to have, but this only inserts an
>> entry in today's agenda without any timestamps.
>
> you need to put the %%(jd:org-current-time) at the beginning of line,
> with no space before it whatsoever.

Thank you all, everything works as expected now. :)

> --
> Rémi Vanicat
>

-- 
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


Re: [Orgmode] Including current time in agenda

2010-12-06 Thread Suvayu Ali

Hi Julien,

On 06/12/10 04:13 PM, Julien Danjou wrote:

On Mon, Dec 06 2010, Suvayu Ali wrote:


That is exactly the information I want to have, but this only inserts an
entry in today's agenda without any timestamps.


You are wrong. It does insert an entry with a timestamp.



Sorry for the confusion, I was using it incorrectly. Carsten and Rémi 
corrected my mistake.


--
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: Including current time in agenda

2010-12-06 Thread Matt Lundin
Julien Danjou  writes:

> On Mon, Dec 06 2010, suvayu ali wrote:
>> So far my attempts have been some variation of `<%%(format-time-string
>> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
>> wrong way? Is this not supported by the diary library?
>>
>> Thanks for any thoughts/suggestions.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
> (format-time-string "%H:%M Current time" (current-time
>
> And use %%(jd:org-current-time) in an entry.
>

This is great! I've been grateful for all the creative uses people have
found for diary expressions recently (weather, current time, etc.).

Best,
Matt

___
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] [PATCH] org-agenda: rewrite mode-line

2010-12-06 Thread Julien Danjou
* org-agenda.el (org-agenda-filter-apply)
(org-agenda-filter-by-tag-show-all) (org-agenda-change-time-span)
(org-remove-subtree-entries-from-agenda) (org-agenda-entry-text-mode,
org-agenda-clockreport-mode) (org-agenda-toggle-diary,
org-agenda-archives-mode) (org-agenda-toggle-deadlines,
org-agenda-toggle-time-grid): Stop calling org-agenda-set-mode-name.
(org-agenda-set-mode-name): Rewrite mode-name value using dynamic
evaluation with :eval and other advanced format.

Signed-off-by: Julien Danjou 
---
 lisp/org-agenda.el |   66 ---
 1 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 20c901a..7624348 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5936,7 +5936,6 @@ If the line does not have an effort defined, return nil."
   (let (tags)
 (setq org-agenda-filter filter
  org-agenda-filter-form (org-agenda-filter-make-matcher))
-(org-agenda-set-mode-name)
 (save-excursion
   (goto-char (point-min))
   (while (not (eobp))
@@ -5973,8 +5972,7 @@ If the line does not have an effort defined, return nil."
   (mapc 'delete-overlay org-agenda-filter-overlays)
   (setq org-agenda-filter-overlays nil)
   (setq org-agenda-filter nil)
-  (setq org-agenda-filter-form nil)
-  (org-agenda-set-mode-name))
+  (setq org-agenda-filter-form nil))
 
 (defun org-agenda-manipulate-query-add ()
   "Manipulate the query by adding a search term with positive selection.
@@ -6164,7 +6162,6 @@ SPAN may be `day', `week', `month', `year'."
  (list (car org-agenda-last-arguments) sd span t)))
 (org-agenda-redo)
 (org-agenda-find-same-or-today-or-agenda))
-  (org-agenda-set-mode-name)
   (message "Switched to %s view" span))
 
 (defun org-agenda-compute-starting-span (sd span &optional n)
@@ -6258,7 +6255,6 @@ so that the date SD will be in that range."
   "Toggle follow mode in an agenda buffer."
   (interactive)
   (setq org-agenda-follow-mode (not org-agenda-follow-mode))
-  (org-agenda-set-mode-name)
   (if (and org-agenda-follow-mode (org-get-at-bol 'org-marker))
   (org-agenda-show))
   (message "Follow mode is %s"
@@ -6274,7 +6270,6 @@ so that the date SD will be in that range."
(let ((org-agenda-entry-text-maxlines
  (if (integerp arg) arg org-agenda-entry-text-maxlines)))
 (org-agenda-entry-text-show)))
-  (org-agenda-set-mode-name)
   (message "Entry text mode is %s.  Maximum number of lines is %d"
   (if org-agenda-entry-text-mode "on" "off")
   (if (integerp arg) arg org-agenda-entry-text-maxlines)))
@@ -6288,7 +6283,6 @@ agenda filter."
   (if with-filter
   (setq org-agenda-clockreport-mode 'with-filter)
 (setq org-agenda-clockreport-mode (not org-agenda-clockreport-mode)))
-  (org-agenda-set-mode-name)
   (org-agenda-redo)
   (message "Clocktable mode is %s"
   (if org-agenda-clockreport-mode "on" "off")))
@@ -6305,7 +6299,6 @@ With a double `C-u' prefix arg, show *only* log items, 
nothing else."
'only
  (if special '(closed clock state)
(not org-agenda-show-log
-  (org-agenda-set-mode-name)
   (org-agenda-redo)
   (message "Log mode is %s"
   (if org-agenda-show-log "on" "off")))
@@ -6316,7 +6309,6 @@ When called with a prefix argument, include all archive 
files as well."
   (interactive "P")
   (setq org-agenda-archives-mode
(if with-files t (if org-agenda-archives-mode nil 'trees)))
-  (org-agenda-set-mode-name)
   (org-agenda-redo)
   (message
"%s"
@@ -6335,7 +6327,6 @@ When called with a prefix argument, include all archive 
files as well."
   (org-agenda-check-type t 'agenda)
   (setq org-agenda-include-diary (not org-agenda-include-diary))
   (org-agenda-redo)
-  (org-agenda-set-mode-name)
   (message "Diary inclusion turned %s"
   (if org-agenda-include-diary "on" "off")))
 
@@ -6345,7 +6336,6 @@ When called with a prefix argument, include all archive 
files as well."
   (org-agenda-check-type t 'agenda)
   (setq org-agenda-include-deadlines (not org-agenda-include-deadlines))
   (org-agenda-redo)
-  (org-agenda-set-mode-name)
   (message "Deadlines inclusion turned %s"
   (if org-agenda-include-deadlines "on" "off")))
 
@@ -6355,7 +6345,6 @@ When called with a prefix argument, include all archive 
files as well."
   (org-agenda-check-type t 'agenda)
   (setq org-agenda-use-time-grid (not org-agenda-use-time-grid))
   (org-agenda-redo)
-  (org-agenda-set-mode-name)
   (message "Time-grid turned %s"
   (if org-agenda-use-time-grid "on" "off")))
 
@@ -6363,36 +6352,33 @@ When called with a prefix argument, include all archive 
files as well."
   "Set the mode name to indicate all the small mode settings."
   (setq mode-name
(list "Org-Agenda"
- (if (get 'org-agenda-files 'org-restrict) " []" "")
+ '(:eval (when (get 'org-agenda-files 'org-restrict) " []"))
  " "
 

[Orgmode] Re: Refile to a different Org file?

2010-12-06 Thread Raymond Zeitler
Matt Lundin [mailto:m...@imapmail.org] wrote:

>"Raymond Zeitler"  writes:
>> Org-agenda-refile still doesn't find the categories within other files.
And
>> now completion is broken for categories even within the main todo file.
But
>> this a viable alternative because:
>
>>>  BTW, I use unique category names across all files using this
>>> structure:
>>>
>>> * Tasks
>>> #+CATEGORY: DM_Tasks
>
> Could you clarify what you mean by categories in this context? Are you
> expecting to find individual headlines such as "Tasks," or are you
> looking for the category name ("DM_TASKS") in the prompt? AFAIK, the
> latter is not possible.

Hi Matt:

I expected completion to work on Category names, in this case
DM_Tasks.  It worked like that when I had only the single todo.org
file, when my org-refile-targets was nil.  It finds headlines (such as
Tasks) just fine.

> (As an aside, the method of adding categories above has been deprecated.
> Using the :CATEGORY: property is a safer method.)

Thanks for letting me know.  As I wrote earlier, I'm happy with the
solution.
I will clean up my org files to match current convention.

- Ray

--
Raymond Zeitler 


___
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: Babel, Python and UTF-8

2010-12-06 Thread Thomas S. Dye

Hi Dan,

Emacs configuration is one of the highest barriers to entry for  
potential adopters of Org-mode, IMO.  The idea of context-sensitive  
configuration is potentially terrific.  It gets the user to work more  
quickly than would otherwise be the case.  The problem I've run into  
is that exiting a buffer doesn't change the configuration back to some  
initial, or base, state.  I'm on to the next task but still configured  
to do the last thing.


I'm not a software engineer, so this idea might be wacky, but it seems  
to me that some code to restore the user's start-up settings would be  
a useful, standard part of an Org-mode file, something like the export  
template that many (most?) org-mode files use.   I think it would be  
handy to be able to stick something simple in my Org-mode file so that  
I was confident I knew exactly how Emacs was configured while I was  
using that file.


Tom

On Dec 5, 2010, at 11:42 PM, Dan Davison wrote:


"Eric Schulte"  writes:


Vincent Beffara  writes:


Hi,

(and it would be excellent to allow for a code block as a  
preamble,

instead of a string in the header or as an alternative, because
preambles once they are allowed tend to grow uncontrollably ;->)


This is currently possible using the `sbe' function.  Arbitrary  
emacs
lisp can be placed inside of header arguments, and the `sbe' take  
the

name of a code block and returns its result.


This makes me think of another good use of the sbe ("src block eval")
function. I'm often seeing Org documents with a src block like this,

#+source: essential-document-config
#+begin_src emacs-lisp
;; some essential document-specific configuration
#+end_src

and some instructions saying something like "To use this document,  
first

evaluate this code block".

This can be automated by using sbe in a local variables line at the  
end

of the Org file:

# Local variables:
# eval:(sbe "essential-document-config")
# End:

When the file is first opened, Emacs will evaluate the set-up blocks
(after asking for confirmation).

This isn't restricted to configuration of Emacs variables with
emacs-lisp blocks; eval lines could reference blocks in any language,
for example to start an ESS session and run some preparatory code,  
etc,

e.g.

#+source: document-config
#+begin_src emacs-lisp
(set (make-local-variable 'org-edit-src-content-indentation) 0)
#+end_src

#+source: start-ess
#+begin_src R :session *R session*
 a <- 1
#+end_src

# Local variables:
# eval:(sbe "document-config")
# eval:(sbe "start-ess")
# End:


Dan



Very cool ! That does all I want, thanks for the info. For multi- 
line it
is a bit heavy to write, with lots of \n and preamble .= "lskjd",  
but I

can live with that. Unless there is a way already to write something
like this ?

#+source: my-preamble
#+begin_src python :return preamble
 # -*- coding: utf-8 -*-"
 import os,sys,whatever
#+end_src

#+begin_src python :preamble (org-babel-get-and-expand-source-code- 
body my-preamble) :return s

 s = "é"
#+end_src

There is org-babel-get-src-block-info but it looks at the block  
around
(point), not by name ... so I guess it would not be too hard to  
write
the extraction method, but it might be somewhere in the code  
already.




Yes, the following uses an internal Babel function, but is probably  
much

simpler

#+results: my-preamble
: # -*- coding: utf-8 -*-
: import os,sys,whatever

#+begin_src python :preamble (org-babel-ref-resolve "my- 
preamble") :return s

s = ""
#+end_src

Note that as written this will return the following python error

Traceback (most recent call last):
 File "", line 2, in 
ImportError: No module named whatever



One naive question : why is the code path different for tangling  
and
evaluation ? One would think that a natural way for evaluation  
would be

to tangle the current block (plus included noweb stuff etc) into a
temporary file and eval that file ... and that would enable  
shebang for

evaluation as well. There must be something I am missing here.


Tangling works for *any* programming language, even those which  
have yet
to be created and have no explicit Emacs or Org-mode support,  
this is

because on tangling the code block is simply treated as text.


As far as I understood from testing, tangling does adapt to the  
language

(at least to implement :var in a suitable way), so I was under the
impression that evaluating could be implemented as some kind of  
wrapping
around the tangled output - and obviously the wrapping would have  
to be

language-specific even if for the most part the tanglong is not.



Yes, some language specific features (e.g. variable expansion) can be
used by the tangling mechanisms if such features are defined for the
language in question, however tangling can be done in the absence  
of any

language specific features and thus works for any arbitrary language.

That shebang and preamble should remain separate for the other  
reasons

mentioned in my previous email.



I am just discover

Re: [Orgmode] Re: Questions about org-capture templates and usage

2010-12-06 Thread Nathan Neff
Great thread --

1) Good docs re:capture
2) Explanation of C-u and how org-capture uses it
3) Emacs keybinding guidelines
4) Notices of requests for more documentation on Worg

Also, I understood most of the things in this thread -- something must
be wrong with me.

--Nate

___
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: re-importing ascii export

2010-12-06 Thread Erik Butz
any hints at all?

On Fri, Nov 26, 2010 at 5:54 PM, Erik Butz  wrote:
> Hi all,
>
> I have a possibly stupid question, which is the following: I have a
> txt file which has been exported using org mode and I don't have the
> initial file. Is there any way to convert the ascii export back into a
> native orgmode file so as to have the usual feature as folding etc?
>
> Any hints appreciated.
>
> Thanks,
>
> Erik
>

___
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] agenda does not call file

2010-12-06 Thread maurice
Hi org-moders,

1 configuration
~~~
Below, a piece of my org-agenda-custom-commands. I want to obtain my
notes from my ordinary agenda files and from carto.org. Some of them are
tagged "note" with the property CATEGORY "openstreetmap"

("n" . "Notes")
 ("na" "toutes" tags "note" nil)
 ("nc" "connexions"
  ((tags "CATEGORY=\"connexions internet\"+note"
((org-agenda-remove-tags t))
)))
 ("no" "osm"
 (
  (tags "CATEGORY=\"openstreetmap\"+note"
   ((org-agenda-remove-tags t)))
  (tags "CATEGORY=\"openstreetmap\"+note"
((org-agenda-files '("/home/momo/org/ordi/carto.org"))
 (org-agenda-remove-tags t)
 ))
))


2 manip1

With C-c a n o, my agenda looks like :

2.1 bad
---

,
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
|   openstreetmap:  osmosis
|   openstreetmap:  org et osm ou gmap : pour indiquer un lieu
|   openstreetmap:  Exemple de lettre à l'administration pour libérer les 
données
| 
|
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
`


3 manip2

Now, I load file carto.org and if I lock agenda restriction to this file
(C-c C-x <) I get :

3.1 good


,
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
|   openstreetmap:  Openstreetmap
|   openstreetmap:  josm et tilecache
|   openstreetmap:  fichier traces
|   openstreetmap:  commandes
|   openstreetmap:  marquage d'un endroit ?
|   openstreetmap:  cartes vélo et piétion garmin
|   openstreetmap:  cartes garmin de Geofabrik
|   openstreetmap:  commande osmosis
|   openstreetmap:  OpenStreetMap/OpenLayers and Privoxy
|   openstreetmap:  Finding all affected URLs
|   openstreetmap:  Comparing the files
|  
|===
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
|   openstreetmap:  Openstreetmap
|   openstreetmap:  josm et tilecache
|   openstreetmap:  fichier traces
|   openstreetmap:  commandes
|   openstreetmap:  marquage d'un endroit ?
|   openstreetmap:  cartes vélo et piétion garmin
|   openstreetmap:  cartes garmin de Geofabrik
|   openstreetmap:  commande osmosis
|   openstreetmap:  OpenStreetMap/OpenLayers and Privoxy
|   openstreetmap:  Finding all affected URLs
|   openstreetmap:  Comparing the files
`


4 manip3

I "agenda lock agenda restriction remove" ( C-c C-x >), I get :

4.1 excellent
-

,
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
|   openstreetmap:  osmosis
|   openstreetmap:  org et osm ou gmap : pour indiquer un lieu
|   openstreetmap:  Exemple de lettre à l'administration pour libérer les 
données
| 
| ===
| Headlines with TAGS match: CATEGORY="openstreetmap"+note
|   openstreetmap:  Openstreetmap
|   openstreetmap:  josm et tilecache
|   openstreetmap:  fichier traces
|   openstreetmap:  commandes
|   openstreetmap:  marquage d'un endroit ?
|   openstreetmap:  cartes vélo et piétion garmin
|   openstreetmap:  cartes garmin de Geofabrik
|   openstreetmap:  commande osmosis
|   openstreetmap:  OpenStreetMap/OpenLayers and Privoxy
|   openstreetmap:  Finding all affected URLs
|   openstreetmap:  Comparing the files
`


5 Conclusion


If I kill the buffer carto.org, I need to repeat manip2 and manip3 to
succeed. Just reloading file carto.org is inefficient.

I suppose the agenda command does not consider the required file
(carto.org), even if this command loads it - I can see it in list of
buffers. 

Maybe my configuration is wrong and of course, no errors occur at any
time.

emacs :
GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-11-04 on barber, modified by Debian

org-mode :
7.3

Thanks for future explanation,

Maurice

___
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] Coding systems in Babel

2010-12-06 Thread Vincent Beffara

Hi, it's me again, still trying to make sense of the interaction between
Org, Babel and coding systems. I have, in a UTF8-encoded .org file, this
code block:

--8<---cut here---start->8---
#+tblname: toto
| é |

#+begin_src python :var t=toto :preamble # -*- coding: latin1 -*-
babel = unicode (t[0][0],"latin1")
local = unicode ("é","latin1")
return [len(babel), len(local)]
#+end_src
--8<---cut here---end--->8---

Evaluating the block with C-c C-c leads to this:

--8<---cut here---start->8---
#+results:
| 1 | 1 |
--8<---cut here---end--->8---

So, the instance of python spawned by C-c C-c receives the text as
latin-1 encoded. Somewhere a conversion from UTF8 to latin-1
happens. But I don't want that, I want everything to stay in UTF8 from
the beginning to the end. I guess I have two questions:

At what point in the process is the convertion performed ?

How do I prevent it / how do I specify UTF8 as the exchange format
between Org-Babel and outside processes spawned by C-c C-c ?

The whole point is to make executed code-blocks and tangled source code
behave the same way - in that particular case, tangling leads to a
UTF8-encoded file, which is what I expected to happen.

Thanks for your help!

   /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


Re: [Orgmode] Re: re-importing ascii export

2010-12-06 Thread Sébastien Mengin
Le lun. 06/12/10 (05:49:34 +0100), Erik Butz a écrit :
> any hints at all?

I read this morning that pandoc was now converting into orgmode... might
worth giving it a try?

S.

> On Fri, Nov 26, 2010 at 5:54 PM, Erik Butz  wrote:
> > Hi all,
> >
> > I have a possibly stupid question, which is the following: I have a
> > txt file which has been exported using org mode and I don't have the
> > initial file. Is there any way to convert the ascii export back into a
> > native orgmode file so as to have the usual feature as folding etc?

-- 
Sébastien Mengin
Édition et logiciels libres
< Mise en page avec LaTeX >
http://edilibre.net
tél. : 06 84 88 49 17
jid. : sebastien-men...@jabber.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] Shared subtrees?

2010-12-06 Thread Samuel Wales
Perhaps you can provide examples?  I am not sure if you are referring
to virtual nodes (virtual regions do not exist in current Emacs,
although it would be good; kludges might be possible with e.g.
overlays but are not ideal), graph theoretic structures (ID markers
implement this in a general way), including text in export (we've
discussed it but not come up with a general solution yet), or
something else.

Org has a philosophy of not duplicating ever.

I have unpublished notes on some of these topics.


Samuel

___
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: Questions about org-capture templates and usage

2010-12-06 Thread Carsten Dominik

Hi Nick,

On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote:


Alan E. Davis  wrote:



I have org-capture assigned to C-c, so C-u C-u C-c c goes straight  
to the last stored item.  Perfect.


I presume the first `C-c' above is a typo and that the bindind is `C-c
c', as the second instance indicates. Rebinding C-c to a command would
be a disaster, but even C-c c is generally not a good idea:


The way I see it:  C-c belongs to the user, so it is a good key
for a global binding to org-capture if the user chooses
it - just like the documentation recommends.  Org mode does not
enforce this key, it just recommends it.


see the Key
Binding Conventions in the Emacs Lisp manual - if you have the manual
locally, evaluate the following

   (info "(elisp)Key Binding Conventions")

otherwise it's available online at

   
http://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#Key-Binding-Conventions

Nick


___
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, Python and UTF-8

2010-12-06 Thread Achim Gratz
"Thomas S. Dye"  writes:
> Emacs configuration is one of the highest barriers to entry for
> potential adopters of Org-mode, IMO.  The idea of context-sensitive
> configuration is potentially terrific.  It gets the user to work more
> quickly than would otherwise be the case.  The problem I've run into
> is that exiting a buffer doesn't change the configuration back to some
> initial, or base, state.  I'm on to the next task but still configured
> to do the last thing.

Isn't that what buffer-local variables are for?


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada


___
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: Questions about org-capture templates and usage

2010-12-06 Thread Carsten Dominik


On Dec 6, 2010, at 6:57 PM, Nick Dokos wrote:


Carsten Dominik  wrote:


Hi Nick,

On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote:


Alan E. Davis  wrote:



I have org-capture assigned to C-c, so C-u C-u C-c c goes straight
to the last stored item.  Perfect.


I presume the first `C-c' above is a typo and that the bindind is  
`C-c
c', as the second instance indicates. Rebinding C-c to a command  
would

be a disaster, but even C-c c is generally not a good idea:


The way I see it:  C-c belongs to the user, so it is a good key
for a global binding to org-capture if the user chooses
it - just like the documentation recommends.  Org mode does not
enforce this key, it just recommends it.



Yup, I spouted nonsense.


And I wrote `C-c' where I meant `C-c c' ... :/

- Carsten

___
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, Python and UTF-8

2010-12-06 Thread Dan Davison
"Thomas S. Dye"  writes:

> Hi Dan,
>
> Emacs configuration is one of the highest barriers to entry for
> potential adopters of Org-mode, IMO.  The idea of context-sensitive
> configuration is potentially terrific.  It gets the user to work more
> quickly than would otherwise be the case.  The problem I've run into
> is that exiting a buffer doesn't change the configuration back to some
> initial, or base, state.  I'm on to the next task but still configured
> to do the last thing.

Hi Tom,

I think someone else suggested using buffer-local variables to address
this problem, and I think that's the correct suggestion. One of the
examples below shows how to set a buffer-local value:

[...]

> #+source: document-config
>> #+begin_src emacs-lisp
>> (set (make-local-variable 'org-edit-src-content-indentation) 0)
>> #+end_src

As it happens, for that particular setting to be useful requires a patch
that is pending review, but, in general, I think this is the way to do
what you're describing.

Dan


>>
>> #+source: start-ess
>> #+begin_src R :session *R session*
>>  a <- 1
>> #+end_src
>>
>> # Local variables:
>> # eval:(sbe "document-config")
>> # eval:(sbe "start-ess")
>> # End:
>>
>>
>> Dan
>>

 Very cool ! That does all I want, thanks for the info. For multi-
 line it
 is a bit heavy to write, with lots of \n and preamble .= "lskjd",
 but I
 can live with that. Unless there is a way already to write something
 like this ?

 #+source: my-preamble
 #+begin_src python :return preamble
  # -*- coding: utf-8 -*-"
  import os,sys,whatever
 #+end_src

 #+begin_src python :preamble
 (org-babel-get-and-expand-source-code-
 body my-preamble) :return s
  s = "é"
 #+end_src

 There is org-babel-get-src-block-info but it looks at the block
 around
 (point), not by name ... so I guess it would not be too hard to
 write
 the extraction method, but it might be somewhere in the code
 already.

>>>
>>> Yes, the following uses an internal Babel function, but is probably
>>> much
>>> simpler
>>>
>>> #+results: my-preamble
>>> : # -*- coding: utf-8 -*-
>>> : import os,sys,whatever
>>>
>>> #+begin_src python :preamble (org-babel-ref-resolve "my-
>>> preamble") :return s
>>> s = ""
>>> #+end_src
>>>
>>> Note that as written this will return the following python error
>>>
>>> Traceback (most recent call last):
>>>  File "", line 2, in 
>>> ImportError: No module named whatever
>>>

>> One naive question : why is the code path different for tangling
>> and
>> evaluation ? One would think that a natural way for evaluation
>> would be
>> to tangle the current block (plus included noweb stuff etc) into a
>> temporary file and eval that file ... and that would enable
>> shebang for
>> evaluation as well. There must be something I am missing here.
>
> Tangling works for *any* programming language, even those which
> have yet
> to be created and have no explicit Emacs or Org-mode support,
> this is
> because on tangling the code block is simply treated as text.

 As far as I understood from testing, tangling does adapt to the
 language
 (at least to implement :var in a suitable way), so I was under the
 impression that evaluating could be implemented as some kind of
 wrapping
 around the tangled output - and obviously the wrapping would have
 to be
 language-specific even if for the most part the tanglong is not.

>>>
>>> Yes, some language specific features (e.g. variable expansion) can be
>>> used by the tangling mechanisms if such features are defined for the
>>> language in question, however tangling can be done in the absence
>>> of any
>>> language specific features and thus works for any arbitrary language.
>>>
>>> That shebang and preamble should remain separate for the other
>>> reasons
>>> mentioned in my previous email.
>>>

 I am just discovering all of this, sorry if I have horrible
 misconceptions about the thing ...

>>>
>>> No problem, it is a fairly (but I don't think overly) complex system.
>>>

 Regards,

/v


 ___
 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 A

[Orgmode] Re: Cool Clockreport in 7.3

2010-12-06 Thread Achim Gratz
Nathan Neff  writes:

> Much easier to read, and I love the nesting/indenting of
> sub-headings.

This happened through a rewrite of the clocktable functionality that
introduced new parameters _after_ the 7.3 release (so it is only in
bleeding edge for now).  If you need to get the old clocktables back,
you need to change some parameters in the #BEGIN line.  If you want the
old behaviour back by default, customize org-clocktable defaults (:level
t :indent nil).


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves


___
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 this function be written better?

2010-12-06 Thread Nathan Neff
I'd like to be able to easily toggle the showing/hiding of CLOSED clock
items in the agenda.

I have a function that does exactly that.  My Lisp is terrible (I bet that's
never been said before :-) and I want to try to improve it.

Any suggestions how to improve/refactor the following function?

(defun njn/agenda-toggle-show-closed()
  "Toggle whether closed clock thingies are shown in the agenda"
  (interactive)
  (if (eq njn/org-agenda-show-closed 't)
  (progn (setq org-agenda-log-mode-items (quote (clock)))
 (setq njn/org-agenda-show-closed nil)
 (message "NOT Showing closed clock entries in agenda"))
(progn (setq org-agenda-log-mode-items (quote (closed clock)))
   (setq njn/org-agenda-show-closed 't)
   (message "Showing closed clock entries in agenda"))
))

Thanks,
--Nate

___
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: Orgmode and Unicode characters

2010-12-06 Thread Dan Davison
"Eric Schulte"  writes:

> My only worry on this front is that I know how to type "|" and "-" for
> tables, and how to type "*" for headings, but I don't have an easy way
> to type utf8 characters.
>
> If Org-mode starts using exotic utf8 characters which can not easily be
> typed from outside of Org-mode then it loses some of the "it's all plain
> text" appeal.
>
> I agree with Darlan that something using Emacs display functionality
> (like used by org-pretty-entities) could be preferable because it would

Hi Eric,

I've never quite understood how the pretty entities stuff works. Is it
related to text (display) properties or overlays? Would you mind giving
a quick explanation?

Dan

> preserve the underlying text.
>
> Best -- Eric
>
> Darlan Cavalcante Moreira  writes:
>
>> If changing the actual character in the file is be the best option (maybe
>> it could cause problems for the exporters), then an approach similar to
>> org-pretty-entities could be used for this.
>>
>> --
>> Darlan
>>
>> At Mon, 6 Dec 2010 11:19:55 +0200,
>> Dov Grobgeld  wrote:
>>> 
>>> Even though this announcement looks very cool, this again reminded me of
>>> something I've been thinking off when using orgmode. And that is the use of
>>> unicode characters. With the latest versions of emacs that support unicode
>>> and with rich fonts such as DejaVu Monospace, it is as easy to use unicode
>>> characters as ascii. What I was thinking of is that the current ascii
>>> graphics of e.g. tables could automatically be switched to box drawing
>>> characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
>>> pressing C-c or Tab. Other characters that could be used are automatic
>>> replacement of leading asterisks to various bullets. Each indentation level
>>> could be given a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure that
>>> arrows and various brackets may also be useful for various contexts.
>>> 
>>> Of course the use of these characters would be configurable and would be
>>> turned off automatically for buffers that are not UTF-8 encoded.
>>> 
>>> Perhaps I'll one day learn the inner workings of org-mode sufficiently to do
>>> this myself, but if there is someone who meanwhile wants to pick up the
>>> idea, you're welcome!
>>> 
>>> Regards,
>>> Dov
>>> 
>>> On Mon, Dec 6, 2010 at 09:05, Nathan Neff  wrote:
>>> 
>>> > Much easier to read, and I love the nesting/indenting of
>>> > sub-headings.
>>> >
>>> > http://nateneff.com/   - Need to understand 
>>> > org-mode-clockreport-rules.html
>>> >
>>> > --Nate
>>> >
>>> > ___
>>> > 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] Re: Babel, Python and UTF-8

2010-12-06 Thread Thomas S. Dye


On Dec 6, 2010, at 8:07 AM, Achim Gratz wrote:


"Thomas S. Dye"  writes:

Emacs configuration is one of the highest barriers to entry for
potential adopters of Org-mode, IMO.  The idea of context-sensitive
configuration is potentially terrific.  It gets the user to work more
quickly than would otherwise be the case.  The problem I've run into
is that exiting a buffer doesn't change the configuration back to  
some
initial, or base, state.  I'm on to the next task but still  
configured

to do the last thing.


Isn't that what buffer-local variables are for?


Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Aloha Achim,

I suppose so, but AFAIK I haven't seen them in the configuration code  
blocks that Dan mentioned.  I might be missing something.


I experimented with buffer-local configuration variables myself a  
while back, but my Lisp skills are sub-minimal and I couldn't make  
them work to my satisfaction.


All the best,
Tom



___
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-indent, org-inlinetask: patches on github

2010-12-06 Thread Nicolas Goaziou
Hello,

It has been applied to master branch.

I will keep an eye on reported bugs about it. It shouldn't change
anything for users not requiring org-inlinetask in their Org
configuration, though.

Regards,

-- Nicolas

___
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] Exporting org-diary-class to icalendar

2010-12-06 Thread Rémi Vanicat
Hello,

For those who want to use the org-diary-class diary sexp, and who want
to export it to ical (for google calendar consumption for example) Here
is a code that will do it. Beware that my timezone is hardwired in it
(search for Europe/Paris).

For now it doesn't take into account the skipped weeks, my first
implementation seemed to failed for an unknown reason.


--8<---cut here---start->8---
(defun icalendar--convert-org-diary-class-to-ical (nonmarker entry-main)
  "Convert `org-diary-class' diary entry to icalendar format.
NONMARKER is a regular expression matching the start of non-marking
entries.  ENTRY-MAIN is the first line of the diary entry."
  (if (string-match (concat nonmarker
"%%(org-diary-class "
"\\([0-9]+ [0-9]+ [0-9]+\\) " ;date start
"\\([0-9]+ [0-9]+ [0-9]+\\) " ;date start
"\\([0-9]+\\)"  ;DAYNAME
"\\([ 0-9]*\\)) "
"\\("
"\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?"
"\\(-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?"
"\\)?"
"\\s-*\\(.*\\) ?$")
entry-main)
  (let* ((start (match-string 1 entry-main))
 (end   (match-string 2 entry-main))
 (dayname (read (match-string 3 entry-main)))
 (skip-week (match-string 4 entry-main))
 (remain-week ())
 (startisostring (icalendar--datestring-to-isodate start))
 (endisostring (icalendar--datestring-to-isodate end))
 (starttimestring (icalendar--diarytime-to-isotime
   (when (match-beginning 6)
 (match-string 6 entry-main))
   (when (match-beginning 7)
 (match-string 7 entry-main
 (endtimestring (icalendar--diarytime-to-isotime
 (when (match-beginning 9)
   (match-string 9 entry-main))
 (when (match-beginning 10)
   (match-string 10 entry-main
 (summary (icalendar--convert-string-for-export
   (match-string 11 entry-main
(icalendar--dmsg "org-diary-class %s" entry-main)

(setq skip-week (read (concat "(" skip-week ")")))
(when skip-week
  (setq remain-week (number-sequence 1 52))
  (mapc (lambda (el) (setq remain-week (delete el remain-week)))
skip-week))

(when starttimestring
  (unless endtimestring
(let ((time
   (read (icalendar--rris "^T0?" ""
  starttimestring
  (setq endtimestring (format "T%06d"
  (+ 1 time))
(list (concat "\nDTSTART;TZID=Europe/Paris;"
  (if starttimestring "VALUE=DATE-TIME:"
  "VALUE=DATE:")
  startisostring
  (or starttimestring "")
  "\nDTEND;TZID=Europe/Paris;"
  (if endtimestring "VALUE=DATE-TIME:"
  "VALUE=DATE:")
  startisostring
  (or endtimestring "")
  "\nRRULE:FREQ=DAILY;INTERVAL=1"
  ";BYDAY="
  (nth dayname '("SU" "MO" "TU" "WE" "TH" "FR" "SA"))
  ";UNTIL="
  endisostring)
  summary))
  ;; no match
  nil))

(defadvice icalendar--convert-to-ical (around ical-for-org (nonmarker 
entry-main))
  (let ((res (icalendar--convert-org-diary-class-to-ical nonmarker entry-main)))
(if res
(setq ad-return-value res)
ad-do-it)))

(ad-activate 'icalendar--convert-to-ical)
--8<---cut here---end--->8---


-- 
Rémi Vanicat


___
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: Org-mode Code Blocks Manuscript: Request For Comments

2010-12-06 Thread Charles C. Berry

On Sat, 4 Dec 2010, Thomas S. Dye wrote:


Aloha Detlef,

On Dec 2, 2010, at 9:58 PM, Detlef Steuer wrote:


Hi!

I very much appreciate your article as a nice introduction to org-babel
and its uses. As I'm going to introduce my colleagues into the nice
world of org-babel giving a talk sometime next term I'll shamelessly
steal from your work. (Of course giving attribution!)

Some remarks:
If you send it to Journal of _Statistical_ Software may be you should
be a little bit more focused on statistics. You article introduces
org-babel as a multi-language frontend to literate programming. What it
is, but there is little statistics in it.

In their article Gentleman and Lang introduced the "statistical
compendium". In my opinion emacs + org-mode + babel +
all-programming-languages-we-know + LaTeX + HTML export build the first
incarnation of a tool to really create such a compendium, org-babel
being central in that chain.
May be you can use some of Tom Dye's data to give an example of a
self-contained statistical workflow. I used his introduction given in
Worg to do my first steps in that direction. (Thx again Tom!)
Doing everything beginning with data-cleaning over data analysis to
template generating and report publishing and presentation in one
text-file.
That feature was, what caught me immediately as a statistician.

If you want to focus on the simulation side (may be more focused on
academics) I would stress the "always-correctness" of graphs in
articles. You all know what I mean...

Just my 2 cents. Of course it is great as it stands  and surely I'm
biased by my own needs.

Detlef
(a statistician)



Thanks very much for the helpful comments and especially your perspective on 
the Journal of Statistical Software.


I'm interested to learn how you've developed a statistical workflow with 
Org-mode beyond my first tentative steps in that direction.  It would be 
great to have an example of your progress on Worg, if you can find the time.


Tom,

You might glean something from these links:

ESS and org-mode workflows are discussed here:


http://stackoverflow.com/questions/1429907/workflow-for-statistical-analysis-and-report-writing/

http://stackoverflow.com/questions/3027476/ess-workflow-for-r-project-package-development

https://github.com/Choens/LiterateR


CRAN's reproducible research 'task view' (with 'Related Links' of some
interest):

   http://cran.r-project.org/web/views/ReproducibleResearch.html

If you want to reach the R community, 'The R Journal' might be worth a try:

http://journal.r-project.org/

==

Let me just add my $0.02 worth to what others have already said and
say, that I really find org-babel useful in my R related work.

Currently, I am making use of it an environment for developing
R-packages. An org-mode file sits in the top level source directory of
an R package; it contains src blocks to fire up speedbar, list files
(for navigation w/o speedbar), do version control operations, check,
build, install, load the package, and do other routine tasks. Each
operation has its own headline, so I need only put the point on the
headline and 'C-c C-v C-s y' to run the subtree containing the block -
effectively making each operation a point - and - (a little more than
a) click.  Those source blocks are nearly the same for each package.

Additional blocks display help pages in the org file, load sample
data, let me work on new package features, and try out R idioms I
might want to use.

Then there are all the usual org-mode features that let me keep notes
and ideas and track the status of the package. org-mode has made this
part of my life a good deal simpler!

Chuck



All the best,
Tom


On Thu, 02 Dec 2010 12:28:27 -0700
"Eric Schulte"  wrote:

> Hi,
> 
> Dan Davison, Tom Dye, Carsten Dominik and myself have been working on a

> paper introducing Org-mode's code block functionality.  We plan to
> submit this paper to the Journal of Statistical Software.  As both
> Org-mode and the code block functionality are largely products of this
> mailing list community, and in the spirit of an open peer review process
> we are releasing the current draft of the paper here to solicit your
> review and comments.
> 
> Both the .org and .pdf formats of the paper are available at the

> following locations.
> 
> http://cs.unm.edu/~eschulte/org-paper/babel.org
> 
> http://cs.unm.edu/~eschulte/org-paper/babel.pdf
> 
> Thanks -- 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
> 




___
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
h

Re: [Orgmode] Including current time in agenda

2010-12-06 Thread Eric S Fraga
Julien Danjou  writes:

> On Mon, Dec 06 2010, suvayu ali wrote:
>> So far my attempts have been some variation of `<%%(format-time-string
>> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
>
>> wrong way? Is this not supported by the diary library?
>>
>> Thanks for any thoughts/suggestions.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
> (format-time-string "%H:%M Current time" (current-time
>
> And use %%(jd:org-current-time) in an entry.
>
> I think this is what you want?

Julien,

many thanks for proving me wrong!  This is great, especially if I have

--8<---cut here---start->8---
*** current time
:PROPERTIES:
:CATEGORY: Now ——►
:END:
%%(jd:org-current-time)
--8<---cut here---end--->8---

and change your "Current time" string to "◄——".  Now all I have to
do is get rid of the ":" put after the category string and I have a nice
symmetric time indicator!

(I'm using unicode/utf characters in case the dashes and arrow heads
don't come through)

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.213.g1ce0)

___
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] Orgmode and Unicode characters

2010-12-06 Thread Dov Grobgeld
The way I see it, within org-mode you wouldn't have to change anything in
your input, but C-c C-c or other hot keys would do the change automatically.
But I really don't mind if the underlying buffer stays the same, but only
the display changes.

Secondly, typing Unicode characters is pretty easy in emacs through its
input modes. I have recently working on a special input mode for the
key-starved N900 keyboard and it is really simple through quail. For box
characters, you may e.g. use input mode rfc1345 through C-\ rfc1345, and
then type:

&dr&hh&dl
&vv &vv
&ur&hh&ul"

which results in:
┌─┐
│ │
└─┘
Obviously the display of these fancy characters is only syntactic suger, but
so is the use of font colors in the buffer.

Regards,
Dov

On Mon, Dec 6, 2010 at 16:58, Eric Schulte  wrote:

> My only worry on this front is that I know how to type "|" and "-" for
> tables, and how to type "*" for headings, but I don't have an easy way
> to type utf8 characters.
>
> If Org-mode starts using exotic utf8 characters which can not easily be
> typed from outside of Org-mode then it loses some of the "it's all plain
> text" appeal.
>
> I agree with Darlan that something using Emacs display functionality
> (like used by org-pretty-entities) could be preferable because it would
> preserve the underlying text.
>
> Best -- Eric
>
> Darlan Cavalcante Moreira  writes:
>
> > If changing the actual character in the file is be the best option (maybe
> > it could cause problems for the exporters), then an approach similar to
> > org-pretty-entities could be used for this.
> >
> > --
> > Darlan
> >
> > At Mon, 6 Dec 2010 11:19:55 +0200,
> > Dov Grobgeld  wrote:
> >>
> >> Even though this announcement looks very cool, this again reminded me of
> >> something I've been thinking off when using orgmode. And that is the use
> of
> >> unicode characters. With the latest versions of emacs that support
> unicode
> >> and with rich fonts such as DejaVu Monospace, it is as easy to use
> unicode
> >> characters as ascii. What I was thinking of is that the current ascii
> >> graphics of e.g. tables could automatically be switched to box drawing
> >> characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
> >> pressing C-c or Tab. Other characters that could be used are automatic
> >> replacement of leading asterisks to various bullets. Each indentation
> level
> >> could be given a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure
> that
> >> arrows and various brackets may also be useful for various contexts.
> >>
> >> Of course the use of these characters would be configurable and would be
> >> turned off automatically for buffers that are not UTF-8 encoded.
> >>
> >> Perhaps I'll one day learn the inner workings of org-mode sufficiently
> to do
> >> this myself, but if there is someone who meanwhile wants to pick up the
> >> idea, you're welcome!
> >>
> >> Regards,
> >> Dov
> >>
> >> On Mon, Dec 6, 2010 at 09:05, Nathan Neff 
> wrote:
> >>
> >> > Much easier to read, and I love the nesting/indenting of
> >> > sub-headings.
> >> >
> >> > http://nateneff.com/   - Need to understand
> org-mode-clockreport-rules.html<
> http://nateneff.com/org-mode-clockreport-rules.html>
> >> >
> >> > --Nate
> >> >
> >> > ___
> >> > 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] Orgmode and Unicode characters

2010-12-06 Thread Dov Grobgeld
It was the posting by Nathan Neff which I am sure that I totally
misinterpret, but used as an excuse for my blurb. :-)

Dov

On Mon, Dec 6, 2010 at 16:51, Carsten Dominik wrote:

>
> On Dec 6, 2010, at 10:19 AM, Dov Grobgeld wrote:
>
>  Even though this announcement looks very cool,
>>
>
> What does "this announcement" refer to, Dov?
>
> - Carsten
>
>
>  this again reminded me of something I've been thinking off when using
>> orgmode. And that is the use of unicode characters. With the latest versions
>> of emacs that support unicode and with rich fonts such as DejaVu Monospace,
>> it is as easy to use unicode characters as ascii. What I was thinking of is
>> that the current ascii graphics of e.g. tables could automatically be
>> switched to box drawing characters (
>> http://en.wikipedia.org/wiki/Box-drawing_characters) when pressing C-c or
>> Tab. Other characters that could be used are automatic replacement of
>> leading asterisks to various bullets. Each indentation level could be given
>> a different bullets. E.g. "*"==▸, "**"==●, etc. I'm sure that arrows and
>> various brackets may also be useful for various contexts.
>>
>> Of course the use of these characters would be configurable and would be
>> turned off automatically for buffers that are not UTF-8 encoded.
>>
>> Perhaps I'll one day learn the inner workings of org-mode sufficiently to
>> do this myself, but if there is someone who meanwhile wants to pick up the
>> idea, you're welcome!
>>
>> Regards,
>> Dov
>>
>> On Mon, Dec 6, 2010 at 09:05, Nathan Neff  wrote:
>> Much easier to read, and I love the nesting/indenting of
>> sub-headings.
>>
>> http://nateneff.com/   - Need to understand
>> org-mode-clockreport-rules.html
>>
>> --Nate
>>
>> ___
>> 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
>>
>
> - Carsten
>
>
>
>
___
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] Shared subtrees?

2010-12-06 Thread Samium Gromoff
On Mon, 6 Dec 2010 10:43:17 -0700, Samuel Wales  wrote:
> Perhaps you can provide examples?  I am not sure if you are referring
> to virtual nodes (virtual regions do not exist in current Emacs,
> although it would be good; kludges might be possible with e.g.
> overlays but are not ideal), graph theoretic structures (ID markers
> implement this in a general way), including text in export (we've
> discussed it but not come up with a general solution yet), or
> something else.

With ten minutes of googling I couldn't figure out what virtual nodes
correspond to, in the context of Emacs (modulo the somewhat irrelevant
Info's virtual-nodes), besides them sounding like something vaguely useful
in implementing the feature I had in mind.

Virtual regions (a presentation of something of synthetic nature, which
is not directly backed by a buffer's region) sound exactly like the best
building block I'd imagine for the implementation of the said feature.

I did refer to the concept of 'partial order', a graph-theoretic
structure indeed.  I did so to illustrate the difference with the usual
tree, where no branches ever join, so none of them ever share identical
children.

I did not refer to including text in export, I'm more interested in the
editing of the partial order.

-- 
regards,
  Samium Gromoff
--
"Actually I made up the term 'object-oriented', and I can tell you I
did not have C++ in mind." - Alan Kay (OOPSLA 1997 Keynote)

___
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: Questions about org-capture templates and usage

2010-12-06 Thread Alan Davis

I said:
,
| I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to
| the last stored item.  Perfect.   
`

Org-capture is indeed bound to C-c c on my system.

This has indeed been a useful thread.  

Thank you one and all,

Alan 

 

___
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] Shared subtrees?

2010-12-06 Thread Samuel Wales
Partial order can refer to more than one concept in org.

You could bring the underlying Emacs technology you seek up on
emacs-devel and see what people say.

What I seek is more akin to an indirect buffer.  What you seek might not be.

Hope it helps.

___
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] Shared subtrees?

2010-12-06 Thread Samuel Wales
On 2010-12-06, Samuel Wales  wrote:
> What I seek is more akin to an indirect buffer.  What you seek might not

I take something "synthetic" to not be like an indirect 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 this function be written better?

2010-12-06 Thread Bernt Hansen
Nathan Neff  writes:

> I'd like to be able to easily toggle the showing/hiding of CLOSED clock
> items in the agenda.
>
> I have a function that does exactly that.  My Lisp is terrible (I bet that's
> never been said before :-) and I want to try to improve it.
>
> Any suggestions how to improve/refactor the following function?
>
> (defun njn/agenda-toggle-show-closed()
>   "Toggle whether closed clock thingies are shown in the agenda"
>   (interactive)
>   (if (eq njn/org-agenda-show-closed 't)
>   (progn (setq org-agenda-log-mode-items (quote (clock)))
>(setq njn/org-agenda-show-closed nil)
>(message "NOT Showing closed clock entries in agenda"))
> (progn (setq org-agenda-log-mode-items (quote (closed clock)))
>  (setq njn/org-agenda-show-closed 't)
>  (message "Showing closed clock entries in agenda"))
> ))
>

Hi Nate,

I would probably write it like this: (but I'm no emacs-lisp expert
either)

(defun njn/agenda-toggle-show-closed()
  "Toggle whether closed clock thingies are shown in the agenda"
  (interactive)
  (setq njn/org-agenda-show-closed (not njn/org-agenda-show-closed))
  (setq org-agenda-log-mode-items (if njn/org-agenda-show-closed
  (quote (closed clock))
(quote (clock
  (message "%sShowing closed clock entries in agenda" (if 
njn/org-agenda-show-closed "" "NOT ")))

You have a bug in your version - the test and report is backwards.
When njn/org-agenda-show-closed is t you don't show closed items and
when it's nil you do.

- You don't need to check for equality with 't (and you don't need to
  quote t)
  - everything non-nil is true
  - you can just check that directly in the (if ... )

My version basically does this:
  1. toggle the boolean njn/org-agenda-shot-closed
  2. set org-agenda-log-mode-items based on the boolean
  3. report the value

HTH,
Bernt

___
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] Including current time in agenda

2010-12-06 Thread suvayu ali
Hi,

On Mon, Dec 6, 2010 at 8:27 PM, Eric S Fraga  wrote:
> Julien Danjou  writes:
>
>> On Mon, Dec 06 2010, suvayu ali wrote:
>>> So far my attempts have been some variation of `<%%(format-time-string
>>> "%H%M")>'  or `<%%(diary-entry-time ...)>'. Am I approaching this the
>>
>>> wrong way? Is this not supported by the diary library?
>>>
>>> Thanks for any thoughts/suggestions.
>>
>> (defun jd:org-current-time ()
>>   "Return current-time if date is today."
>>   (when (equal date (calendar-current-date))
>>     (format-time-string "%H:%M Current time" (current-time
>>
>> And use %%(jd:org-current-time) in an entry.
>>
>> I think this is what you want?
>
> Julien,
>
> many thanks for proving me wrong!  This is great, especially if I have
>
> --8<---cut here---start->8---
> *** current time
>    :PROPERTIES:
>    :CATEGORY: Now ——►
>    :END:
> %%(jd:org-current-time)
> --8<---cut here---end--->8---
>
> and change your "Current time" string to "◄——".  Now all I have to
> do is get rid of the ":" put after the category string and I have a nice
> symmetric time indicator!
>

I actually tried to set the text properties for the string instead,
but looks like org-agenda is ignoring that.

(defun jd:org-current-time ()
  "Return current-time if date is today."
  (when (equal date (calendar-current-date))
(propertize (format-time-string "%H:%M Current time") 'font-lock-face
'(:weight bold :foreground "DodgerBlue4" :background "snow"

-- 
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: Two issues with :VISIBILITY: property

2010-12-06 Thread Cassio Koshikumo
Thanks a lot, Matt! The patch did correct the second issue.

About the first one:

> I cannot replicate this. When I move the headlines, they remain folded.

It's strange that you cannot replicate this behavior. I got today's
snapshot and disabled all my customizations to try a vanilla install,
and it's still there.

Just to make sure we're talking about the same thing: when you move
the Level 1 tree (the one that has the PROPERTY drawer) it really
keeps folded? I ask because I noticed that, if I move one of its
children, everything remains folded. But if I move the parent tree,
the entire tree gets expanded.

By the way, it doesn't even take a VISIBILITY setting to cause this. Say I have:

* Chapter 1
  Text under Chapter 1.

** Section A
   Text under Section A.

* Chapter 2
  Text under Chapter 2.

** Section B
   Text under Section B.

Using S-TAB, I go to OVERVIEW:

* Chapter 1...
* Chapter 2...

Now I place the cursor on "Chapter 1" and press TAB:

* Chapter 1
  Text under Chapter 1.

** Section A...

* Chapter 2...

Right now, "Section A" remains folded, which is what you'd expect
(because "Chapter 1" is only showing its children). But, if I move
"Chapter 1" down, putting it after "Chapter 2", "Section A" gets
expanded:

* Chapter 2...

* Chapter 1
  Text under Chapter 1.

** Section A
   Text under Section A.

This behavior is absolutely consistent here... If you really cannot
replicate it, I wonder what could be causing it in my installation.

Thanks again for your help and time,

-- 
Cássio Koshikumo

___
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: Org-mode Code Blocks Manuscript: Request For Comments

2010-12-06 Thread Sunny Srivastava
Hello Chuck:

Your idea is very interesting. I am curious to make use of your ideas. If it
is not too much trouble, can you please share an example org file that you
use for package development? I completely understand if you can't share the
file.

Your help is highly appreciated.

Thank you in advance.

Best Regards,
S.

On Mon, Dec 6, 2010 at 2:52 PM, Charles C. Berry wrote:

> On Sat, 4 Dec 2010, Thomas S. Dye wrote:
>
>  Aloha Detlef
>>
>> On Dec 2, 2010, at 9:58 PM, Detlef Steuer wrote:
>>
>>  Hi!
>>>
>>> I very much appreciate your article as a nice introduction to org-babel
>>> and its uses. As I'm going to introduce my colleagues into the nice
>>> world of org-babel giving a talk sometime next term I'll shamelessly
>>> steal from your work. (Of course giving attribution!)
>>>
>>> Some remarks:
>>> If you send it to Journal of _Statistical_ Software may be you should
>>> be a little bit more focused on statistics. You article introduces
>>> org-babel as a multi-language frontend to literate programming. What it
>>> is, but there is little statistics in it.
>>>
>>> In their article Gentleman and Lang introduced the "statistical
>>> compendium". In my opinion emacs + org-mode + babel +
>>> all-programming-languages-we-know + LaTeX + HTML export build the first
>>> incarnation of a tool to really create such a compendium, org-babel
>>> being central in that chain.
>>> May be you can use some of Tom Dye's data to give an example of a
>>> self-contained statistical workflow. I used his introduction given in
>>> Worg to do my first steps in that direction. (Thx again Tom!)
>>> Doing everything beginning with data-cleaning over data analysis to
>>> template generating and report publishing and presentation in one
>>> text-file.
>>> That feature was, what caught me immediately as a statistician.
>>>
>>> If you want to focus on the simulation side (may be more focused on
>>> academics) I would stress the "always-correctness" of graphs in
>>> articles. You all know what I mean...
>>>
>>> Just my 2 cents. Of course it is great as it stands  and surely I'm
>>> biased by my own needs.
>>>
>>> Detlef
>>> (a statistician)
>>>
>>>
>> Thanks very much for the helpful comments and especially your perspective
>> on the Journal of Statistical Software.
>>
>> I'm interested to learn how you've developed a statistical workflow with
>> Org-mode beyond my first tentative steps in that direction.  It would be
>> great to have an example of your progress on Worg, if you can find the time.
>>
>
> Tom,
>
> You might glean something from these links:
>
> ESS and org-mode workflows are discussed here:
>
>
>
> http://stackoverflow.com/questions/1429907/workflow-for-statistical-analysis-and-report-writing/
>
>
> http://stackoverflow.com/questions/3027476/ess-workflow-for-r-project-package-development
>
> https://github.com/Choens/LiterateR
>
>
> CRAN's reproducible research 'task view' (with 'Related Links' of some
> interest):
>
>   http://cran.r-project.org/web/views/ReproducibleResearch.html
>
> If you want to reach the R community, 'The R Journal' might be worth a try:
>
> http://journal.r-project.org/
>
> ==
>
> Let me just add my $0.02 worth to what others have already said and
> say, that I really find org-babel useful in my R related work.
>
> Currently, I am making use of it an environment for developing
> R-packages. An org-mode file sits in the top level source directory of
> an R package; it contains src blocks to fire up speedbar, list files
> (for navigation w/o speedbar), do version control operations, check,
> build, install, load the package, and do other routine tasks. Each
> operation has its own headline, so I need only put the point on the
> headline and 'C-c C-v C-s y' to run the subtree containing the block -
> effectively making each operation a point - and - (a little more than
> a) click.  Those source blocks are nearly the same for each package.
>
> Additional blocks display help pages in the org file, load sample
> data, let me work on new package features, and try out R idioms I
> might want to use.
>
> Then there are all the usual org-mode features that let me keep notes
> and ideas and track the status of the package. org-mode has made this
> part of my life a good deal simpler!
>
> Chuck
>
>
>
>> All the best,
>> Tom
>>
>>  On Thu, 02 Dec 2010 12:28:27 -0700
>>> "Eric Schulte"  wrote:
>>>
>>> > Hi,
>>> > > Dan Davison, Tom Dye, Carsten Dominik and myself have been working on
>>> a
>>> > paper introducing Org-mode's code block functionality.  We plan to
>>> > submit this paper to the Journal of Statistical Software.  As both
>>> > Org-mode and the code block functionality are largely products of this
>>> > mailing list community, and in the spirit of an open peer review
>>> process
>>> > we are releasing the current draft of the paper here to solicit your
>>> > review and comments.
>>> > > Both the .org and .pdf formats of the paper are available at the
>>> > following locations.
>>> > > http

[Orgmode] Re: Can this function be written better?

2010-12-06 Thread Nathan Neff
> Hi Nate,
>
> I would probably write it like this: (but I'm no emacs-lisp expert
> either)
>
> (defun njn/agenda-toggle-show-closed()
>  "Toggle whether closed clock thingies are shown in the agenda"
>  (interactive)
>  (setq njn/org-agenda-show-closed (not njn/org-agenda-show-closed))
>  (setq org-agenda-log-mode-items (if njn/org-agenda-show-closed
>                                      (quote (closed clock))
>                                    (quote (clock
>  (message "%sShowing closed clock entries in agenda" (if 
> njn/org-agenda-show-closed "" "NOT ")))
>
> You have a bug in your version - the test and report is backwards.
> When njn/org-agenda-show-closed is t you don't show closed items and
> when it's nil you do.
>
> - You don't need to check for equality with 't (and you don't need to
>  quote t)
>  - everything non-nil is true
>  - you can just check that directly in the (if ... )
>
> My version basically does this:
>  1. toggle the boolean njn/org-agenda-shot-closed
>  2. set org-agenda-log-mode-items based on the boolean
>  3. report the value

Thanks Bernt -- hehe -- I never really noticed the bug.

I'd like to see if there's a way to avoid having a variable at all --
something like this (In functional language / Lisp speak, that is)

If org-agenda-log-mode-items contains (closed) then
org-agenda-log-mode-items = org-agenda-log-mode-items - (closed)
else
org-agenda-log-mode-items = org-agenda-log-mode-items + (closed)
end if

I'll try something on my own if I have 15-20 minutes to work on it tonight --

Thanks for the bugfix and this cool line:
(message "%sShowing closed clock entries in agenda" (if
njn/org-agenda-show-closed "" "NOT ")

--Nate

___
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: Questions about org-capture templates and usage

2010-12-06 Thread Štěpán Němec
Carsten Dominik  writes:

> Hi Nick,
>
> On Dec 6, 2010, at 3:48 PM, Nick Dokos wrote:
>
>> Alan E. Davis  wrote:
>>
>>>
>>> I have org-capture assigned to C-c, so C-u C-u C-c c goes straight to the
>>> last stored item.  Perfect.
>>
>> I presume the first `C-c' above is a typo and that the bindind is `C-c
>> c', as the second instance indicates. Rebinding C-c to a command would
>> be a disaster, but even C-c c is generally not a good idea:
>
> The way I see it:  C-c belongs to the user, so it is a good key
> for a global binding to org-capture if the user chooses
> it - just like the documentation recommends.  Org mode does not
> enforce this key, it just recommends it.

Indeed. More precisely, C-c  belongs to the user, so `C-c c'
is a perfectly fine user binding (and so is thus the suggestion in the
docs).

  Štěpán

___
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: Org-mode Code Blocks Manuscript: Request For Comments

2010-12-06 Thread Charles C. Berry

On Mon, 6 Dec 2010, Sunny Srivastava wrote:


Hello Chuck:

Your idea is very interesting. I am curious to make use of your ideas. If it
is not too much trouble, can you please share an example org file that you
use for package development? I completely understand if you can't share the
file.



Sunny,

I posted the vanilla version of the file at

http://famprevmed.ucsd.edu/faculty/cberry/org-mode/RpkgExample.org

It has the src blocks I use in each package.

To use it, you set up a minimal package directory structure:

myPackage/
myPackage/DESCRIPTION
myPackage/man/
myPackage/R/

say, and (optionally) put it under version control.

Or use an existing package you are already working on.

Or download one from CRAN, and untar it.

Then copy RpkgExample.org to myPackage/

(or whatever the equivalent directory is)

and you are ready to start.

FWIW, if I have a good idea of what I am doing at the outset, I will
write functions in R/*.R files and create man/*.Rd files using
prompt() and then edit them, and then get around to checking,
installing, and trying out the package from the org file.

But usually, I have only a fuzzy idea of what how to organize the
code, so I start by writing a snippet of code in an R :session src
block that sets up some objects of the sort I would want my package to
work on. I run that block. Then I might write a script in another :session
src block to do some of the work I want the package to do, and
try it out. Once it works I wrap it into a function, and write another
:session src block to call the function. Once that works, I kill the
src block with the function in it and yank it into a fresh buffer
where it is saved as R/whatever.R. After using prompt() to make the
man/whatever.Rd and editting it, I am ready to run the package check,
install the package, restart my R session and load the package. Then I
can stitch together tests, examples, and more functions in the org
file, and test them and migrate them to the right places.


Comments welcome.

Best,

Chuck



Your help is highly appreciated.

Thank you in advance.

Best Regards,
S.

On Mon, Dec 6, 2010 at 2:52 PM, Charles C. Berry wrote:


On Sat, 4 Dec 2010, Thomas S. Dye wrote:

 Aloha Detlef


On Dec 2, 2010, at 9:58 PM, Detlef Steuer wrote:

 Hi!


[rest deleted]


Charles C. BerryDept of Family/Preventive Medicine
cbe...@tajo.ucsd.eduUC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



___
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] Dynamic Tangle?

2010-12-06 Thread Nathan Neff
I'm preparing a presentation and I'm getting using tangle to show code /and/
produce working code examples -- this is really cool.

It is possible to define a "template" and pass code blocks to it?
For example: (Using pseudo-org-babel-code for brevity)

#+template
header code
<>
footer code

#+example1 :render #+template with 111
11

#+example2 :render #+template with 22
2

The tangled output would be:

header code
111
footer code

header code
22
footer code

I'm already able to use org-babel like below, but I have to
put a <> and a <> in each code block.

Here's my existing setup:
#+header
header code

#+footer
footer code

#+example1
<><-- I have to specify these <> and <> in
each code block
111
<>

#+example2
<>
22
<>

Thanks again for org-babel -- I'll post my presentation when I get it done.

--Nate

___
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] Multi Todo state

2010-12-06 Thread Chao LU
Dear all,

Is it possible to have multiple todo state for one item? Like example below:

(setq org-todo-keywords '((type "PersonA" "PersonB" "PersonC" "|" "DONE")
  (sequence "REPORT" "BUG" "KNOWNCAUSE"
"|" "FIXED")))

So it could be possible for one item both have "PersonA" and "BUG" todo
properties. Besides, what's the essential difference between TODO and TAG?
Since to me, TODO is kind of special TAG?

Thanks a lot.

Chao
___
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