all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: David Reitter <reitter@cmu.edu>
Cc: 6069@debbugs.gnu.org
Subject: bug#6069: 23.1.96; sxhash, big uints and overflow-error in custom-file
Date: Sun, 27 Mar 2011 20:39:46 -0400	[thread overview]
Message-ID: <jwvy640ccn1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <D6672EA3-41B8-4BB7-86BD-8418E040B621@cmu.edu> (David Reitter's message of "Sun, 27 Mar 2011 17:16:56 -0400")

>>> - 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





  reply	other threads:[~2011-03-28  0:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-30 23:02 bug#6069: 23.1.96; sxhash, big uints and overflow-error in custom-file David Reitter
2010-05-01  2:31 ` bug#6069: INTMASK on 32/64 bit machines David Reitter
2011-03-27 20:46 ` bug#6069: 23.1.96; sxhash, big uints and overflow-error in custom-file Stefan Monnier
2011-03-27 21:16   ` David Reitter
2011-03-28  0:39     ` Stefan Monnier [this message]
2011-09-21 19:40       ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy640ccn1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=6069@debbugs.gnu.org \
    --cc=reitter@cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.