all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-annotation-helper
       [not found] <200805161527.m4GFRMGN010370@dog.comp.uvic.ca>
@ 2008-05-17  0:16 ` Daniel M German
  2008-05-17 11:13   ` org-annotation-helper Carsten Dominik
  2008-05-19 17:19   ` org-annotation-helper Cezar Halmagean
  0 siblings, 2 replies; 19+ messages in thread
From: Daniel M German @ 2008-05-17  0:16 UTC (permalink / raw)
  To: emacs-orgmode


hi everybody,

I took the liberty of updating the elisp file that John Rakestraw sent
last week. I (think) have improved a bit and the description should be
easier to follow. I have also made it possible to insert the selected
text into the current buffer (the code was there, I just had to grab
it).

One major change: i have replaced the separator from "%1C" to
"::remember::" (the %1C never worked for me).

Let me know if you have questions/problems. 

http://turingmachine.org/~dmg/temp/org-annotation-helper.el


-- 
--
Daniel M. German                  
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-05-17  0:16 ` org-annotation-helper Daniel M German
@ 2008-05-17 11:13   ` Carsten Dominik
  2008-05-18 21:38     ` org-annotation-helper John Rakestraw
  2008-05-19 17:19   ` org-annotation-helper Cezar Halmagean
  1 sibling, 1 reply; 19+ messages in thread
From: Carsten Dominik @ 2008-05-17 11:13 UTC (permalink / raw)
  To: dmg; +Cc: emacs-orgmode

Hi,

I have now added this file to the contrib/lisp directory.  If
any of the authors does not agree with thi, please let me know.

- Carsten

On May 17, 2008, at 2:16 AM, Daniel M German wrote:
>
> hi everybody,
>
> I took the liberty of updating the elisp file that John Rakestraw sent
> last week. I (think) have improved a bit and the description should be
> easier to follow. I have also made it possible to insert the selected
> text into the current buffer (the code was there, I just had to grab
> it).
>
> One major change: i have replaced the separator from "%1C" to
> "::remember::" (the %1C never worked for me).
>
> Let me know if you have questions/problems.
>
> http://turingmachine.org/~dmg/temp/org-annotation-helper.el
>
>
> -- 
> --
> Daniel M. German
> http://turingmachine.org/
> http://silvernegative.com/
> dmg (at) uvic (dot) ca
> replace (at) with @ and (dot) with .
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-05-17 11:13   ` org-annotation-helper Carsten Dominik
@ 2008-05-18 21:38     ` John Rakestraw
  2008-05-19 12:28       ` org-annotation-helper Carsten Dominik
  0 siblings, 1 reply; 19+ messages in thread
From: John Rakestraw @ 2008-05-18 21:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi Dan, Carsten, Alan and others --

Dan, thanks for following up on this.

Carsten, I'm happy to have this added to the contrib/lisp directory.
However, I really shouldn't be listed in the code as an author. Bastien
did the initial adaptations of the code from the emacs-planner list. I
sent it to the list in response to Dan's query, but I think the only
tweak I added to the code (it's been months, so I'm not sure) was to
comment out one line that seemed redundant to me. These other guys are
the coders.

Alan, just to reinforce Dan's encouragement -- I remember being a
little puzzled when I first tried to set this up, but the perseverance
was well worth it -- it's been a great tool to get annotated links into
an org file collection. You're right, there are three bits of code --
the bookmarklets added to your browser, the shell script that Dan
calls the handler, and the org-annotation-helper.el module. Then you
have your org-remember template, but you don't even have to write that
-- just use Dan's. To set it all up, just work through Dan's
step-by-step listed in the commentary on the code. It's not nearly as
complicated as you might think -- and you can come back with particular
questions if you encounter problems. (Don't mean to be pushy or glib --
just a satisfied user....)

--John



> Hi,
> 
> I have now added this file to the contrib/lisp directory.  If
> any of the authors does not agree with thi, please let me know.
> 
> - Carsten
> 
> On May 17, 2008, at 2:16 AM, Daniel M German wrote:
> >
> > hi everybody,
> >
> > I took the liberty of updating the elisp file that John Rakestraw
> > sent last week. I (think) have improved a bit and the description
> > should be easier to follow. I have also made it possible to insert
> > the selected text into the current buffer (the code was there, I
> > just had to grab it).
> >
> > One major change: i have replaced the separator from "%1C" to
> > "::remember::" (the %1C never worked for me).
> >
> > Let me know if you have questions/problems.
> >
> > http://turingmachine.org/~dmg/temp/org-annotation-helper.el
> >
> >
> > -- 
> > --
> > Daniel M. German
> > http://turingmachine.org/
> > http://silvernegative.com/
> > dmg (at) uvic (dot) ca
> > replace (at) with @ and (dot) with .
> >
> >
> > _______________________________________________
> > 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


-- 
John Rakestraw

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-05-18 21:38     ` org-annotation-helper John Rakestraw
@ 2008-05-19 12:28       ` Carsten Dominik
  0 siblings, 0 replies; 19+ messages in thread
From: Carsten Dominik @ 2008-05-19 12:28 UTC (permalink / raw)
  To: John Rakestraw; +Cc: emacs-orgmode


On May 18, 2008, at 11:38 PM, John Rakestraw wrote:

> Hi Dan, Carsten, Alan and others --
>
> Dan, thanks for following up on this.
>
> Carsten, I'm happy to have this added to the contrib/lisp directory.
> However, I really shouldn't be listed in the code as an author.

Fixed, thanks.

- Carsten


> Bastien
> did the initial adaptations of the code from the emacs-planner list. I
> sent it to the list in response to Dan's query, but I think the only
> tweak I added to the code (it's been months, so I'm not sure) was to
> comment out one line that seemed redundant to me. These other guys are
> the coders.
>
> Alan, just to reinforce Dan's encouragement -- I remember being a
> little puzzled when I first tried to set this up, but the perseverance
> was well worth it -- it's been a great tool to get annotated links  
> into
> an org file collection. You're right, there are three bits of code --
> the bookmarklets added to your browser, the shell script that Dan
> calls the handler, and the org-annotation-helper.el module. Then you
> have your org-remember template, but you don't even have to write that
> -- just use Dan's. To set it all up, just work through Dan's
> step-by-step listed in the commentary on the code. It's not nearly as
> complicated as you might think -- and you can come back with  
> particular
> questions if you encounter problems. (Don't mean to be pushy or glib  
> --
> just a satisfied user....)
>
> --John
>
>
>
>> Hi,
>>
>> I have now added this file to the contrib/lisp directory.  If
>> any of the authors does not agree with thi, please let me know.
>>
>> - Carsten
>>
>> On May 17, 2008, at 2:16 AM, Daniel M German wrote:
>>>
>>> hi everybody,
>>>
>>> I took the liberty of updating the elisp file that John Rakestraw
>>> sent last week. I (think) have improved a bit and the description
>>> should be easier to follow. I have also made it possible to insert
>>> the selected text into the current buffer (the code was there, I
>>> just had to grab it).
>>>
>>> One major change: i have replaced the separator from "%1C" to
>>> "::remember::" (the %1C never worked for me).
>>>
>>> Let me know if you have questions/problems.
>>>
>>> http://turingmachine.org/~dmg/temp/org-annotation-helper.el
>>>
>>>
>>> -- 
>>> --
>>> Daniel M. German
>>> http://turingmachine.org/
>>> http://silvernegative.com/
>>> dmg (at) uvic (dot) ca
>>> replace (at) with @ and (dot) with .
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
> -- 
> John Rakestraw
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-05-17  0:16 ` org-annotation-helper Daniel M German
  2008-05-17 11:13   ` org-annotation-helper Carsten Dominik
@ 2008-05-19 17:19   ` Cezar Halmagean
  1 sibling, 0 replies; 19+ messages in thread
From: Cezar Halmagean @ 2008-05-19 17:19 UTC (permalink / raw)
  To: emacs-orgmode


> hi everybody,
>
> I took the liberty of updating the elisp file that John Rakestraw sent
> last week. I (think) have improved a bit and the description should be
> easier to follow. I have also made it possible to insert the selected
> text into the current buffer (the code was there, I just had to grab
> it).
>
> One major change: i have replaced the separator from "%1C" to
> "::remember::" (the %1C never worked for me).
>
> Let me know if you have questions/problems. 
>
> http://turingmachine.org/~dmg/temp/org-annotation-helper.el

How do you use this ? when I call it it just opens up the remember
buffer and asks me for a template. 

Cezar

^ permalink raw reply	[flat|nested] 19+ messages in thread

* org-annotation-helper
@ 2008-08-30 22:46 Richard G Riley
  2008-08-31  2:14 ` org-annotation-helper Nick Dokos
  0 siblings, 1 reply; 19+ messages in thread
From: Richard G Riley @ 2008-08-30 22:46 UTC (permalink / raw)
  To: org-mode


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

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?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-08-30 22:46 org-annotation-helper Richard G Riley
@ 2008-08-31  2:14 ` Nick Dokos
  2008-08-31  9:14   ` org-annotation-helper Richard G Riley
  2008-08-31 10:19   ` org-annotation-helper Richard G Riley
  0 siblings, 2 replies; 19+ messages in thread
From: Nick Dokos @ 2008-08-31  2:14 UTC (permalink / raw)
  To: Richard G Riley; +Cc: org-mode

Richard G Riley <rileyrgdev@googlemail.com> 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
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-08-31  2:14 ` org-annotation-helper Nick Dokos
@ 2008-08-31  9:14   ` Richard G Riley
  2008-08-31 10:19   ` org-annotation-helper Richard G Riley
  1 sibling, 0 replies; 19+ messages in thread
From: Richard G Riley @ 2008-08-31  9:14 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: org-mode, 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 <nicholas.dokos@hp.com> writes:

> Richard G Riley <rileyrgdev@googlemail.com> 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
>> 

-- 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-08-31  2:14 ` org-annotation-helper Nick Dokos
  2008-08-31  9:14   ` org-annotation-helper Richard G Riley
@ 2008-08-31 10:19   ` Richard G Riley
  2008-09-01 11:20     ` org-annotation-helper Peter Westlake
  1 sibling, 1 reply; 19+ messages in thread
From: Richard G Riley @ 2008-08-31 10:19 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: org-mode, 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>%1C<the 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 <g.j.kloosterman@gmail.com>
| ;;# 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!" 1>&2
| ;;    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 (match-string 3 info))
|              (splitparts (split-string url_title_region "%1C"))
|              (url (car splitparts))
|              (type (if (string-match "^\\([a-z]+\\):" url) 
|                        (match-string 1 url)))
|              (title (cadr splitparts))
|              (region (url-unhex-string (caddr splitparts)))
|              orglink)
|         (setq title (if (> (length title) 0) (url-unhex-string title)))
|         (setq url (if (> (length url) 0) (url-unhex-string url)))
|         (setq orglink (org-make-link-string url title))
|         (org-store-link-props :type type
|                               :link url
|                               :region region
|                               :description title)
|         (setq org-stored-links
|               (cons (list url title) org-stored-links))
|         ;; FIXME can't access %a in the template -- how to set annotation? (raise-frame)
|         (cond ((equal proto "remember")
|                (kill-new orglink)
|                (org-remember ?w))
| ;;             (yank)) I don't think I need this yank
|               ((equal proto "annotation")
|                (message "Copied '%s' to the kill-ring." orglink)
|                (kill-new orglink))
|               (t (error "unrecognized org-helper protocol"))))
|       (error "could not parse argument"))))
| 
| (provide 'org-annotation-helper)
`----

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-08-31 10:19   ` org-annotation-helper Richard G Riley
@ 2008-09-01 11:20     ` Peter Westlake
  2008-09-01 11:27       ` org-annotation-helper Carsten Dominik
  2008-09-01 14:14       ` org-annotation-helper Richard G Riley
  0 siblings, 2 replies; 19+ messages in thread
From: Peter Westlake @ 2008-09-01 11:20 UTC (permalink / raw)
  To: org-mode


On Sun, 31 Aug 2008 12:19:23 +0200, "Richard G Riley"
<rileyrgdev@googlemail.com> said:
> 
> 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())
> `----

I have a slightly different link, which works too:

javascript:location.href='remember://'+location.href+'::remember::'+escape(document.title)+'::remember::'+escape(window.getSelection())

On the subject of org-annotation-helper, the code has this comment about
%a:

> |         ;; FIXME can't access %a in the template -- how to set
> annotation? (raise-frame)

While I was trying to make this work, using a slightly earlier version,
I found that the %a would work if I had an active region selected at the
time. Before I could find out how to make a region active, or stop it
being needed, I found the new version of the code, and now I use
%:region. But it would be interesting to know why org-mode tests for
there being an active region; it seems to do it quite a lot. You need an
active region to convert a table with C-c |, for instance. Carsten, is
there any reason why it works this way?

Peter.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-09-01 11:20     ` org-annotation-helper Peter Westlake
@ 2008-09-01 11:27       ` Carsten Dominik
  2008-09-01 11:35         ` org-annotation-helper Peter Westlake
  2008-09-01 14:14       ` org-annotation-helper Richard G Riley
  1 sibling, 1 reply; 19+ messages in thread
From: Carsten Dominik @ 2008-09-01 11:27 UTC (permalink / raw)
  To: Peter Westlake; +Cc: org-mode


On Sep 1, 2008, at 1:20 PM, Peter Westlake wrote:

>
> On Sun, 31 Aug 2008 12:19:23 +0200, "Richard G Riley"
> <rileyrgdev@googlemail.com> said:
>>
>> 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())
>> `----
>
> I have a slightly different link, which works too:
>
> javascript:location.href='remember://'+location.href 
> +'::remember::'+escape(document.title) 
> +'::remember::'+escape(window.getSelection())
>
> On the subject of org-annotation-helper, the code has this comment  
> about
> %a:
>
>> |         ;; FIXME can't access %a in the template -- how to set
>> annotation? (raise-frame)
>
> While I was trying to make this work, using a slightly earlier  
> version,
> I found that the %a would work if I had an active region selected at  
> the
> time. Before I could find out how to make a region active, or stop it
> being needed, I found the new version of the code, and now I use
> %:region. But it would be interesting to know why org-mode tests for
> there being an active region; it seems to do it quite a lot. You  
> need an
> active region to convert a table with C-c |, for instance. Carsten, is
> there any reason why it works this way?

Hi Peter,

how else should Org know the range of lines to convert?
Or maybe I misunderstand your question?

- Carsten

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-09-01 11:27       ` org-annotation-helper Carsten Dominik
@ 2008-09-01 11:35         ` Peter Westlake
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Westlake @ 2008-09-01 11:35 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode

On Mon, 1 Sep 2008 13:27:18 +0200, "Carsten Dominik"
<dominik@science.uva.nl> said:

> > On the subject of org-annotation-helper, the code has this comment
> > about %a:
> >
> >> |         ;; FIXME can't access %a in the template -- how to set
> >> annotation? (raise-frame)
> >
> > While I was trying to make this work, using a slightly earlier
> > version, I found that the %a would work if I had an active region
> > selected at the time. Before I could find out how to make a region
> > active, or stop it being needed, I found the new version of the
> > code, and now I use
> > %:region. But it would be interesting to know why org-mode tests for
> > there being an active region; it seems to do it quite a lot. You
> > need an active region to convert a table with C-c |, for instance.
> > Carsten, is there any reason why it works this way?
>
> Hi Peter,
>
> how else should Org know the range of lines to convert? Or maybe I
> misunderstand your question?

If I use C-space to place the mark at the beginning of the table, and
move point to the end, then the region covers the table, and I would
expect C-c | to operate on the region. Instead, it ignores the region
and asks what size table to make. If I highlight a region using the
mouse, then it works.

Peter.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-09-01 11:20     ` org-annotation-helper Peter Westlake
  2008-09-01 11:27       ` org-annotation-helper Carsten Dominik
@ 2008-09-01 14:14       ` Richard G Riley
  1 sibling, 0 replies; 19+ messages in thread
From: Richard G Riley @ 2008-09-01 14:14 UTC (permalink / raw)
  To: Peter Westlake; +Cc: org-mode

"Peter Westlake" <peter.westlake@pobox.com> writes:

> On Sun, 31 Aug 2008 12:19:23 +0200, "Richard G Riley"
> <rileyrgdev@googlemail.com> said:
>> 
>> 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())
>> `----
>
> I have a slightly different link, which works too:
>
> javascript:location.href='remember://'+location.href+'::remember::'+escape(document.title)+'::remember::'+escape(window.getSelection())
>


Following Carstens post about using

(org-remember nil ?w)

to get the weblink template up with no prompting, and then using refile,
org-mode has taken on an entirely new position in my daily life - even
higher and more important! ....

my current template is:

	      ("Weblink" ?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" ) 

since I wanted to see the physical http link in order to launch firefox
using a hot key I have (return default for me is w3m).

^ permalink raw reply	[flat|nested] 19+ messages in thread

* org-annotation-helper
@ 2008-09-04 21:06 Robert Goldman
  2008-09-06 16:19 ` org-annotation-helper Christopher Suckling
  0 siblings, 1 reply; 19+ messages in thread
From: Robert Goldman @ 2008-09-04 21:06 UTC (permalink / raw)
  To: emacs-orgmode

Has anyone managed to get org-annotation-helper to work with Firefox 3
on Mac OSX Leopard?

I'm asking because I have the shell script in, working with emacs and
remember (from the shell), but when I try to invoke the remember links
from Firefox I get only the "protocol (remember) isn't associated with
any program" error.  This is known to occur when FF can't find the
program file, but AFAICT FF should be able to find the program file ---
I took the network.protocol-handler.app.remember preference value,
copied it into the shell, gave it a url, and it worked fine.

So there seems to be either

1.  something I'm not getting about how to define a ff protocol extension or

2.  something I don't get about invoking a shell script from FF in this
environment (rejected as a security hole in the latest FF?  Busted for
some reason under Mac OSX?).

If anyone has experience with this with the Mac, I'd be incredibly
grateful for any enlightenment.  For that matter, if anyone could even
tell me how I might get some trace information from FF when it tries to
handle this protocol, that would be great too.

Many thanks,
r

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2008-09-04 21:06 org-annotation-helper Robert Goldman
@ 2008-09-06 16:19 ` Christopher Suckling
  0 siblings, 0 replies; 19+ messages in thread
From: Christopher Suckling @ 2008-09-06 16:19 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, Sep 04, 2008 at 04:06:28PM -0500, Robert Goldman wrote:

> Has anyone managed to get org-annotation-helper to work with Firefox 3
> on Mac OSX Leopard?

I've got something even nicer almost up and running, assuming you like
Quicksilver; assorted scripts to insert links and remember notes from
Safari, Mail, Mutt (Terminal), Skim, Bibdesk, and, to a lesser degree,
any application with an AppleScript dictionary. Call up a remember
buffer or file directly from Quicksilver, as you find
convenient. Basically an extension of org-annotation-helper.

It's currently very much tailored to my workflow, so will require some
editing for others, a fair amount of setting up and is still not documented.

I've got a hideous week ahead; once complete I'll post the scripts
(AppleScript, bash and elisp) in their present crude form.

Best wishes,

Christopher

^ permalink raw reply	[flat|nested] 19+ messages in thread

* org-annotation-helper
@ 2009-05-03  9:50 thierry.volpiatto
  2009-05-04  9:43 ` org-annotation-helper Sebastian Rose
  0 siblings, 1 reply; 19+ messages in thread
From: thierry.volpiatto @ 2009-05-03  9:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,
I use org-annotation-helper.el with firefox.
When i have a region with multilines marked in firefox and i use
remember, the region is  sended to emacs but on one line (the newlines
are removed). 
Somebody know how to fix that?
Thanks.
-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2009-05-03  9:50 org-annotation-helper thierry.volpiatto
@ 2009-05-04  9:43 ` Sebastian Rose
  2009-05-04 12:04   ` org-annotation-helper thierry.volpiatto
  0 siblings, 1 reply; 19+ messages in thread
From: Sebastian Rose @ 2009-05-04  9:43 UTC (permalink / raw)
  To: thierry.volpiatto; +Cc: emacs-orgmode

Hi Thiery,


this is a problem of HTML. HTML has no linebreaks (or better: they are
ignored). Since the browser doesn't know about the linebreaks, you
simple get one line of text.


Only lists are send with linebreaks it seems.


For normal text this is no problem, just press `M-q' and everything is
fine (still anoying when copying source code though).




   Sebastian


thierry.volpiatto@gmail.com writes:
> Hi all,
> I use org-annotation-helper.el with firefox.
> When i have a region with multilines marked in firefox and i use
> remember, the region is  sended to emacs but on one line (the newlines
> are removed). 
> Somebody know how to fix that?
> Thanks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: org-annotation-helper
  2009-05-04  9:43 ` org-annotation-helper Sebastian Rose
@ 2009-05-04 12:04   ` thierry.volpiatto
  2009-05-04 16:30     ` org-annotation-helper Sebastian Rose
  0 siblings, 1 reply; 19+ messages in thread
From: thierry.volpiatto @ 2009-05-04 12:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi Sebastian!
Thank you for your answer.

Sebastian Rose <sebastian_rose@gmx.de> writes:

> Hi Thiery,
>
>
> this is a problem of HTML. HTML has no linebreaks (or better: they are
> ignored). Since the browser doesn't know about the linebreaks, you
> simple get one line of text.

Yes i see now.
>
> Only lists are send with linebreaks it seems.

Which kind of lists?

>
> For normal text this is no problem, just press `M-q' and everything is
> fine (still anoying when copying source code though).

Yes the problem is for source code.

>
>
>
>    Sebastian
>
>
> thierry.volpiatto@gmail.com writes:
>> Hi all,
>> I use org-annotation-helper.el with firefox.
>> When i have a region with multilines marked in firefox and i use
>> remember, the region is  sended to emacs but on one line (the newlines
>> are removed). 
>> Somebody know how to fix that?
>> Thanks.
>
>
> _______________________________________________
> 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
>

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: org-annotation-helper
  2009-05-04 12:04   ` org-annotation-helper thierry.volpiatto
@ 2009-05-04 16:30     ` Sebastian Rose
  0 siblings, 0 replies; 19+ messages in thread
From: Sebastian Rose @ 2009-05-04 16:30 UTC (permalink / raw)
  To: thierry.volpiatto; +Cc: emacs-orgmode

thierry.volpiatto@gmail.com writes:
>> Only lists are send with linebreaks it seems.
>
> Which kind of lists?


From Firefox I get bulleted lists in the form:

  * Here is the text of the first item
  * Second item...

And numbered lists:

  # first item
  # second item...


Hm - it's not that great :)


Regards,

  Sebastian


>
>>
>> For normal text this is no problem, just press `M-q' and everything is
>> fine (still anoying when copying source code though).
>
> Yes the problem is for source code.
>
>>
>>
>>
>>    Sebastian
>>
>>
>> thierry.volpiatto@gmail.com writes:
>>> Hi all,
>>> I use org-annotation-helper.el with firefox.
>>> When i have a region with multilines marked in firefox and i use
>>> remember, the region is  sended to emacs but on one line (the newlines
>>> are removed). 
>>> Somebody know how to fix that?
>>> Thanks.
>>
>>
>> _______________________________________________
>> 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
>>

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-05-04 16:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03  9:50 org-annotation-helper thierry.volpiatto
2009-05-04  9:43 ` org-annotation-helper Sebastian Rose
2009-05-04 12:04   ` org-annotation-helper thierry.volpiatto
2009-05-04 16:30     ` org-annotation-helper Sebastian Rose
  -- strict thread matches above, loose matches on Subject: below --
2008-09-04 21:06 org-annotation-helper Robert Goldman
2008-09-06 16:19 ` org-annotation-helper Christopher Suckling
2008-08-30 22:46 org-annotation-helper Richard G Riley
2008-08-31  2:14 ` org-annotation-helper Nick Dokos
2008-08-31  9:14   ` org-annotation-helper Richard G Riley
2008-08-31 10:19   ` org-annotation-helper Richard G Riley
2008-09-01 11:20     ` org-annotation-helper Peter Westlake
2008-09-01 11:27       ` org-annotation-helper Carsten Dominik
2008-09-01 11:35         ` org-annotation-helper Peter Westlake
2008-09-01 14:14       ` org-annotation-helper Richard G Riley
     [not found] <200805161527.m4GFRMGN010370@dog.comp.uvic.ca>
2008-05-17  0:16 ` org-annotation-helper Daniel M German
2008-05-17 11:13   ` org-annotation-helper Carsten Dominik
2008-05-18 21:38     ` org-annotation-helper John Rakestraw
2008-05-19 12:28       ` org-annotation-helper Carsten Dominik
2008-05-19 17:19   ` org-annotation-helper Cezar Halmagean

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.