all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org Remember idea
@ 2007-11-06 16:42 Tim O'Callaghan
  2007-11-06 18:38 ` Leo
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Tim O'Callaghan @ 2007-11-06 16:42 UTC (permalink / raw)
  To: emacs-orgmode

I've started using Remember mode more and more, and it has given me an
idea for new piece of functionality.

%c - insert clipboard/kill-ring at point

This is for 'auto' pasting links or snippets of text from my browser
into an org file.

What do you think?

Tim.

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

* Re: Org Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
@ 2007-11-06 18:38 ` Leo
  2007-11-06 18:39 ` Carsten Dominik
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Leo @ 2007-11-06 18:38 UTC (permalink / raw)
  To: emacs-orgmode

On 2007-11-06 16:42 +0000, Tim O'Callaghan wrote:
> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
>
> %c - insert clipboard/kill-ring at point
>
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.
>
> What do you think?
>
> Tim.

Inter-application copying and pasting is tricky now that Emacs can run
in terminal and X at the same time.

Within Emacs, remember can include the text in a region. It is a feature
of Remember.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Org Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
  2007-11-06 18:38 ` Leo
@ 2007-11-06 18:39 ` Carsten Dominik
  2007-11-06 19:42   ` Tim O'Callaghan
  2007-11-06 20:49 ` John Rakestraw
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Carsten Dominik @ 2007-11-06 18:39 UTC (permalink / raw)
  To: Tim O'Callaghan; +Cc: emacs-orgmode


On  6Nov2007, at 5:42 PM, Tim O'Callaghan wrote:

> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
>
> %c - insert clipboard/kill-ring at point
>
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.
>
> What do you think?

I think it is a good idea, but may backfire.  The current-kill can be  
HUGE
if you do not watch out.  Maybe limited to a certain lengths?

- Carsten

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

* Re: Org Remember idea
  2007-11-06 18:39 ` Carsten Dominik
@ 2007-11-06 19:42   ` Tim O'Callaghan
  2007-11-06 19:43     ` Tim O'Callaghan
  0 siblings, 1 reply; 19+ messages in thread
From: Tim O'Callaghan @ 2007-11-06 19:42 UTC (permalink / raw)
  To: emacs-orgmode

On 06/11/2007, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> On  6Nov2007, at 5:42 PM, Tim O'Callaghan wrote:
>
> > I've started using Remember mode more and more, and it has given me an
> > idea for new piece of functionality.
> >
> > %c - insert clipboard/kill-ring at point
> >
> > This is for 'auto' pasting links or snippets of text from my browser
> > into an org file.
> >
> > What do you think?
>
> I think it is a good idea, but may backfire.  The current-kill can be
> HUGE
> if you do not watch out.  Maybe limited to a certain lengths?
>
> - Carsten
>

I say dealers choice? a warning if its over 30 lines or so for those
that are new to it? I mean i should know what is in the clipboard
before i hit the remember key.

Another idea that i have been thinking about is 'remember-here'  or
'remember at point' where i can use a remember template to insert in
the current line in the current buffer. Either using the current
remember mode templates or another separate one, it could be argued
either way.

as for terminal vs X, that is quite tricky, but %c could be disabled
in windowing environments.

Tim.

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

* Re: Org Remember idea
  2007-11-06 19:42   ` Tim O'Callaghan
@ 2007-11-06 19:43     ` Tim O'Callaghan
  2007-11-06 19:43       ` Tim O'Callaghan
  0 siblings, 1 reply; 19+ messages in thread
From: Tim O'Callaghan @ 2007-11-06 19:43 UTC (permalink / raw)
  To: emacs-orgmode

On 06/11/2007, Tim O'Callaghan <tim.ocallaghan@gmail.com> wrote:
> On 06/11/2007, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> >
> > On  6Nov2007, at 5:42 PM, Tim O'Callaghan wrote:
> >
> > > I've started using Remember mode more and more, and it has given me an
> > > idea for new piece of functionality.
> > >
> > > %c - insert clipboard/kill-ring at point
> > >
> > > This is for 'auto' pasting links or snippets of text from my browser
> > > into an org file.
> > >
> > > What do you think?
> >
> > I think it is a good idea, but may backfire.  The current-kill can be
> > HUGE
> > if you do not watch out.  Maybe limited to a certain lengths?
> >
> > - Carsten
> >
>
> I say dealers choice? a warning if its over 30 lines or so for those
> that are new to it? I mean i should know what is in the clipboard
> before i hit the remember key.
>
> Another idea that i have been thinking about is 'remember-here'  or
> 'remember at point' where i can use a remember template to insert in
> the current line in the current buffer. Either using the current
> remember mode templates or another separate one, it could be argued
> either way.
>
> as for terminal vs X, that is quite tricky, but %c could be disabled
> in windowing environments.
>
> Tim.
>

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

* Re: Org Remember idea
  2007-11-06 19:43     ` Tim O'Callaghan
@ 2007-11-06 19:43       ` Tim O'Callaghan
  0 siblings, 0 replies; 19+ messages in thread
From: Tim O'Callaghan @ 2007-11-06 19:43 UTC (permalink / raw)
  To: emacs-orgmode

sorry - i mean disabled in non-windowing environments.

On 06/11/2007, Tim O'Callaghan <tim.ocallaghan@gmail.com> wrote:
> On 06/11/2007, Tim O'Callaghan <tim.ocallaghan@gmail.com> wrote:
> > On 06/11/2007, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> > >
> > > On  6Nov2007, at 5:42 PM, Tim O'Callaghan wrote:
> > >
> > > > I've started using Remember mode more and more, and it has given me an
> > > > idea for new piece of functionality.
> > > >
> > > > %c - insert clipboard/kill-ring at point
> > > >
> > > > This is for 'auto' pasting links or snippets of text from my browser
> > > > into an org file.
> > > >
> > > > What do you think?
> > >
> > > I think it is a good idea, but may backfire.  The current-kill can be
> > > HUGE
> > > if you do not watch out.  Maybe limited to a certain lengths?
> > >
> > > - Carsten
> > >
> >
> > I say dealers choice? a warning if its over 30 lines or so for those
> > that are new to it? I mean i should know what is in the clipboard
> > before i hit the remember key.
> >
> > Another idea that i have been thinking about is 'remember-here'  or
> > 'remember at point' where i can use a remember template to insert in
> > the current line in the current buffer. Either using the current
> > remember mode templates or another separate one, it could be argued
> > either way.
> >
> > as for terminal vs X, that is quite tricky, but %c could be disabled
> > in windowing environments.
> >
> > Tim.
> >
>

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

* Re: Org Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
  2007-11-06 18:38 ` Leo
  2007-11-06 18:39 ` Carsten Dominik
@ 2007-11-06 20:49 ` John Rakestraw
  2007-11-07  2:22   ` Bastien
  2007-11-06 22:42 ` Adam Spiers
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: John Rakestraw @ 2007-11-06 20:49 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 6009 bytes --]

> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
> 
> %c - insert clipboard/kill-ring at point
> 
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.
> 

I used planner mode for a while before switching to org mode, and still
occasionally look in on planner to see what they're doing. A couple of
weeks ago I stumbled on this in the list planner-el-discuss:

> Ever wanted to create a planner annotation or start remember directly
> from within an external web browser, say Firefox?  Here's how I do it.
> 
> I've registered special protocol handlers in the browser,
> "remember://" and "annotation://".  I've configured these handlers to
> call a script that passes the information to a running Emacs session
> using emacsclient/gnuclient.  The remember/annotation handlers are
> invoked through bookmarklets (bookmarks which execute JavaScript
> code).
> 
> The "remember://" protocol starts M-x remember with a planner link for
> the current website filled in, using the document title as the
> description of the link, just like planner-w3m does.
> 
> The "annotation://" protocol handler works similar to
> `planner-annotation-as-kill': it puts a planner link in the kill ring.

I would really like to have something like this for org. The poster
actually included the lisp code, the browser protocols, and the script
that did all this. I know next to nothing about lisp so was unable to
do anything with it, but is it possible that it could be easy for
someone who knows this stuff to adapt it to org?

In hopes that someone will look at it, I've posted the code below.
Apologies for the length of the post.

--John

;;; gjk-planner-annotation-helper.el --- start remember from a web
browser

;; Author: Geert Kloosterman <g.j.kloosterman@gmail.com>
;; Created: Sat Nov 19 22:33:18 2005
;; Updated: Thu Oct 25 17:48:41 2007
;; Keywords: planner remember

;;; Commentary:

;; 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'.
;;
;; 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) ;; javascript:location.href='annotation://' +
location.href + '%1C' + escape(document.title)

;; The helper script:
;;
;; #!/bin/sh
;; # planner-annotation-helper -- pass a remember-url to emacs
;; #
;; # Author: Geert Kloosterman <g.j.kloosterman@gmail.com>
;; # Date: Sat Nov 19 22:33:18 2005
;; 
;; if [ -z "$1" ]; then
;;     echo "$0: Error: no arguments given!" 1>&2
;;     exit 1
;; fi
;; 
;; # For years I've been using Martin Schwenke's dtemacs script to start
;; # Emacs.  The script uses gnuclient to connect to Emacs and starts a
;; # new Emacs process when necessary.
;; # See http://www.meltin.net/hacks/emacs/
;; #
;; # dtemacs -batch -eval "(progn (gjk/planner-annotation-helper
\"$1\" ) \"\")" ;; 
;; # As of Emacs 22 emacsclient will work too
;; emacsclient --eval "(progn (gjk/planner-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.
"planner-annotation-helper". ;;   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:

(autoload 'url-unhex-string "url")

(defun gjk/planner-annotation-helper (urlstring)
  """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 `planner-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  "^\\([^:]*\\):\\(/*\\)\\(.*\\)" urlstring)
      (let* ((proto (match-string 1 urlstring))
            (url+title (match-string 3 urlstring))
            (splitparts (split-string url+title "%1C"))
            (url (car splitparts))
            (title (cadr splitparts))
            plannerlink)
            
        (setq title (if (> (length title) 0) (url-unhex-string title)))
        (setq plannerlink (planner-make-link url title t))

        (raise-frame)
        (cond ((equal proto "remember")
               (remember (concat "\n\n" plannerlink)))
              ((equal proto "annotation")
               (message "Copied '%s' to the kill-ring." plannerlink)
               (kill-new plannerlink))
              (t 
               (error "unrecognized planner-helper protocol"))))
      (error "could not parse argument"))))

;;; planner-annotation-helper.el ends here

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
                   ` (2 preceding siblings ...)
  2007-11-06 20:49 ` John Rakestraw
@ 2007-11-06 22:42 ` Adam Spiers
  2007-11-07  8:43 ` Carsten Dominik
  2007-11-09  5:56 ` Dmitri Minaev
  5 siblings, 0 replies; 19+ messages in thread
From: Adam Spiers @ 2007-11-06 22:42 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Nov 06, 2007 at 05:42:03PM +0100, Tim O'Callaghan wrote:
> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
> 
> %c - insert clipboard/kill-ring at point
> 
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.
> 
> What do you think?
> 
> Tim.

With the patch I just posted to the concurrent thread concerning
embedding elisp in remember templates, this should easily be achieved
via something like

  %(x-clipboard-yank)

or you could even define a wrapper function `x-clipboard-yank-safely'
which watches out for the case where the clipboard contents are large
and handles the situation accordingly, then use it via

  %(x-clipboard-yank-safely)

Though `%c' is easier to type, of course :-)

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

* Re: Org Remember idea
  2007-11-06 20:49 ` John Rakestraw
@ 2007-11-07  2:22   ` Bastien
  2007-11-07  2:59     ` John Rakestraw
  0 siblings, 1 reply; 19+ messages in thread
From: Bastien @ 2007-11-07  2:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

John Rakestraw <lists@johnrakestraw.com> writes:

> I used planner mode for a while before switching to org mode, and still
> occasionally look in on planner to see what they're doing. A couple of
> weeks ago I stumbled on this in the list planner-el-discuss:

I had seen this as well and tried to adapt it for Org immediately.  I
didn't post the code here because I'm not using/testing it a lot, but
since others seem interested, here it is.


[-- Attachment #2: org-annotation-helper --]
[-- Type: application/octet-stream, Size: 657 bytes --]

#!/bin/sh
# org-annotation-helper -- pass a remember-url to emacs
#
# Author: Geert Kloosterman <g.j.kloosterman@gmail.com>
# Date: Sat Nov 19 22:33:18 2005

if [ -z "$1" ]; then
    echo "$0: Error: no arguments given!" 1>&2
    exit 1
fi

# For years I've been using Martin Schwenke's dtemacs script to start
# Emacs.  The script uses gnuclient to connect to Emacs and starts a
# new Emacs process when necessary.
# See http://www.meltin.net/hacks/emacs/
#
# dtemacs -batch -eval "(progn (gjk/planner-annotation-helper \"$1\" ) \"\")"

# As of Emacs 22 emacsclient will work too
emacsclient --eval "(progn (bzg/org-annotation-helper \"$1\" ) nil)"

# EOF

[-- Attachment #3: org-annotation-helper.el --]
[-- Type: application/emacs-lisp, Size: 4189 bytes --]

[-- Attachment #4: Type: text/plain, Size: 416 bytes --]


> I would really like to have something like this for org. The poster
> actually included the lisp code, the browser protocols, and the script
> that did all this.

I would summarize the step like this:

1. put org-annotation-helper in a path for executables

2. ~$ chmod +x org-annotation-helper

3. add the Org bookmarklet (right click on Firefox Personnal Toolbar to
   create a bookmark -- see the screenshot)


[-- Attachment #5: bookmarklet.png --]
[-- Type: image/png, Size: 14891 bytes --]

[-- Attachment #6: Type: text/plain, Size: 187 bytes --]


4. test it!

> In hopes that someone will look at it, I've posted the code below.

Please tell me if the code above is working for you.  As I said, I
didn't test it enough.

-- 
Bastien

[-- Attachment #7: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-07  2:22   ` Bastien
@ 2007-11-07  2:59     ` John Rakestraw
  2007-11-07 12:29       ` Bastien
  0 siblings, 1 reply; 19+ messages in thread
From: John Rakestraw @ 2007-11-07  2:59 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 846 bytes --]

Hi Bastien --

> Please tell me if the code above is working for you.  As I said, I
> didn't test it enough.

Thanks very much for this. I'm not sure that I have it working as you
intended. 

When I click on the annotate bookmarklet in firefox pops me into emacs
(into an already existing buffer) with a message that the link and page
title are in the kill-ring. Yanking gives me a nice link to the web
page, with the page title as the link text.

When I click on the remember bookmarklet, I'm taken to my standard
org-remember template screen asking me to select one of my templates.
The page link and title don't show up -- can I write a template that
incorporates this information?

I fear that I'm just being dense and that there's something obvious
that I'm not seeing. Any hints?

Thanks again.

-- 
John Rakestraw

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
                   ` (3 preceding siblings ...)
  2007-11-06 22:42 ` Adam Spiers
@ 2007-11-07  8:43 ` Carsten Dominik
  2007-11-09  5:56 ` Dmitri Minaev
  5 siblings, 0 replies; 19+ messages in thread
From: Carsten Dominik @ 2007-11-07  8:43 UTC (permalink / raw)
  To: Tim O'Callaghan; +Cc: emacs-orgmode


On  6Nov2007, at 5:42 PM, Tim O'Callaghan wrote:

> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
>
> %c - insert clipboard/kill-ring at point

Will be in 5.14, thanks.

- Carsten

>
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.
>
> What do you think?
>
> Tim.
>
>
> _______________________________________________
> 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 Remember idea
  2007-11-07  2:59     ` John Rakestraw
@ 2007-11-07 12:29       ` Bastien
  2007-11-07 21:17         ` John Rakestraw
  2008-01-14 11:35         ` Adam Spiers
  0 siblings, 2 replies; 19+ messages in thread
From: Bastien @ 2007-11-07 12:29 UTC (permalink / raw)
  To: emacs-orgmode

John Rakestraw <lists@johnrakestraw.com> writes:

> When I click on the annotate bookmarklet in firefox pops me into emacs
> (into an already existing buffer) with a message that the link and page
> title are in the kill-ring. Yanking gives me a nice link to the web
> page, with the page title as the link text.

This is all I used myself so far...

> When I click on the remember bookmarklet, I'm taken to my standard
> org-remember template screen asking me to select one of my templates.
> The page link and title don't show up -- can I write a template that
> incorporates this information?

My mistake.  Please replace this

,----
| (cond ((equal proto "remember")
|        (remember (concat "\n\n" orglink)))
`----

by this

,----
| (cond ((equal proto "remember")
|        (org-remember ?f))
`----

`?f' being the key for the Org template you want to use.  You will be
able to yank the link from the kill-ring once Carsten has implemented
this functionnality (as %c -- see recent discussion about this.)

Hope this will work correctly...

-- 
Bastien

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

* Re: Org Remember idea
  2007-11-07 12:29       ` Bastien
@ 2007-11-07 21:17         ` John Rakestraw
  2007-11-08  3:57           ` Bastien
  2007-11-08  4:59           ` Bastien
  2008-01-14 11:35         ` Adam Spiers
  1 sibling, 2 replies; 19+ messages in thread
From: John Rakestraw @ 2007-11-07 21:17 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2171 bytes --]

On Wed, 07 Nov 2007 12:29:00 +0000
Bastien <bzg@altern.org> wrote:

> Hope this will work correctly...

Yes, it works great. However, to make the remember function work I had
to add a line to the lisp, so that the relevant section now reads:

	(cond ((equal proto "remember")
	(kill-new orglink) ;; added to put the link in the kill-ring  
	(org-remember ?w))        
              ((equal proto "annotation")
               (message "Copied '%s' to the kill-ring." orglink)
               (kill-new orglink))

I don't fully understand why I needed to add the line -- all I know is
that without it the link isn't in the kill-ring when I yank it.

I couple this with this template:

("web-clip" ?w "* %^{Paste page title/URL}\n %u\n  :PROPERTIES:
\n  :END: \n  %?" "~/plans/webclips.org") 

I suspect I'll use this a lot -- thanks for setting it up. (And I
understand that once we have the functionality in the template to yank
the kill-ring to a point indicated by %c it will be simpler still.)

The next question is whether the link and perhaps other bits of
information can be passed as variables instead of via the kill-ring. I
ask because it would be great to block (and perhaps copy) a section of
a web page, click on the bookmarklet, and then see a template with the
link/title and the section of text that I blocked/copied already
entered. Something like this:

---->
* <link:[[http://www.nytimes.com/2007/11/07/][A news article]]
  [2007-11-07 Wed]
  :PROPERTIES:
  Here is the text I blocked/copied from the web page. It might be 3 or
  4 sentences, and it might be set off somehow either by quotation
  marks or perhaps a different indent level.

  <point is here for any notes I want to add to the entry>
---->

I don't know whether others will use this functionality. I confess that
part of my interest stems from my experience with the only program I
miss from my days using windows software -- a program called Zoot
(http://www.zootsoftware.com/). Zoot does many things, but one thing I
really like is that it makes it very easy to store, annotate, and
organize links to web pages. 

-- 
John Rakestraw

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-07 21:17         ` John Rakestraw
@ 2007-11-08  3:57           ` Bastien
  2007-11-09  3:27             ` John Rakestraw
  2007-11-08  4:59           ` Bastien
  1 sibling, 1 reply; 19+ messages in thread
From: Bastien @ 2007-11-08  3:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

John Rakestraw <lists@johnrakestraw.com> writes:

> I ask because it would be great to block (and perhaps copy) a section
> of a web page, click on the bookmarklet, and then see a template with
> the link/title and the section of text that I blocked/copied already
> entered.

I tried to do that.  Here's an updated version of org-annotation-helper.


[-- Attachment #2: org-annotation-helper.el --]
[-- Type: application/emacs-lisp, Size: 4624 bytes --]

[-- Attachment #3: Type: text/plain, Size: 543 bytes --]


The template I used is

  (?f "* %^{Paste the link}%?\n\n%:region")

The bookmarklet:

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

This basically add a :region property to the link created by the
bookmarklet, :region containing data from window.getSelection()

> I don't know whether others will use this functionality.

Would be nice to know... I didn't use it a lot myself for now;  I can
put the file somewhere on the web if needed.

-- 
Bastien

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-07 21:17         ` John Rakestraw
  2007-11-08  3:57           ` Bastien
@ 2007-11-08  4:59           ` Bastien
  2007-11-09  3:30             ` John Rakestraw
  1 sibling, 1 reply; 19+ messages in thread
From: Bastien @ 2007-11-08  4:59 UTC (permalink / raw)
  To: emacs-orgmode

John Rakestraw <lists@johnrakestraw.com> writes:

> On Wed, 07 Nov 2007 12:29:00 +0000
> Bastien <bzg@altern.org> wrote:
>
>> Hope this will work correctly...
>
> Yes, it works great. 

Thinking of this again: this is exactly the kind of functionnality that
could easily be demonstrated in a screencast.  Would you consider doing
one?  

You might check the xvidcap rpm for your system:

  http://atrpms.net/name/xvidcap/

-- 
Bastien

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

* Re: Org Remember idea
  2007-11-08  3:57           ` Bastien
@ 2007-11-09  3:27             ` John Rakestraw
  0 siblings, 0 replies; 19+ messages in thread
From: John Rakestraw @ 2007-11-09  3:27 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

On Thu, 08 Nov 2007 03:57:40 +0000
Bastien <bzg@altern.org> wrote:

> I tried to do that.  Here's an updated version of
> org-annotation-helper.

Thanks very much -- it's working nicely for me, and I'm hoping I've
learned enough from your example to rig up something similar that I can
use with claws-mail.

I know you're not reading this until next week, Bastien -- but thanks
for your efforts.

And thanks again to Carsten.

-- 
John Rakestraw

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-08  4:59           ` Bastien
@ 2007-11-09  3:30             ` John Rakestraw
  0 siblings, 0 replies; 19+ messages in thread
From: John Rakestraw @ 2007-11-09  3:30 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 464 bytes --]

On Thu, 08 Nov 2007 04:59:09 +0000
Bastien <bzg@altern.org> wrote:

> Thinking of this again: this is exactly the kind of functionnality
> that could easily be demonstrated in a screencast.  Would you
> consider doing one?  

Yes, I'll do something with this -- either in a screencast or a simple
howto -- once I tweak things a bit more and settle into regular use of
this. It would be a small way to give back to the community.


-- 
John Rakestraw

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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 Remember idea
  2007-11-06 16:42 Org Remember idea Tim O'Callaghan
                   ` (4 preceding siblings ...)
  2007-11-07  8:43 ` Carsten Dominik
@ 2007-11-09  5:56 ` Dmitri Minaev
  5 siblings, 0 replies; 19+ messages in thread
From: Dmitri Minaev @ 2007-11-09  5:56 UTC (permalink / raw)
  To: Tim O'Callaghan; +Cc: emacs-orgmode

On Nov 6, 2007 8:42 PM, Tim O'Callaghan <tim.ocallaghan@gmail.com> wrote:
> I've started using Remember mode more and more, and it has given me an
> idea for new piece of functionality.
>
> %c - insert clipboard/kill-ring at point
>
> This is for 'auto' pasting links or snippets of text from my browser
> into an org file.

Exactly what I did using StumpWM scripting capabilities. I posted the
code here: http://thread.gmane.org/gmane.emacs.orgmode/2240

I believe this can be done with any other scriptable window manager,
Sawfish, ion, etc.

-- 
With best regards,
Dmitri Minaev

Russian history blog: http://minaev.blogspot.com

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

* Re: Org Remember idea
  2007-11-07 12:29       ` Bastien
  2007-11-07 21:17         ` John Rakestraw
@ 2008-01-14 11:35         ` Adam Spiers
  1 sibling, 0 replies; 19+ messages in thread
From: Adam Spiers @ 2008-01-14 11:35 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Nov 07, 2007 at 12:29:00PM +0000, Bastien wrote:
> John Rakestraw <lists@johnrakestraw.com> writes:
> > When I click on the annotate bookmarklet in firefox pops me into emacs
> > (into an already existing buffer) with a message that the link and page
> > title are in the kill-ring. Yanking gives me a nice link to the web
> > page, with the page title as the link text.

Comments on this old thread:

  1. Bastien, would it be worth adding this to the Worg add-on page?

  2. Rather than having the javascript bookmarklet create a
     annotation://... URL which then invokes a custom handler, would
     another possibility be to have the javascript directly construct
     the link and write it to the clipboard?  Although I see that this
     would require jumping through some other hoops:

       http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard

     and I guess it wouldn't work for remember://... which requires
     more than putting something in the clipboard.

  3. Would gconf be a more browser-agnostic way of handling new
     protocols?  e.g.

       gconftool-2 -s /desktop/gnome/url-handlers/remember/command \
                   -t string 'org-annotation-helper %s'

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

end of thread, other threads:[~2008-01-14 11:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 16:42 Org Remember idea Tim O'Callaghan
2007-11-06 18:38 ` Leo
2007-11-06 18:39 ` Carsten Dominik
2007-11-06 19:42   ` Tim O'Callaghan
2007-11-06 19:43     ` Tim O'Callaghan
2007-11-06 19:43       ` Tim O'Callaghan
2007-11-06 20:49 ` John Rakestraw
2007-11-07  2:22   ` Bastien
2007-11-07  2:59     ` John Rakestraw
2007-11-07 12:29       ` Bastien
2007-11-07 21:17         ` John Rakestraw
2007-11-08  3:57           ` Bastien
2007-11-09  3:27             ` John Rakestraw
2007-11-08  4:59           ` Bastien
2007-11-09  3:30             ` John Rakestraw
2008-01-14 11:35         ` Adam Spiers
2007-11-06 22:42 ` Adam Spiers
2007-11-07  8:43 ` Carsten Dominik
2007-11-09  5:56 ` Dmitri Minaev

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.