all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Thien-Thi Nguyen <ttn@gnuvola.org>
Cc: emacs-devel@gnu.org
Subject: Re: PATCH: bookmark.el LIFO preservation
Date: Mon, 16 Jul 2007 09:02:56 -0700	[thread overview]
Message-ID: <87wsx0nxov.fsf@red-bean.com> (raw)
In-Reply-To: <877ip0myao.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Mon\, 16 Jul 2007 12\:35\:11 +0200")

Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> according to comments in bookmark.el, if `bookmark-sort-flag' is
> non-nil, the entries in the menu list are to be displayed in LIFO order.
>
> unfortunately, while `bookmark-maybe-sort-alist' currently does manage a
> properly non-destructive sort, it then goes on to assign the result to
> `bookmark-alist' anyway, thus losing the original order.  entries have
> no timestamp, either, so the order cannot even be recovered.
>
> to see this behavior:
>
>   (setq bookmark-sort-flag t)         ; default t anyway
>   (bookmark-bmenu-list)               ; note lexical ordering
>   (setq bookmark-sort-flag nil)
>   (bookmark-bmenu-list)               ; note lexical ordering
>   (describe-variable 'bookmark-alist)
>
> the last form is not strictly necessary; i include it to demonstrate the
> lossage at the data-structure level.  below is a small patch that makes
> the display option actually only affect display.  here is a ChangeLog
> entry:
>
> 	* bookmark.el (bookmark-maybe-sort-alist): Don't modify
> 	bookmark-alist.  Instead, if not sorting, simply return it.
> 	(bookmark-bmenu-list): Call bookmark-maybe-sort-alist
> 	for its return value, not for its side effect.
>
> do you mind if i install it?

Thank you for the clear explanation and the fix!  It'd be great if you
would install it, yes.

-Karl

      reply	other threads:[~2007-07-16 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 10:35 PATCH: bookmark.el LIFO preservation Thien-Thi Nguyen
2007-07-16 16:02 ` Karl Fogel [this message]

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=87wsx0nxov.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-devel@gnu.org \
    --cc=ttn@gnuvola.org \
    /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.