From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wPBDEDsAQ2P0ewEAbAwnHQ (envelope-from ) for ; Sun, 09 Oct 2022 19:09:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CM1NDzsAQ2NMpgAAG6o9tA (envelope-from ) for ; Sun, 09 Oct 2022 19:09:15 +0200 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 06B872D70D for ; Sun, 9 Oct 2022 19:09:15 +0200 (CEST) Received: from localhost ([::1]:56606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohZnd-0002nI-El for larch@yhetil.org; Sun, 09 Oct 2022 13:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohZn9-0002nA-Lm for emacs-orgmode@gnu.org; Sun, 09 Oct 2022 13:08:43 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:42393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohZn7-0000eF-Mq for emacs-orgmode@gnu.org; Sun, 09 Oct 2022 13:08:43 -0400 Received: from localhost ([::ffff:197.239.6.155]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000BBD14.0000000063430017.0000323A; Sun, 09 Oct 2022 10:08:39 -0700 Date: Sun, 9 Oct 2022 20:08:25 +0300 From: Jean Louis To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: idea for capture anywhere in x Message-ID: Mail-Followup-To: Max Nikulin , emacs-orgmode@gnu.org References: <87sgbsq2t5.fsf@gmail.com> <87tuw31iub.fsf@mm.st> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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=1665335355; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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; bh=CebGGmOB0HMrEBDP7mlK62bKtcFdYLrZxUkKKv8J5rw=; b=e623Dhk+uZzLRjD3R2ZazGR+ce/y0PW+weAUVZQXVeGdziAG+D4XiWjZbUBPcC7uMywpft z5VGo4aEM+XBO7ryTu9n76ltUv0BzDDTcH+JYXa6dUbJ8Kh5wIrPVl9wJfdllbSjpgtxGA AvtZangFLN+ZoXszUsbhJtZfyuHY54HUDwxJfHzxPGBE495hsffPLHyn0etfY7cORZm82H fWuZ/vytgM08fS7/2Ie9988/5FXLDRpMxuZrjFTHXRuIEo82ZHp4/Z3odtupfHPb+GVw1y fQBVaN+imh0UhXWF1DuvtAjS2S8ED4NgqMaNfSVoGEs1iQNs28Zl9LcXia98Rg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665335355; a=rsa-sha256; cv=none; b=cKXg6OT8oJdkpVGxPBgwrrPI2IqhRzVyNx3QA2vx11x8geRnkDvxuQ7zes0/+lONcW8448 G+uBGq7G5zNcmoTt49kbEtq/2YISAu7nJhkYsXGDRKYdcmMyrAXPOQp1flN06O0Rqkgles BjPDCnJ5cn7GVZtDU1ZxEpOc+Gy6aTuFoPRXHZEkKB4mZubdY7E+jbmR99M5c0vWwKKaOl UvqrXgx3iQ7KfN7ytpAbpT6kgA1TBNxxmWCy46LY615OTCRnCSV6+kFvxtZD6zB2Xz3NSO Kvph8plkZHhjhRT7kUNTjxPOl6+75Uzc0jZmDM06Iy3106JQ30b9yOMT7HCF0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -1.68 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 06B872D70D X-Spam-Score: -1.68 X-Migadu-Scanner: scn0.migadu.com X-TUID: SXtDucC9aVO6 * Max Nikulin [2022-10-09 19:41]: > On 09/10/2022 21:47, Jean Louis wrote: > > > > I have basic concept to capture X selection in file and get it in > > Emacs. It is not really related to Org, one can capture X selection > > and record it anyhow. There is no need for org-protocol this way. > > > > File: ~/bin/capture-x-selection.sh > > > > #!/usr/bin/bash > > TEMP=/tmp/xselection.txt > > xsel -o > $TEMP > > Jean, take a breath and think several minutes on your recipe. You will > figure out that (perhaps unsafe) intermediate file is redundant. Emacs can > access text/plain target of PRIMARY_SELECTION and CLIPBOARD directly (anyway > xsel, unlike xclip, is not your friend if you need more). In default > configuration C-y yanks from CLIPBOARD, mouse middle click from > PRIMARY_SELECTION. Thank you. Directly of courseworks, but that would mean that you have to make several clicks, not just one click. It also implies you must have Emacs in front of you, and not sitting around as server in background or anywhere. You must be on window manager workspace with Emacs to capture X selection as without Emacs in front of you, how do you invoke it in that case? > The idea of org-protocol is to pass more data. It is structured data, something like '(:url "https://www.example.com" :title "Something" :body "More here") and it may be anything in general. But no, I don't find it appealing in itself apart from using those ready made browser extensions. In fact when we speak of capturing any selection from X, I would not like relying on Emacs, it would be better using SQLite or PostgreSQL for that. One can define templates and forms and use some graphical dialogs like yad, zenity, which then insert things into database. Once in Emacs, it is easy to convert it without doing anything, to Org or any other type of file. Of course I don't use Org capture browser extensions to insert anything in Org files. Not when I have it faster and better. > Outside of Org there is e.g. remember mode (info "remember") > https://www.gnu.org/software/emacs/manual/html_mono/remember.html > You might notice remnants of org-remember in docs related to org-capture. That is great simplest note taking system. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/