GNU bug report logs -
#6825
what-page line count
Previous Next
Reported by: Markus Falb <markus.falb <at> fasel.at>
Date: Sun, 8 Aug 2010 17:27:02 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Thu, 19 Aug 2010 20:53:42 -0600 Christoph <cschol2112 <at> googlemail.com> wrote:
> emacs -Q
> in *scratch* buffer type something
> C-a
> M-x what-page
> Output in minibuffer: Page 1, line 5
> C-f
> M-x what-page
> Output in minibuffer: Page 1, line 6
AFAICT using line-number-at-pos instead of count-lines DTRT, see patch
below.
Steve Berman
2010-08-21 Stephen Berman <stephen.berman <at> gmx.net>
* page.el (what-page): Use line-number-at-pos instead of
count-lines to calculate line number.
[Message part 2 (text/plain, inline)]
*** /data/steve/bzr/emacs/trunk/lisp/textmodes/page.el 2010-01-13 10:56:56.000000000 +0100
--- /data/steve/bzr/emacs/quickfixes/lisp/textmodes/page.el 2010-08-24 23:30:11.000000000 +0200
***************
*** 156,164 ****
(if (= (match-beginning 0) (match-end 0))
(forward-char 1))
(setq count (1+ count)))
! (message "Page %d, line %d"
! count
! (1+ (count-lines (point) opoint)))))))
;;; Place `provide' at end of file.
(provide 'page)
--- 156,162 ----
(if (= (match-beginning 0) (match-end 0))
(forward-char 1))
(setq count (1+ count)))
! (message "Page %d, line %d" count (line-number-at-pos opoint))))))
;;; Place `provide' at end of file.
(provide 'page)
This bug report was last modified 14 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.