GNU bug report logs -
#25243
26.0.50; ffap-guesser very slow w/ region active in large diff files
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Wed, 21 Dec 2016 15:37:02 UTC
Severity: minor
Tags: patch
Found in version 26.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Thanks for working on this, Tino. Some minor comments below.
> +(defvar ffap-max-region-length 1024
> + "Maximum allowed region length in `ffap-string-at-point'.")
1. I think it should say "active region".
Very minor (can be ignored): If we say something is not allowed it is
unclear what happens. In particular, it can suggest that we raise an
error. You might want to say here that if the active region is larger
... it is considered empty. (Or just refer to `ffap-string-at-point',
which you do already.)
> + (region-len (- (max beg end) (min beg end))))
> + (if (or (null ffap-max-region-length)
> + (< region-len ffap-max-region-length)) ; Bug#25243.
> + (setf ffap-string-at-point-region (list beg end)
> + ffap-string-at-point
> + (buffer-substring-no-properties beg end))
> + (setf ffap-string-at-point-region (list 1 1)
> + ffap-string-at-point ""))))
1. The doc string should say that if the active region is
larger than `ffap-max-region-length' then those two vars
are set to ... and ....
2. Instead of testing whether the max-length var is nil, I'd suggest
testing it with `natnump', to take care of the unexpected case where
it might get assigned a non-number.
This bug report was last modified 8 years and 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.