* bug#5550: 23.1.92; bookmark stops relocating
@ 2010-02-09 3:54 Leo
2010-02-09 7:49 ` Thierry Volpiatto
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Leo @ 2010-02-09 3:54 UTC (permalink / raw)
To: 5550
It seems this is the third bug report from me regarding bookmark. I
wonder what has happened to it.
Previously if I 'C-x r b' and choose a bookmark whose target no longer
exists, for example, a directory, I am offered to relocate the target.
Now emacs just opens a blank buffer. I recently upgraded to snow leopard
and so I ran into lots of such cases.
In GNU Emacs 23.1.92.2 (x86_64-apple-darwin10.2.0, Carbon Version 1.6.0 AppKit 1038.25)
of 2010-02-03 on Victoria.local
Windowing system distributor `Apple Inc.', version 10.6.2
configured using `configure '--prefix=/usr/local/unix/emacs' '--with-mac''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: iso-latin-1-unix
default enable-multibyte-characters: t
Major mode: Bookmark Menu
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: 23.1.92; bookmark stops relocating
2010-02-09 3:54 bug#5550: 23.1.92; bookmark stops relocating Leo
@ 2010-02-09 7:49 ` Thierry Volpiatto
2010-02-09 8:09 ` Thierry Volpiatto
2010-12-08 8:30 ` bug#5550: " Karl Fogel
2 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2010-02-09 7:49 UTC (permalink / raw)
To: bug-gnu-emacs
Hi Leo,
precedent bug is fixed, just have to wait my patch is applied...
This one is fixed also:
now bookmark use instead of file-error==>bookmark-error-no-filename
So please, use `bookmark-error-no-filename' instead of `file-error' in all
functions of bookmark.el to handle errors.(typically in condition-case
statement).
Leo <sdl.web@gmail.com> writes:
> It seems this is the third bug report from me regarding bookmark. I
> wonder what has happened to it.
>
> Previously if I 'C-x r b' and choose a bookmark whose target no longer
> exists, for example, a directory, I am offered to relocate the target.
>
> Now emacs just opens a blank buffer. I recently upgraded to snow leopard
> and so I ran into lots of such cases.
>
>
> In GNU Emacs 23.1.92.2 (x86_64-apple-darwin10.2.0, Carbon Version 1.6.0 AppKit 1038.25)
> of 2010-02-03 on Victoria.local
> Windowing system distributor `Apple Inc.', version 10.6.2
> configured using `configure '--prefix=/usr/local/unix/emacs' '--with-mac''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: nil
> value of $XMODIFIERS: nil
> locale-coding-system: iso-latin-1-unix
> default enable-multibyte-characters: t
>
> Major mode: Bookmark Menu
>
>
>
>
>
>
--
Thierry Volpiatto
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: 23.1.92; bookmark stops relocating
2010-02-09 3:54 bug#5550: 23.1.92; bookmark stops relocating Leo
2010-02-09 7:49 ` Thierry Volpiatto
@ 2010-02-09 8:09 ` Thierry Volpiatto
2010-02-09 10:47 ` Leo
2010-12-08 8:30 ` bug#5550: " Karl Fogel
2 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2010-02-09 8:09 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]
Find here the patch that fix bug#5476 and bug#5550.
(patch sent to Stefan also)
Leo <sdl.web@gmail.com> writes:
> It seems this is the third bug report from me regarding bookmark. I
> wonder what has happened to it.
>
> Previously if I 'C-x r b' and choose a bookmark whose target no longer
> exists, for example, a directory, I am offered to relocate the target.
>
> Now emacs just opens a blank buffer. I recently upgraded to snow leopard
> and so I ran into lots of such cases.
>
>
> In GNU Emacs 23.1.92.2 (x86_64-apple-darwin10.2.0, Carbon Version 1.6.0 AppKit 1038.25)
> of 2010-02-03 on Victoria.local
> Windowing system distributor `Apple Inc.', version 10.6.2
> configured using `configure '--prefix=/usr/local/unix/emacs' '--with-mac''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: nil
> value of $XMODIFIERS: nil
> locale-coding-system: iso-latin-1-unix
> default enable-multibyte-characters: t
>
> Major mode: Bookmark Menu
>
>
>
>
>
>
--
Thierry Volpiatto
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: SingleInitial-patchToTip.patch --]
[-- Type: text/x-patch, Size: 3470 bytes --]
##Merge of all patches applied from revision 107108
## Initial-patch: bookmark.el (bookmark-default-handler): bugfix 5476:Use buffer entry of bookmark if some instead of filename.
## patch-r107110: bookmark.el (bookmark-handle-bookmark):Fix bug 5550 fail to relocate non--existent bookmark.
##
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1068,7 +1068,7 @@
(funcall (or (bookmark-get-handler bookmark)
'bookmark-default-handler)
(bookmark-get-bookmark bookmark))
- (file-error
+ ('bookmark-error-no-filename ;file-error
;; We were unable to find the marked file, so ask if user wants to
;; relocate the bookmark, else remind them to consider deletion.
(when (stringp bookmark)
@@ -1116,24 +1116,26 @@
BMK-RECORD is a bookmark record, not a bookmark name (i.e., not a string).
Changes current buffer and point and returns nil, or signals a `file-error'."
(let ((file (bookmark-get-filename bmk-record))
+ (buf (bookmark-prop-get bmk-record 'buffer))
(forward-str (bookmark-get-front-context-string bmk-record))
(behind-str (bookmark-get-rear-context-string bmk-record))
(place (bookmark-get-position bmk-record)))
- (if (not file)
- (signal 'bookmark-error-no-filename (list 'stringp file))
- (set-buffer (find-file-noselect file))
- (if place (goto-char place))
- ;; Go searching forward first. Then, if forward-str exists and
- ;; was found in the file, we can search backward for behind-str.
- ;; Rationale is that if text was inserted between the two in the
- ;; file, it's better to be put before it so you can read it,
- ;; rather than after and remain perhaps unaware of the changes.
- (if forward-str
- (if (search-forward forward-str (point-max) t)
- (goto-char (match-beginning 0))))
- (if behind-str
- (if (search-backward behind-str (point-min) t)
- (goto-char (match-end 0)))))
+ (if (and file (file-readable-p file) (not (buffer-live-p buf)))
+ (with-current-buffer (find-file-noselect file) (setq buf (buffer-name)))
+ ;; No file found. See if buffer BUF have been created. If not, raise error.
+ (unless (and buf (get-buffer buf))
+ (signal 'bookmark-error-no-filename (list 'stringp file))))
+ (set-buffer buf)
+ (if place (goto-char place))
+ ;; Go searching forward first. Then, if forward-str exists and
+ ;; was found in the file, we can search backward for behind-str.
+ ;; Rationale is that if text was inserted between the two in the
+ ;; file, it's better to be put before it so you can read it,
+ ;; rather than after and remain perhaps unaware of the changes.
+ (when (and forward-str (search-forward forward-str (point-max) t))
+ (goto-char (match-beginning 0)))
+ (when (and behind-str (search-backward behind-str (point-min) t))
+ (goto-char (match-end 0)))
nil))
;;;###autoload
diff --git a/lisp/info.el b/lisp/info.el
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4797,7 +4797,7 @@
;; Use bookmark-default-handler to move to the appropriate location
;; within the node.
(bookmark-default-handler
- (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk)))))
+ `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
(provide 'info)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: 23.1.92; bookmark stops relocating
2010-02-09 8:09 ` Thierry Volpiatto
@ 2010-02-09 10:47 ` Leo
2010-02-09 11:02 ` Thierry Volpiatto
0 siblings, 1 reply; 8+ messages in thread
From: Leo @ 2010-02-09 10:47 UTC (permalink / raw)
To: bug-gnu-emacs
On 2010-02-09 08:09 +0000, Thierry Volpiatto wrote:
> - (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk)))))
> + `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
Is bookmark a typo for bmk here?
Leo
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: 23.1.92; bookmark stops relocating
2010-02-09 10:47 ` Leo
@ 2010-02-09 11:02 ` Thierry Volpiatto
2010-02-09 11:57 ` Leo
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2010-02-09 11:02 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Leo <sdl.web@gmail.com> writes:
> On 2010-02-09 08:09 +0000, Thierry Volpiatto wrote:
>> - (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk)))))
>> + `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
>
> Is bookmark a typo for bmk here?
Yes thanks. ;-)
Apply patch on top of precedents ones.
--
Thierry Volpiatto
[-- Attachment #2: patch-r107111 --]
[-- Type: application/octet-stream, Size: 655 bytes --]
# HG changeset patch
# User Thierry Volpiatto <thierry.volpiatto@gmail.com>
# Date 1265713112 -3600
# Node ID 15a13a7ce9b61f77f8a20323816f67c32cc45edf
# Parent d3a0f3c8eeddeb30bccfc2b765941e9ae0a4d072
info.el (Info-bookmark-jump): Fix typo error, thanks Leo.
diff --git a/lisp/info.el b/lisp/info.el
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4797,7 +4797,7 @@
;; Use bookmark-default-handler to move to the appropriate location
;; within the node.
(bookmark-default-handler
- `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
+ `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bmk)))))
(provide 'info)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: 23.1.92; bookmark stops relocating
2010-02-09 11:02 ` Thierry Volpiatto
@ 2010-02-09 11:57 ` Leo
0 siblings, 0 replies; 8+ messages in thread
From: Leo @ 2010-02-09 11:57 UTC (permalink / raw)
To: bug-gnu-emacs
On 2010-02-09 11:02 +0000, Thierry Volpiatto wrote:
> Leo <sdl.web@gmail.com> writes:
>
>> On 2010-02-09 08:09 +0000, Thierry Volpiatto wrote:
>>> - (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk)))))
>>> + `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
>>
>> Is bookmark a typo for bmk here?
> Yes thanks. ;-)
> Apply patch on top of precedents ones.
Thanks.
Leo
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: bookmark stops relocating
2010-02-09 3:54 bug#5550: 23.1.92; bookmark stops relocating Leo
2010-02-09 7:49 ` Thierry Volpiatto
2010-02-09 8:09 ` Thierry Volpiatto
@ 2010-12-08 8:30 ` Karl Fogel
2010-12-08 9:31 ` Thierry Volpiatto
2 siblings, 1 reply; 8+ messages in thread
From: Karl Fogel @ 2010-12-08 8:30 UTC (permalink / raw)
To: 5550-done
I'm (tentatively) marking this as closed, because I can not reproduce
this bug with the latest development emacs (24.0.50.1, bzr rev 102609),
and there have been many patches to bookmark.el since this was reported.
Theirry, in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5550#11 you
supplied a patch that affected bug #5476 too. If you can still
reproduce bug #5476, please update the patch and submit it to that bug,
so it can be tracked and applied properly. (However, I cannot reproduce
bug #5476, so I'm going to mark it as closed for now too.)
-Karl
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5550: bookmark stops relocating
2010-12-08 8:30 ` bug#5550: " Karl Fogel
@ 2010-12-08 9:31 ` Thierry Volpiatto
0 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2010-12-08 9:31 UTC (permalink / raw)
To: bug-gnu-emacs
Hi Karl,
all this have been fixed, so you can close bugs safely.
Karl Fogel <kfogel@red-bean.com> writes:
> I'm (tentatively) marking this as closed, because I can not reproduce
> this bug with the latest development emacs (24.0.50.1, bzr rev 102609),
> and there have been many patches to bookmark.el since this was reported.
>
> Theirry, in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5550#11 you
> supplied a patch that affected bug #5476 too. If you can still
> reproduce bug #5476, please update the patch and submit it to that bug,
> so it can be tracked and applied properly. (However, I cannot reproduce
> bug #5476, so I'm going to mark it as closed for now too.)
>
> -Karl
>
>
>
>
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-08 9:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 3:54 bug#5550: 23.1.92; bookmark stops relocating Leo
2010-02-09 7:49 ` Thierry Volpiatto
2010-02-09 8:09 ` Thierry Volpiatto
2010-02-09 10:47 ` Leo
2010-02-09 11:02 ` Thierry Volpiatto
2010-02-09 11:57 ` Leo
2010-12-08 8:30 ` bug#5550: " Karl Fogel
2010-12-08 9:31 ` Thierry Volpiatto
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).