Re: [Orgmode] Small patch: org-agenda-bulk-toggle

2009-08-06 Thread Carsten Dominik

This is what I had originally, but t was pointed out to me
that in other applications in Emacs, marking and unmarking
are usually separate commands.

I have no objections to put this function back in.  But what should
be the key for it?  I guess you would then have to use the
agenda-mode-hook to redefine the m key.

- Carsten

On Aug 7, 2009, at 5:04 AM, Paul Holcomb wrote:



Can we add the behavoir of org-agenda-bulk-select back?  I far prefer
the toggle action rather than having a key for "mark" and one for
"unmark"

This seems to work:

--
(defun org-agenda-bulk-toggle ()
 "Support behavoir of org-agenda-bulk-select"
 (interactive)
 (if (eq (get-char-property (point-at-bol) 'type)
   'org-marked-entry-overlay)
 (org-agenda-bulk-unmark)
   (org-agenda-bulk-mark)))
--

Although it would probably be better to refactor the bulk checker
rather than copying the code here.

--  
Paul Holcomb   *pholcomb\@   
cpoint  net*
GPG key fingerprint  2B62 05AE EE74 845A 705F  D716 28C4  
FE1C 088F CFAC



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




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


[Orgmode] Fireforg, a Firefox extension for Org mode interaction

2009-08-06 Thread Andreas Burtzlaff
Hello all,

I am developing a Firefox extension for interaction with org-mode that
goes by the name "Fireforg".

It shows the number of occurrences of the currently viewed url in
the agenda files as well as the associated tags in the status bar.
A left click on the status bar entry displays a popup menu, where all
associated headings are shown and a click on one of them lets emacs
visit it.

Furthermore, it alters the style of links that occur in the agenda files
when viewing a website. Their tooltip is set to contain the associated
headers.

A right click on the status bar entry lets the user choose
from predefined actions, currently org-protocol's "store-link" and
"remember".

Although the functionality mentioned above is usable, the code should
still be considered experimental, so don't expect anything and backup
your data. This is not a release but rather a call for testing and
ideas.

* Try it out
To try it out you need to have org-protocol installed as described here:
http://orgmode.org/worg/org-contrib/org-protocol.php

Download org-registry.el and org-fireforg.el from the lisp directory in the
repository: http://repo.or.cz/w/org-fireforg.git

(org-registry.el is supposed to replace the contributed package, but is
still lacking some of its functions (see section below)).
Put the two files in the load-path and initialize by evaluating:

(require 'org-registry) ;; Be sure the downloaded file is used here, not the 
one in contrib
(org-registry-insinuate)
(require 'org-fireforg)
;; When putting the following into .emacs it might fail, if 
;; org-agenda-files has not been initialized yet.
(org-registry-initialize t) 

Finally, click on the file build/fireforg.xpi in the latest tree in the
repository at: http://repo.or.cz/w/org-fireforg.git
confirm the installation of the extension and reload firefox.

(Windows users might have to adjust: org-registry-file-xml  in Emacs
and "registry-file" in Fireforgs preferences.)

* Ideas/Discussion

- Add an optional search string to external links, so that
individual text passages in a website can be referenced and highlighted
in the site itself when it is revisited.

- Show a bookmark tree in firefox that is generated from the header
structure of an org file/a set of org files by filtering those with
url's in them. Together with store-link this would completely replace
firefox's bookmark functionality.
The tree could be shown either using menu popups or better as html
rendered using org's publishing capabilities. As I have no experience
with the later, could someone write such a function?

- Weaker url matching criteria. Match all parent urls, ...

- The registry is currently only updated for files in the agenda to
prevent pollution from temporary org files, possibly containing
org-fstrees. Maybe we could extend the set with
org-agenda-text-search-extra-files? Or rather make it customizable on
its own?

- I hope no one takes offence at the rewrite of org-registry without
renaming or prior discussion. I'd like to add the missing functions, but
can't get org-registry-show to work in Bastien's original version.

- Is the use of the org logo ok for the purpose of the extension?

- The logo and name are also subject to discussion. I'm still wondering
what crossbreeding a firefox and a green unicorn would yield...

* How it works
The rewritten org-registry generates an xml file (customizable through
org-registry-file-xml) that is read and searched by the extension.
An org-protocol subprotocol is used to let emacs visit an occurence.

I also have almost finished code that uses a temporary file to pass
response data from emacs to the extension. Kind of Emacs as a database
server... (probably existed though).

Hope you enjoy it,

Andreas


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


[Orgmode] Small patch: org-agenda-bulk-toggle

2009-08-06 Thread Paul Holcomb

 Can we add the behavoir of org-agenda-bulk-select back?  I far prefer
 the toggle action rather than having a key for "mark" and one for
 "unmark"

 This seems to work:

--
(defun org-agenda-bulk-toggle ()
  "Support behavoir of org-agenda-bulk-select"
  (interactive)
  (if (eq (get-char-property (point-at-bol) 'type)
'org-marked-entry-overlay)
  (org-agenda-bulk-unmark)
(org-agenda-bulk-mark)))
--

 Although it would probably be better to refactor the bulk checker
 rather than copying the code here.

-- 
Paul Holcomb   *pholcomb\@  cpoint  net*
GPG key fingerprint  2B62 05AE EE74 845A 705F  D716 28C4 FE1C 088F CFAC


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


Re: [Orgmode] suggestion: "native" orgmode XML export (and import?)

2009-08-06 Thread Andrew Stribblehill
I notice the experimental org-export.el contains an internal representation.
It would probably be very easy for your python to parse the lisp
s-expression it uses, if it were exported.

On Aug 6, 2009 3:55 PM, "Ilya Shlyakhter"  wrote:

I'm not an emacs-lisp programmer, but I'd like to write scripts
(ideally in Python) to generate custom reports from my .org files.
What would help a lot, is if there was a command to export an .org
file to a "native" XML format that would mirror the org file's
structure and all its logical elements (tags, properties, drawers,
dates etc).   I know about the DocBook exporter, but it maps orgmode's
concepts onto DocBook concepts such as articles.   I'm a longtime
orgmode user and it would be much simpler to write a program in terms
of the familiar org concepts (hierarchical entries, tags, properties
etc).
It would also be great if there was a way to import such an XML file
back into org.  Then one could e.g. take Toodledo.com tasks and
transform them into an orgmode file.

There is an orgmode Python reader at
http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
and I plan to use that for now.  But it doesn't support all orgmode
features, and more importantly it does its own parsing of orgfiles (so
may not keep up with any future changes).   Using orgmode's own
parser, and then exporting the results as XML, would be much more
reliable.

ilya


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


Re: [Orgmode] Timer doesn't seem to do anything

2009-08-06 Thread Nick Dokos
Paul Mead  wrote:


> I was just trying out the new function for setting a timer for a heading
> and am wondering if I'm missing something.
> 
> I go to a heading and type C-c C-x ; or just ; from the agenda, and I
> get a prompt 'Time out in (min)?'. I enter the time (to test, I used 1)
> and. nothing.
> 
> I also tried M-x org-timers-show-remaining-time and it says 'No timer
> set'
> 
> So, what am I doing wrong here?
> 

Probably nothing. The default notification method is a message in the
minibuffer/echo area that can go away very quickly, so you gotta look
carefully and just at the right time to catch it. If you have the notify-send
program installed (on Ubuntu, it's part of the libnotify-bin package, which
depends on the libnotify1 package), then that is used for notification: it's
much more visible, but it too goes away quickly, so if you are looking away
from your screen for a few seconds, you are likely to miss it.

I described a way to set it up so that notifications make use of your
appointment mechanism: there have been several descriptions of how to do
the latter on this list, and their great advantage is that the
notification stays put until you do something about it. See

  http://thread.gmane.org/gmane.emacs.orgmode/14349/focus=15971

The whole thread is at

  http://thread.gmane.org/gmane.emacs.orgmode/14349

HTH,
Nick


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


[Orgmode] Timer doesn't seem to do anything

2009-08-06 Thread Paul Mead
Hi

I was just trying out the new function for setting a timer for a heading
and am wondering if I'm missing something.

I go to a heading and type C-c C-x ; or just ; from the agenda, and I
get a prompt 'Time out in (min)?'. I enter the time (to test, I used 1)
and. nothing.

I also tried M-x org-timers-show-remaining-time and it says 'No timer
set'

So, what am I doing wrong here?

Thanks
Paul



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


[Orgmode] suggestion: "native" orgmode XML export (and import?)

2009-08-06 Thread Ilya Shlyakhter
I'm not an emacs-lisp programmer, but I'd like to write scripts
(ideally in Python) to generate custom reports from my .org files.
What would help a lot, is if there was a command to export an .org
file to a "native" XML format that would mirror the org file's
structure and all its logical elements (tags, properties, drawers,
dates etc).   I know about the DocBook exporter, but it maps orgmode's
concepts onto DocBook concepts such as articles.   I'm a longtime
orgmode user and it would be much simpler to write a program in terms
of the familiar org concepts (hierarchical entries, tags, properties
etc).
It would also be great if there was a way to import such an XML file
back into org.  Then one could e.g. take Toodledo.com tasks and
transform them into an orgmode file.

There is an orgmode Python reader at
http://www.members.optusnet.com.au/~charles57/GTD/orgnode.html
and I plan to use that for now.  But it doesn't support all orgmode
features, and more importantly it does its own parsing of orgfiles (so
may not keep up with any future changes).   Using orgmode's own
parser, and then exporting the results as XML, would be much more
reliable.

ilya


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


Re: [Orgmode] Local variables

2009-08-06 Thread Daniel Clemente

Thank you very much.
I am forwarding your response also to the mailing list.

--Daniel


El dc, ago 05 2009 a les 16:32, Carsten Dominik va escriure:
> On Aug 5, 2009, at 12:39 PM, Daniel Clemente wrote:
>
>>
>> Hi,
>>
>> El dt, ago 04 2009 a les 23:15, Carsten Dominik va escriure:
>>> General mechanism for local variable settings
>>> ==
>>> …
>>>
>>> A line like:
>>>
>>>  #+BIND: variable value
>>>
>>>
>>> will bind the variable to value.  For example, the line
>>> …
>>
>>
>> 1. That's very useful and makes .org file distribution much easier since
>> configuration is self-contained. Thanks.
>>
>> 2. I find that it doesn't work. For instance, this buffer
>>
>> -
>> #+BIND: org-export-with-section-numbers nil
>>
>> * one
>> something
>> -
>>
>> and this one:
>> -
>> #+BIND: org-export-with-section-numbers t
>>
>> * one
>> something
>> -
>>
>>  Export the same content, with section numbers. Only with this:
>> #+OPTIONS: num:nil
>>  can I export without section numbers.
>>
>>  Running org 6.29a on latest Emacs from CVS from today. I get no other error
>> messages.
>
> This was a bug, fixed, thanks.
>
>>
>> 3. I found it created one problem with custom time dates. I can't export this
>> buffer:
>> 
>> #+STARTUP: customtime
>> #+BIND: org-time-stamp-custom-formats '("<%d.m%m.%Y>" . "<%d.m%m.%Y %H:%M>")
>> # (setq org-time-stamp-custom-formats '("<%d.m%m.%Y>" . "<%d.m%m.%Y %H:%M>"))
>
> in #+BIND, the value should not be quoted, it will not be evaluated like it
> would in
> a setq form.  So you need:
>
> #+BIND: org-time-stamp-custom-formats ("<%d.m%m.%Y>" . "<%d.m%m.%Y %H:
> %M>")
>
>>
>> a date:
>>
>> <2006-03-25 sáb>
>> 
>>
>>  It fails with:
>>
>> Debugger entered--Lisp error: (wrong-type-argument arrayp quote)
>>  substring(quote 1 -1)
>>  (concat (if inactive "[" "<") (substring tf 1 -1) (if inactive "]" ">"))
>>  (format-time-string (concat (if inactive "[" "<") (substring tf 1 -1) (if
>> inactive "]" ">")) (apply (quote encode-time) time))
>> …
>>  org-translate-time(#("<2006-03-25 s\x00e1\ b>" 0 1 (fontified t) 1 2
>> (fontified t display #("25.m03.2006" 0 11 ...)) 2 3 (fontified t  org-dwidth 
>> t
>> org-dwidth-n 3 display #("25.m03.2006" 0 11 ...)) 3 15  (fontified t display
>> #("25.m03.2006" 0 11 ...)) 15 16 (fontified t  rear-nonsticky (mouse-face
>> highlight keymap invisible intangible  help-echo org-linked-text
>>
>>
>>  It fails only if I have that #+BIND line.
>>  You may eval or not the (setq), as needed; it's there only to test.
>>
>>
>>
>> 4. Being able to change any variable is dangerous. „Local variables“ in Emacs
>> have a confirmation dialog which asks whether you really  want to change 
>> them;
>> org may need something similar if it  reimplements local variables.
>>   Restricting changes to variables whose name is org-.* probably doesn't
>> prevent code execution, and anyway the good thing about # +BIND: is being 
>> able
>> to change anything. So maybe a confirmation  dialog can be used, or a switch.
>
> Yes, #+BIND might in principle open the possibility to execute
> code and in this way is a security risk.  Org-mode files as virus vectors.
> There are other, similar issues with executable code in org-eval.el,
> and with shell links, for example.
>
> I am not sure what the right course of a action is here.
>
> The most important thing is of course to only open Org files from
> trusted sources in Emacs.
>
> I guess we could use a switch . . . I have now implemented one.
> You need to confirm using BIND for each buffer that wants it,
> or you can configure the variable org-export-allow-BIND to
> allow them always, on your own risk.
>
> - Carsten


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


[Orgmode] Org-mode updated in CVS Emacs

2009-08-06 Thread Carsten Dominik

Hi,

the EMacs CVS truck now again contains a recent version
of Org-mode, specifically 6.29c.

- Carsten


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