From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mFdiHF4C9mFvjQAAgWs5BA (envelope-from ) for ; Sun, 30 Jan 2022 04:13:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UEv7GF4C9mGvgwAAauVa8A (envelope-from ) for ; Sun, 30 Jan 2022 04:13:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC26035BEE for ; Sun, 30 Jan 2022 04:13:33 +0100 (CET) Received: from localhost ([::1]:36350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nE0ei-0001HZ-OW for larch@yhetil.org; Sat, 29 Jan 2022 22:13:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nE0eK-0001HB-OQ for emacs-orgmode@gnu.org; Sat, 29 Jan 2022 22:13:08 -0500 Received: from [2a00:1450:4864:20::32f] (port=45054 helo=mail-wm1-x32f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nE0eH-0008H3-Tj for emacs-orgmode@gnu.org; Sat, 29 Jan 2022 22:13:08 -0500 Received: by mail-wm1-x32f.google.com with SMTP id l35-20020a05600c1d2300b0034d477271c1so6945479wms.3 for ; Sat, 29 Jan 2022 19:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jqywwsAYzzK+thR81CvNgvSONkbWQAaD3oCeonLvQP0=; b=FhOH0s5ay9ikCFKP23d4ZbSxR6wlpfvL2lzXzkz85URNY6D70QZbLEf+RCSXkzjwxa +Wdq5OoCcYiHJHdURzLUmF5heOlAJV/1WVU5vQfS9ghRcPSRkPU9+Sy2iDjRXORmYLwW ziCOhXrtpXuWS5x0u2LN8YDEBQd2aBseTleSdMLOW+eMrKLn2UGmNoE3RBceYo6Iz+iB 3IFJgAQvZgzPvgIikcvf9v75rDLSZWl18iBFkFM7v8I4vDqgts9Fbx2FVXX53Knn6AGo vu+ii1QkEkUco1plUKt1L9DcB5fNCjNigzrc72OYaAbuSausGpOLkQ+eu1QBT+yqOcdJ EoPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jqywwsAYzzK+thR81CvNgvSONkbWQAaD3oCeonLvQP0=; b=EC/22U6x2+7kXCwsk3DKrn2wseJ9KQtLBrf7BZqDy32er1N7R40OVuQiUoaF2p6WBi L2NvY2Pwxq4gf0ycdesWEMp97C//tTYFhMRV0YEAAfbE70mjvJ67Jr5Lnbyx9dZFAanL uUNvbvsHVdHSIJrF99mZu22b+SPh+0IOs8aYKzvDstKrxMDb5ZFsIqT59AuQNt96AaJ8 kUYxitWuKbQ4fCtxfYOxfVxISZWEQKVZC8Ae8cuYGBNzruh6ZNr47y61+cSOuDo3S6B5 mOTP57AetfOHyu7W7RuRpVNo0CqIc6rfn0dXzPs1SI0ZLPkjiY0BeQeUzOD6+LJzDKOK v9Uw== X-Gm-Message-State: AOAM531gBxxLdVDCWcD1Xc9XkEN7OiQm6ivQ4BRXIJ2xW85sL39YJ0eh Z1MSIOMmTQaxcDSyKdhI0KGbJg/K+k4= X-Google-Smtp-Source: ABdhPJzVvCcSlsC31Vieh/AL9C/IjeX6MldOZl8hZydnFbeZ3SWdKJPFYk8vPI20IRwPlKbLr6iTsg== X-Received: by 2002:a05:600c:5109:: with SMTP id o9mr21696700wms.149.1643512384103; Sat, 29 Jan 2022 19:13:04 -0800 (PST) Received: from pluto.localnet (alagny-552-1-21-233.w83-200.abo.wanadoo.fr. [83.200.40.233]) by smtp.gmail.com with ESMTPSA id g6sm8109019wrq.97.2022.01.29.19.13.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 19:13:03 -0800 (PST) From: chris To: emacs-orgmode@gnu.org Subject: Re: cut and paste not working after xdg-open "org-protocol://store-link?url=URL&title=TITLE" Date: Sun, 30 Jan 2022 04:12:51 +0100 Message-ID: <3701125.3ICyicTkgz@pluto> In-Reply-To: References: <1902025.jDVfpnRRgo@pluto> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=inkbottle007@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643512414; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jqywwsAYzzK+thR81CvNgvSONkbWQAaD3oCeonLvQP0=; b=l8qqr2rwOiVFf0oq+E8nygWYKxxORO08heuGfNlUWV6YfBQ957q76nGVv8o78aILA47BhN M9+Zryw2oHXyoLc0ue2D8viuHjTWotSsDx7k5AEuMM9q0+wexgvwx3XpD/Yr1p/iSOPpvh /RcyXaXK2Hrm5Efdz4kr+ZeRbPJbiHvy+SWpELfIwj1dAjZq5uQCu8I67BEJNieYXCZIR+ 9L2JB5tU2lanSC9Csw71/tfOamRalw2z3l651a9dyPUfEqqO0xIqE7vLBIYqzK8MU97yax xiSdcTilIPMsMulKN2jYqkj+U7Ec1uFL8KYoLEjhd1ybDtKeVCGVmnOyUzJtmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643512414; a=rsa-sha256; cv=none; b=J+gZqqoVeLwaE57Infe/yA/XmhOju2qQkieTkXUB48qVqntNl+6zPbqo5vVc5HL9xRI9U1 IdyI320jaK37hvqO4WZs9S2v/SPCaM63uWg5htlk+6IKYedLip2uxWbnNPnDO3ztinCj8q d/XXbov9l01Vx1CwZLLdY7MvHCHaJTHHFZ7Klkk/lhvX/YjxTsVYnUCKCAx74QtiopamZG wJfzs04HrjklODdAdbiOCoRjpzX4rczH3UXk1RWwKCteoZUO8wZdQoPFdvrrwRPQwCYTyb hIHlLrx2Ay/WCH7nY9yp9a7rAamhlilHbHmlig9CoBNLsjkNvwtJ2EeYEh7MLQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FhOH0s5a; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FhOH0s5a; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EC26035BEE X-Spam-Score: -3.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: Mcz6K8oYAfYn On Friday, 28 January 2022 13:40:45 CET Max Nikulin wrote: > On 27/01/2022 07:03, chris wrote: > > First: `xdg-open "org-protocol://store-link?url=URL&title=TITLE"` from a > > terminal. > > Then `M-x org-insert-link` in emacs, or not (it makes no difference). > > Then cut-and-paste from non-emacs-application (e.g., Kde's Konsole, or > > Firefox) to emacs. > > When doing `C-y` what it pastes is "URL", not what I have copied from > > Firefox. > > Just a data point: I can not reproduce it with X11, emacs-26.3, and Org > from git main HEAD. Maybe I will try with emacs-27 and Wayland in a few > days. > > emacs -Q -L ~/src/org-mode/lisp/ \ > -l org-protocol --eval '(server-start)' test.org > emacsclient 'org-protocol:/store-link?url=http://o.rg/&title=Tt1' > copy from firefox > C-y (org-yank) in Emacs pastes text that I copied from firefox. > > In some aspects your problem looks similar to: > > Max Nikulin. [PATCH] [BUG] org.el: Fix first call of `org-paste-subtree' > Mon, 29 Nov 2021 19:02:35 +0700. > https://list.orgmode.org/so2fh1$10kj$1@ciao.gmane.io Yes, yes, possibly Just something I've noticed, which is obvious, but I didn't thought about, and which has probably no bearing: 1- click on the bookmarklet 2- `C-c C-l Ret Ret` in an org-buffer, so the link is created (this step not necessary though) 3- if you do `C-y` you can see the URL is in the kill-ring But obviously there is no reason for this URL to be also in the Wayland (or x11) clipboard? (there is no law of nature saying that what is in emacs kill- ring must necessarily also be in wayland clipboard. I think there is a law of nature for the other way around though) In any case, in the case of Kde/Kwin/Wayland, it is not copied in the Wayland clipboard. Maybe it's in the description of org-protocol/store-link that the URL should be copied in emacs kill-ring, in any case, it is. But no it doesn't show in the kde/wayland clipboard (and why would it). > > > But why is there a `nil` here: > > > > https://github.com/emacs-mirror/emacs/blob/19dcb237/lisp/org/org-protocol. > > el#L467 > > > 4f346a66024/lisp/org/org-protocol.el#L467> > > > > And why is it working at all from `xdg-open > > "org-protocol://store-link?url=URL&title=TITLE"`, with a `nil` in that > > position? > > > > Note: `(org-protocol-store-link "U/T")` works, `(org-protocol-store-link > > "url=U&title=T")` doesn't work. Produces link `[[url=U&title=T]]` > > instead of `[[U][T]]`. > > What is the problem with nil there? New-style URIs are parsed before > they are passed to subprotocol handlers. Why are you trying to call > org-protocol-store-link directly? Right, right, right I was only trying to see if there was something obviously sticking out about the cut and paste issue. So you say "new style URIs are parsed before they are passed to subprotocol handler": so, no worries then. Thanks a lot for saying so. I've been searching but haven't found were they were parsed. I've probably haven't searched enough, and anyway it's of no bearing. Thanks again.