From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Desktop mode saves mark-ring too verbosely Date: Sat, 23 Nov 2013 08:40:23 -0500 Message-ID: References: <1369194255.41567.YahooMailClassic@web141101.mail.bf1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385214041 9056 80.91.229.3 (23 Nov 2013 13:40:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Nov 2013 13:40:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kelly Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 23 14:40:46 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 1VkDS1-0008MC-Ge for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2013 14:40:45 +0100 Original-Received: from localhost ([::1]:43700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDS1-0005Cv-3h for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2013 08:40:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDRr-0005Cc-0u for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:40:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkDRj-0006bd-M4 for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:40:34 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDRj-0006bZ-DN for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:40:27 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K4R/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av4EABK/CFHO+K4R/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40222870" Original-Received: from 206-248-174-17.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.17]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Nov 2013 08:40:25 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 5EEBA60BD2; Sat, 23 Nov 2013 08:40:23 -0500 (EST) In-Reply-To: <1369194255.41567.YahooMailClassic@web141101.mail.bf1.yahoo.com> (Kelly Dean's message of "Tue, 21 May 2013 20:44:15 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:165614 Archived-At: > You can (add-to-list 'desktop-locals-to-save 'mark-ring) and it works, so > long as you have the fix for bug 13951 applied. But it's very verbose; for > each element of mark-ring for each buffer, it writes an entry like > (let ((mk (make-marker))) (add-hook 'desktop-delay-hook (list 'lambda '() > (list 'set-marker mk 123 '(get-buffer "init.el")))) mk) > @@ -694,7 +694,8 @@ > (when (member (car locals) loclist) > (setq ll (cons (car locals) ll))))) > (setq locals (cdr locals))) > - ll))) > + ll) > + (mapcar 'marker-position mark-ring))) Having special-case code to print&read some variables is not in itself a bad idea, but I think we should do it via a table mapping variables to ad-hoc massaging functions. Stefan