Package: edb Version: 1.31-2 Severity: normal File: /etc/emacs/site-start.d/50edb.el
There seems to be a couple of doubtful bits in edb-debian-after-find-file setup by 50edb.el. I think the delq works by side-effect so the let-binding of find-file-hook won't preserve the value, and I think point might not always be at the start of the buffer if bookmarking packages have restored a previous position. I get some joy from the following, leaving the hook in permanently and binding the inhibit variable. Was that the intention anyway? I suppose it'd be even better if there was a db-mode which could act on an already-read buffer, instead of re-running the find-file. But perhaps that's difficult. (defun edb-debian-after-find-file () "Turn on EDB if first like is ';; Database file written by EDB'. This function is normally placed in `find-file-hooks'." (when (and (not edb-debian-inhibit-edb) ;; bookmarking etc might have moved point from start of buffer (save-excursion (goto-char (point-min)) (looking-at ";; Database file written by EDB"))) (let ((file (buffer-file-name))) ;; - We're already in the FILE, so kill buffer ;; and let db-* functions to load the file again ;; - BUT disable ourselves while db-* runs (kill-buffer (current-buffer)) (let ((edb-debian-inhibit-edb t)) (db-find-file file))))) -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages edb depends on: ii dpkg 1.15.8.8 ii emacs22-gtk [emacs22] 22.3+1-1.2 ii emacs23 23.4+1-3 ii install-info 4.13a.dfsg.1-8 ii make 3.81-8.1 edb recommends no packages. edb suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org