Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-26 Thread Max Nikulin
On 26/10/2022 11:58, Ihor Radchenko wrote: Yes. From org-capture-templates docstring: %x Content of the X clipboard. Ihor, I am afraid there are a couple of pitfalls with "%x" for Samuel since he prefers to keep Emacs hidden so can not check result. 1. If something goes wrong,

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-27 Thread Samuel Wales
i do not use emacs daemon or systemd. have not tried running emacs from cron i think. i launch emacs from xinit or fluxbox menu. sometimes from a shell. i run emacs as a cli batch thing from a shell. [and i run emacs on linux console when nec. it is inaccessible for reasons like blinking curs

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-27 Thread Max Nikulin
On 28/10/2022 11:59, Samuel Wales wrote: i launch emacs from xinit or fluxbox menu. sometimes from a shell. i run emacs as a cli batch thing from a shell. Then you should always have an X11 Emacs frame, maybe behind other windows, and the following command should work emacsclient --eval '

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Dr. Arne Babenhauserheide
Max Nikulin writes: > Then you should always have an X11 Emacs frame, maybe behind other > windows This sounds like a tray application. Do you know whether something like that already exitst (mark one frame as system tray entry)? Code the other way round (emacs *as* system tray) seems to alread

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Max Nikulin
On 28/10/2022 15:39, Dr. Arne Babenhauserheide wrote: Max Nikulin writes: Then you should always have an X11 Emacs frame, maybe behind other windows This sounds like a tray application. Do you know whether something like that already exitst (mark one frame as system tray entry)? I was tryin

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Samuel Wales
i am still lost in this and it will take me a while. although it would be great to have everywhere, such as in emacs also with r click, it is not a top priority for me at this time as long as the ff org-capture extension works [i wrote the original when it did not work for me] beecuse ff is the bi

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Ihor Radchenko
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 anythin

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Samuel Wales
not sure i am following everything but it seems a popup that goes away after a very short period of time shows adequately that first contact was made with emacs. then, including the captured text shows that there isn't another issue? On 10/28/22, Ihor Radchenko wrote: > Max Nikulin writes: > >>

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Ihor Radchenko
Samuel Wales writes: > not sure i am following everything but it seems a popup that goes away > after a very short period of time shows adequately that first contact > was made with emacs. then, including the captured text shows that > there isn't another issue? Let me elaborate. What I have i

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Max Nikulin
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 capture

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Max Nikulin
On 29/10/2022 06:07, Samuel Wales wrote: i am still lost in this and it will take me a while. .. it is not a top priority for me at this time as long as the ff org-capture extension works Samuel, feel free came back with this question when you will have enough spare time and motivation to co

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-28 Thread Samuel Wales
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

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-29 Thread Max Nikulin
On 29/10/2022 13:03, Samuel Wales wrote: fluxbox is the only wm or de that seems to do everything i need. Then you should have no problem to call `org-capture' using emacsclient as a menu entry action. Does it work for you? From my point of view "capture anywhere in x" task should be roughly s

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-10-29 Thread Samuel Wales
i am still slightly lost [varying cognitive issues] but wanted to make one correction. i think i have my capture set up so that my typical capture location shows, although it is underneath ff so cannot be seen at the time. so a new frame in many cases is not necessary; the existing emacs frame co

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-12 Thread Ihor Radchenko
Max Nikulin writes: > On 26/10/2022 11:58, Ihor Radchenko wrote: >> >> Yes. From org-capture-templates docstring: >> >>%x Content of the X clipboard. > > Ihor, I am afraid there are a couple of pitfalls with "%x" for Samuel > since he prefers to keep Emacs hidden so can not check

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-13 Thread Max Nikulin
On 13/11/2022 11:54, Ihor Radchenko wrote: Max Nikulin writes: On 26/10/2022 11:58, Ihor Radchenko wrote: Yes. From org-capture-templates docstring: %x Content of the X clipboard. Ihor, I am afraid there are a couple of pitfalls with "%x" for Samuel since he prefers to keep Ema

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-14 Thread Ihor Radchenko
Max Nikulin writes: >> I am unsure what can be done here. AFAIU, Org just follows the %x >> description. Nothing wrong on Org side. >> >> The best we can do is alternative %?? that will do something more >> reliable. But I am unsure what it can be. > > Depending of particular capture template (e

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-15 Thread Samuel Wales
idk if related to this thread, but i sure do appreciate the effor in this thread to solve such problems. it is a key feature for me because i am often in mouse-only mode. it is thus a constant concern that org-capture could stop working etc. right now, it seems org-capture is broken for me again

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-11-17 Thread Jean Louis
* Samuel Wales [2022-11-16 07:06]: > idk if related to this thread, but i sure do appreciate the effor in > this thread to solve such problems. it is a key feature for me > because i am often in mouse-only mode. it is thus a constant concern > that org-capture could stop working etc. > > right

Re: Getting X selection reliably (Re: idea for capture anywhere in x)

2022-12-03 Thread Max Nikulin
On 14/11/2022 09:06, Ihor Radchenko wrote: Max Nikulin writes: Depending of particular capture template (even with :immediate-finish t) empty selection may or may not be an error. In Samuel's case it is an error. Unfortunately, while the template is processed, signaled errors are caught and the