From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: protocol capture without url corrupts org-stored-links [9.1.14 (9.1.14-1059-gadec50-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20181211/)] Date: Wed, 12 Dec 2018 17:38:24 +0100 Message-ID: <87tvjiittr.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8nk-0005g2-M7 for emacs-orgmode@gnu.org; Wed, 12 Dec 2018 13:00:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8nh-0005NH-7P for emacs-orgmode@gnu.org; Wed, 12 Dec 2018 13:00:04 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8ng-0005Kh-Vt for emacs-orgmode@gnu.org; Wed, 12 Dec 2018 13:00:01 -0500 In-Reply-To: (Allen Li's message of "Tue, 11 Dec 2018 19:38:06 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Allen Li Cc: Org Mode List Hello, Allen Li writes: > I didn't realize that org-protocol-capture is documented for URLs, > since the concept of capturing through org-protocol is useful for > non-web browser contexts. > > Anyway, I'm not interested in updating the documentation for > org-protocol-capture at the moment, but even if org-protocol-capture > is documented to need a URL, it seems wrong for it to corrupt > org-stored-links but otherwise function correctly if a URL was not > provided. Could you give more context about the bug you're encountering? What does mean "function correctly if a URL was not provided"? What is the use case? What result did you expect, besides not encountering an error message? There are multiple ways to solve this. In particular, if a URL is not provided, it seems natural to store nil instead, as `org-protocol-capture' currently does. If we do not support missing URL, then it should raise an error instead of letting it slip into `org-insert-link'. If we do, then `org-insert-link' should handle it gracefully. So, again, more context could help understanding what is the best solution. Regards, -- Nicolas Goaziou