From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4I64Muc6V1/mFQAA0tVLHw (envelope-from ) for ; Tue, 08 Sep 2020 08:03:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QMmaLuc6V19IbgAAbx9fmQ (envelope-from ) for ; Tue, 08 Sep 2020 08:03:51 +0000 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 0AB959402CB for ; Tue, 8 Sep 2020 08:03:51 +0000 (UTC) Received: from localhost ([::1]:33876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFYbV-0006XC-LX for larch@yhetil.org; Tue, 08 Sep 2020 04:03:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFYbA-0006Wq-3U for emacs-orgmode@gnu.org; Tue, 08 Sep 2020 04:03:28 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:46652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFYb8-0007fe-9X for emacs-orgmode@gnu.org; Tue, 08 Sep 2020 04:03:27 -0400 Received: by mail-ej1-x631.google.com with SMTP id z23so21117311ejr.13 for ; Tue, 08 Sep 2020 01:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzamboni-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u3VlGNcIGUWTACldi14wlbSV77RINFoQsDb6GuWJXEc=; b=MAka4kl8lKrwOAv2+2gsFWKXt2u/hvpj4mmUTdvYYd7rclJBaHdrwl5P7Emzf+nzJA 2Nm/4GN0pYqzkkIuFOzw3/K+iLqhRxweNB8VcvIZgABjoXyMCdMGEcw0Ybaodr+3PARS FamrXj0dhxWmJHVvy3Dh23Wj3guUgSePySZGLtNovgw9xQTW65jcQmRyNwld3GEALlNX hRsKQ0sWshZoF9niL+jazVojPfLBw0ubUAmnIbiYQ4lDnJecJ0VMGBl5R1/w91yGqt3g hNdeu8BXGdZDYwE1QgXG5C/6ISuXzOuJPoNdrPpP184VVaXqZlltNv2bHqB93c0iv550 hSzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u3VlGNcIGUWTACldi14wlbSV77RINFoQsDb6GuWJXEc=; b=PTFuXF6P1WjtmgJyCuVUlz0Zftc8fobnMgzdQdDAUnwZ4DHKFJirWMEW9hDPOQj5E2 WMym7wqubulX5ddKyN5CQ3HP1k8IXFHYzi6nLb3B9MzOJQ06fwrKsPsfYYRFfOPfv/dR cTngFUie/77ByQ6sszNeSS3iflrdRHXZrkN4cwa9qr17h+5yfGPY9TA089KuAhV/qYtm I7OijG5NuxG+TohBgm4zxP/h9G6nP5pS4ZTEcGIijvRrSRwyUgTGrrpSC8HTq+xWwQX4 JZMXx5e8ChsP5t5oaQxN3HoeEe3D34spL33TWbCq0lN+yWSw5rT9Mhjb+sWYAocP+FQB JP9A== X-Gm-Message-State: AOAM530pkocnF7bRErAo3edo+zWwlOkxovc1yvJkPRP1HFWZXlM2hpUm 1hFzcn+G7foUn4k7v1R4Fplb6VRj5eoJgO+BMbOQLg== X-Google-Smtp-Source: ABdhPJw5DaTlcxSh2rydwlqIeevjmU2g7upyhvXIqW7YhHDL1zTbpL0uS7Oh7Tj3XAJHFD31e7qy0Yv0w89J2860XPU= X-Received: by 2002:a17:906:c830:: with SMTP id dd16mr395544ejb.196.1599552204247; Tue, 08 Sep 2020 01:03:24 -0700 (PDT) MIME-Version: 1.0 References: <87sgbsq2t5.fsf@gmail.com> <87pn6wq1wt.fsf@gmail.com> In-Reply-To: From: Diego Zamboni Date: Tue, 8 Sep 2020 10:03:13 +0200 Message-ID: Subject: Re: idea for capture anywhere in x To: Maxim Nikulin Content-Type: multipart/alternative; boundary="000000000000ef2d9405aec8c47b" Received-SPF: none client-ip=2a00:1450:4864:20::631; envelope-from=diego@zzamboni.org; helo=mail-ej1-x631.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zzamboni-org.20150623.gappssmtp.com header.s=20150623 header.b=MAka4kl8; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: kBSnvOOWvvVE --000000000000ef2d9405aec8c47b Content-Type: text/plain; charset="UTF-8" Doom Emacs has an 'org-capture' script that uses emacsclient to externally invoke a new frame with 'org-capture' in it. Maybe this could be a good starting point? https://github.com/hlissner/doom-emacs/blob/develop/bin/org-capture --Diego On Tue, Sep 8, 2020 at 9:19 AM Maxim Nikulin wrote: > 08.09.2020 12:21, Tim Cross wrote: > > > > How you add this to a window manager menu or key binding will depend on > > your window manager, but essentially, you just calling emacscleint with > > the argument -e (org-capture). You may need to quote the command to > > prevent shell interpolation of the command and you may need to add other > > arguments, such as -n or --no-wait etc. > > Good point. However playing with a script for org protocol, I realized > that there could be no emacs frame yet, so I added --create-frame > depending on output of > > emacsclient --quiet --eval \ > "(seq-some (lambda (f) (if (eq 'x (framep f)) 'has-frame 'no-frame)) > (frame-list))" \ > 2>&1 > > Another point is to provide feedback (notify-send, kdialog, zenity, > etc.) if emacs server is not running at all (non-zero exit code of the > shell command above). Though since Samuel is already using org-protocol, > it should not be a problem. > > > --000000000000ef2d9405aec8c47b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Doom Emacs has an 'org-capture' script that us= es emacsclient to externally invoke a new frame with 'org-capture' = in it. Maybe this could be a good starting point?

https://githu= b.com/hlissner/doom-emacs/blob/develop/bin/org-capture

--Diego
On T= ue, Sep 8, 2020 at 9:19 AM Maxim Nikulin <manikulin@gmail.com> wrote:
08.09.2020 12:21, Tim Cross wrote:
>
> How you add this to a window manager menu or key binding will depend o= n
> your window manager, but essentially, you just calling emacscleint wit= h
> the argument -e (org-capture). You may need to quote the command to > prevent shell interpolation of the command and you may need to add oth= er
> arguments, such as -n or --no-wait etc.

Good point. However playing with a script for org protocol, I realized
that there could be no emacs frame yet, so I added --create-frame
depending on output of

emacsclient --quiet --eval \
=C2=A0 =C2=A0"(seq-some (lambda (f) (if (eq 'x (framep f)) 'ha= s-frame 'no-frame))
(frame-list))" \
=C2=A0 =C2=A02>&1

Another point is to provide feedback (notify-send, kdialog, zenity,
etc.) if emacs server is not running at all (non-zero exit code of the
shell command above). Though since Samuel is already using org-protocol, it should not be a problem.


--000000000000ef2d9405aec8c47b--