emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Debugging firefox extension (Re: idea for capture anywhere in x)
Date: Thu, 17 Nov 2022 23:12:10 +0700	[thread overview]
Message-ID: <tl5mgs$7hh$1@ciao.gmane.io> (raw)
In-Reply-To: <CAJcAo8uTD51gk8jNBadS1KFhRgcG7zSgBaDhTuAXp7qnyU_2ZA@mail.gmail.com>

On 17/11/2022 10:16, Samuel Wales wrote:
> On 11/16/22, Max Nikulin wrote:
>> Since recently we were discussing desktop notifications and temporary
>> rising emacs window, I am unsure if capture indication is related to the
>> firefox extension, notification daemon, or emacs.
> 
> my brain is not connecting the first part of your sentence with the
> second part [this has to do with my brain, not your english],

I was writing about notify-send (or d-bus function) called in the case 
of successful capture and notification-daemon or dunst:
Samuel Wales. Re: desktop notifications (Re: idea for capture anywhere 
in x) Wed, 26 Oct 2022 01:07:18 -0700. 
https://list.orgmode.org/CAJcAo8sp3dyUT0b8=3T1YeiQZzmDYS9Zah_6+LdczWHicnVX=w@mail.gmail.com

I am unsure if your managed to add such feature to your configuration.

> but i
> have been assuming that it is the firefox org-capture extension saying
> "i sent the request".

Check browser console for warnings and try to call emacsclient with some 
org-protocol: URI from xterm or another terminal application (I would 
avoid Emacs shell buffers for such tests).

> pop up emacs frame for a fraction of a second, which then, in elisp,
> pops back down again.

To raise and lower an existing window perhaps something like wmctrl, 
xdotool or fluxbox-remote should be used.

Remaining withing Emacs I would consider temporary creating a new frame 
and dismissing it. I am unsure concerning focus stealing protection in 
window managers that may hide such window.

A simple command that might be a substitute to notification windows:

     zenity --timeout 1 --info --title 'Title' --text 'Text'

There are a number of dialog tools similar to zenity: lightweight or 
integrated with desktop environments. I have no idea which one you may 
have installed and if it has timeout feature or sleep&kill workaround 
should be used instead.

However I believe that not running some notification daemon may cause 
problems with various application.

>> More robust approach is a native messaging application that is a bridge
>> between sandboxed firefox extension and emacs. It makes setup more
>> complicated however and no simple org-protocol extensions use this
>> approach.
> 
> not sure i understand what native or sandboxed mean here or why, and
> whether org-protocol is needed or if you are saying that there might
> be a non-simple-to-install extension for it or so.

Browsers create sandboxes for web pages and extensions to isolate them 
from host system. There is an API that allows communication of an add-on 
with particular helper application running on host system:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging

A dedicated naive messaging helper allows to check emacsclient exit code 
or stdout. The price is more complicated configuration. Of course, an 
extension should support such communication protocol.




  parent reply	other threads:[~2022-11-17 16:13 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  4:22 idea for capture anywhere in x Samuel Wales
2020-09-08  5:01 ` Tim Cross
2020-09-08  5:05   ` Samuel Wales
2020-09-08  5:21     ` Tim Cross
2020-09-08  7:18       ` Maxim Nikulin
2020-09-08  8:03         ` Diego Zamboni
2020-09-08 16:08           ` Maxim Nikulin
2020-09-08  5:39     ` Maxim Nikulin
2020-09-08 22:40       ` Samuel Wales
2020-09-09  4:52         ` Maxim Nikulin
2020-09-10 14:23           ` Maxim Nikulin
2020-09-12  8:48             ` Nick Econopouly
2022-06-10  2:35               ` Samuel Wales
2022-06-10  9:59                 ` Charles Philip Chan
2022-06-11  4:11                 ` Ihor Radchenko
2022-06-13  7:46                 ` Max Nikulin
2022-06-13  9:10                 ` Michal Politowski
2022-06-13 10:04                   ` Max Nikulin
2022-06-13 14:02                     ` Michal Politowski
2022-10-12  1:09                       ` Samuel Wales
2022-10-09 14:47                 ` Jean Louis
2022-10-09 16:40                   ` Max Nikulin
2022-10-09 17:08                     ` Jean Louis
2022-10-10 17:16                       ` Max Nikulin
2022-10-10 22:06                         ` Jean Louis
2022-10-11  9:11                           ` Juan Manuel Macías
2022-10-12  1:09                             ` Samuel Wales
2022-10-15  3:40                               ` Max Nikulin
2022-10-26  4:40                                 ` Samuel Wales
2022-10-26  4:58                                   ` Ihor Radchenko
2022-10-26  5:05                                     ` Samuel Wales
2022-10-26  6:05                                       ` desktop notifications (Re: idea for capture anywhere in x) Max Nikulin
2022-10-26  6:22                                         ` Samuel Wales
2022-10-26  7:41                                           ` Max Nikulin
2022-10-26  8:07                                             ` Samuel Wales
2022-10-26  8:29                                               ` Max Nikulin
2022-10-27  6:33                                     ` Getting X selection reliably " Max Nikulin
2022-10-28  4:59                                       ` Samuel Wales
2022-10-28  5:16                                         ` Max Nikulin
2022-10-28  8:39                                           ` Dr. Arne Babenhauserheide
2022-10-28 16:38                                             ` Max Nikulin
2022-10-28 23:07                                               ` Samuel Wales
2022-10-29  3:21                                                 ` Max Nikulin
2022-10-29  2:59                                           ` Ihor Radchenko
2022-10-29  3:30                                             ` Max Nikulin
2022-10-29  6:03                                               ` Samuel Wales
2022-10-29  7:33                                                 ` Max Nikulin
2022-10-29 22:33                                                 ` Samuel Wales
2022-10-29  4:50                                             ` Samuel Wales
2022-10-29  4:59                                               ` Ihor Radchenko
2022-10-29  7:44                                                 ` desktop notifications " Max Nikulin
2022-10-29 23:07                                                   ` Samuel Wales
2022-10-30  4:49                                                     ` Ihor Radchenko
2022-11-13  4:54                                       ` Getting X selection reliably " Ihor Radchenko
2022-11-13 11:03                                         ` Max Nikulin
2022-11-14  2:06                                           ` Ihor Radchenko
2022-11-16  4:03                                             ` Samuel Wales
2022-11-16 16:46                                               ` Debugging firefox extension " Max Nikulin
2022-11-17  3:16                                                 ` Samuel Wales
2022-11-17  9:42                                                   ` Jean Louis
2022-11-17 16:12                                                   ` Max Nikulin [this message]
2022-11-17  7:18                                               ` Getting X selection reliably " Jean Louis
2022-11-17 15:30                                                 ` Reliability of org-protocol browser extensions Max Nikulin
2022-12-04  5:21                                             ` Getting X selection reliably (Re: idea for capture anywhere in x) Max Nikulin
2022-10-12 17:16                           ` idea for capture anywhere in x Max Nikulin
2022-10-12 20:06                             ` Jean Louis
2020-09-09  8:40     ` Russell Adams
2020-09-09 21:11       ` Samuel Wales
2020-09-09  1:07 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tl5mgs$7hh$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).