From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: server.el problem ? Date: Wed, 01 Aug 2012 16:25:59 +0200 Message-ID: <87ipd2y9hk.fsf@thinkpad.tsdh.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343831187 2014 80.91.229.3 (1 Aug 2012 14:26:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2012 14:26:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 16:26:27 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SwZsU-00040A-VM for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2012 16:26:23 +0200 Original-Received: from localhost ([::1]:43675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZsU-0002bI-8F for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2012 10:26:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZsI-0002ag-H8 for emacs-devel@gnu.org; Wed, 01 Aug 2012 10:26:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwZsA-0003PT-UR for emacs-devel@gnu.org; Wed, 01 Aug 2012 10:26:10 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:37031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwZsA-0003PJ-OV for emacs-devel@gnu.org; Wed, 01 Aug 2012 10:26:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id E20D2D238D; Wed, 1 Aug 2012 16:26:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TqvMJHQQohgV; Wed, 1 Aug 2012 16:26:01 +0200 (CEST) X-CHKRCPT: Envelopesender noch tsdh@gnu.org Original-Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id A8C35D238B; Wed, 1 Aug 2012 16:26:00 +0200 (CEST) Mail-Followup-To: Fabrice Popineau , emacs-devel@gnu.org In-Reply-To: (Fabrice Popineau's message of "Wed, 1 Aug 2012 14:01:14 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.26.64.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152080 Archived-At: Fabrice Popineau writes: Hi Fabrice, > javascript:location.href='org-protocol://capture://'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title)+'/'+ > encodeURIComponent(window.getSelection()) > > but org-protocol failed to capture anything. The reason was that the > emacsclientw.exe directory was added to the org-protocol url. > I traced the problem to server.el and I had to patch it this way: > > [patch] > > to prevent addition of the current directory to the org-protocol url. > This is a crude patch, but anyway, I have the feeling nothing should be > added to 'file' when it is 'absolute' or when it is a url like in this > case. > > Have I done something wrong? Or is there a problem here ? Dunno exactly, but at least for me typing % emacsclient org-protocol://capture://www.google.de in a terminal while the emacs server is running opens a new org capture buffer with a link to www.google.de prefilled, no nothing's added. AFAIKS, that's exactly what your javascript snippet also does, isn't it? I run a very recent bzr emacs, so maybe the problem is already solved in between 24.1 and now... Bye, Tassilo