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: make a drawing with Emacs Date: Wed, 02 Sep 2020 20:26:22 -0500 Message-ID: <86o8mnr6pt.fsf@x201.butler.org> References: <20200901145854.GF15433@tuxteam.de> <87sgbzsx4q.fsf@logand.com> <87r1rjsv86.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18722"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 03 03:42:07 2020 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 1kDeGN-0004jf-Eu for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 03 Sep 2020 03:42:07 +0200 Original-Received: from localhost ([::1]:57782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDeGL-0006MG-Q1 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Sep 2020 21:42:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDeG1-0006M3-Ld for help-gnu-emacs@gnu.org; Wed, 02 Sep 2020 21:41:45 -0400 Original-Received: from mail-eopbgr660133.outbound.protection.outlook.com ([40.107.66.133]:12212 helo=CAN01-QB1-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 1kDeFz-0003hW-Dd for help-gnu-emacs@gnu.org; Wed, 02 Sep 2020 21:41:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ToW564hE575g+Gh5A4obFaKMGvF/d3w0KXXAHYXnTG6yzmJsIU1ZQPngWwAv201FLiQqEdeAxtyKtFycvARKXkLm+vZ0K+0j/3n2H9oXmNSAYtbeMPFpFYT8xuyt8hNq6Na8INTN2AR+W0xm/A9pTI7ybTstsBW1rSEaHNjCLmEO5xK+WObnpLCIBNi6gg+Eey/9zV1P3xtErBom+WXvMhA15PuZbcux2LbSdIcTWOjvBqecSAttb8RcEWR44mf11pJ0rWD6VW+1qfWDtFpjSPLW6rx+xR/RxI1ZSEVJvaLBRRe9WPAZVGiyD5dHJLY6HuQ5CIKkjYYZLqRJP027Hg== 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=SLVTQSfEIeyPIayQ0ElMZ4+s9HliWTGUNL5oGkWXCMk=; b=UQWNc1OR0AcEaqFm5dQIv78XhKtyq6B3iJOBn/lN7zDfCan6jYHH8ehOfTXkmrVFn/bXI9kfap3sfgNpcLyw4iJka8wqWSfVjVRkhO+FHRuOVoE1CPydqZ3cuxgi5mNUjxC/62YhWQO93g1VlGrgRm8SF89RhO+ulaIAM21jiaCOUq4CLfvZHAIY35r/lC/yWfbtoVT4sNuaXn0dWen5BSFMhpv6mZZyuu3lAJ2LXf7K7KYWKEvuhIHp0N4N/yk8fhCKCZgAvsNaRltFDaUnQ2almH12zlwF7OZr6lXhg6t0s4mbPJVuMgYw7hmQolBCl8sYDutK5/iLstDc+M+FQA== 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=SLVTQSfEIeyPIayQ0ElMZ4+s9HliWTGUNL5oGkWXCMk=; b=FqIVloFlEVdWMR2XBNySZpXLyCPhLgcJyB5ZcKSFk/yBwG5YkkuXH8CKbZWTtUSFwnWMItQy8rrNiG6MdXo7ehX1pQKZ8Zcy5XjJSAQUAU4urrcX2/oS/M5P2O7DyKugcA8+AMTe/aqSulMoDTrQWL64jOwdylidr9sF5UAeouI= 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 QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:33::32) by YQXPR0101MB1655.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:25::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.24; Thu, 3 Sep 2020 01:26:26 +0000 Original-Received: from QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM ([fe80::f0cf:acc0:b1c3:8927]) by QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM ([fe80::f0cf:acc0:b1c3:8927%6]) with mapi id 15.20.3326.025; Thu, 3 Sep 2020 01:26:26 +0000 In-Reply-To: <87r1rjsv86.fsf@ebih.ebihd> (Emanuel Berg via Users list for the's message of "Wed, 2 Sep 2020 23:51:37 +0200") X-ClientProxiedBy: CO2PR04CA0172.namprd04.prod.outlook.com (2603:10b6:104:4::26) To QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:33::32) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from x201 (45.44.33.194) by CO2PR04CA0172.namprd04.prod.outlook.com (2603:10b6:104:4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15 via Frontend Transport; Thu, 3 Sep 2020 01:26:26 +0000 X-Originating-IP: [45.44.33.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 029529eb-9c73-4a5b-8b69-08d84fa860a2 X-MS-TrafficTypeDiagnostic: YQXPR0101MB1655: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hLX62q9wYBp6HZYhDDYfvcTWMF/vKZ3GBIErA99zN9wtqhJI7HKCLoCetL3OZxPWhFild15vIuIZg5+tvtONmJygTClpaIZs8dMWdT9QUqTjRnCJ2SIdssG8NcaFpbIjdEAivEukhmuX+C+7BmhO2xlfmAhwXarJSagWJUCp486TmEUmzA+Olx9GVj8orK9hKuVT8K0B9E/bLYZDaJf7xrDqRPfmlot2/l7+SkKxM+uI2YLE61hHlO15w5UH7q1vU3Tm5walFIZCvYvwrgIFFPLBDYggrypmwtiIdbabtLPHYX7YRyelI8LXu+pE0/iaJCw5ULRHX5yIjhxtOqRWUWJWZc1xEKuO+1SEe7g+72WJ9PFaGhE1x6VvVpo4pHt1x15L74cAnKFtex8Z0dKmKw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(136003)(396003)(39850400004)(346002)(376002)(6496006)(8936002)(6666004)(2906002)(66476007)(6486002)(9686003)(956004)(66556008)(5660300002)(52116002)(6916009)(66946007)(44832011)(83380400001)(8676002)(316002)(16526019)(966005)(478600001)(26005)(186003)(86362001)(786003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: SF/2VYWUMnzHw/K+ciIdCmzVoUZHIIqfblhxrb5Kh7pUNB1GdFcvV4aWjUbnLKlfS5LAA7zIA4kZhV0wcElizOsOpGysWqlUFhXzx5OvdSAIiucqiXULic0G5DqozH+FG1fiV7jSh4n3fJJmLuE0lv2q2g9LsimSElXTvDO/xwNFyGdgk8iZyzm+qLcV8FkfYsPpIrmYHschw1i89D4d0jdkAgLu2QIC5rVeJJG4iqrnW3ENOuaKV5aFajId2zNO9zbCW+8DCDHGYEFV91jVrGi4WbxKvgSFw1sQ58iZi9WEUuI3rpkAgxXHR4suDKGaEXZmtctmsc8XCCihGKhR11XWII8awByVC0s08516WwYdvRibJPPCAYQ+0jWI0uQGoANsfB53CyZy2TfpA+QjuhCk+kfnRi8pMCtLZ8To5+6OVGuOCQALKZHcJRHgBzU3+lQb6GVkgWjvKK2pSphGM9XY3mewwQDhcyFAKrIwWN+qFjijBLwCZFf0bj43GwbJQXr3GhCEn2totNuWR6NqvxiSJsdgEGQKoj2jHfJB9y0eWOhYQVVszDpyMjCugZeOx2T2lNs4+FBxMAvVB8GwIresreEZhbrwwsJPDgYxiAFAUPcwg8X6yD3A/MhaOTvZRXmhfZNr7p1VGGUpUGB1Ew== X-OriginatorOrg: umanitoba.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 029529eb-9c73-4a5b-8b69-08d84fa860a2 X-MS-Exchange-CrossTenant-AuthSource: QB1PR01MB3042.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2020 01:26:26.8130 (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: MUIMcJ/2s+RqUCUuUwjwfCsKbm+Zq3fEqW3RCRPPQkpuFTxT/dwevsLzyGp2NQHM2IAKrXvt7d7LukCYgmap2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR0101MB1655 Received-SPF: pass client-ip=40.107.66.133; envelope-from=Leo.Butler@umanitoba.ca; helo=CAN01-QB1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/02 21:41:41 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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:123910 Archived-At: Emanuel Berg via Users list for the GNU Emacs text editor writes: > ******************************************************** > Caution: This message was sent from outside the University of Manitoba. > ******************************************************** > > Tomas Hlavaty wrote: > >> Here is an alternative which works even on console without any graphics >> toolkit compiled in: >> >> (require 'xml) >> (with-temp-buffer >> (xml-print >> '((svg >> ((xmlns . "http://www.w3.org/2000/svg") >> (viewBox . "0 0 100 100")) >> (circle >> ((cx . "50") (cy . "50") (r . "20")))))) >> (write-file "/tmp/a.svg")) >> >> The /tmp/a.svg file will contain the SVG image. >> >> Now the nice part of doing it in pure Elisp is that >> you can refactor the code into useful functions as >> you need. For example [...] > > Indeed, that works great! Thanks a lot! Now I just > have to get the primitives from the W3C tutorial and > then implement neat little Elisp wrappers for all the > common stuff... > > https://dataswamp.org/~incal/emacs-init/svg-my.el > >> You can then display the generated image in the console using >> https://logand.com/sw/emacs-framebuffer/file/emacs-framebuffer.el.html > > Really? :O > > And... how do I get just the .el file? Line 9 of the file: Download: git clone https://logand.com/git/emacs-framebuffer.git Interesting thread. Leo