* bug#46704: X clipboard is always empty with emacs server without emacsclient running
@ 2021-02-22 8:37 Parvesh Monu
2021-02-22 14:55 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Parvesh Monu @ 2021-02-22 8:37 UTC (permalink / raw)
To: 46704
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
I have this template which captures clipboard content in file. It works
fine when emacsclient is running, but if no client is running then
server adds empty entry.
(add-to-list 'org-capture-templates
'("x" "Clips" entry (file+headline "/home/user/desktop/clips"
"Clips")
"** %x" :immediate-finish t :prepend t))
*System:* 5.10.16-arch1-1
*Desktop Environment:* xfce
*GNU Emacs 27.1*
[-- Attachment #2: Type: text/html, Size: 696 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#46704: X clipboard is always empty with emacs server without emacsclient running
2021-02-22 8:37 bug#46704: X clipboard is always empty with emacs server without emacsclient running Parvesh Monu
@ 2021-02-22 14:55 ` Lars Ingebrigtsen
2021-02-22 15:52 ` Parvesh Monu
2022-06-19 13:51 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-22 14:55 UTC (permalink / raw)
To: Parvesh Monu; +Cc: 46704
Parvesh Monu <parvesh.dhullmonu@gmail.com> writes:
> I have this template which captures clipboard content in file. It works fine when
> emacsclient is running, but if no client is running then server adds empty entry.
>
> (add-to-list 'org-capture-templates
> '("x" "Clips" entry (file+headline "/home/user/desktop/clips" "Clips")
> "** %x" :immediate-finish t :prepend t))
I'm not quite sure I understand you correctly here -- but I think you're
saying that if you start "emacs --daemon", then that daemonised Emacs
can't communicate with the X clipboard?
I'm not sure, but doesn't that sound quite natural? If you don't have
an X window open, then you can't talk to the X server, so you can't
access the clipboard, either.
I don't know how Org is talking to the clipboard, though. Anybody?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#46704: X clipboard is always empty with emacs server without emacsclient running
2021-02-22 14:55 ` Lars Ingebrigtsen
@ 2021-02-22 15:52 ` Parvesh Monu
2022-06-19 13:51 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Parvesh Monu @ 2021-02-22 15:52 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 46704
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
I don't know if it will help, but I found workaround to capture X-clipboard.
Since %x doesn't work with daemon, I used %i and passed X-clipboard's
content using xsel. Like,
xdg-open "org-protocol://capture?template=h&body=`xsel`"
On Mon, Feb 22, 2021, 8:25 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Parvesh Monu <parvesh.dhullmonu@gmail.com> writes:
>
> > I have this template which captures clipboard content in file. It works
> fine when
> > emacsclient is running, but if no client is running then server adds
> empty entry.
> >
> > (add-to-list 'org-capture-templates
> > '("x" "Clips" entry (file+headline "/home/user/desktop/clips"
> "Clips")
> > "** %x" :immediate-finish t :prepend t))
>
> I'm not quite sure I understand you correctly here -- but I think you're
> saying that if you start "emacs --daemon", then that daemonised Emacs
> can't communicate with the X clipboard?
>
> I'm not sure, but doesn't that sound quite natural? If you don't have
> an X window open, then you can't talk to the X server, so you can't
> access the clipboard, either.
>
> I don't know how Org is talking to the clipboard, though. Anybody?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
[-- Attachment #2: Type: text/html, Size: 2040 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#46704: X clipboard is always empty with emacs server without emacsclient running
2021-02-22 14:55 ` Lars Ingebrigtsen
2021-02-22 15:52 ` Parvesh Monu
@ 2022-06-19 13:51 ` Lars Ingebrigtsen
2022-06-20 1:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-19 13:51 UTC (permalink / raw)
To: Parvesh Monu; +Cc: 46704
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I'm not quite sure I understand you correctly here -- but I think you're
> saying that if you start "emacs --daemon", then that daemonised Emacs
> can't communicate with the X clipboard?
>
> I'm not sure, but doesn't that sound quite natural? If you don't have
> an X window open, then you can't talk to the X server, so you can't
> access the clipboard, either.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I think the conclusion here is that this is working as it should, so I'm
closing this bug report. If I misunderstood, please respond to the
debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#46704: X clipboard is always empty with emacs server without emacsclient running
2022-06-19 13:51 ` Lars Ingebrigtsen
@ 2022-06-20 1:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 5+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-06-20 1:21 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 46704, Parvesh Monu
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> I'm not sure, but doesn't that sound quite natural? If you don't have
>> an X window open, then you can't talk to the X server, so you can't
>> access the clipboard, either.
Actually, that's not quite correct: Emacs can talk to the X server as
long as the terminal object remains available, but there is no way for
_other_ clients to ask for the contents of Emacs's selections if it
doesn't have at least one open frame that can be used as the owner for
the selection(s).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-20 1:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-22 8:37 bug#46704: X clipboard is always empty with emacs server without emacsclient running Parvesh Monu
2021-02-22 14:55 ` Lars Ingebrigtsen
2021-02-22 15:52 ` Parvesh Monu
2022-06-19 13:51 ` Lars Ingebrigtsen
2022-06-20 1:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.