[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: idea for capture anywhere in x
From: |
Max Nikulin |
Subject: |
Re: idea for capture anywhere in x |
Date: |
Thu, 13 Oct 2022 00:16:38 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
On 11/10/2022 05:06, Jean Louis wrote:
Jean, make a pause and think ones more. It does not mean extra click
and implies nothing different from you recipe.
Instead of thinking, I am doing it.
I consider it as a problem. It is better to think at first.
Did you try to invoke Emacs without having Emacs in front of you?
Just because actually selected text in browser may be quite different
from expectations (due to various tricks on web pages, not to mention
that JS may completely overwrite clipboard content) I prefer to see
capture result. That is why I decided to ensure that an emacs frame is
created (if no one exists yet) when I invoke capture. (Without
additional efforts from my side the frame is marked as required
attention even if it is on another virtual desktop, so I can switch to
it using a DE shortcut.) Perhaps requirement of a frame is the reason
why I avoided a kind of pitfall you have in mind.
If there is no running Emacs daemon yet, it may be started on demand
either through systemd socket activation or by
emacsclient -a "" ...
I do not see any problem here.
If you mean that Emacs can not access X selection if no frames created
yet then I agree, behavior is strange. On the other hand I do not
understand why Emacs must be in front of me. A frame may be hidden.
emacsclient -a "" --eval "(server-select-display (getenv \"DISPLAY\"))"
emacsclient --eval "(require 'org-compat)" --eval "(org-get-x-clipboard
'CLIPBOARD)"
Emacs is not "in front of me", but selection is accessible. Such kind of
action may be assigned to DE or WM shortcut so I do not see any reason
why mouse must be involved to get selection (in a way quite similar to C-y).
Here is updated bash file,
..
#!/usr/bin/bash
TEMP=/tmp/xselection.txt
xsel -o > $TEMP
Such way to work with temporary files is unsafe.
Capturing notes shall not IMHO be limited to Org mode as that limits
users to specific lightweight markup language (Org).
I do not mind, but nobody has created a more generic solution that Org
can use as a base to implement its features. That is why I wrote
If Emacs had generic enough functions to create captures then Org would
reuse it as it extends outline mode. Maybe such tools should be added to
Emacs, but they should be designed at first.
A browser extension is a straightforward way to add page URL to the
quoted text.
I don't know which quoted text you mean and how to add page URL to
quoted text.
I mean a note consisting of page title, page URL, and a quote with text
selected on the page. Firefox exposes URL to selection, but I consider a
browser extension as a better variant. You mentioned one extension,
another one is https://github.com/sprig/org-capture-extension/
Plain text files stored in a version control system allows to review
changes done at specific time interval.
To use version control system is non-trivial. To use Emacs is
non-trivial. Org, anything. What is trivial is to use simple
applications how they are designed on mobile devices.
Backups, history of changes, and compatibility over decades may be
serious issues with "simple applications".
Computer thinks for me.
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), (continued)
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Ihor Radchenko, 2022/10/28
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Max Nikulin, 2022/10/29
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Samuel Wales, 2022/10/29
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Max Nikulin, 2022/10/29
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Samuel Wales, 2022/10/29
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Samuel Wales, 2022/10/29
- Re: Getting X selection reliably (Re: idea for capture anywhere in x), Ihor Radchenko, 2022/10/29
- desktop notifications (Re: idea for capture anywhere in x), Max Nikulin, 2022/10/29
- Re: desktop notifications (Re: idea for capture anywhere in x), Samuel Wales, 2022/10/29
- Re: desktop notifications (Re: idea for capture anywhere in x), Ihor Radchenko, 2022/10/30
- Re: idea for capture anywhere in x,
Max Nikulin <=
- Re: idea for capture anywhere in x, Jean Louis, 2022/10/12
Re: idea for capture anywhere in x, Ypo, 2022/10/09
- Re: idea for capture anywhere in x, Ihor Radchenko, 2022/10/12
- Re: idea for capture anywhere in x, Ypo, 2022/10/12
- Re: idea for capture anywhere in x, Ihor Radchenko, 2022/10/12
- Re: idea for capture anywhere in x, Jean Louis, 2022/10/12
- Re: idea for capture anywhere in x, Ihor Radchenko, 2022/10/12
- Re: idea for capture anywhere in x, Jean Louis, 2022/10/13
Re: idea for capture anywhere in x, Juan Manuel MacĂas, 2022/10/12
Re: idea for capture anywhere in x, Samuel Wales, 2022/10/11