From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: RE: SES local variables to define printers Date: Tue, 28 May 2013 06:38:44 +0200 Message-ID: <808v2z3ei3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369715977 13287 80.91.229.3 (28 May 2013 04:39:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 May 2013 04:39:37 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 06:39:36 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UhBh9-0003xh-6u for ged-emacs-devel@m.gmane.org; Tue, 28 May 2013 06:39:35 +0200 Original-Received: from localhost ([::1]:39559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhBh8-00079q-7g for ged-emacs-devel@m.gmane.org; Tue, 28 May 2013 00:39:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhBh4-00079b-9E for emacs-devel@gnu.org; Tue, 28 May 2013 00:39:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhBh2-0006Tl-AL for emacs-devel@gnu.org; Tue, 28 May 2013 00:39:30 -0400 Original-Received: from smtp10.smtpout.orange.fr ([80.12.242.132]:33882 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhBh2-0006Tc-41 for emacs-devel@gnu.org; Tue, 28 May 2013 00:39:28 -0400 Original-Received: from CHOUNEK ([92.135.232.123]) by mwinf5d33 with ME id hGfR1l0092gQEcC03GfR4F; Tue, 28 May 2013 06:39:26 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.132 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159848 Archived-At: > From: monnier@iro.umontreal.ca > To: vincent.b.1@hotmail.fr > Subject: Re: SES local variables to define printers > Date: Sun, 26 May 2013 21:35:49 -0400 > CC: emacs-devel@gnu.org > > > That would not really make it safer because any hacker could find the > > `somewhere in the file' and put some malicious definition there. > > You'd check the function's safety when reading the file, of course, as > it is done currently for the `printer' arg of ses-cell. > > > My concern was more about getting the system stuck, but you still have > > the C-g > > Exactly: it allows denial-of-service kinds of attacks, but you can > probably already get similar problems some other way (e.g. provide > a `printer' argument that's a circular structure, so that the safety > checking doesn't terminate). > > > Stefan > Just to recap your suggestion: - the user would call some ses-define-local-printer interactive command, and would enter some symbol and body - the symbol to function would be saved in some hashmap or alist, or somthing like that, and saved in some special slot in the sheet, like at the end of the sheet where you can column count and row count, or like in a file local variable (second is probably the simplest, let us not re-invent the wheel). - each time the user wants to set a printer, he/she can set the printer function symbol to mean a sheet local printer - when a sheet is loaded, the local printer alist is loaded --- like any file local variable if local variables is what is used to define file local printers. BR, Vincent.