* Take a screenshot from within Emacs
@ 2016-07-07 19:44 Clément Pit--Claudel
2016-07-07 19:57 ` joakim
2016-07-07 20:53 ` Andrey Tykhonov
0 siblings, 2 replies; 9+ messages in thread
From: Clément Pit--Claudel @ 2016-07-07 19:44 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1.1: Type: text/plain, Size: 411 bytes --]
Hey emacs-dev,
How hard would it be to teach Emacs to make screenshots of itself? Not the Gtk menus or additional system-rendered elements — just buffer contents, windows, and frames. I expect there wouldn't be a general solution; but maybe there is? If not, how hard would it be to do it in the default configuration on GNU/Linux?
And for bonus points: what about screenshots as SVG?
Clément.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-07 19:44 Take a screenshot from within Emacs Clément Pit--Claudel
@ 2016-07-07 19:57 ` joakim
2016-07-08 6:09 ` Eli Zaretskii
2016-07-07 20:53 ` Andrey Tykhonov
1 sibling, 1 reply; 9+ messages in thread
From: joakim @ 2016-07-07 19:57 UTC (permalink / raw)
To: Clément Pit--Claudel; +Cc: Emacs developers
Clément Pit--Claudel <clement.pit@gmail.com> writes:
> Hey emacs-dev,
>
> How hard would it be to teach Emacs to make screenshots of itself? Not
> the Gtk menus or additional system-rendered elements — just buffer
> contents, windows, and frames. I expect there wouldn't be a general
> solution; but maybe there is? If not, how hard would it be to do it
> in the default configuration on GNU/Linux?
You could do it by calling a shell utility, but I suppose that wasn't
what you meant.
I don't think Emacs has the capability to access its internal rendering
data out of the box.
Perhaps you could investigate the Cairo branch?
>
> And for bonus points: what about screenshots as SVG?
>
> Clément.
>
--
Joakim Verona
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-07 19:44 Take a screenshot from within Emacs Clément Pit--Claudel
2016-07-07 19:57 ` joakim
@ 2016-07-07 20:53 ` Andrey Tykhonov
2016-07-08 16:13 ` Clément Pit--Claudel
1 sibling, 1 reply; 9+ messages in thread
From: Andrey Tykhonov @ 2016-07-07 20:53 UTC (permalink / raw)
To: Clément Pit--Claudel; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
Hello!
You could try https://github.com/atykhonov/escr . It makes screenshots by
means of `import` utility (ImageMagick). It is possible to make a
screenshot of a frame, window and region. I hope you would find it useful.
--
Andrii
On 7 July 2016 at 22:44, Clément Pit--Claudel <clement.pit@gmail.com> wrote:
> Hey emacs-dev,
>
> How hard would it be to teach Emacs to make screenshots of itself? Not the
> Gtk menus or additional system-rendered elements — just buffer contents,
> windows, and frames. I expect there wouldn't be a general solution; but
> maybe there is? If not, how hard would it be to do it in the default
> configuration on GNU/Linux?
>
> And for bonus points: what about screenshots as SVG?
>
> Clément.
>
>
[-- Attachment #2: Type: text/html, Size: 1209 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-07 19:57 ` joakim
@ 2016-07-08 6:09 ` Eli Zaretskii
2016-07-08 8:29 ` joakim
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-07-08 6:09 UTC (permalink / raw)
To: joakim; +Cc: clement.pit, emacs-devel
> From: joakim@verona.se
> Date: Thu, 07 Jul 2016 21:57:41 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> I don't think Emacs has the capability to access its internal rendering
> data out of the box.
Actually, it does, sort of. Take a look at the dump-glyph-matrix
function and the subroutines it calls. There are also
dump-frame-glyph-matrix (for TTY frames) and dump-tool-bar-row. They
describe the data structures Emacs uses to draw its windows and
frames. We could use them to provide some initial testing capability
for the display engine. The disadvantages of using these functions
are that (a) they currently need Emacs build with GLYPH_DEBUG defined,
and (b) they don't test the terminal-specific parts of the display
engine (in xterm.c, w32term.c, nsterm.m, etc.) that actually write to
the glass.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-08 6:09 ` Eli Zaretskii
@ 2016-07-08 8:29 ` joakim
2016-07-08 9:13 ` psachin
0 siblings, 1 reply; 9+ messages in thread
From: joakim @ 2016-07-08 8:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: clement.pit, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: joakim@verona.se
>> Date: Thu, 07 Jul 2016 21:57:41 +0200
>> Cc: Emacs developers <emacs-devel@gnu.org>
>>
>> I don't think Emacs has the capability to access its internal rendering
>> data out of the box.
>
> Actually, it does, sort of. Take a look at the dump-glyph-matrix
> function and the subroutines it calls. There are also
> dump-frame-glyph-matrix (for TTY frames) and dump-tool-bar-row. They
> describe the data structures Emacs uses to draw its windows and
> frames. We could use them to provide some initial testing capability
> for the display engine. The disadvantages of using these functions
> are that (a) they currently need Emacs build with GLYPH_DEBUG defined,
> and (b) they don't test the terminal-specific parts of the display
> engine (in xterm.c, w32term.c, nsterm.m, etc.) that actually write to
> the glass.
Yes you are right of course. I even used those routines while working
on the xwidget branch, but forgot.
--
Joakim Verona
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-08 8:29 ` joakim
@ 2016-07-08 9:13 ` psachin
2016-07-08 9:27 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: psachin @ 2016-07-08 9:13 UTC (permalink / raw)
To: joakim; +Cc: Eli Zaretskii, clement.pit, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
https://github.com/psachin/.emacs.d/blob/config.org/custom_functions.org
See subsection: 'Screenshot frame'
On Fri, Jul 8, 2016 at 1:59 PM, <joakim@verona.se> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: joakim@verona.se
> >> Date: Thu, 07 Jul 2016 21:57:41 +0200
> >> Cc: Emacs developers <emacs-devel@gnu.org>
> >>
> >> I don't think Emacs has the capability to access its internal rendering
> >> data out of the box.
> >
> > Actually, it does, sort of. Take a look at the dump-glyph-matrix
> > function and the subroutines it calls. There are also
> > dump-frame-glyph-matrix (for TTY frames) and dump-tool-bar-row. They
> > describe the data structures Emacs uses to draw its windows and
> > frames. We could use them to provide some initial testing capability
> > for the display engine. The disadvantages of using these functions
> > are that (a) they currently need Emacs build with GLYPH_DEBUG defined,
> > and (b) they don't test the terminal-specific parts of the display
> > engine (in xterm.c, w32term.c, nsterm.m, etc.) that actually write to
> > the glass.
>
> Yes you are right of course. I even used those routines while working
> on the xwidget branch, but forgot.
>
> --
> Joakim Verona
>
>
--
Sachin
psachin.github.io
[-- Attachment #2: Type: text/html, Size: 2336 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-08 9:13 ` psachin
@ 2016-07-08 9:27 ` Eli Zaretskii
2016-07-08 16:10 ` Clément Pit--Claudel
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-07-08 9:27 UTC (permalink / raw)
To: psachin; +Cc: clement.pit, joakim, emacs-devel
> From: psachin <iclcoolster@gmail.com>
> Date: Fri, 8 Jul 2016 14:43:00 +0530
> Cc: Eli Zaretskii <eliz@gnu.org>, clement.pit@gmail.com,
> Emacs developers <emacs-devel@gnu.org>
>
> https://github.com/psachin/.emacs.d/blob/config.org/custom_functions.org
>
> See subsection: 'Screenshot frame'
I believe Clément wanted to accomplish that without external programs.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-08 9:27 ` Eli Zaretskii
@ 2016-07-08 16:10 ` Clément Pit--Claudel
0 siblings, 0 replies; 9+ messages in thread
From: Clément Pit--Claudel @ 2016-07-08 16:10 UTC (permalink / raw)
To: Eli Zaretskii, psachin; +Cc: joakim, emacs-devel
[-- Attachment #1.1: Type: text/plain, Size: 457 bytes --]
On 2016-07-08 05:27, Eli Zaretskii wrote:
>> From: psachin <iclcoolster@gmail.com>
>> Date: Fri, 8 Jul 2016 14:43:00 +0530
>> Cc: Eli Zaretskii <eliz@gnu.org>, clement.pit@gmail.com,
>> Emacs developers <emacs-devel@gnu.org>
>>
>> https://github.com/psachin/.emacs.d/blob/config.org/custom_functions.org
>>
>> See subsection: 'Screenshot frame'
>
> I believe Clément wanted to accomplish that without external programs.
That's correct :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Take a screenshot from within Emacs
2016-07-07 20:53 ` Andrey Tykhonov
@ 2016-07-08 16:13 ` Clément Pit--Claudel
0 siblings, 0 replies; 9+ messages in thread
From: Clément Pit--Claudel @ 2016-07-08 16:13 UTC (permalink / raw)
To: Andrey Tykhonov; +Cc: Emacs developers
[-- Attachment #1.1: Type: text/plain, Size: 384 bytes --]
On 2016-07-07 16:53, Andrey Tykhonov wrote:
> You could try https://github.com/atykhonov/escr . It makes
> screenshots by means of `import` utility (ImageMagick). It is
> possible to make a screenshot of a frame, window and region. I hope
> you would find it useful.
Thanks :) I'm looking for a way to do this without external dependencies, though, so ImageMagick won't do.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-07-08 16:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 19:44 Take a screenshot from within Emacs Clément Pit--Claudel
2016-07-07 19:57 ` joakim
2016-07-08 6:09 ` Eli Zaretskii
2016-07-08 8:29 ` joakim
2016-07-08 9:13 ` psachin
2016-07-08 9:27 ` Eli Zaretskii
2016-07-08 16:10 ` Clément Pit--Claudel
2016-07-07 20:53 ` Andrey Tykhonov
2016-07-08 16:13 ` Clément Pit--Claudel
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.