Re: [Orgmode] org-annotation-helper

2008-08-31 Thread Richard G Riley

I have found that the released code is wrong. I got it working for a
short while by following the instructions at the following link but tiny
little issues like the formatting of the javascript cause some cut and
paste issues and can easily break the system. In addition, when I create
my remember bookmakr if I select load this bookmark in the sidebar it
stops working completely.

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg06608.html

I will find out what the hiccup is today and post an update.


Nick Dokos [EMAIL PROTECTED] writes:

 Richard G Riley [EMAIL PROTECTED] wrote:

 
 Can someone please confirm they have org-annotation-helper working with
 Firefox/Iceweasel 3?

 I have not been able to get org-annotation-helper working at all
 w/Firefox 3. I get an unhandled exception in Javascript at the browser,
 don't know why:

 Error: uncaught exception: [Exception... Component returned failure code: 
 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]  nsresult: 0x80004005 
 (NS_ERROR_FAILURE)  location: JS frame :: 
 javascript:location.href='remember://'+location.href+'::remember::'+escape(document.title)+'::remember::'+escape(window.getSelection())
  :: TOP_LEVEL :: line 1  data: no]

 One of these years, I hope to get some time to dig deeper. For now,
 it's been back to copy-n-paste for me.

 Sorry I can't help,
 Nick

 
 If I type remember://hello in the address bar it works fine. If,
 however I click my bookmark with the following as the location then I
 get about:blank as the embedded link in my new remember buffer:
 
 javascript:location.href='remember://' + location.href + '::remember::'
 + escape(document.title) + '::remember::' +
 escape(window.getSelection())
 
 
 What could be wrong?
 
 
 
 ___
 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] org-annotation-helper

2008-08-31 Thread Richard G Riley

caveat : I do not know if this is optimal or even recommended but it now
works for me.

I have modified the code a little to remove hex from the actual link. I
have boxquoted all code so you will need to remove that.

firefox/iceweasel : To set up the bookmark link, simple create a new
book mark called remember in firefox and make this the location code:

,
| 
javascript:location.href='remember://%20'+location.href+'%1C'+escape(document.title)+'%1C'+escape(window.getSelection())
`

This is as simple as right click on your bookmark toolbar and
create new. Do *not* select load this bookmark in the sidebar - when I
selected this then links and region did not pass to the protocol handler
discussed in the comments below. I have no idea why and if someone could
explain why this should be I would be grateful.

Follow the instructions in the code to set up the shell script and the
protocol registry to handle the protocol when you click on the remember
bookmark. I would advise ignoring all annotation stuff and just
concentrate getting remember working for now.

The org-remember-template I now use is (note the addition of %:link which
shows the physical http link)

,
| (Web-Link ?w * %c \n  :PROPERTIES: \n  :Entered: %U\n  :END: \n\n  - link: 
%:link\n  - Quote:\n%:region\n  - End Quote\n\n  %?\n bookmarks.org 
Unfiled Clips) 
`

Using linux with X, I also modified the remember shell script to use wmctl to
bring emacs to the foreground.

I also reformatted the location codes to be on a single line.


,
| ;;; org-annotation-helper.el --- start remember from a web browser
| ;;
| ;; Author: bzg AT altern DOT org
| ;; Keywords: org remember
| ;;
| ;;; Commentary:
| ;;
| ;; [bzg:] This is an adapted version of the planner-mode extension the
| ;; was first posted by Geert Kloosterman [EMAIL PROTECTED] on
| ;; the Planner mailing list.  All comments below are his.
| ;;
| ;; We want to be able to pass a URL and document title directly from a
| ;; web browser to Emacs.
| ;;
| ;; We define a remember:// url handler in the browser and use a shell
| ;; script to handle the protocol.  This script passes the information
| ;; to a running Emacs process (using emacsclient/gnuclient).  We use 
| ;; bookmarklets to create the remember:// urls dynamicly.
| ;;
| ;; The protocol types currently recognized are:
| ;; 
| ;; remember:// start `remember' with the url and title filled in
| ;; annotation://   similar to `planner-annotation-as-kill' (org?)
| ;;
| ;; The urls used internally will have the following form:
| ;;
| ;;   remember://the web page url%1Cthe title
| ;;
| ;; The title will be url-hex-encoded.  %1C is the (url-encoded) low
| ;; ascii value for the field separator.
| ;;
| ;;
| ;; The bookmarklets:
| ;;
| ;; javascript:location.href='remember://' + location.href + '%1C' + 
escape(document.title) + '%1C' + escape(window.getSelection())
| ;; javascript:location.href='annotation://' + location.href + '%1C' + 
escape(document.title)
| ;;
| ;; The helper script:
| ;;
| ;;#!/bin/sh
| ;;# remember -- pass a remember-url to emacs
| ;;#
| ;;# Author: Geert Kloosterman [EMAIL PROTECTED]
| ;;# Date: Sat Nov 19 22:33:18 2005
| ;;#
| ;;# modified 31 Aug 2008 rgr : added call to wmctrl to bring emacs to the 
foreground
| ;;#
| ;; 
| ;;if [ -z $1 ]; then
| ;;echo $0: Error: no arguments given! 12
| ;;exit 1
| ;;fi
| ;; 
| ;;# To test uncomment following line
| ;;#echo $1  /tmp/remember.out
| ;;wmctrl -a emacs22
| ;;emacsclient --eval (progn (bzg/org-annotation-helper \$1\ ) nil)
| ;; 
| ;;# EOF
| 
| ;; Adding a protocol handler
| ;; -
| ;;
| ;; Firefox
| ;;
| ;; To add a protocol handler (eg: remember://) in Firefox, take the
| ;; following steps:
| ;;
| ;; - type in about:config in the location bar
| ;; - right click, select New -- String
| ;; - the name should be network.protocol-handler.app.remember 
| ;; - the value should be the executable, eg. remember.
| ;;   At least under Linux this does not need to be the full path to 
| ;;   the executable.
| ;;
| ;; See http://kb.mozillazine.org/Register_protocol for more details.
| ;;
| ;; Opera
| ;;
| ;; In Opera add the protocol in the Preferences-Advanced-Programs
| ;; dialog.
| 
| 
| ;; Code:
| 
| (require 'url)
| 
| (autoload 'url-unhex-string url)
| 
| (defun bzg/org-annotation-helper (info)
| (interactive)
|   Process an externally passed remember:// style url.
| 
| URLSTRING consists of a protocol part and a url and title,
| separated by %1C.
| 
| The protocol types currently recognized are:
| 
| remember:// start `remember' with the url and title
| annotation://   similar to `org-annotation-as-kill'.
|   (let ((remember-annotation-functions nil))
| ;; The `parse-url' functions break on the embedded url,
| ;; since our format is fixed we'll split the url ourselves.
| (if (string-match  ^\\([^:]*\\):\\(/*\\)\\(.*\\) info)
|   (let* ((proto (match-string 1 info))
|  (url_title_region 

[Orgmode] org-remember : auto template selection

2008-08-31 Thread Richard G Riley

Can someone give an example of org-remember being forced into using a
predefined template instead of prompting?

e.g I have a template

(Web-Link ?w * %^{Title|%:description} %^g\n  :PROPERTIES: \n  :Entered: 
%U\n  :END: \n  - title: %:title\n  - link: %:link\n  - Quote:\n%:region\n  
- End Quote\n\n  %?\n weblinks.org WebLinks) 

But

(org-remember w)

Still prompts as does

(org-remember ?w)

org-version: 6.06b




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


Re: [Orgmode] org-plot (generating graphs from org-mode)

2008-08-31 Thread Eric Schulte

Thanks for the feedback, much appreciated.  A new version of org-plot is
up on the git repo http://github.com/eschulte/org-plot/tree/master

detailed comments below...

William Henney [EMAIL PROTECTED] writes:
 *** [2008-08-28 Thu] Finding the table to plot
 =org-plot/goto-nearest-table= searches backward first, which means
 that if point is located in an options line for a following table,
 then it will find the previous table instead. This is usually
 undesired.

I changed this so it no longer looks backwards

 *** [2008-08-28 Thu] Columns with multi-word text
 Consider the following table:

 #+PLOT: title:Citas ind:0 deps:(3) type:2d with:histograms set:yrange [0:]
 | Sede  | Max cites | H-index |
 |---+---+-|
 | Chile |257.72 |   21.39 |
 | Leeds |165.77 |   19.68 |
 | São Paolo | 71.00 |   11.50 |
 | Stockholm |134.19 |   14.33 |
 | Morelia   |257.56 |   17.67 |

 In theory, this should plot the third column. However, the data
 point for São Paolo comes from the second column
 instead. Presumably this is because of the embedded space in Sõo
 Paolo. If I replace it with a unicode non-breaking space,
 São Paolo, then it works correctly.

you're right, I am now quoting non-text columns on export which takes
care of the problem you mentioned here.  Also, org-plot is now using to
gnuplot `xticlabel' command to use the ind columns values as labels in
the case that they are text.  (for an example plot your table from above
with the ind:1 option).  If you don't mind, I would like to add the
table you sent above to the example.org file in org-plot to demonstrate
this feature.

Thanks -- Eric


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


[Orgmode] feature inquiry

2008-08-31 Thread Stuart McLean
Hello everyone,

I have a large number of tasks that I do in a cyclic fashion, or at
least would _like_ to do regularly. I do this via a SCHEDULED keyword
under a TODO heading with a repeat like so

* cyclic category 1
** cyclic task 1
   SCHEDULED: 2008-07-31 Sun .+1d

I would like the following functionality: a checkbox cookie [/] or
something similar so that I could track compliance to a particular
cyclic task over the period of a month (or whatever) until I archive the
group of tasks. It would be easy to see if you did a task 31 days out 31
or 20 out of 31 and so on. I think this would be a good incentive for
trying to up the score so to speak.

If anyone has any ideas how to implement this, or if I am missing the
boat entirely and this functionality already exists, I would love to
hear it.

Thanks,

Stuart


___
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] Strange key binding problem

2008-08-31 Thread Samuel Wales
The keybinding for ESC right remains bound to forward-word even after
loading org.

What am I doing wrong below?  I must be missing something obvious.

;;[emacs is carbon emacs 22 on mac os x tiger, which runs as gui]
;;[org is 6.06b]
;;emacs -q from the default terminal
;;eval the following forms using c-x c-e
(defun alpha-add-path (p) (setq load-path (cons p load-path)))
(alpha-add-path [valid path]/org/lisp)
(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))
;;c-x c-f [myorgfile].org
;;result loads and colorizes correctly.  TAB works correctly for the mode.
;;m-x org-version
;;result Org-mode version 6.06b
;;c-h c ESC right
;;result ESC right (translated from escape right) runs the
command forward-word


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


[Orgmode] Re: Strange key binding problem

2008-08-31 Thread Samuel Wales
This is the header to the org file, in case it matters.

#+LINK: goor http://www.google.com/search?q=%s
#default is item todo pri tags
#+COLUMNS: %25ITEM %10DEADLINE %SCHEDULED %TODO %TAGS %PRIORITY
##+STARTUP: showall


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


Re: [Orgmode] org-plot (generating graphs from org-mode)

2008-08-31 Thread Eric Schulte
Thanks for the feedback, much appreciated.  A new version of org-plot is
up on the git repo http://github.com/eschulte/org-plot/tree/master

detailed comments below...

William Henney [EMAIL PROTECTED] writes:
 *** [2008-08-28 Thu] Finding the table to plot
 =org-plot/goto-nearest-table= searches backward first, which means
 that if point is located in an options line for a following table,
 then it will find the previous table instead. This is usually
 undesired.

I changed this so it no longer looks backwards

 *** [2008-08-28 Thu] Columns with multi-word text
 Consider the following table:

 #+PLOT: title:Citas ind:0 deps:(3) type:2d with:histograms set:yrange [0:]
 | Sede  | Max cites | H-index |
 |---+---+-|
 | Chile |257.72 |   21.39 |
 | Leeds |165.77 |   19.68 |
 | São Paolo | 71.00 |   11.50 |
 | Stockholm |134.19 |   14.33 |
 | Morelia   |257.56 |   17.67 |

 In theory, this should plot the third column. However, the data
 point for São Paolo comes from the second column
 instead. Presumably this is because of the embedded space in Sõo
 Paolo. If I replace it with a unicode non-breaking space,
 São Paolo, then it works correctly.

you're right, I am now quoting non-text columns on export which takes
care of the problem you mentioned here.  Also, org-plot is now using to
gnuplot `xticlabel' command to use the `ind' column's values as labels
in the case that they are text.  (to demonstrate, plot your table from
above with the ind:1 option).  If you don't mind, I would like to add
the table you sent above to the example.org file in org-plot to
demonstrate this feature.

Thanks -- Eric


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