emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Update to org-protocol-capture-html
@ 2016-04-04  5:16 Adam Porter
  2017-07-22 22:57 ` Nikolay Kudryavtsev
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Porter @ 2016-04-04  5:16 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Just a note to let you all know that I've updated org-protocol-capture-html:

https://github.com/alphapapa/org-protocol-capture-html

I've improved the instructions, and I added support for python-readability,
which extracts articles from web pages.  This makes it easy to quickly
capture a web page into Emacs as org-mode content.

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

* Re: Update to org-protocol-capture-html
  2016-04-04  5:16 Update to org-protocol-capture-html Adam Porter
@ 2017-07-22 22:57 ` Nikolay Kudryavtsev
  2017-07-23 22:35   ` Adam Porter
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Kudryavtsev @ 2017-07-22 22:57 UTC (permalink / raw)
  To: Adam Porter, emacs-orgmode

Sorry for kind of resurrecting this thread.

I've been trying to get this working and I noticed that bookmarklets 
only work with a single slash after org-protocol.

Does not work:

javascript:location.href = 'org-protocol://capture-html ...

Does work:

javascript:location.href = 'org-protocol:/capture-html ...

Is this a bug in org-protocol-capture-html documentation or // before 
protocol should actually work?

Another somewhat minor thing of note and this applies to generic 
org-protocol documentation too - we probably want to give emacsclient 
with -n flag in all protocol documentation. There's no point in 
stockpiling client processes, right?

-- 
Best Regards,
Nikolay Kudryavtsev

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

* Re: Update to org-protocol-capture-html
  2017-07-22 22:57 ` Nikolay Kudryavtsev
@ 2017-07-23 22:35   ` Adam Porter
  2017-07-24  6:52     ` Nikolay Kudryavtsev
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Porter @ 2017-07-23 22:35 UTC (permalink / raw)
  To: emacs-orgmode

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:

> Sorry for kind of resurrecting this thread.

Not at all.  :)  You might consider filing an issue on the GitHub
tracker, though, because I almost didn't notice this (just haven't been
watching the ml lately).

> I've been trying to get this working and I noticed that bookmarklets
> only work with a single slash after org-protocol.
>
> Does not work:
>
> javascript:location.href = 'org-protocol://capture-html ...
>
> Does work:
>
> javascript:location.href = 'org-protocol:/capture-html ...
>
> Is this a bug in org-protocol-capture-html documentation or // before
> protocol should actually work?

It should work.  Works for me and everyone else, AFAIK.  What version of
Org are you using?  It's currently set up to work with Org 9.0+.

> Another somewhat minor thing of note and this applies to generic
> org-protocol documentation too - we probably want to give emacsclient
> with -n flag in all protocol documentation. There's no point in
> stockpiling client processes, right?

That's an interesting point, but AFAIK that stockpiling doesn't happen.
I've never noticed it, anyway.  Have you actually seen it?

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

* Re: Update to org-protocol-capture-html
  2017-07-23 22:35   ` Adam Porter
@ 2017-07-24  6:52     ` Nikolay Kudryavtsev
  2017-07-24 23:50       ` Adam Porter
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Kudryavtsev @ 2017-07-24  6:52 UTC (permalink / raw)
  To: Adam Porter, emacs-orgmode

I'm using 9.0 too. It's just that I'm also using Windows. Maybe it's the 
only platform where this happens.

I even got the idea that you could use single slashes there from 
test-org-protocol.el, since the documentation for org-protocol is outdated.

Weirdly some tests in test-org-protocol.el use single slash, while some 
use double. I guess we need a comment on this from org-protocol dev.

Yeah, I've seen emacsclient stockpiling, it happens on Windows and 
should also happen on some other platforms, I guess, depending on how 
their protocol support and/or OS processes are implemented. By default 
emacsclient creates a process that waits till server reports that it's 
finished editing it. This works for stuff like git and other places 
where you want to edit something and then do something else from an 
external app. But for places where you're not doing anything else it's 
kind of pointless.

Bonus somewhat offtopic question: I remember that you could create a 
capture template that captures immediately, without launching a capture 
window. How is it done? Forgot to write down the instructions, the last 
time I tinkered with org-protocol.

-- 
Best Regards,
Nikolay Kudryavtsev

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

* Re: Update to org-protocol-capture-html
  2017-07-24  6:52     ` Nikolay Kudryavtsev
@ 2017-07-24 23:50       ` Adam Porter
  2017-07-27 11:58         ` Nikolay Kudryavtsev
  2017-07-27 15:40         ` Nikolay Kudryavtsev
  0 siblings, 2 replies; 9+ messages in thread
From: Adam Porter @ 2017-07-24 23:50 UTC (permalink / raw)
  To: emacs-orgmode

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:

> I'm using 9.0 too. It's just that I'm also using Windows. Maybe it's
> the only platform where this happens.

Yeah, I haven't even tried org-protocol on Windows.  When I'm in Windows
I use the Cygwin version of Emacs, and there are occasional issues with
the Windows fork() code, which I guess might interact with this.

> I even got the idea that you could use single slashes there from
> test-org-protocol.el, since the documentation for org-protocol is
> outdated.

I saw another thread where some folks are working to update that...

> Weirdly some tests in test-org-protocol.el use single slash, while
> some use double. I guess we need a comment on this from org-protocol
> dev.

That does seem weird.

> Yeah, I've seen emacsclient stockpiling, it happens on Windows and
> should also happen on some other platforms, I guess, depending on how
> their protocol support and/or OS processes are implemented. By default
> emacsclient creates a process that waits till server reports that it's
> finished editing it. This works for stuff like git and other places
> where you want to edit something and then do something else from an
> external app. But for places where you're not doing anything else it's
> kind of pointless.

On my system, the emacsclient process is killed when the org-capture
buffer appears.  I usually see this message, which I guess has something
to do with it (I don't fully understand how org-protocol works
internally):

"Greedy org-protocol handler.  Killing client."

Which protocol handler are you using?  Maybe the problem lies there.

> Bonus somewhat offtopic question: I remember that you could create a
> capture template that captures immediately, without launching a
> capture window. How is it done? Forgot to write down the instructions,
> the last time I tinkered with org-protocol.

C-h v org-capture-templates RET

Look for ":immediate-finish".  :)

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

* Re: Update to org-protocol-capture-html
  2017-07-24 23:50       ` Adam Porter
@ 2017-07-27 11:58         ` Nikolay Kudryavtsev
  2017-07-27 15:40         ` Nikolay Kudryavtsev
  1 sibling, 0 replies; 9+ messages in thread
From: Nikolay Kudryavtsev @ 2017-07-27 11:58 UTC (permalink / raw)
  To: Adam Porter, emacs-orgmode

Oh, I see. In org-protocol-protocol-alist you can define protocols with 
:kill-client t and this should close the server buffer for them. And on 
my machine it does it half-way - server-edit no longer pops them, but 
the process still hangs. Normal use of server works fine though - doing 
server-edit on a manually opened client buffer closes the process fine. 
I'll do some more debugging on that.

> C-h v org-capture-templates RET
>
> Look for ":immediate-finish"
Thanks. I don't have org-capture required, so I even got confused before 
why that variable documentation is empty. :-)

-- 
Best Regards,
Nikolay Kudryavtsev

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

* Re: Update to org-protocol-capture-html
  2017-07-24 23:50       ` Adam Porter
  2017-07-27 11:58         ` Nikolay Kudryavtsev
@ 2017-07-27 15:40         ` Nikolay Kudryavtsev
  2017-07-29  1:23           ` Adam Porter
  1 sibling, 1 reply; 9+ messages in thread
From: Nikolay Kudryavtsev @ 2017-07-27 15:40 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Adam Porter

My testing had shown that if in org-protocol-check-filename-for-protocol 
we have (server-delete-client _client) instead of (server-edit), the 
client process gets closed fine. May I propose such a change?

-- 
Best Regards,
Nikolay Kudryavtsev

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

* Re: Update to org-protocol-capture-html
  2017-07-27 15:40         ` Nikolay Kudryavtsev
@ 2017-07-29  1:23           ` Adam Porter
  2017-07-29 16:26             ` Nikolay Kudryavtsev
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Porter @ 2017-07-29  1:23 UTC (permalink / raw)
  To: emacs-orgmode

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:

> My testing had shown that if in
> org-protocol-check-filename-for-protocol we have (server-delete-client
> _client) instead of (server-edit), the client process gets closed
> fine. May I propose such a change?

Hi Nikolay,

I'm not sure if you're asking me or Nicolas.  But since we have observed
differences between platforms, I guess your proposal should be tested on
Linux, Mac OS, etc. to make sure it doesn't break anything on them.

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

* Re: Update to org-protocol-capture-html
  2017-07-29  1:23           ` Adam Porter
@ 2017-07-29 16:26             ` Nikolay Kudryavtsev
  0 siblings, 0 replies; 9+ messages in thread
From: Nikolay Kudryavtsev @ 2017-07-29 16:26 UTC (permalink / raw)
  To: Adam Porter, emacs-orgmode

Yeah, I'm asking whoever's currently doing the org-protocol maintenance. 
That's why I put you in copy, not to.;-)

You're right this has to be tested on all those platforms, but it's a 
more proper way, than doing server-edit...

-- 
Best Regards,
Nikolay Kudryavtsev

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

end of thread, other threads:[~2017-07-29 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04  5:16 Update to org-protocol-capture-html Adam Porter
2017-07-22 22:57 ` Nikolay Kudryavtsev
2017-07-23 22:35   ` Adam Porter
2017-07-24  6:52     ` Nikolay Kudryavtsev
2017-07-24 23:50       ` Adam Porter
2017-07-27 11:58         ` Nikolay Kudryavtsev
2017-07-27 15:40         ` Nikolay Kudryavtsev
2017-07-29  1:23           ` Adam Porter
2017-07-29 16:26             ` Nikolay Kudryavtsev

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).