unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13972: 24.3.50; Cannot delete bookmark
@ 2013-03-16  1:53 Xue Fuqiao
  2013-03-17  6:38 ` Thierry Volpiatto
  0 siblings, 1 reply; 7+ messages in thread
From: Xue Fuqiao @ 2013-03-16  1:53 UTC (permalink / raw)
  To: 13972

[-- Attachment #1: Type: text/plain, Size: 7682 bytes --]

I have three bookmarks:

  TODO			        /usr/local/share/emacs/24.3.50/etc/TODO
  startup.el		        ~/emacs-bzr/trunk/lisp/startup.el
  text property		        /usr/local/share/info/elisp

All of these files exist.  To reproduce this bug:

  emacs -Q
  C-x r l
  d x

The echo area says: "Deleting bookmarks...done".

But the bookmark isn't deleted.  I have attached my
~/.emacs.d/bookmarks.



In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0)
 of 2013-03-10 on Emacs
Bzr revision: 111984 rgm@gnu.org-20130309202227-7xolc8f5fagp712b
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.10

Configured using:
 `configure --enable-link-time-optimization'

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Bookmark Menu

Minor modes in effect:
  diff-auto-refine-mode: t
  which-function-mode: t
  electric-pair-mode: t
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x k <return> <tab> <return> C-x k C-g <help-echo> 
<down-mouse-1> <help-echo> <mouse-1> C-x k <return> 
C-x k <return> C-x k <return> <tab> C-x k C-g <tab> 
<tab> <tab> <tab> C-p C-p <return> SPC C-x k <return> 
<tab> <tab> <return> C-x k <return> C-x k <return> 
M-< <tab> <tab> <tab> <tab> <tab> <tab> <S-iso-lefttab> 
<S-iso-lefttab> <S-iso-lefttab> C-v C-v C-v C-v C-v 
C-v C-v C-v C-v C-v C-v M-v M-v C-h v g l o - w h i 
<tab> m o <tab> <return> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <S-iso-lefttab> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<help-echo> <help-echo> <help-echo> C-g <help-echo> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <down-mouse-1> <mouse-1> 
<help-echo> <help-echo> C-x k <return> C-x 1 <menu> 
d i a r y <return> C-v C-n C-n C-n <tab> <tab> C-n 
C-e <C-return> C-/ C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-n C-e <return> * * SPC t e x t SPC p r o 
p e r t y C-x C-s C-x r l d x <menu> r e - b u f f 
<tab> M-b C-b v e <tab> <return> q p d x C-x k <return> 
C-x r l d x c C-h k x C-h k C-g C-p D C-h k d <help-echo> 
<down-mouse-1> <mouse-1> C-v M-v C-l C-x k <return> 
C-x o C-h k x <help-echo> <down-mouse-1> <help-echo> 
<mouse-1> <help-echo> C-x o d x C-x o C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-v C-l M-v C-x o C-x b s t a <tab> 
C-g p <menu> r e - e m - b u g <tab> <return> C a n 
n o t SPC <tab> <backspace> <backspace> SPC C-g <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu> 
r e - e m - b u <tab> <return>

Recent messages:
Entering debugger...
Back to top level.
Deleting bookmarks...done
Deleting bookmarks...done
Type "q" in help window to restore its previous buffer.
 [2 times]
uncompressing bookmark.el.gz...done

uncompressing bookmark.el.gz...done
Deleting bookmarks...done
Quit [2 times]

Load-path shadows:
None found.

Features:
(sort mail-extr bookmark woman tutorial help-macro man help-at-pt ehelp
apropos lisp-mnt gulp emacsbug sendmail elint locate xesam dbus
time-stamp page-ext data-debug informat makeinfo texinfo vc
vc-dispatcher srecode soap-client url-http tls url-auth url-gw url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap smerge-mode semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
rcompile pcvs-defs pcvs-util make-mode glasses gdb-mi bindat gud flymake
emerge elide-head ediff-merg ediff-diff ediff-wind ediff-help ediff-util
ediff-mult ediff-init ediff ede/speedbar ede/files ede ede/base gv
ede/auto ede/source eieio-base eieio-speedbar eieio-custom cedet ebrowse
ebuff-menu diff-mode copyright compare-w add-log xscheme trace testcover
scheme re-builder profiler shadow inf-lisp ert ewoc debug edebug hideif
cpp cmacexp vhdl-mode assoc verilog-mode diff vera-mode tcl simula sieve
sieve-mode sieve-manage sh-script executable sgml-mode ruby-mode python
rx prolog perl-mode pascal opascal octave-mod rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
modula2 smie meta-mode m4-mode ld-script js json info-look idlwave
idlwave-help idlw-help icon fortran f90 dcl-mode tempo css-mode
cperl-mode cfengine cfengine3 asm-mode antlr-mode cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
ada-mode which-func align find-file sql ps-mode ses unsafep rcirc
newst-backend xml derived mpc htmlfontify esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode
esh-util erc-goodies erc erc-backend erc-compat doc-view image-mode
calculator calc calc-loaddefs calc-macs disp-table find-dired grep
compile etags dired-aux dired vc-bzr message rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader ibuf-ext isearchb
quickurl browse-url expand windmove whitespace vcursor speedbar sb-image
ezimage dframe ruler-mode reveal repeat org-protocol master linum kmacro
iswitchb imenu ido ibuffer hl-line hippie-exp follow filesets filecache
ffap url-parse auth-source eieio mm-util mail-prsvr password-cache
url-vars emacs-lock dabbrev cua-base completion bs autorevert autoinsert
electric cus-edit wid-edit jka-compr misearch multi-isearch info org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus
gnus-util org-docview org-bibtex bibtex org-bbdb org byte-opt warnings
advice help-fns ob-tangle ob-ref ob-lob ob-table org-footnote org-src
ob-comint ob-keys org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
org-compat org-macs ob-eval org-loaddefs format-spec find-func flyspell
ispell checkdoc thingatpt help-mode uniquify nadvice wheatgrass-theme
time delsel cus-start cus-load xfq-backup ielm pp comint ansi-color ring
server view mule-util cal-china lunar solar cal-dst cal-bahai cal-islam
cal-hebrew holidays hol-loaddefs diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs xfq-org xfq-minor-modes paren xfq-elisp
xfq-require bmi elp hideshow easymenu bytecomp byte-compile cconv cl-lib
xfq-packages package time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)


-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/
rr

[-- Attachment #2: bookmarks --]
[-- Type: application/octet-stream, Size: 797 bytes --]

;;;; Emacs Bookmark Format Version 1 ;;;;
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("startup.el"
 (filename . "~/emacs-bzr/trunk/lisp/startup.el")
 (front-context-string . "-fancy-splash-sc")
 (rear-context-string . ")\n      (if (use")
 (position . 82067))
("text property"
 (front-context-string . "\n     (defun dir")
 (rear-context-string . "lowing command:\n")
 (position . 2079711)
 (filename . "/usr/local/share/info/elisp")
 (info-node . "Clickable Text")
 (handler . Info-bookmark-jump))
("TODO"
 (filename . "/usr/local/share/emacs/24.3.50/etc/TODO")
 (front-context-string . "** erase-buffer ")
 (rear-context-string . "/msg01346.html\n\n")
 (position . 5203))
)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-03-16  1:53 bug#13972: 24.3.50; Cannot delete bookmark Xue Fuqiao
@ 2013-03-17  6:38 ` Thierry Volpiatto
  2013-03-17  7:47   ` Thierry Volpiatto
  0 siblings, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2013-03-17  6:38 UTC (permalink / raw)
  To: 13972

Xue Fuqiao <xfq.free@gmail.com> writes:

> I have three bookmarks:
>
>   TODO			        /usr/local/share/emacs/24.3.50/etc/TODO
>   startup.el		        ~/emacs-bzr/trunk/lisp/startup.el
>   text property		        /usr/local/share/info/elisp
>
> All of these files exist.  To reproduce this bug:
>
>   emacs -Q
>   C-x r l
>   d x
>
> The echo area says: "Deleting bookmarks...done".
>
> But the bookmark isn't deleted.  I have attached my
> ~/.emacs.d/bookmarks.

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 47e1379..ee6e050 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1582,8 +1582,8 @@ deletion, or > if it is flagged for displaying."
     (if bookmark-bmenu-use-header-line
 	(bookmark-bmenu-set-header)
       (forward-line bookmark-bmenu-inline-header-height))
-    (if bookmark-bmenu-toggle-filenames
-        (bookmark-bmenu-toggle-filenames t))))
+    (when (and bookmark-alist bookmark-bmenu-toggle-filenames)
+      (bookmark-bmenu-toggle-filenames t))))
 
 ;;;###autoload
 (defalias 'list-bookmarks 'bookmark-bmenu-list)

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-03-17  6:38 ` Thierry Volpiatto
@ 2013-03-17  7:47   ` Thierry Volpiatto
  2013-03-18 11:20     ` Thierry Volpiatto
  2013-04-04  1:59     ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2013-03-17  7:47 UTC (permalink / raw)
  To: 13972

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Xue Fuqiao <xfq.free@gmail.com> writes:
>
>> I have three bookmarks:
>>
>>   TODO			        /usr/local/share/emacs/24.3.50/etc/TODO
>>   startup.el		        ~/emacs-bzr/trunk/lisp/startup.el
>>   text property		        /usr/local/share/info/elisp
>>
>> All of these files exist.  To reproduce this bug:
>>
>>   emacs -Q
>>   C-x r l
>>   d x
>>
>> The echo area says: "Deleting bookmarks...done".
>>
>> But the bookmark isn't deleted.  I have attached my
>> ~/.emacs.d/bookmarks.
>
> diff --git a/lisp/bookmark.el b/lisp/bookmark.el
> index 47e1379..ee6e050 100644
> --- a/lisp/bookmark.el
> +++ b/lisp/bookmark.el
> @@ -1582,8 +1582,8 @@ deletion, or > if it is flagged for displaying."
>      (if bookmark-bmenu-use-header-line
>  	(bookmark-bmenu-set-header)
>        (forward-line bookmark-bmenu-inline-header-height))
> -    (if bookmark-bmenu-toggle-filenames
> -        (bookmark-bmenu-toggle-filenames t))))
> +    (when (and bookmark-alist bookmark-bmenu-toggle-filenames)
> +      (bookmark-bmenu-toggle-filenames t))))
>  
>  ;;;###autoload
>  (defalias 'list-bookmarks 'bookmark-bmenu-list)

And here final patch that delete also the first bookmark in list.
(When forward-line 1, the first bookmark is never deleted because search
start to next bookmark with new header stuff.)
Also the final hook will not save bookmark-alist if empty, I have
removed the check of bookmark-alist.

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 47e1379..c1d8a4a 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1582,8 +1582,8 @@ deletion, or > if it is flagged for displaying."
     (if bookmark-bmenu-use-header-line
 	(bookmark-bmenu-set-header)
       (forward-line bookmark-bmenu-inline-header-height))
-    (if bookmark-bmenu-toggle-filenames
-        (bookmark-bmenu-toggle-filenames t))))
+    (when (and bookmark-alist bookmark-bmenu-toggle-filenames)
+      (bookmark-bmenu-toggle-filenames t))))
 
 ;;;###autoload
 (defalias 'list-bookmarks 'bookmark-bmenu-list)
@@ -1998,7 +1998,8 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
                        (progn (end-of-line) (point))))))
         (o-col     (current-column)))
     (goto-char (point-min))
-    (forward-line 1)
+    (unless bookmark-bmenu-use-header-line
+      (forward-line 1))
     (while (re-search-forward "^D" (point-max) t)
       (bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg
     (bookmark-bmenu-list)
@@ -2186,8 +2187,7 @@ strings returned are not."
   "Save bookmark state, if necessary, at Emacs exit time.
 This also runs `bookmark-exit-hook'."
   (run-hooks 'bookmark-exit-hook)
-  (and bookmark-alist
-       (bookmark-time-to-save-p t)
+  (and (bookmark-time-to-save-p t)
        (bookmark-save)))
 
 (unless noninteractive

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-03-17  7:47   ` Thierry Volpiatto
@ 2013-03-18 11:20     ` Thierry Volpiatto
  2013-04-01 15:55       ` Thierry Volpiatto
  2013-04-04  1:59     ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2013-03-18 11:20 UTC (permalink / raw)
  To: 13972

Note: I think this bug affect also partially Emacs-24.3.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-03-18 11:20     ` Thierry Volpiatto
@ 2013-04-01 15:55       ` Thierry Volpiatto
  0 siblings, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2013-04-01 15:55 UTC (permalink / raw)
  To: 13972

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Note: I think this bug affect also partially Emacs-24.3.
More exactly:
On 24.3 when one delete all remaining bookmarks, always one bookmark,
the last will not be deleted and impossible to delete without editing
bookmark file.

On 24.3.50 same problem + the problem related to
`bookmark-bmenu-use-header-line'.

The patch I sent is for Emacs-24.3.50 and btw fix both problems.
 
-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-03-17  7:47   ` Thierry Volpiatto
  2013-03-18 11:20     ` Thierry Volpiatto
@ 2013-04-04  1:59     ` Stefan Monnier
  2013-04-04  5:20       ` Thierry Volpiatto
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-04-04  1:59 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 13972-done

Installed, thanks,


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#13972: 24.3.50; Cannot delete bookmark
  2013-04-04  1:59     ` Stefan Monnier
@ 2013-04-04  5:20       ` Thierry Volpiatto
  0 siblings, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2013-04-04  5:20 UTC (permalink / raw)
  To: 13972

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Installed, thanks,

Thanks, probably you should also merge this in 24.3 without the new
header related fix.
Or do we need to open a new bug for this (only 24.3) ?
I can do this if you want with an attached patch to the bug.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-04  5:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16  1:53 bug#13972: 24.3.50; Cannot delete bookmark Xue Fuqiao
2013-03-17  6:38 ` Thierry Volpiatto
2013-03-17  7:47   ` Thierry Volpiatto
2013-03-18 11:20     ` Thierry Volpiatto
2013-04-01 15:55       ` Thierry Volpiatto
2013-04-04  1:59     ` Stefan Monnier
2013-04-04  5:20       ` 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).