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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6825 in the body.
You can then email your comments to 6825 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6825
; Package
emacs
.
(Sun, 08 Aug 2010 17:27:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Markus Falb <markus.falb <at> fasel.at>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 08 Aug 2010 17:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Visit a new file and type some arbitrary text and move point to begin
of line.
C-x C-f newfile RET bla C-a
If point is at line 1 column 0 what-page says (expected):
Page 1, line 1
but when at column > 0 (moved point with C-f) what-page says:
Page 1, line 2
I get this behavior with 23.2.1 on os-x (macports) both with gui or
not, e.g.
GNU Emacs 23.2.1 (powerpc-apple-darwin9.8.0, NS apple-appkit-949.54)
of 2010-05-11 on mac.fasel.at
I may provide more Information if needed, of course.
--
Markus
[PGP.sig (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6825
; Package
emacs
.
(Fri, 20 Aug 2010 02:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6825 <at> debbugs.gnu.org (full text, mbox):
I can reproduce this with 24.0.50 (r101141) on Windows 7.
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
In GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7600)
of 2010-08-19 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (4.4) --cflags
-IC:Progra~2GnuWin32include -ID:develmacslibXpm-3.5.8include
-ID:develmacslibXpm-3.5.8src'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-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
line-number-mode: t
transient-mark-mode: t
Recent input:
t e s t C-a M-x w h a t - o <backspace> p a g e <tab>
<return> C-f M-x <up> <return> M-x r e p o r t <tab>
<return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Page 1, line 5
Page 1, line 6
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr message rfc822 mml easymenu mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32
disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag 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 button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6825
; Package
emacs
.
(Tue, 24 Aug 2010 22:16:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6825 <at> debbugs.gnu.org (full text, mbox):
[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)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6825
; Package
emacs
.
(Sun, 10 Apr 2011 20:53:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 6825 <at> debbugs.gnu.org (full text, mbox):
> AFAICT using line-number-at-pos instead of count-lines DTRT, see patch
> below.
Thanks, applied.
bug closed, send any further explanations to
6825 <at> debbugs.gnu.org and Markus Falb <markus.falb <at> fasel.at>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Sun, 10 Apr 2011 20:53:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 09 May 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.