From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Re: savehist and ido. Date: Thu, 31 Aug 2006 20:20:35 +0200 Organization: Epita/LRDE Message-ID: <871wqwu5qk.fsf@lrde.org> References: <87y7taqzxa.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1549333772==" X-Trace: sea.gmane.org 1157048448 25503 80.91.229.2 (31 Aug 2006 18:20:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 18:20:48 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 31 20:20:42 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIr9K-0006n3-TO for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 20:20:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIr9K-0002Yg-0l for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2006 14:20:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIr96-0002Tt-Rz for emacs-devel@gnu.org; Thu, 31 Aug 2006 14:20:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIr95-0002Qd-G3 for emacs-devel@gnu.org; Thu, 31 Aug 2006 14:20:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIr95-0002QK-Aq for emacs-devel@gnu.org; Thu, 31 Aug 2006 14:20:07 -0400 Original-Received: from [62.39.139.2] (helo=kualalumpur.lrde.epita.fr) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GIrIk-0002jj-Rn for emacs-devel@gnu.org; Thu, 31 Aug 2006 14:30:07 -0400 Original-Received: from mahaena.lrde.epita.fr ([192.168.101.66] helo=mahaena.lrde) by kualalumpur.lrde.epita.fr with esmtp (Exim 4.50) id 1GIr90-0006s4-H5 for emacs-devel@gnu.org; Thu, 31 Aug 2006 20:20:02 +0200 Original-To: emacs-devel@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVWPh+Tai+5r5YKBAEU CQQzGAtiq7gjAAACR0lEQVQ4jW2UzW7lIAyFzVW8BzTZX5DmCZLuU2H2pMXv/ypzbK7aSh2kRCRf /HNsE0q7Sg+RQ7JFKaqtrRNAl5AIIKe6D5DBqgbmUAe5hBI1wIRFAHjeM0RKtZi7XVVEpb0BSNfA IddChChT5DildSLWOWhY5IEItMnncZgFcUAc/5jjwCMsDosRNdfKPDTFEdVBW8C+RebDb4N5Orio RhM1+11IJyx0ng2+LryFHBMPDQDYHrY6IfGuU3ouiXTQNE8LIJDKOWpNxERTFrggQwRPd7USUsTW fJ0XbR3bdj5KgBYy4SACpxDeUYEUAzLmtJ1iIrD2gczPq8Qomjhsh/RjGIgKIO8p7NITjwlx7WID nsnQe5NeuTvoBpi8LX6vLLOh5icjOHqBypgnuSp7M+RE1agbQKHQr5E2z1WObhYW4gMqeGQL7joM jCf2DxSk5ApADSYHfFF4igNfJZL1z0GKP0FN02s4XiDXr7V5P94W6I9v8MfBOQDmfwAaVYt+x8Da v4DJvX8BAdin3Knm5yMZYAO4ABDkDniZLLfi4P40gP1F0TPGZOu0CGwA1lcowxwlGy6A9705mD0V jHCxwVZT/hYdRJVUGZNlx6l7ScQBTluof6Wj6bsPYlvpwoTvXFD9gHPn2TZPF3ntI2ecxVrW5MrV XiCie5EeNa7BlWu/HNSkprDUva163PHxAv5jyGV7gVzyAghSKOTnat85UIYFICXbD2NV9rRiv0BS tKQsg6OHH4A15F1WW+UHKHHa32h6aPnAm3/pUcWp+WYnTQAAAABJRU5ErkJggg== In-Reply-To: <87y7taqzxa.fsf@lrde.org> (=?iso-8859-1?Q?Micha=EBl?= Cadilhac's message of "Sun, 27 Aug 2006 11:40:49 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59174 Archived-At: --===============1549333772== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi! ... Just pinging :-) michael.cadilhac@lrde.org (Micha=EBl Cadilhac) writes: > When ido creates a new buffer, it records the command > =AB switch-to-buffer buffer =BB, which is fine. However, =AB buffer =BB i= s not > a string, but a buffer-object. When savehist will save > command-history, a command will have the form > > (switch-to-buffer #) > > which can't be read back when Emacs is relaunched (with an error > message that is probably cryptic for standard users). > > I can came up with the following simple solution: > > Index: lisp/ChangeLog > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /sources/emacs/emacs/lisp/ChangeLog,v > retrieving revision 1.9966 > diff -c -r1.9966 ChangeLog > *** lisp/ChangeLog 27 Aug 2006 07:08:19 -0000 1.9966 > --- lisp/ChangeLog 27 Aug 2006 09:34:13 -0000 > *************** > *** 1,3 **** > --- 1,8 ---- > + 2006-08-27 Micha=EBl Cadilhac > +=20 > + * ido.el (ido-record-command): If the argument is a buffer, save its > + name, not the buffer object. > +=20 > 2006-08-27 YAMAMOTO Mitsuharu > > * term/mac-win.el (mac-apple-event-map): Rename hicommand to hi-comman= d. > Index: lisp/ido.el > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /sources/emacs/emacs/lisp/ido.el,v > retrieving revision 1.102 > diff -c -r1.102 ido.el > *** lisp/ido.el 22 Aug 2006 09:45:13 -0000 1.102 > --- lisp/ido.el 27 Aug 2006 09:34:13 -0000 > *************** > *** 1710,1716 **** > (defun ido-record-command (command arg) > ;; Add (command arg) to command-history if ido-record-commands is t > (if ido-record-commands > ! (let ((cmd (list command arg))) > (if (or (not command-history) > (not (equal cmd (car command-history)))) > (setq command-history (cons cmd command-history)))))) > --- 1710,1718 ---- > (defun ido-record-command (command arg) > ;; Add (command arg) to command-history if ido-record-commands is t > (if ido-record-commands > ! ;; If arg is a buffer, get its name, to please savehist. > ! (let* ((buffer-arg (if (bufferp arg) (buffer-name arg) arg)) > ! (cmd (list command buffer-arg))) > (if (or (not command-history) > (not (equal cmd (car command-history)))) > (setq command-history (cons cmd command-history)))))) > > > But maybe this has to be done in `savehist-save', which will no longer > use prin1 but its own function. > > Bye! =2D-=20 | Micha=EBl `Micha' Cadilhac | Mieux vaut se taire = | | Epita/LRDE Promo 2007 | Que de parler trop fort. = | | http://www.lrde.org/~cadilh_m | -- As de tr=E8fle = | `-- - JID: micha@amessage.be --' - -= -' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFE9yh5ZYNf4qobZ7kRAvLtAJsHoCN0D/aOKc8y2uQZb0JnvHNADACfdasL vjJYJVzXZu/zKv4PadhODXE= =weeI -----END PGP SIGNATURE----- --=-=-=-- --===============1549333772== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============1549333772==--