From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sian Mountbatten Newsgroups: gmane.emacs.bugs Subject: bug#15069: Introduction to Elisp 14.3: Function 'count-words-defun' does not work as described. Date: Sun, 11 Aug 2013 12:32:34 +0100 Message-ID: <52077652.1050901@fastmail.co.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070503040903010608050909" X-Trace: ger.gmane.org 1376220855 16091 80.91.229.3 (11 Aug 2013 11:34:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Aug 2013 11:34:15 +0000 (UTC) To: 15069@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 11 13:34:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V8TuZ-0007b8-FW for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2013 13:34:15 +0200 Original-Received: from localhost ([::1]:36258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TuZ-0000dp-4O for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2013 07:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TuS-0000dd-1I for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:34:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8TuM-0000cW-MI for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:34:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TuM-0000c5-JE for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V8TuM-0002gg-5m for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sian Mountbatten Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Aug 2013 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137622079710256 (code B ref -1); Sun, 11 Aug 2013 11:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2013 11:33:17 +0000 Original-Received: from localhost ([127.0.0.1]:52814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V8Ttb-0002fK-Iy for submit@debbugs.gnu.org; Sun, 11 Aug 2013 07:33:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45211) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V8TtY-0002f7-OD for submit@debbugs.gnu.org; Sun, 11 Aug 2013 07:33:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8TtO-0000EO-O3 for submit@debbugs.gnu.org; Sun, 11 Aug 2013 07:33:07 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TtO-0000EE-Lc for submit@debbugs.gnu.org; Sun, 11 Aug 2013 07:33:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TtK-0000Zo-0p for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:33:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8TtE-0008VV-3D for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:32:57 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8TtD-0008Qt-Qn for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2013 07:32:52 -0400 Original-Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id AD82A20977 for ; Sun, 11 Aug 2013 07:32:49 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sun, 11 Aug 2013 07:32:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.co.uk; h= message-id:date:from:mime-version:to:subject:content-type; s= mesmtp; bh=QVgAM2dUTRuyPFnuXvz+cF32fP8=; b=SCrx3HLspsSFjnYqrcoCn wzifTPSzMcJ8wO8B5E7xSpH9u25SPYQAyoGXxP3frosQFUyo/ADIvKuoroBDJlTV Zhk+vF5GB24zWZfyEcCfh4kfup3RlcsyNrOvPWqh1SjQVg3aqXd+1DiSZH66Lm3l Cu0aXqy1kJEAgfU9e40LXs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:content-type; s=smtpout; bh=QVgAM2dUTRuyPFnuXvz+cF32fP8 =; b=j7bp8BcX5VMZC5oabqr69cBszmkb+xEVazR0bod/P2QaprnPd+ojky7Bd14 ezXI1aEQfT64BxJ40Nj0aRXlZevpq5bXWy3Gk+vrIyKXdX2/GSUCoJ19t2YvX26Q 9eZNUZSnWErk9tEhT1BpluQAE8WjRb/VmzWV6G094G6l3y9w= X-Sasl-enc: TtujB3g6WFFo4MVcpdvf/7t33kMubtUvkbYaoGI2qt6P 1376220767 Original-Received: from [192.168.11.10] (unknown [92.29.166.200]) by mail.messagingengine.com (Postfix) with ESMTPA id B7D96C00E81 for ; Sun, 11 Aug 2013 07:32:45 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Thunderbird/23.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77246 Archived-At: This is a multi-part message in MIME format. --------------070503040903010608050909 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: Sian Mountbatten To: bug-gnu-emacs@gnu.org Subject: 24.3; Introduction to Elisp 14.3: count-words-defun misbehaves --text follows this line-- This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgment at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': I used C-xC-e to evaluate the functions count-words-in-defun and count-words-defun as displayed in the Info section 14.3 of the Introduction. I then used C-xC-e to set the key sequence C-c= to invoke the latter function. I then positioned point in the sample function provided to see whether the two count-words functions were correct. Instead of reporting that there were 10 words or symbols in the function, Emacs reported that there were 1 word or symbol and point was moved to the beginning of section 14.3. Point should not have been moved in that fashion, according to the Introduction. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.3/etc/DEBUG. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2) of 2013-06-25 on sochi, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11204000 System Description: Debian GNU/Linux unstable (sid) Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: eo.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental 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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: SPC e m SPC SPC 1 I n t o r o d u c t i o n SPC t o SPC E l i s p SPC 1 4 . 3 : SPC c o u n t - w o r d s - d e f u n SPC d n o t SPC w o r k i n g SPC a s SPC d e s c r i b e d C-y C-x 2 C-x C-f * m e s C-SPC M-w C-x k C-y C-x 0 M-d M-d p o e n i k a t u @ f a s t m a i l . c o . u k C-c C-c y e s m a i l SPC c l i e n t C-x o C-a C-x k C-x 1 C-x C-f * m e s M-w C-x k SPC q M-x r e p o r t SPC e m SPC SPC Recent messages: Mark set [2 times] Auto-saving...done byte-code: Beginning of buffer [9 times] Mark set Saving file /home/sian/.emacs... Wrote /home/sian/.emacs [2 times] Sending... Mark set [2 times] Sending via mail... Sending...done Load-path shadows: /usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell Features: (jka-compr info mailalias mailclient browse-url cus-edit cus-start cus-load wid-edit help-mode shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils server saveplace time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar 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 minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- Sian Mountbatten (home web-site http://www.poenikatu.co.uk/>) Learning C++11 from the C++ Primer 5th edition. I'm an associate FSF member (no. 10888). Help us support software freedom! http://www.fsf.org/jf?referrer=10888 --------------070503040903010608050909 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Sian Mountbatten <poenikatu@fastmail.co.uk>
To: bug-gnu-emacs@gnu.org
Subject: 24.3; Introduction to Elisp 14.3: count-words-defun misbehaves
--text follows this line--
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.=C2=A0 Please check that=
the From: line contains a valid email address.=C2=A0 After a delay = of up
to one day, you should receive an acknowledgment at that address.
Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.=C2=A0 If you can, give a recipe starting from `emacs -Q':

I used C-xC-e to evaluate the functions count-words-in-defun and count-words-defun as displayed in the Info section 14.3 of the
Introduction. I then used C-xC-e to set the key sequence C-c=3D to invoke
the latter function. I then positioned point in the sample function
provided to see whether the two count-words functions were correct.
Instead of reporting that there were 10 words or symbols in the
function, Emacs reported that there were 1 word or symbol and point was
moved to the beginning of section 14.3. Point should not have been moved
in that fashion, according to the Introduction.


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
=C2=A0=C2=A0=C2=A0 `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
=C2=A0of 2013-06-25 on sochi, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:=C2=A0=C2=A0=C2=A0 Debian GNU/Linux unstable (si= d)

Configured using:
=C2=A0`configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
=C2=A0'--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib'
=C2=A0'--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info' =C2=A0'--mandir=3D/usr/share/man' '--with-pop=3Dyes'
=C2=A0'--enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/= emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24= .3/site-lisp:/usr/share/emacs/site-lisp'
=C2=A0'--with-crt-dir=3D/usr/lib/x86_64-linux-gnu' '--with-x=3Dyes'=
=C2=A0'--with-x-toolkit=3Dgtk3' '--with-toolkit-scroll-bars'
=C2=A0'build_alias=3Dx86_64-linux-gnu' 'CFLAGS=3D-g -O2 -fstack-pro= tector
=C2=A0--param=3Dssp-buffer-size=3D4 -Wformat -Werror=3Dformat-secur= ity -Wall'
=C2=A0'LDFLAGS=3D-Wl,-z,relro' 'CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2''<= br>
Important settings:
=C2=A0 value of $LANG: eo.UTF-8
=C2=A0 locale-coding-system: utf-8-unix
=C2=A0 default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 column-number-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Recent input:
SPC e m SPC SPC <return> 1 <backspace> I n t o <backspace>
r o d u c t i o n SPC t o SPC E l i s p SPC 1 4 . 3
: SPC c o u n t - w o r d s - d e f u n SPC d <backspace> n o t SPC w o r k i n g SPC a s SPC d e s c r i b e
d <return> C-y <up> <down> C-x 2 C-x C-f * m e s <tab>
<return> C-SPC <down> <down> <down> <down> <down> <down>
<down> <down> <down> M-w C-x k <return> C-y C-x 0 <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <backspace> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
M-d M-d p o e n i k a t u @ f a s t m a i l . c o .
u k <right> <right> C-c C-c y e s <return> m a i l
SPC c l i e n t <return> <help-echo> <down-mouse-1>
<mouse-1> C-x o <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <menu-bar> <buffer> C-a C-x
k <return> C-x 1 C-x C-f * m e s <tab> <return> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <S-down> <S-down>
<S-down> <S-down> <S-down> <S-down> <S-down> <S-down>
<S-down> M-w C-x k <return> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <emacs-manual-bug> <help-echo> <tab> <tab>
<tab> <return> SPC q M-x r e p o r t SPC e m SPC SPC <return>

Recent messages:
Mark set [2 times]
Auto-saving...done
byte-code: Beginning of buffer [9 times]
Mark set
Saving file /home/sian/.emacs...
Wrote /home/sian/.emacs [2 times]
Sending...
Mark set [2 times]
Sending via mail...
Sending...done

Load-path shadows:
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell

Features:
(jka-compr info mailalias mailclient browse-url cus-edit cus-start<= br> cus-load wid-edit help-mode shadow sort gnus-util mail-extr emacsbug
message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils server
saveplace time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao<= br> korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule<= br> custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

--
Sian Mountbatten (home web-site http://www.poenikatu.co.uk/>)=
Learning C++11 from the C++ Primer 5th edition.
I'm an associate FSF member (no. 10888).
Help us support software freedom! http://www.fsf.org/jf?referrer=3D10888

--------------070503040903010608050909--