From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6069: 23.1.96; sxhash, big uints and overflow-error in custom-file Date: Sun, 27 Mar 2011 20:39:46 -0400 Message-ID: References: <5A5EF5AB-3423-4AB4-A315-FE0E167CCD71@cmu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301274444 5274 80.91.229.12 (28 Mar 2011 01:07:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 01:07:24 +0000 (UTC) Cc: 6069@debbugs.gnu.org To: David Reitter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 28 03:07:19 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q40vP-0006QN-3t for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Mar 2011 03:07:19 +0200 Original-Received: from localhost ([127.0.0.1]:56180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q40vO-0003cu-Et for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Mar 2011 21:07:18 -0400 Original-Received: from [140.186.70.92] (port=58821 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q40vH-0003c0-A9 for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2011 21:07:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q40vF-0006ay-G4 for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2011 21:07:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q40vF-0006au-DA for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2011 21:07:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q40V1-00039B-Lh; Sun, 27 Mar 2011 20:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Mar 2011 00:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6069-submit@debbugs.gnu.org id=B6069.130127280012080 (code B ref 6069); Mon, 28 Mar 2011 00:40:03 +0000 Original-Received: (at 6069) by debbugs.gnu.org; 28 Mar 2011 00:40:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q40Ux-00038m-9r for submit@debbugs.gnu.org; Sun, 27 Mar 2011 20:39:59 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q40Uq-00038S-Si; Sun, 27 Mar 2011 20:39:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEANHXj01MCqRC/2dsb2JhbAClSnjANoVpBJYFg0s X-IronPort-AV: E=Sophos;i="4.63,252,1299474000"; d="scan'208";a="98288792" Original-Received: from 76-10-164-66.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.66]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 27 Mar 2011 20:39:46 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A91A158EBD; Sun, 27 Mar 2011 20:39:46 -0400 (EDT) In-Reply-To: (David Reitter's message of "Sun, 27 Mar 2011 17:16:56 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 27 Mar 2011 20:40:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45405 Archived-At: >>> - I stored it in a customization variable, which was subsequently >>> saved to my custom-file. >> What was the use of this sxhash value in your customization? > I allow users to customize the toolbar through a standard graphical > interface. This customization is specific to the toolbar set by the major > mode (and other contextual factors). Thus, I associate a toolbar setting > with a hash over the keys used in the tool-bar-map. This is not ideal (as > other keymaps may also define icons that appear in the toolbar), but works > reasonably well. So you could work around the problem by doing a logand with #xfffffff. I'm not saying that the problem you describe is an Emacs feature, but simply that the only way to "make it work right" (i.e. make that sxhash returns the same value on all systems) involves clipping it to #xfffffff and while that's OK in many cases, I'd rather do it when it can be avoided (e.g. when the sxhash value is used to index a hash table). Also sxhash's values are not guaranteed to be the same between different Emacs versions, so maybe instead of storing the sxhash you should simply use the list of keys as-is. It's not like it's expected to be very long. Stefan