unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Loading an output from prin1 (savehist bug).
       [not found]   ` <E1Fiyuj-0006C9-Bg@fencepost.gnu.org>
@ 2006-05-25 11:40     ` Michaël Cadilhac
  2006-05-25 14:23       ` Stefan Monnier
  2006-05-26  2:21       ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Michaël Cadilhac @ 2006-05-25 11:40 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1228 bytes --]

Richard Stallman <rms@gnu.org> writes:

>     >   If some code output command-history with prin1 then try to load it
>     >   back, the # things will cause parse errors.
>
> We can't alter that.  I see a few possible solutions:
>
> 1. Don't put markers into arguments to interactive commands,
> except thru the specific functions (point), (mark), etc.,
> which go into command-history as calls to those functions.
>
> 2. Fix programs such as bbdb-create and savehist to find
> such markers and replace them with nil.
>
> 3. Create a more general mechanism for commands to specify
> how to record calls to them in command-history.
>
> Solution #1 seems simplest; is there any reason why you need to put
> these markers in args to commands?

I don't have one ; that was just because bbdb seems to do.

Does this restriction have to be put in the coding style section of
the manual?

-- 
 |      Michaël `Micha' Cadilhac   |   Pour les 35-40 ans, l'humour         |
 |         Epita/LRDE Promo 2007   |        c'est une plus-value.           |
 | http://www.lrde.org/~cadilh_m   |           -- Guillaume L.              |
 `--  -   JID: micha@amessage.be --'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Loading an output from prin1 (savehist bug).
  2006-05-25 11:40     ` Loading an output from prin1 (savehist bug) Michaël Cadilhac
@ 2006-05-25 14:23       ` Stefan Monnier
  2006-05-26  2:22         ` Richard Stallman
  2006-05-26 13:52         ` Johan Bockgård
  2006-05-26  2:21       ` Richard Stallman
  1 sibling, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2006-05-25 14:23 UTC (permalink / raw)
  Cc: emacs-pretest-bug, rms, emacs-devel

>> >   If some code output command-history with prin1 then try to load it
>> >   back, the # things will cause parse errors.
>> We can't alter that.  I see a few possible solutions:
>> 
>> 1. Don't put markers into arguments to interactive commands,
>> except thru the specific functions (point), (mark), etc.,
>> which go into command-history as calls to those functions.
>> 
>> 2. Fix programs such as bbdb-create and savehist to find
>> such markers and replace them with nil.
>> 
>> 3. Create a more general mechanism for commands to specify
>> how to record calls to them in command-history.
>> 
>> Solution #1 seems simplest; is there any reason why you need to put
>> these markers in args to commands?

I think those uses of prin1 really call for some way to reliably print data
in a lisp-readable form.  I.e. a variant of prin1 (or a way to tell prin1)
that ignores print-depth and friends and which signals an error when it
encounters an element that it can't print readably (e.g. a marker, a hash
table, ...).


        Stefan

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

* Re: Loading an output from prin1 (savehist bug).
  2006-05-25 11:40     ` Loading an output from prin1 (savehist bug) Michaël Cadilhac
  2006-05-25 14:23       ` Stefan Monnier
@ 2006-05-26  2:21       ` Richard Stallman
  2006-06-10 16:00         ` Michaël Cadilhac
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2006-05-26  2:21 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

    Does this restriction have to be put in the coding style section of
    the manual?

I think it should go in the place where `interactive' is documented.

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

* Re: Loading an output from prin1 (savehist bug).
  2006-05-25 14:23       ` Stefan Monnier
@ 2006-05-26  2:22         ` Richard Stallman
  2006-05-26 13:52         ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-05-26  2:22 UTC (permalink / raw)
  Cc: emacs-pretest-bug, michael.cadilhac, emacs-devel

    >> Solution #1 seems simplest; is there any reason why you need to put
    >> these markers in args to commands?

    I think those uses of prin1 really call for some way to reliably print data
    in a lisp-readable form.  I.e. a variant of prin1 (or a way to tell prin1)
    that ignores print-depth and friends and which signals an error when it
    encounters an element that it can't print readably (e.g. a marker, a hash
    table, ...).

This is a very complicated project, and I think that with
the added complexity it would be a change for the worse.

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

* Re: Loading an output from prin1 (savehist bug).
  2006-05-25 14:23       ` Stefan Monnier
  2006-05-26  2:22         ` Richard Stallman
@ 2006-05-26 13:52         ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: Johan Bockgård @ 2006-05-26 13:52 UTC (permalink / raw)
  Cc: emacs-pretest-bug

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I think those uses of prin1 really call for some way to reliably
> print data in a lisp-readable form. I.e. a variant of prin1 (or a
> way to tell prin1) that ignores print-depth and friends and which
> signals an error when it encounters an element that it can't print
> readably (e.g. a marker, a hash table, ...).

How about a `print-readably' variable? XEmacs has one, Common Lisp has
*print-readably*.

Hmm...

In fact savehist already binds `print-readably'.

-- 
Johan Bockgård

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

* Re: Loading an output from prin1 (savehist bug).
  2006-05-26  2:21       ` Richard Stallman
@ 2006-06-10 16:00         ` Michaël Cadilhac
  2006-06-11 10:28           ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: Michaël Cadilhac @ 2006-06-10 16:00 UTC (permalink / raw)
  Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1115 bytes --]

Richard Stallman <rms@gnu.org> writes:

>     Does this restriction have to be put in the coding style section of
>     the manual?
>
> I think it should go in the place where `interactive' is documented.

Is this done?

I couldn't do it since I wasn't aware of the other restrictions
(regarding those interactive arguments) that have to be made.

We pointed  out that the  use of a  marker is harmful, but  what about
(this is a grep) the following:

#<process 
#<subr 
#<window 
#<hash-table
#<killed buffer>
#<buffer 
#<window-configuration>
#<frame 
#<dead frame 
#<marker 
#<overlay 
#<misc free cell>
#<intfwd to %ld>
#<boolfwd to %s>
#<objfwd to 
#<buffer_objfwd to 
#<kboard_objfwd to 
#<buffer_local_value 
#<some_buffer_local_value 
#<save_value 

-- 
 |      Michaël `Micha' Cadilhac   |    Le copillage-collage                |
 |         Epita/LRDE Promo 2007   |       tue le programmeur.              |
 | http://www.lrde.org/~cadilh_m   |           -- Dictons LRDE              |
 `--  -   JID: micha@amessage.be --'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Loading an output from prin1 (savehist bug).
  2006-06-10 16:00         ` Michaël Cadilhac
@ 2006-06-11 10:28           ` Richard Stallman
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2006-06-11 10:28 UTC (permalink / raw)
  Cc: emacs-devel

    > I think it should go in the place where `interactive' is documented.

    Is this done?

No, but I wrote it just now.  Thanks.

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

end of thread, other threads:[~2006-06-11 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <874q07xfm5.fsf@lrde.org>
     [not found] ` <87odxoslsr.fsf@lrde.org>
     [not found]   ` <E1Fiyuj-0006C9-Bg@fencepost.gnu.org>
2006-05-25 11:40     ` Loading an output from prin1 (savehist bug) Michaël Cadilhac
2006-05-25 14:23       ` Stefan Monnier
2006-05-26  2:22         ` Richard Stallman
2006-05-26 13:52         ` Johan Bockgård
2006-05-26  2:21       ` Richard Stallman
2006-06-10 16:00         ` Michaël Cadilhac
2006-06-11 10:28           ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).