From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leo Butler Newsgroups: gmane.emacs.help Subject: Re: Screenshots, frame shots straight from Emacs Date: Tue, 20 Jul 2021 15:21:06 -0500 Message-ID: <87fsw8butp.fsf@t14.reltub.ca> References: <87sg1dgbbk.fsf@omarpolo.com> <87pmwhg843.fsf@omarpolo.com> <8735t96mxj.fsf@omarpolo.com> <87pmw961ox.fsf@zoho.eu> <874kcpxln9.fsf@logand.com> <87pmvcdgqg.fsf@t14.reltub.ca> <87a6mgwz17.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Tomas Hlavaty Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 20 22:21:43 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5wFK-0007Jc-P5 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 22:21:42 +0200 Original-Received: from localhost ([::1]:48446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5wFJ-0006P7-7N for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 20 Jul 2021 16:21:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5wEu-0006Oj-2A for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 16:21:16 -0400 Original-Received: from mail-eopbgr670097.outbound.protection.outlook.com ([40.107.67.97]:22368 helo=CAN01-TO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5wEq-0008H2-W7 for help-gnu-emacs@gnu.org; Tue, 20 Jul 2021 16:21:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mt2sn9ne788Mr6QZnXsgRr3N9pG6XyeUanHl6SRL9tOALUdbge9LliHl+gTLmCvNF70fw/jAcsPaefGT8l/cgSIMGh44zNdIQ5SjSzbMUoZa8CE4qHeSg1FqKQjd6LZgIf6JW4MU7Um8U6ABQQMZ6s8KTgMrRJvlOAfpHUr1K8M4bI8ypGm2ArMAGvdLX1Y50gEHy+NNRI77CnfdHpETqYFbl10nwwrNEgvIBqFOq053C0duq4GdwlOd2iR6UbwZWXZwTS8s5GKhs2qJY0w7tgLj9o40AzVfcaA++uYcK8IzcNGcbfKs9Sm7dAYfwyvycsdLJJ6ylGgsgH68cwbigQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TKvZmmBLKLOmxIfWBaC8l5OboC+OA3ndInOAH4Bi0CM=; b=Kfz/J3ixETBObCQGeORbKlcgzyOiuvS510CCUPP7oLL3stlccz+4O67vpWbpWIlZREYauVtsqhxAyystYdv4yNuMuas5n7xtQslmqxBbaLt4VLtYWYvL8LUvY0mOtHKq3Pzt8GKXbMQlh0W2Ua2ECRa+offhEAdpkxXtxvckjdxmakB4eXYdNVYMJrZpeA8m5f0pE296Kdi3qjBKFsEi/pX1EHUiSdjM+CXtMTCx+GpDNa8OAUf47efJA4JrviiD3nvbEUQx2HIKRBbPznYHUjR/tnXvt6D5DyTjOW7a7KrVPnkqszdl4qC01vg4J1o2IxEf1xmnyo29gCztwRQYTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=umanitoba.ca; dmarc=pass action=none header.from=umanitoba.ca; dkim=pass header.d=umanitoba.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umanitoba.onmicrosoft.com; s=selector2-umanitoba-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TKvZmmBLKLOmxIfWBaC8l5OboC+OA3ndInOAH4Bi0CM=; b=gSm/c+mYUOx74IgMDw++Xxfv3X/pNRDFcZ2pYZk/lMqUMEwPZacGsOi8T3ENUC9eWdTEo2xCRR+9v4vFYWN0fYjbQ7i48vOS4S+nq+YQ7bJFE4sYepSQmJXOJ8UZivtPh/fBFT0OSleqvT2wX/ejHrxkHDU/6Tig7T2Cuf7GNdA= Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=umanitoba.ca; Original-Received: from YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:21::31) by YT3PR01MB5490.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:62::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Tue, 20 Jul 2021 20:21:09 +0000 Original-Received: from YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM ([fe80::b926:b079:6737:7770]) by YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM ([fe80::b926:b079:6737:7770%5]) with mapi id 15.20.4331.034; Tue, 20 Jul 2021 20:21:09 +0000 In-Reply-To: <87a6mgwz17.fsf@logand.com> (Tomas Hlavaty's message of "Tue, 20 Jul 2021 21:44:36 +0200") X-ClientProxiedBy: MWHPR18CA0064.namprd18.prod.outlook.com (2603:10b6:300:39::26) To YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:21::31) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from t14 (130.179.244.45) by MWHPR18CA0064.namprd18.prod.outlook.com (2603:10b6:300:39::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22 via Frontend Transport; Tue, 20 Jul 2021 20:21:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bf1f38b-336a-441a-3832-08d94bbbe95a X-MS-TrafficTypeDiagnostic: YT3PR01MB5490: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mFwYKOCNVxqDwIsjFjt9N1CxBh/KvblUxWUqksHngo+Vrh9NtxzB+VbuCOYomSR8I2MtniNQr9eGHeSqBIQH31bnUiUjNnK4p3DkXDH7Wcd7VsvDoSoHr/xOVP+K2e4v7CJ6avsU0N3EiDLQOdFLq/0TK7SBRUjOVlkoPUylwO2c84WeRYSuBoGTueJBvaKyY00SqzHkLbZXV0QdVwvkMF0UpUdwrxElPXVQ8xlHipNvY36abVUQV8W1oW5byvrKHJjW4jPYF7Phr7nqPEoRWk30LlxW8nREV+QzEHIYBlOuiW/nVhXCxJuIlmkThpupKlMC+Dk/+QetsjWfEZ0emoWbLxPjOD5ThUYIalZ9xDoJ3C5ghOjCdfXKLzh/R66cMpbqH0VoLgQejGzdeNTz8bwBtaZtx5shcdVEaxFC6rlqc/+aiI7U17SoAnGIXXdh0QQ0ve2HTM35B0QkQucwj6li5JNKDWEfVxZrUIi0ji1dIwHZfiq0CWHoAC6udwAfFa1tSxlakcqCh7r/a56D/HhvFVl8g9xLjbvgDE//TCMyxM4fIgv9fkgUZD69s/K5PvMfWoZd6y+rqlTqQ3/ow9T2lAMbc8SIHhE65hVhB+H6jfR3vxWi6f5EFP194viPuVZU4HZjB3Sek2eSLYMvUEq24jndQnhwzk5Ok+jiUfZ0lcVJOh08HCpV06DWJmlnRH8uPel+wDdNmUJJZe4+OA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(39860400002)(346002)(136003)(396003)(366004)(376002)(186003)(9686003)(478600001)(6666004)(38100700002)(8936002)(8676002)(38350700002)(966005)(86362001)(316002)(786003)(66574015)(26005)(6486002)(6496006)(66476007)(52116002)(6916009)(66556008)(956004)(2906002)(4326008)(44832011)(5660300002)(83380400001)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TkVMYWVFSklSQmFKakxHZnZaL3pnR2wwVEFMVzZiVDVvL3VpY2JTZU9YQlIy?= =?utf-8?B?TmZVaVYzZlkvbU1GdWhwbmkvQWsxNWUzZlVldG1CeGJlNUNYcTd1T2hybWlZ?= =?utf-8?B?VFJtMjRwbE1sSGVTa1orWDJFemYwa3FHK3FMM0Y3Njh4aEw5ZnVVZ0NCK2Y1?= =?utf-8?B?NkU1RDUxVU5ieFcvWE1Yb1FYdWEyWGR3VzRGL1dtQ2EvVmMrMnZYMFBGZEVS?= =?utf-8?B?WFRSbytybHlLN0FGK1djdE82U3BCMC9xTnRSdUVHL2J1SkNVVEpTZm5HRmY3?= =?utf-8?B?TUFQbFM4R0h6SnJBNGN4c01IbzlJWCt6OHY4cDdtemhGVm9UUXFPZXNYRlJJ?= =?utf-8?B?U215bWpSaUxVSm5CYkZ6WXc0YzNjMHFSd0ZtYTMya0Y1Zy94UkdITUozRFZx?= =?utf-8?B?aFVlaVlZSi80ZjlMWXRpMzFhNjFWS1ZXaU9MTjhEbjc1NmxJNUxEc2ZxcXl2?= =?utf-8?B?ZkVWTGxaUWxTYzl5VjJSZ2MrWENWblA3TUNCS2dhWEx1M2l4WFlhNGkrNk13?= =?utf-8?B?ODFVLzhTZ3ZKN1lrVGJRSlp3aDY1UzN4QWNnZXZPai80NDF4UlV6K1JoSnEx?= =?utf-8?B?TjY5aUxyeHBoKzFTSHMvYktBSHJXRHZlaGVoVUphU1FoVmprQklzeDhoT0Nq?= =?utf-8?B?TWpSY050TUdxVGVFeEVOOGZXNzZxK1lFb3JmZG X-OriginatorOrg: umanitoba.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 4bf1f38b-336a-441a-3832-08d94bbbe95a X-MS-Exchange-CrossTenant-AuthSource: YTBPR01MB3053.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2021 20:21:09.6546 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4f80dd0b-338c-4e4c-8a14-90446962f7b8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n5zoFPvT6lFUPREq4IEVCg5nXNdsQW+nfrH7zuCW7eFNjIFz2GgZG1JHEz8xFBu3XY3ezBhIZV0Zm/+xs9rMpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT3PR01MB5490 Received-SPF: pass client-ip=40.107.67.97; envelope-from=Leo.Butler@umanitoba.ca; helo=CAN01-TO1-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131899 Archived-At: Tomas Hlavaty writes: > ******************************************************** > Caution: This message was sent from outside the University of Manitoba. > ******************************************************** > > Hi Leo, > > On Tue 20 Jul 2021 at 12:42, Leo Butler wrote: >> Tomas Hlavaty writes: >> >>> this one works with plain console emacs: >>> https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#= l755 >> >> Nice. I have not tried it yet, but I do notice that > > thanks for your feedback! > >> https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html#l= 28 >> >> requires cl. >> >> Also, when byte-compiling the file, I ran into 3 warnings which are easy >> to correct (see attached). I still haven't got it working, but I think >> that is due to user error. > > What Emacs version are you using? M-x emacs-version GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-27, modified by Debian > > In Emacs 27.2, I get 2 warnings: > > emacs-framebuffer.el:28:1:Warning: cl package required at runtime > > and > > In framebuffer-hh:mm:ss: > emacs-framebuffer.el:666:38:Warning: reference to free variable =E2=80=98= position=E2=80=99 > > The first one does not break anything. > > The second one is a bug relevant only for viewing videos on the console > from a chosen position. > > None of them break screenshot functionality. > > There is /dev/fb0 hardcoded so this might cause problems for some but I > actually never experienced any other device. It would be interesting to > know, how to properly detect which device is actually used if there are > more than one. > >> -(require 'cl) >> +(require 'cl-lib) > > What is the difference? Why is that needed? Is it it backward > compatible? There have been changes to working with cl package for some > time, has the dust settled yet? I think cl was officially deprecated in v27, so if I start emacs as a daemon and my .emacs tries to pull in cl, emacs freezes. > >> +(make-variable-buffer-local >> + (defvar framebuffer-image-mode-current-page)) >> + >> (defun framebuffer-draw (x y w h sx sy sw sh file) >> (setq file (framebuffer-cache-remote file)) >> (let ((format (framebuffer-file-format file))) >> @@ -465,8 +468,6 @@ >> (defvar framebuffer-image-mode-image-size)) >> (make-variable-buffer-local >> (defvar framebuffer-image-mode-npages)) >> -(make-variable-buffer-local >> - (defvar framebuffer-image-mode-current-page)) > > I seems to be necessary to have these defined before use so I will > probably move those to the beginning of the file. Yes. > > I did not get a warning for this. Did you get a warning? Yes, I did. > >> - (format "%d:%02d:%02d" (floor position 3600) (floor (- m s) 60) = s))))) >> + (format "%d:%02d:%02d" (floor sec 3600) (floor (- m s) 60) s))))= ) > > Thanks, I'll fix this typo. I'll try to get it working on my installation when I have time. It's great to be able to do this sort of thing. Leo