From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: bookmark.el bug report Date: Sat, 02 Jan 2010 14:17:46 -0500 Message-ID: <87ws005nad.fsf@red-bean.com> References: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com> <87r5q99jv9.fsf@red-bean.com> <87aawx9jfm.fsf@red-bean.com> <87ljgh2dkc.fsf@tux.homenetwork> <87637l7ys5.fsf@red-bean.com> <87ws00sz0z.fsf@tux.homenetwork> Reply-To: Karl Fogel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262459886 3197 80.91.229.12 (2 Jan 2010 19:18:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jan 2010 19:18:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 02 20:17:59 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NR9U5-0005d6-Vz for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2010 20:17:58 +0100 Original-Received: from localhost ([127.0.0.1]:50627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NR9U6-0002Gy-7P for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2010 14:17:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NR9U2-0002Gg-Ao for emacs-devel@gnu.org; Sat, 02 Jan 2010 14:17:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NR9Tx-0002G4-HX for emacs-devel@gnu.org; Sat, 02 Jan 2010 14:17:53 -0500 Original-Received: from [199.232.76.173] (port=57247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NR9Tx-0002G1-DF for emacs-devel@gnu.org; Sat, 02 Jan 2010 14:17:49 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.206.141]:58736) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NR9Tx-0004H0-0M for emacs-devel@gnu.org; Sat, 02 Jan 2010 14:17:49 -0500 Original-Received: from localhost ([127.0.0.1]:46506 helo=floss ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.71) (envelope-from ) id 1NR9Tv-0006ZG-7j; Sat, 02 Jan 2010 13:17:47 -0600 In-Reply-To: <87ws00sz0z.fsf@tux.homenetwork> (Thierry Volpiatto's message of "Sat, 02 Jan 2010 09:15:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:119285 Archived-At: Thierry Volpiatto writes: >> I can't reproduce this. Can you please try with the latest bookmark.el >> and let me know an exact reproduction recipe, if you can reproduce? > >It is working, but still fragile if you don't put properties on bookmark >when rebuilding in *-hide-filenames. I've fixed it to work the way you recommend, which is more robust than what I was doing before. Thanks (there was a boundary error in my head that led me to believe the old way was robust too, but then I remembered about annotation marks appearing in the second column). >,----[ bookmark-bmenu-hide-filenames ] >| (while bookmark-bmenu-hidden-bookmarks >| (move-to-column column t) >| (bookmark-kill-line) >| (let ((name (pop bookmark-bmenu-hidden-bookmarks)) >| (start (point))) >| (insert name) >| (put-text-property start (point) 'bookmark-name-prop name) >| (if (and (display-color-p) (display-mouse-p)) >| (add-text-properties >| start (point) >`---- > >Also, in the same function,now you have a new variable, there is no need >to set column around bookmark title, just set it to this new variable. I've gotten rid of the column variable -- you're right, it's no longer necessary -- and am adding the text property now. I think you might have an older version of bookmark.el; are you working with the latest one from the Bazaar master branch? If not, please do. If you can't get it the usual way, then see [1] for another way. Also, it would be great if you can send suggested changes in 'patch' form (i.e., using 'diff -u'). But I can read it the above way too. >,----[ bookmark-bmenu-hide-filenames ] >| (let ((inhibit-read-only t) >| (column bookmark-bmenu-marks-width)) >`---- > >Why `bookmark-bmenu-marks-width' is set to 1 and not 2? See above about boundary error. Fixed now :-). Thanks! -Karl [1] http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/annotate/head%3A/lisp/bookmark.el