all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Can Emacs started with `-nw' option view pdf with pdf-tools?
@ 2021-07-17  4:50 Hongyi Zhao
  2021-07-17  7:00 ` Arthur Miller
  0 siblings, 1 reply; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-17  4:50 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using auctex and pdf-tools with Emacs,  and find that if I start
Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.

Any hints?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17  4:50 Can Emacs started with `-nw' option view pdf with pdf-tools? Hongyi Zhao
@ 2021-07-17  7:00 ` Arthur Miller
  2021-07-17 10:37   ` Hongyi Zhao
  0 siblings, 1 reply; 17+ messages in thread
From: Arthur Miller @ 2021-07-17  7:00 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I'm using auctex and pdf-tools with Emacs,  and find that if I start
> Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.
>
> Any hints?
>
> Regards

Yes you need a GUI window to display images (which is what pdf-tools
does).

Albeit a virtual terminal in X (or console in Win32) are implemented in
a platform window, they don't expose windowing capabilities but pretend
they are old-fashioned consoles without gui capabilities.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17  7:00 ` Arthur Miller
@ 2021-07-17 10:37   ` Hongyi Zhao
  2021-07-17 11:47     ` Thibaut Verron
  2021-07-17 11:52     ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-17 10:37 UTC (permalink / raw)
  To: Arthur Miller; +Cc: help-gnu-emacs

On Sat, Jul 17, 2021 at 3:00 PM Arthur Miller <arthur.miller@live.com> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > I'm using auctex and pdf-tools with Emacs,  and find that if I start
> > Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.
> >
> > Any hints?
> >
> > Regards
>
> Yes you need a GUI window to display images (which is what pdf-tools
> does).

Basically, if I start emacs without `-nw' option, the `C-c C-v' will
do the job described here automatically. But how to let `C-c C-v' open
a GUI window for this case?

> Albeit a virtual terminal in X (or console in Win32) are implemented in
> a platform window, they don't expose windowing capabilities but pretend
> they are old-fashioned consoles without gui capabilities.

Best regards,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17 10:37   ` Hongyi Zhao
@ 2021-07-17 11:47     ` Thibaut Verron
  2021-07-20 22:35       ` Felix Dietrich
  2021-07-17 11:52     ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Thibaut Verron @ 2021-07-17 11:47 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs, Arthur Miller

Le sam. 17 juil. 2021 à 12:38, Hongyi Zhao <hongyi.zhao@gmail.com> a écrit :
>
> On Sat, Jul 17, 2021 at 3:00 PM Arthur Miller <arthur.miller@live.com> wrote:
> >
> > Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> >
> > > I'm using auctex and pdf-tools with Emacs,  and find that if I start
> > > Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.
> > >
> > > Any hints?
> > >
> > > Regards
> >
> > Yes you need a GUI window to display images (which is what pdf-tools
> > does).
>
> Basically, if I start emacs without `-nw' option, the `C-c C-v' will
> do the job described here automatically. But how to let `C-c C-v' open
> a GUI window for this case?

Emacs with -nw has no concept of "GUI window", so I don't think that
it is possible.

If you use emacs as a daemon and start a terminal client with
emacsclient -t, there might be a way to have C-c C-v open a gui client
with pdf-view, but that would be tricky.

Otherwise, I guess you could always define your own viewer command,
which would start another emacs and open the pdf with pdf-view. But
you'd probably be better off spawning a pdf viewer if it comes to
that.

Thibaut



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17 10:37   ` Hongyi Zhao
  2021-07-17 11:47     ` Thibaut Verron
@ 2021-07-17 11:52     ` Eli Zaretskii
  2021-07-17 12:51       ` Hongyi Zhao
  1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2021-07-17 11:52 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Sat, 17 Jul 2021 18:37:51 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> how to let `C-c C-v' open a GUI window for this case?

Start the server (M-x server-start RET), then connect with emacsclient
to that server, and you will have a GUI frame.

But I don't understand why you start Emacs with -nw if you then want
GUI frames in that session.  Why not start Emacs without -nw to begin
with?



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17 11:52     ` Eli Zaretskii
@ 2021-07-17 12:51       ` Hongyi Zhao
  0 siblings, 0 replies; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-17 12:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Sat, Jul 17, 2021 at 7:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Sat, 17 Jul 2021 18:37:51 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > how to let `C-c C-v' open a GUI window for this case?
>
> Start the server (M-x server-start RET), then connect with emacsclient
> to that server, and you will have a GUI frame.
>
> But I don't understand why you start Emacs with -nw if you then want
> GUI frames in that session.  Why not start Emacs without -nw to begin
> with?

For the following considerations:

1. Without using the -nw option, the speed and efficiency could be better.
2. For the remote case, if I want to open an Emacs over ssh without
using tramp-mode, in this situation, start Emacs with `-nw' option is
a natural way.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-17 11:47     ` Thibaut Verron
@ 2021-07-20 22:35       ` Felix Dietrich
  2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
                           ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Felix Dietrich @ 2021-07-20 22:35 UTC (permalink / raw)
  To: help-gnu-emacs

Thibaut Verron <thibaut.verron@gmail.com> writes:

> Le sam. 17 juil. 2021 à 12:38, Hongyi Zhao <hongyi.zhao@gmail.com> a écrit :
>>
>> On Sat, Jul 17, 2021 at 3:00 PM Arthur Miller <arthur.miller@live.com> wrote:
>> >
>> > Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>> >
>> > > I'm using auctex and pdf-tools with Emacs,  and find that if I start
>> > > Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.
>> > >
>> > > Any hints?
>> > >
>> > > Regards
>> >
>> > Yes you need a GUI window to display images (which is what pdf-tools
>> > does).
>>
>> Basically, if I start emacs without `-nw' option, the `C-c C-v' will
>> do the job described here automatically. But how to let `C-c C-v' open
>> a GUI window for this case?
>
> Emacs with -nw has no concept of "GUI window", so I don't think that
> it is possible.

Emacs can handle (info "(elisp) Multiple Terminals") and can display
text terminal and graphical terminal frames at the same time.

> If you use emacs as a daemon and start a terminal client with
> emacsclient -t, there might be a way to have C-c C-v open a gui client
> with pdf-view, but that would be tricky.

For the X Display Server, use (make-frame-on-display (getenv "DISPLAY"))
to create a graphical frame.  If Emacs was started with the “-nw”
options, this will run the necessary initialisation steps (according to
the manual).  The environment variable “DISPLAY” should already be set
in your terminal emulator and, therefore, in the Emacs instance you
started in the terminal emulator.  For single user systems its value is
commonly “:0”.

When running Emacs remotely via ssh, you may allow remote X client
applications to create their windows on your local desktop by passing
the “-X” option (or setting “ForwardX11” in your “~/.ssh/config”).  This
will create a tunnel for X11 applications from the remote system to your
local X Server and set the “DISPLAY” variable accordingly.  Performance
may be lagging, though.

Here is a sketch for a function that creates a graphical terminal frame
before it calls the command that “C-c C-v” runs.  You need to fill in
the command.  You can find it with “C-h c C-c C-v”.  Beware: the code is
untested.


    (defun view-pdf-in-graphical-frame ()
      (interactive)
      (unless window-system
        ;; Create a graphical frame first.
        (let ((display (getenv "DISPLAY")))
          (when (seq-empty-p display)
            (user-error "No DISPLAY environment variable set"))
          (select-frame (make-frame-on-display display))))
      ;; Replace ‘C-c_C-v_command’ with the actual name of the command.
      (call-interactively 'C-c_C-v_command))
    

-- 
Felix Dietrich



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-20 22:35       ` Felix Dietrich
@ 2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-07-21  1:38           ` Hongyi Zhao
  2021-07-21  1:56         ` Hongyi Zhao
  2021-07-21 18:53         ` Leo Butler
  2 siblings, 1 reply; 17+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-20 22:59 UTC (permalink / raw)
  To: help-gnu-emacs

Felix Dietrich wrote:

> Emacs can handle (info "(elisp) Multiple Terminals") and can
> display text terminal and graphical terminal frames at the
> same time.

Invoke like this

  DISPLAY=:0 emacs -nw

I use this so I can use Emacs from the Linux VT (like now, and
anytime) but still have SLIME (SBCL) pipe SDL2 (SDL and
OpenGL) to X... it works :)

https://dataswamp.org/~incal/cl/general-base/gb.lisp
https://dataswamp.org/~incal/conf/.zprofile

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-21  1:38           ` Hongyi Zhao
  2021-07-21  2:24             ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-21  1:38 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

On Wed, Jul 21, 2021 at 6:59 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Felix Dietrich wrote:
>
> > Emacs can handle (info "(elisp) Multiple Terminals") and can
> > display text terminal and graphical terminal frames at the
> > same time.
>
> Invoke like this
>
>   DISPLAY=:0 emacs -nw

I tried this method as follows but failed:

$ echo $DISPLAY
:1
$ DISPLAY=:1 emacs -nw

See the attachment for more details.

> I use this so I can use Emacs from the Linux VT (like now, and
> anytime) but still have SLIME (SBCL) pipe SDL2 (SDL and
> OpenGL) to X... it works :)
>
> https://dataswamp.org/~incal/cl/general-base/gb.lisp
> https://dataswamp.org/~incal/conf/.zprofile
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
>


-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province

[-- Attachment #2: 2021-07-21_09-36.png --]
[-- Type: image/png, Size: 179317 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-20 22:35       ` Felix Dietrich
  2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-21  1:56         ` Hongyi Zhao
  2021-07-21  6:41           ` Yuri Khan
  2021-07-21 18:53         ` Leo Butler
  2 siblings, 1 reply; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-21  1:56 UTC (permalink / raw)
  To: Felix Dietrich; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3865 bytes --]

On Wed, Jul 21, 2021 at 6:37 AM Felix Dietrich
<felix.dietrich@sperrhaken.name> wrote:
>
> Thibaut Verron <thibaut.verron@gmail.com> writes:
>
> > Le sam. 17 juil. 2021 à 12:38, Hongyi Zhao <hongyi.zhao@gmail.com> a écrit :
> >>
> >> On Sat, Jul 17, 2021 at 3:00 PM Arthur Miller <arthur.miller@live.com> wrote:
> >> >
> >> > Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> >> >
> >> > > I'm using auctex and pdf-tools with Emacs,  and find that if I start
> >> > > Emacs with `emacs -nw`, the pdf-tools won't let me preview pdf.
> >> > >
> >> > > Any hints?
> >> > >
> >> > > Regards
> >> >
> >> > Yes you need a GUI window to display images (which is what pdf-tools
> >> > does).
> >>
> >> Basically, if I start emacs without `-nw' option, the `C-c C-v' will
> >> do the job described here automatically. But how to let `C-c C-v' open
> >> a GUI window for this case?
> >
> > Emacs with -nw has no concept of "GUI window", so I don't think that
> > it is possible.
>
> Emacs can handle (info "(elisp) Multiple Terminals") and can display
> text terminal and graphical terminal frames at the same time.
>
> > If you use emacs as a daemon and start a terminal client with
> > emacsclient -t, there might be a way to have C-c C-v open a gui client
> > with pdf-view, but that would be tricky.
>
> For the X Display Server, use (make-frame-on-display (getenv "DISPLAY"))
> to create a graphical frame.  If Emacs was started with the “-nw”
> options, this will run the necessary initialisation steps (according to
> the manual).  The environment variable “DISPLAY” should already be set
> in your terminal emulator and, therefore, in the Emacs instance you
> started in the terminal emulator.  For single user systems its value is
> commonly “:0”.
>
> When running Emacs remotely via ssh, you may allow remote X client
> applications to create their windows on your local desktop by passing
> the “-X” option (or setting “ForwardX11” in your “~/.ssh/config”).  This
> will create a tunnel for X11 applications from the remote system to your
> local X Server and set the “DISPLAY” variable accordingly.  Performance
> may be lagging, though.
>
> Here is a sketch for a function that creates a graphical terminal frame
> before it calls the command that “C-c C-v” runs.  You need to fill in
> the command.  You can find it with “C-h c C-c C-v”.  Beware: the code is
> untested.
>
>
>     (defun view-pdf-in-graphical-frame ()
>       (interactive)
>       (unless window-system
>         ;; Create a graphical frame first.
>         (let ((display (getenv "DISPLAY")))
>           (when (seq-empty-p display)
>             (user-error "No DISPLAY environment variable set"))
>           (select-frame (make-frame-on-display display))))
>       ;; Replace ‘C-c_C-v_command’ with the actual name of the command.
>       (call-interactively 'C-c_C-v_command))

I tried with the following code in init file:

(defun view-pdf-in-graphical-frame ()
  (interactive)
  (unless window-system
    ;; Create a graphical frame first.
    (let ((display (getenv "DISPLAY")))
      (when (seq-empty-p display)
        (user-error "No DISPLAY environment variable set"))
      (select-frame (make-frame-on-display display))))
  ;; Replace ‘C-c_C-v_command’ with the actual name of the command.
  (call-interactively 'TeX-view))

Then I run `M-x view-pdf-in-graphical-frame', but this will open a
second Emacs GUI instance instead of create a new GUI frame in the
original one. See the attachment fore more detailed info.

Regards,
HY
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province

[-- Attachment #2: 2021-07-21_09-52.png --]
[-- Type: image/png, Size: 230001 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  1:38           ` Hongyi Zhao
@ 2021-07-21  2:24             ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 17+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-21  2:24 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> I tried this method as follows but failed:
>
> $ echo $DISPLAY
> :1
> $ DISPLAY=:1 emacs -nw
>
> See the attachment for more details.

OK, then I don't know, it works here, I can even view the
attachment you sent in X just by hitting the button here in
the VT

  Displaying /usr/bin/display-im6.q16 -nostdin
  /tmp/emm.c4OPfu/2021-07-21_09-36.png...done

with no problem using the DISPLAY=:0 method.

https://dataswamp.org/~incal/conf/.zprofile (line 49)

( cool script BTW:
  zsh: https://dataswamp.org/~incal/scripts/speed
  png: https://dataswamp.org/~incal/figures/speed.png - 592 bytes )

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  1:56         ` Hongyi Zhao
@ 2021-07-21  6:41           ` Yuri Khan
  2021-07-21  6:51             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-07-21  7:09             ` Hongyi Zhao
  0 siblings, 2 replies; 17+ messages in thread
From: Yuri Khan @ 2021-07-21  6:41 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: Felix Dietrich, help-gnu-emacs

On Wed, 21 Jul 2021 at 08:57, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:

> Then I run `M-x view-pdf-in-graphical-frame', but this will open a
> second Emacs GUI instance instead of create a new GUI frame in the
> original one. See the attachment fore more detailed info.

You are confused about frames, windows and instances. Which is
understandable, given Emacs’s peculiar terminology and its rare
ability to have frames of different kinds in a single instance.

You cannot have graphics in a terminal emulator (unless you happen to
be using a terminal emulator that implements graphics display[1], and
unless somebody actually writes some Elisp code to utilize this
terminal capability).

[1]: https://sw.kovidgoyal.net/kitty/graphics-protocol/

So you have to create a graphical frame. A frame in Emacs is what is
called a window in the rest of the desktop applications. What you got
is a new GUI frame. Both this new frame and what you have in the
terminal emulator belong to the same Emacs instance; if you do a
‘list-buffers’ in both, you will see they operate on the same internal
state.

To reiterate: Your original window is a terminal emulator. You
*cannot* have graphics appear right *in* it.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  6:41           ` Yuri Khan
@ 2021-07-21  6:51             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-07-21  7:15               ` Yuri Khan
  2021-07-21  7:09             ` Hongyi Zhao
  1 sibling, 1 reply; 17+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-21  6:51 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan wrote:

> To reiterate: Your original window is a terminal emulator.
> You *cannot* have graphics appear right *in* it.

Are you sure?

See the other thread what amazing stuff Tomas Hlavaty has been
cooking :)

  https://dataswamp.org/~incal/figures/emacs/framebuffer-draw-test.png

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  6:41           ` Yuri Khan
  2021-07-21  6:51             ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-21  7:09             ` Hongyi Zhao
  1 sibling, 0 replies; 17+ messages in thread
From: Hongyi Zhao @ 2021-07-21  7:09 UTC (permalink / raw)
  To: Yuri Khan; +Cc: Felix Dietrich, help-gnu-emacs

On Wed, Jul 21, 2021 at 2:41 PM Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
> On Wed, 21 Jul 2021 at 08:57, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> > Then I run `M-x view-pdf-in-graphical-frame', but this will open a
> > second Emacs GUI instance instead of create a new GUI frame in the
> > original one. See the attachment fore more detailed info.
>
> You are confused about frames, windows and instances. Which is
> understandable, given Emacs’s peculiar terminology and its rare
> ability to have frames of different kinds in a single instance.
>
> You cannot have graphics in a terminal emulator (unless you happen to
> be using a terminal emulator that implements graphics display[1], and
> unless somebody actually writes some Elisp code to utilize this
> terminal capability).
>
> [1]: https://sw.kovidgoyal.net/kitty/graphics-protocol/
>
> So you have to create a graphical frame. A frame in Emacs is what is
> called a window in the rest of the desktop applications. What you got
> is a new GUI frame. Both this new frame and what you have in the
> terminal emulator belong to the same Emacs instance; if you do a
> ‘list-buffers’ in both, you will see they operate on the same internal
> state.

Thank you for explaining and clearing up my conceptual confusion.

> To reiterate: Your original window is a terminal emulator. You
> *cannot* have graphics appear right *in* it.

Best,
HY



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  6:51             ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-21  7:15               ` Yuri Khan
  2021-07-21  8:51                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Yuri Khan @ 2021-07-21  7:15 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Wed, 21 Jul 2021 at 14:01, Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> > To reiterate: Your original window is a terminal emulator.
> > You *cannot* have graphics appear right *in* it.
>
> Are you sure?
>
> See the other thread what amazing stuff Tomas Hlavaty has been
> cooking :)
>
>   https://dataswamp.org/~incal/figures/emacs/framebuffer-draw-test.png

Should I have qualified that with “using documented and supported
facilities of all software components involved”?



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-21  7:15               ` Yuri Khan
@ 2021-07-21  8:51                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 17+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-21  8:51 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan wrote:

>> Are you sure?
>>
>> See the other thread what amazing stuff Tomas Hlavaty has been
>> cooking :)
>>
>>   https://dataswamp.org/~incal/figures/emacs/framebuffer-draw-test.png
>
> Should I have qualified that with “using documented and
> supported facilities of all software components involved”?

Interesting reaction, I for one think that is nothing short of
amazing and I don't remember the last time I said
that... awesome! :O

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Can Emacs started with `-nw' option view pdf with pdf-tools?
  2021-07-20 22:35       ` Felix Dietrich
  2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-07-21  1:56         ` Hongyi Zhao
@ 2021-07-21 18:53         ` Leo Butler
  2 siblings, 0 replies; 17+ messages in thread
From: Leo Butler @ 2021-07-21 18:53 UTC (permalink / raw)
  To: Felix Dietrich; +Cc: help-gnu-emacs

Felix Dietrich <felix.dietrich@sperrhaken.name> writes:

> Emacs can handle (info "(elisp) Multiple Terminals") and can display
> text terminal and graphical terminal frames at the same time.
>
>> If you use emacs as a daemon and start a terminal client with
>> emacsclient -t, there might be a way to have C-c C-v open a gui client
>> with pdf-view, but that would be tricky.
>
> For the X Display Server, use (make-frame-on-display (getenv "DISPLAY"))
> to create a graphical frame.  If Emacs was started with the “-nw”
> options, this will run the necessary initialisation steps (according to
> the manual).

Felix, thank you for pointing this out. I run emacs in server mode from
a terminal (emacs -nw --daemon) and had unsuccessfully tried to connect
a graphical client to the daemon, which failed and I gave up. But your
pointer corrected my misapprehension.

Leo



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-07-21 18:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-17  4:50 Can Emacs started with `-nw' option view pdf with pdf-tools? Hongyi Zhao
2021-07-17  7:00 ` Arthur Miller
2021-07-17 10:37   ` Hongyi Zhao
2021-07-17 11:47     ` Thibaut Verron
2021-07-20 22:35       ` Felix Dietrich
2021-07-20 22:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  1:38           ` Hongyi Zhao
2021-07-21  2:24             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  1:56         ` Hongyi Zhao
2021-07-21  6:41           ` Yuri Khan
2021-07-21  6:51             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  7:15               ` Yuri Khan
2021-07-21  8:51                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-21  7:09             ` Hongyi Zhao
2021-07-21 18:53         ` Leo Butler
2021-07-17 11:52     ` Eli Zaretskii
2021-07-17 12:51       ` Hongyi Zhao

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.