GNU bug report logs - #7229
23.1; ido guess and ffap bug

Previous Next

Package: emacs;

Reported by: "Thibault Kruse" <thibault.kruse <at> gmx.de>

Date: Sat, 16 Oct 2010 20:52:02 UTC

Severity: minor

Tags: fixed, patch

Merged with 8990, 24057

Found in versions 23.1, 23.3, 25.1.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Thibault Kruse" <thibault.kruse <at> gmx.de>
To: 7229 <at> debbugs.gnu.org
Subject: bug#7229: patch
Date: Sun, 24 Oct 2010 21:06:50 +0200
HI,

i dont know where the ffap sources are in emacs 23.1, therefore I could not write a patch myself, but as a workaround, I created this advice. Maybe it can help.

(require 'advice)
(defadvice ffap-file-at-point (around bugfix-ffap  activate)
  "returns nil when point is somewhere we do not want to guess filenames"
  (require 'thingatpt)
;;; prevent in javadoc style comments
  (narrow-to-region (line-beginning-position) (line-end-position))
  (unless (or
           (thing-at-point-looking-at "[\\*]+")
           ;; for xml modes, not sure about other modes
           (and (member major-mode '(sgml-mode nxml-mode))
                ;; ignore about <somenode/> and </somenode>
                (or (thing-at-point-looking-at "</?[a-zA-Z_][a-zA-Z0-9:_.-]+")
                    (thing-at-point-looking-at "/>"))))
    ad-do-it))

-- 
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl




This bug report was last modified 8 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.