From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: savehist-mode: invalid-read-syntax "#" Date: Wed, 04 Jan 2006 20:59:11 +0100 Message-ID: References: <87fyo469gn.fsf@jurta.org> <85psn8xo0r.fsf@lola.goethe.zz> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136404784 27491 80.91.229.2 (4 Jan 2006 19:59:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 19:59:44 +0000 (UTC) Cc: hniksic@xemacs.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 04 20:59:41 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 1EuEnD-0007Ly-IH for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2006 20:59:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuEot-0003TS-VB for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2006 15:01:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuEoi-0003Sv-CS for emacs-devel@gnu.org; Wed, 04 Jan 2006 15:01:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuEog-0003RE-Qv for emacs-devel@gnu.org; Wed, 04 Jan 2006 15:01:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuEog-0003RB-Np for emacs-devel@gnu.org; Wed, 04 Jan 2006 15:01:02 -0500 Original-Received: from [134.60.1.1] (helo=mail.uni-ulm.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EuEq8-000218-IN for emacs-devel@gnu.org; Wed, 04 Jan 2006 15:02:32 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.4/8.13.4) with ESMTP id k04JxCQM007525; Wed, 4 Jan 2006 20:59:12 +0100 (MET) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id D0CAD10E37; Wed, 4 Jan 2006 20:59:11 +0100 (CET) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org, hniksic@xemacs.org X-Face: /U7=m^"/-Dn61mAl{g9e3>\G5Tp,oEX|V)g2I1hBk\ML; )7A?6cmB-y7y?'NA^J<=oz7syB =(McAwIHgLX!.B?R3X}98d@?>CrT094KLWh]WU4gDpnL/")MS(XoQTv`Oq225uL>+; CpPXo$N5e>N> $tPd-gbB^F{gQS#1ase]XO~D4p4M"3+F-7~u]dy3I?Pb8RO*H-EFeWDUf?Rf, d]pv\Jvh2Cht!A=im yKAS2Z%Ao^;}W/qzMvMm In-Reply-To: <85psn8xo0r.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 04 Jan 2006 11:53:24 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-DCC-servers-Metrics: gemini 1049; Body=2 Fuz1=2 Fuz2=2 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:48708 Archived-At: On Wed, Jan 04 2006, David Kastrup wrote: > Juri Linkov writes: > >>> Alas, from time to time `savehist-mode' saves entries containing "#" >> >> Perhaps Emacs should provide a general purpose function (like >> `desktop-value-to-string') to print Lisp-readable expressions. > > You can't make buffers, windows, overlays, yes even markers > "Lisp-readable". Mentioning "markers" reminds me of another failure when reading the history file. I had the following entry in ~/.emacs.d/history (I didn't C&P in which variable it was) after editing entries in my BBDB: (bbdb-insert-new-field '["J..." "H..." ("J H...") nil (["Home" "NNNNN/NNNNN"] ["Office" "NNNNN/NNNNNN"] ["Mobile" "0"]) (["Home" ("...weg N") "...." "" "NNNNN" ""]) ("J....H...@invalid.invalid" "j..._h...@invalid.invalid") ((gnokii . "t") (birthday . "NNNN-NN-NN") (www . "http://www.invalid.invalid/") (category . "...") (creation-date . "NNNN-NN-NN") (timestamp . "NNNN-NN-NN")) ["J... H..." nil # nil]] 'phone '["Mobile" "0"]) > They are just not restorable by the Lisp reader and so one should > find out what causes them to be in the history in the first place. AFAICS, it's the following code... (defun savehist-install () "Hook savehist into Emacs. Normally invoked by calling `savehist-mode' to set the minor mode. Installs `savehist-autosave' in `kill-emacs-hook' and on a timer. To undo this, call `savehist-uninstall'." (add-hook 'minibuffer-setup-hook 'savehist-minibuffer-hook) [...] (defun savehist-minibuffer-hook () ;; XEmacs sets minibuffer-history-variable to t to mean "no history ;; is being recorded". (unless (eq minibuffer-history-variable t) (add-to-list 'savehist-minibuffer-history-variables minibuffer-history-variable))) Maybe there should be a list (say `savehist-ignores-variables') which should contain `command-history' (and maybe other variables). Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/