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: savehist and ido. Date: Sun, 27 Aug 2006 11:40:49 +0200 Organization: Epita/LRDE Message-ID: <87y7taqzxa.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0489733416==" X-Trace: sea.gmane.org 1156671673 16066 80.91.229.2 (27 Aug 2006 09:41:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Aug 2006 09:41:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 27 11:41:08 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 1GHH8d-0008V0-GR for ged-emacs-devel@m.gmane.org; Sun, 27 Aug 2006 11:41:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHH8c-000324-8W for ged-emacs-devel@m.gmane.org; Sun, 27 Aug 2006 05:41:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GHH8N-00031k-OH for emacs-devel@gnu.org; Sun, 27 Aug 2006 05:40:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GHH8M-00031Y-GE for emacs-devel@gnu.org; Sun, 27 Aug 2006 05:40:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHH8M-00031V-Bq for emacs-devel@gnu.org; Sun, 27 Aug 2006 05:40:50 -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 1GHHH3-00089Y-DT for emacs-devel@gnu.org; Sun, 27 Aug 2006 05:49:49 -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 1GHH8H-0006Go-LQ for emacs-devel@gnu.org; Sun, 27 Aug 2006 11:40:45 +0200 Original-To: emacs-devel@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEU/JREXDATg1LV8UCao i1fQpmoP3Nd6AAACa0lEQVQ4jWWUQW7jMAxFqZEPICJzAjXeM6W8dyNqX9ji/a8yn04xnWIEJLD9 LJH85DcJFyJV3erqPty8ExHfBikXSdn0WVezC0hOAQiA2nCsAHOqEnPe4k+puU8zw/t+xquqjRKA 4lHsmQBT8C5pDtBwfwH8VdcHI5+FHtjRxrQRwZsf3hNjZRKAPEzHEdH9mFNSYb5dQK3r8KM6ftNy KikAirDZFWdVkDqbxjGFbAcwbQCxxc8mPRHUGOcCIMgMACV23RfJTch3gC6ofT3qCdG0NyUUPfYF yQrKCIAnuYsgX2qPzW2i9sNrfSOSPPZQiygtCNlCjlpXJV38lIKshF/AZzsAMoArdCKNHfXukPuJ ImbLh+9J2gXwap0QpZ7NjZ7ekdkFcDiqPiLGcHmuvaG/AHgy62s52Lae1ABoA7D6d2kDoAvgbnyD ZutEd6lTHOXfYPHVJDH1K8a1+oyrjoZpAGn1x5pfwPr2E9yjxSpk50/gEyKgD/+BD/KzN3tQ13b8 Cx5loF0AgnZf5IUny9hRHQOYBllHDM+6s3oviZBu77mFjDm621Np3hkjR90wE1BkTYvhdDgDgCmR xWChFfcYAOqMm5NZkVWMur8AL5+oeMQOob2FmY76FiM+PrDDZypwGdqokSlAaQOmGH6mW8KpsOwl 0YOLedjSITr6scNRF8D4PesH33QmLrx8AzjpV/3kkg025w2gfAFYKCLluJAc4Ap+h18oo4S8wzaY klDsBUTiY8EZFkg5Iass75FubC9wd8qa0u9+gRxAsAKEaRAo6iB+vwCMGmdBjvgidQGA1ntMX4CS ZYGV/wADyL80LIX/UAAAAABJRU5ErkJggg== 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:58933 Archived-At: --===============0489733416== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi the list. When ido creates a new buffer, it records the command =AB switch-to-buffer buffer =BB, which is fine. However, =AB buffer =BB is = 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: --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=ido.patch Content-Transfer-Encoding: quoted-printable 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 =2D-- lisp/ChangeLog 27 Aug 2006 09:34:13 -0000 *************** *** 1,3 **** =2D-- 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 =20=20 * term/mac-win.el (mac-apple-event-map): Rename hicommand to hi-command. 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 =2D-- 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)))))) =2D-- 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)))))) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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 | Le copillage-collage = | | Epita/LRDE Promo 2007 | tue le programmeur. = | | http://www.lrde.org/~cadilh_m | -- Dictons LRDE = | `-- - JID: micha@amessage.be --' - -= -' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFE8WikZYNf4qobZ7kRAsILAJ4mBH1mC4yEf5c4GxiCQiRwHFHOLgCfcG4t 1nw72qVUsiBGxzv0aVGenCw= =/d2L -----END PGP SIGNATURE----- --==-=-=-- --===============0489733416== 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 --===============0489733416==--