From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 GP2UN3jCXGMZvAAAbAwnHQ (envelope-from ) for ; Sat, 29 Oct 2022 08:04:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qICQN3jCXGPI6gAA9RJhRA (envelope-from ) for ; Sat, 29 Oct 2022 08:04:40 +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 72D9B22667 for ; Sat, 29 Oct 2022 08:04:40 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooewt-0006aH-FZ; Sat, 29 Oct 2022 02:04:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooewg-0006Zs-DE for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 02:03:52 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooewe-0004t8-6M for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 02:03:49 -0400 Received: by mail-lj1-x231.google.com with SMTP id o4so10777005ljp.8 for ; Fri, 28 Oct 2022 23:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DAWjsgsjbm+qHH1jiPRCznSKsFHe2V/W5sRkqDx8mEY=; b=pGo7qXvdpJ7tNN+TCiKxC71wb4rktFqwU0wwbzifUKU69YFK/0XlXM8/aQ2xpLkIsi m5w/En/0u2JJtUkZfYzqvMye3UCBWBvPvkQwZuMXvExvUaBNJsDRsawiQaQOro6w7Jbm TC7IWirxKNpnxTFjzCKzy2DRcsYTuv/rKZRuarKBgnTMP1/9CBtnsqRdSFNTIKHRURqL OHhqol/QyMIQWh35uUiCvRswsoUXtegnd1Us/uUI1UqenvZ1lsaIFfi1GVGEbkFbcnkH UriDRO8UpylQW+Nf/sUycdG9BfbgcB5NGQwLg9kDcLh87lrRHOPiYyI5SD5lYeLMrz+0 WVWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DAWjsgsjbm+qHH1jiPRCznSKsFHe2V/W5sRkqDx8mEY=; b=ewX4r+COh2gyAnKQtaWpdubpBS0JFYiDLz0Ul6w7zj2ZrHCc/cHsQcATVoyF7gIIjM a1Nuy2PgtmcI7Iz1AsLy8kpPi3JqFYkdaajyg94rrliwWQgK29kSt9jCrgpEAvi4FV07 YYvxSjKU8m4mOnHOsn4mRzNdMQpbPNIIdTmr8zJEm0v59Er7ur+zxXI1rStL3H8qfZvg yZAe6twEccppjPw2/u+FZBPB4MNMidxvOWO8Qfcd0G2kmPLowHg2BJR+dTNTTBb4vxwr GPG4fsR93F1+z1bNhuTp8kmg0k5e1WfBjxOk8TyS2pNBExj4gQ8GlyHJB4oVDbn+881p E6bg== X-Gm-Message-State: ACrzQf2gOXuucjeR8rUWb2QbqOEp+xVGTTv9eqG5/GHIHFJM0QxMa/kp I2/5uAgsjSn0YgWkJnWMs2XTtpDLRS0lVSIVX00= X-Google-Smtp-Source: AMsMyM5FUuc5ZODtjwWYdJj5FXdDNKrvwlqY1Kg6sCP5JZVvebxugIuMdbzLH5o+HAa9kXIgvPTxm5E+8D/3GL/k9aw= X-Received: by 2002:a05:651c:a11:b0:26f:db4e:e7a6 with SMTP id k17-20020a05651c0a1100b0026fdb4ee7a6mr1120153ljq.361.1667023424891; Fri, 28 Oct 2022 23:03:44 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6520:4af1:b0:22a:e96a:7f9b with HTTP; Fri, 28 Oct 2022 23:03:43 -0700 (PDT) In-Reply-To: References: <87tuw31iub.fsf@mm.st> <87r0zelo7e.fsf@posteo.net> <875yg7qiyb.fsf@localhost> <87bkpvl4go.fsf@localhost> From: Samuel Wales Date: Fri, 28 Oct 2022 23:03:43 -0700 Message-ID: Subject: Re: Getting X selection reliably (Re: idea for capture anywhere in x) To: Max Nikulin Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=samologist@gmail.com; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1667023480; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DAWjsgsjbm+qHH1jiPRCznSKsFHe2V/W5sRkqDx8mEY=; b=o7WLhoKtaVa3/VxMQ5ckFouiJecM5KUC6C9xG291XVW5SdetMos0XPPkp+rPy/yLOUPITd G80NHLxhJmrtUbX6b2gE9aNiaOgxybzQ58iQzwjvIDxRTgSPMdjrMUT82WvxI83cbnsaZX yEGL/19TxXjBxh2hOMuLxM7wTlqfr7hVvs6czKH95OEucaBkx0LebOA+mRNOI5gd+MmLb3 723OrOJlkg0F1L+cuUf5hIZgFAh4GDx7qQLrgJ+0ZK+d8z/8/yV2hlvipORNLdLbxtYslk uIGLlLCBWEAfycBfUKuJt4EGKejoHuyTcyZzNzmGAoAQ3YHBwUuIXbkdA4WY+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667023480; a=rsa-sha256; cv=none; b=tVBElP7KiKY/Sma4q9uw9ZCypOi9Lu3xfYqtvQ1yAs/SdzHyNkb8NE2wSdRoKTnHp/o5tB DfeUjP2ccgKSBlCCnMA8gZV90uevLJwWj5IAjVMIHuNLLPhr1Hm1dEJjfdgcPdpBgzNsxT TRBNncCAFJoIr/0K0u3uGnoRghe81oh21wKid1E8KSafW1se6mBWwpXhm4uR6GngY1HI4A eHcQgIDiR+RIYoic9lqLAum5FJRTErG9ZlGES84wzFYo0PUJ70j2Zr8nELv51c58rNy36J EzY8qEYk27nJCnUegEyRtM+YFnLszcsXfwrwMNQ4RQJe84DjFgEMxnq969hTUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pGo7qXvd; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pGo7qXvd; 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: 72D9B22667 X-Spam-Score: -3.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: XrG31E8NThWe if what we are talking about is checking the text or metadata as org capture or emacs understands it against what we are capturing in a maximized application, by means of a popup and a human [myself], then: i'd say an emacs frame popping up over the application [whether the application is emacs or firefox or whatever] as just another frame for my normal emacs [which has some degree of optimization for ergo and accessibiity], but frame shrunk to fit the text, would actually be preferable to a separate popup application/notifier tool [which would require unfamiliar configuration and might not even be ergo or accessible or portable/lts], provided that it goes away after a configured delay, and does not require the keyboard or the mouse to make it go away. so an emacs frame is not a bad idea, just has to be done right. i think. > For other applications, since you have a requirement of maximized application window and purely mouse action, I am unsure if you managed to configure fluxbox to add a custom menu entry accessible in such layout. fluxbox is the only wm or de that seems to do everything i need. in this case, it is quite straightforward for me [or else i have put out of my mind any annoyance at previous years' efforts in making it work]. what it does is have a bar that drops down when mouse pointer hits top edge of window. this only works if the application is maximized or normalized rather than fullscreen in fluxbox's terminology. and that is the case for everything i'd need to capture. the only fullscreen apps i have are video players, and idk what the point of fullscreen is but with video players they seem to get fit to screen right then as opposed to having the video extend off teh edge of the screen or be tiny or whatever. i do not need to capture from vlc or mpv. [although a super-fancy doug englebart demo type of pov might have me grabbing a few minutes of video and capturing it and then speech to text from the video and metadata would be captured but i am not holding my breath or expecting that.] then rclick on that fluxbox bar drops down a fluxbox menu of highly useful things, which i can add a line to in .fluxbox/.menu to add one. usually shell commands. and also various fluxbox items like maximize and close. and menus i never use courtesy of fluxbox and debian]. it is copacetic. except for one rather annoying bug, which is that the bar stays there if i select anything from that manu, so i have to move pointer to the top again and then back to make it go away again. i gave up trying to fix that bug, wish it could be fixed. but adding a menu item is for me trivial. so that part is not part of the problem. i just open .menu and cargo cult a line that says capture. On 10/28/22, Max Nikulin wrote: > On 29/10/2022 09:59, Ihor Radchenko wrote: >> Max Nikulin writes: >> >>> %(org-get-x-clipboard 'PRIMARY) >>> " >>> :immediate-finish t) >>> >>> However to be at the safe side I would check if (org-get-x-clipboard >>> 'PRIMARY) value is not nil at first. >> >> My approach to this is simply showing a popup with captured heading >> after capture. If anything is wrong, I can quickly notice. >> >> Not sure if it is suitable for Samuel though. > > I started with a small wrapper that checks if Emacs server is running > and creates a new frame if it does not exist yet. So I avoided a pitfall > with empty string instead of selection. I intentionally do not use > :immediate-finish to inspect capture and to add some comment. > > Samuel wish to have minimal distraction: no sound, no popup window, > Emacs window is not raised in front of current application, visual > notification should disappear after some pause. > > That is why I believe that additional checks are required in such silent > workflow to avoid missed data in notes. > > > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com