From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Caleb Wakeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 01:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16190@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: caleb@compwizard.net Received: via spool by submit@debbugs.gnu.org id=B.138741797429570 (code B ref -1); Thu, 19 Dec 2013 01:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Dec 2013 01:52:54 +0000 Received: from localhost ([127.0.0.1]:57979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtSnF-0007gs-Cf for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:52:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtSkm-0007cS-T4 for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtSkg-0005q8-Mf for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: **** X-Spam-Status: No, score=4.2 required=5.0 tests=BAYES_50,DATE_IN_PAST_96_XX autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkg-0005q4-Ji for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkb-0006Cr-2v for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtSkU-0005bb-JT for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:09 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:44049 helo=cdptpa-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkU-0005ZM-Dv for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:02 -0500 Received: from [24.58.56.153] ([24.58.56.153:34910] helo=[192.168.168.44]) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 60/12-08900-9C052B25; Thu, 19 Dec 2013 01:50:01 +0000 Message-ID: <52AA8710.4030706@twcny.rr.com> Date: Thu, 12 Dec 2013 23:03:28 -0500 From: Caleb Wakeman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.0 (--) X-Mailman-Approved-At: Wed, 18 Dec 2013 20:52:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) With point in the middle of a word, I ran M-x capitalize-word. Rather than capitalize the first letter of the word, as I expected, it capitalized the character at point and moved point to the end of the word. (Specifically, rather than change `word' (wo-!-rd) to `Word', it changed it to `woRd'.) I checked this in the message edit buffer, and it seems pretty consistent to me. I was able to reproduce this with M-c as well as M-x capitalize-word (as well as ESC c and ESC x capitalize word on the Mac mentioned below). I was also able to reproduce this in (apparently vanilla?) GNU Emacs 22.1.1 under Mac OS X (tested in the scratch buffer). --!Autofilled content from M-x report-emacs-bug!-- This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. 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': 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/23.4/etc/DEBUG. In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-09-22 on allspice, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11303000 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/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--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 -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' 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: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: longlines-mode: t iswitchb-mode: t minibuffer-depth-indicate-mode: t icicle-mode: t server-mode: t global-whitespace-mode: t display-battery-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t line-number-mode: t transient-mark-mode: t Recent input: T M L , SPC o r SPC P D SPC o r SPC H T M L , SPC t h a n e n SPC a n y o n e SPC w o u l d SPC b e SPC a b l e SPC t o SPC r e a d SPC i t . ( e E v e n SPC p e o p l e SPC w i t h SPC i M i c r o s o f t SPC w o r d SPC m a y SPC n o t SPC b e SPC a b l e SPC t o SPC r e a d SPC i t , t h e SPC f i l e , SPC i f SPC i t SPC w a s SPC m a d e SPC w i t h SPC a SPC n e w e r SPC v e r s i o n SPC o f SPC w o r W r o o r d SPC t h a n SPC t h e y SPC h a v e . ) SPC SPC C-x C-f G o SPC C-_ M-v C-v C-v C-x C-f l i b C-x k C-x k c a p t i i t - w o C-_ M-c C-_ M-b M-c C-n C-n C-n C-n r e p o r t - e m Recent messages: Auto-saving...done Auto-saving...done Auto-saving...done Auto-saving...done Auto-saving...done Undo! call-interactively: Beginning of buffer call-interactively: End of buffer Auto-saving...done Undo! [2 times] Load-path shadows: ~/.emacslisp/icicles/lacarte hides ~/.emacslisp/lacarte /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/23.4/lisp/language/thai-word /usr/share/emacs23/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp /usr/share/emacs23/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold /usr/share/emacs23/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex /usr/share/emacs23/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview /usr/share/emacs23/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite /usr/share/emacs23/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik /usr/share/emacs23/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl /usr/share/emacs23/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt /usr/share/emacs23/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex /usr/share/emacs23/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex /usr/share/emacs23/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x /usr/share/emacs23/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font /usr/share/emacs23/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar /usr/share/emacs23/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs /usr/share/emacs23/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style /usr/share/emacs23/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context /usr/share/emacs23/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info /usr/share/emacs23/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp /usr/share/emacs23/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en /usr/share/emacs23/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex /usr/share/emacs23/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf Features: (shadow sort message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils emacsbug mail-extr ispell debug jka-compr multi-isearch vc-hg face-remap image-file org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb longlines iswitchb two-column mb-depth info bookmark pp icicles icicles-mode icicles-cmd2 icicles-cmd1 cus-edit icicles-mcmd help-mode view image-dired format-spec dired regexp-opt doremi ring+ ring icicles-fn icicles-var icicles-opt ffap wid-edit thingatpt icicles-face hexrgb remember org-remember org-datetree org byte-opt warnings bytecomp byte-compile org-footnote org-src org-list org-faces org-compat org-macs easymenu time-date noutline outline easy-mmode edmacro kmacro disp-table saveplace uniquify advice help-fns advice-preload server whitespace battery cus-start cus-load slime-autoloads magit-install bbdb-autoloads preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting 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 loaddefs 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 dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 04:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: caleb@compwizard.net Cc: 16190@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138742554110554 (code B ref 16190); Thu, 19 Dec 2013 04:00:03 +0000 Received: (at 16190) by debbugs.gnu.org; 19 Dec 2013 03:59:01 +0000 Received: from localhost ([127.0.0.1]:58054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtUlJ-0002k6-7W for submit@debbugs.gnu.org; Wed, 18 Dec 2013 22:59:01 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:46371) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtUlF-0002jt-Jy for 16190@debbugs.gnu.org; Wed, 18 Dec 2013 22:58:59 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MY100200B8MI400@a-mtaout23.012.net.il> for 16190@debbugs.gnu.org; Thu, 19 Dec 2013 05:50:45 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MY100276C0LGP50@a-mtaout23.012.net.il>; Thu, 19 Dec 2013 05:50:45 +0200 (IST) Date: Thu, 19 Dec 2013 05:51:02 +0200 From: Eli Zaretskii In-reply-to: <52AA8710.4030706@twcny.rr.com> X-012-Sender: halo1@inter.net.il Message-id: <83sitpbis9.fsf@gnu.org> References: <52AA8710.4030706@twcny.rr.com> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 12 Dec 2013 23:03:28 -0500 > From: Caleb Wakeman > > With point in the middle of a word, I ran M-x capitalize-word. Rather > than capitalize the first letter of the word, as I expected, it > capitalized the character at point and moved point to the end of the > word. (Specifically, rather than change `word' (wo-!-rd) to `Word', it > changed it to `woRd'.) That's how capitalize-word is supposed to work. It's not a bug, but intended behavior. From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 08:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Eli Zaretskii Cc: caleb@compwizard.net, 16190@debbugs.gnu.org Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138744223314721 (code B ref 16190); Thu, 19 Dec 2013 08:38:02 +0000 Received: (at 16190) by debbugs.gnu.org; 19 Dec 2013 08:37:13 +0000 Received: from localhost ([127.0.0.1]:58187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtZ6T-0003pH-18 for submit@debbugs.gnu.org; Thu, 19 Dec 2013 03:37:12 -0500 Received: from mout.gmx.net ([212.227.15.19]:61832) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtZ6N-0003ob-7T for 16190@debbugs.gnu.org; Thu, 19 Dec 2013 03:37:07 -0500 Received: from rosalinde.fritz.box ([89.245.118.127]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LqF9o-1VFoVL3uqm-00dlTy for <16190@debbugs.gnu.org>; Thu, 19 Dec 2013 09:36:56 +0100 From: Stephen Berman References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> Date: Thu, 19 Dec 2013 09:36:54 +0100 In-Reply-To: <83sitpbis9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Dec 2013 05:51:02 +0200") Message-ID: <87ppotuti1.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:62idEALEUG4c9lo2TwvsPM3uvbuYhIapJmbzT7Pp6z9V03qK/Tu I8/CkPLcoEen1AtyD+IFZ6kh2MpIM6nIHXYaVDNbpra4SzD96751fg7qBFbyO4cj73ajaH/ GqFNPgSJWPaeZHjFV2zgv4dpgw1/ZAhdYcDKA8T6enAxnVnOBGifITC+hZxevMR0XefUYxQ fM5M2674yst/uKYgZCBqQ== X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, 19 Dec 2013 05:51:02 +0200 Eli Zaretskii wrote: >> Date: Thu, 12 Dec 2013 23:03:28 -0500 >> From: Caleb Wakeman >> >> With point in the middle of a word, I ran M-x capitalize-word. Rather >> than capitalize the first letter of the word, as I expected, it >> capitalized the character at point and moved point to the end of the >> word. (Specifically, rather than change `word' (wo-!-rd) to `Word', it >> changed it to `woRd'.) > > That's how capitalize-word is supposed to work. It's not a bug, but > intended behavior. Then its doc string is incorrect: capitalize-word is an interactive built-in function in `C source code'. It is bound to M-c. (capitalize-word ARG) Capitalize the following word (or ARG words), moving over. This gives the word(s) a first character in upper case ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ and the rest lower case. ^^^^^^^^^^^^^^^^^^^^^^^^ With negative argument, capitalize previous words but do not move. Steve Berman From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Dec 2013 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Stephen Berman , Eli Zaretskii Cc: caleb@compwizard.net, 16190@debbugs.gnu.org Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138747052511091 (code B ref 16190); Thu, 19 Dec 2013 16:29:02 +0000 Received: (at 16190) by debbugs.gnu.org; 19 Dec 2013 16:28:45 +0000 Received: from localhost ([127.0.0.1]:58812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtgSq-0002sp-UA for submit@debbugs.gnu.org; Thu, 19 Dec 2013 11:28:45 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:17481) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtgSo-0002se-6q for 16190@debbugs.gnu.org; Thu, 19 Dec 2013 11:28:43 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBJGSSB3029497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Dec 2013 16:28:28 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBJGSL9O028719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Dec 2013 16:28:22 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBJGSKgO028697; Thu, 19 Dec 2013 16:28:21 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 19 Dec 2013 08:28:20 -0800 (PST) From: Drew Adams References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> In-Reply-To: <87ppotuti1.fsf@rosalinde.fritz.box> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > > That's how capitalize-word is supposed to work. It's not a bug, but > > intended behavior. >=20 > Then its doc string is incorrect: >=20 > capitalize-word is an interactive built-in function in `C source code'= . >=20 > It is bound to M-c. >=20 > (capitalize-word ARG) >=20 > Capitalize the following word (or ARG words), moving over. > This gives the word(s) a first character in upper case > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > and the rest lower case. > ^^^^^^^^^^^^^^^^^^^^^^^^ > With negative argument, capitalize previous words but do not move. The key here is the *word that starts at point*. With point after the `n' here: "another", the word that starts at point is "other". It could help for the doc to explicitly emphasize this, as an extra tip. That is, to point out that there is no scanning backward to find the maximal word, i.e., to find a non word-constituent character. But this should be treated as extra info, implied by a statement (missing, it seems) that the word starts at point. "The following word" is too loose a description to make this clear. From unknown Sun Sep 21 02:49:54 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: caleb@compwizard.net Subject: bug#16190: closed (Re: bug#16190: 23.4; M-x captialize-word works incorrectly) Message-ID: References: <83haa4bubq.fsf@gnu.org> <52AA8710.4030706@twcny.rr.com> X-Gnu-PR-Message: they-closed 16190 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 16190@debbugs.gnu.org Date: Thu, 19 Dec 2013 17:54:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1387475644-21508-1" This is a multi-part message in MIME format... ------------=_1387475644-21508-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16190: 23.4; M-x captialize-word works incorrectly which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 16190@debbugs.gnu.org. --=20 16190: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16190 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1387475644-21508-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16190-done) by debbugs.gnu.org; 19 Dec 2013 17:53:49 +0000 Received: from localhost ([127.0.0.1]:58880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VthnA-0005aR-AR for submit@debbugs.gnu.org; Thu, 19 Dec 2013 12:53:48 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:35581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vthn7-0005aA-4s for 16190-done@debbugs.gnu.org; Thu, 19 Dec 2013 12:53:46 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MY200500ETBAS00@a-mtaout22.012.net.il> for 16190-done@debbugs.gnu.org; Thu, 19 Dec 2013 19:53:43 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MY2004I6F1IKOL0@a-mtaout22.012.net.il>; Thu, 19 Dec 2013 19:53:43 +0200 (IST) Date: Thu, 19 Dec 2013 19:54:01 +0200 From: Eli Zaretskii Subject: Re: bug#16190: 23.4; M-x captialize-word works incorrectly In-reply-to: <87ppotuti1.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il To: Stephen Berman Message-id: <83haa4bubq.fsf@gnu.org> References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16190-done Cc: caleb@compwizard.net, 16190-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stephen Berman > Cc: caleb@compwizard.net, 16190@debbugs.gnu.org > Date: Thu, 19 Dec 2013 09:36:54 +0100 > > On Thu, 19 Dec 2013 05:51:02 +0200 Eli Zaretskii wrote: > > >> Date: Thu, 12 Dec 2013 23:03:28 -0500 > >> From: Caleb Wakeman > >> > >> With point in the middle of a word, I ran M-x capitalize-word. Rather > >> than capitalize the first letter of the word, as I expected, it > >> capitalized the character at point and moved point to the end of the > >> word. (Specifically, rather than change `word' (wo-!-rd) to `Word', it > >> changed it to `woRd'.) > > > > That's how capitalize-word is supposed to work. It's not a bug, but > > intended behavior. > > Then its doc string is incorrect: Fair enough, I fixed the doc string to be more explicit on this matter (in trunk revision 115612). ------------=_1387475644-21508-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Dec 2013 01:52:54 +0000 Received: from localhost ([127.0.0.1]:57979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtSnF-0007gs-Cf for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:52:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtSkm-0007cS-T4 for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtSkg-0005q8-Mf for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: **** X-Spam-Status: No, score=4.2 required=5.0 tests=BAYES_50,DATE_IN_PAST_96_XX autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkg-0005q4-Ji for submit@debbugs.gnu.org; Wed, 18 Dec 2013 20:50:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkb-0006Cr-2v for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtSkU-0005bb-JT for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:09 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:44049 helo=cdptpa-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtSkU-0005ZM-Dv for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2013 20:50:02 -0500 Received: from [24.58.56.153] ([24.58.56.153:34910] helo=[192.168.168.44]) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 60/12-08900-9C052B25; Thu, 19 Dec 2013 01:50:01 +0000 Message-ID: <52AA8710.4030706@twcny.rr.com> Date: Thu, 12 Dec 2013 23:03:28 -0500 From: Caleb Wakeman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 23.4; M-x captialize-word works incorrectly Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 18 Dec 2013 20:52:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: caleb@compwizard.net List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) With point in the middle of a word, I ran M-x capitalize-word. Rather than capitalize the first letter of the word, as I expected, it capitalized the character at point and moved point to the end of the word. (Specifically, rather than change `word' (wo-!-rd) to `Word', it changed it to `woRd'.) I checked this in the message edit buffer, and it seems pretty consistent to me. I was able to reproduce this with M-c as well as M-x capitalize-word (as well as ESC c and ESC x capitalize word on the Mac mentioned below). I was also able to reproduce this in (apparently vanilla?) GNU Emacs 22.1.1 under Mac OS X (tested in the scratch buffer). --!Autofilled content from M-x report-emacs-bug!-- This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. 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': 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/23.4/etc/DEBUG. In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-09-22 on allspice, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11303000 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/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--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 -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' 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: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: longlines-mode: t iswitchb-mode: t minibuffer-depth-indicate-mode: t icicle-mode: t server-mode: t global-whitespace-mode: t display-battery-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t line-number-mode: t transient-mark-mode: t Recent input: T M L , SPC o r SPC P D SPC o r SPC H T M L , SPC t h a n e n SPC a n y o n e SPC w o u l d SPC b e SPC a b l e SPC t o SPC r e a d SPC i t . ( e E v e n SPC p e o p l e SPC w i t h SPC i M i c r o s o f t SPC w o r d SPC m a y SPC n o t SPC b e SPC a b l e SPC t o SPC r e a d SPC i t , t h e SPC f i l e , SPC i f SPC i t SPC w a s SPC m a d e SPC w i t h SPC a SPC n e w e r SPC v e r s i o n SPC o f SPC w o r W r o o r d SPC t h a n SPC t h e y SPC h a v e . ) SPC SPC C-x C-f G o SPC C-_ M-v C-v C-v C-x C-f l i b C-x k C-x k c a p t i i t - w o C-_ M-c C-_ M-b M-c C-n C-n C-n C-n r e p o r t - e m Recent messages: Auto-saving...done Auto-saving...done Auto-saving...done Auto-saving...done Auto-saving...done Undo! call-interactively: Beginning of buffer call-interactively: End of buffer Auto-saving...done Undo! [2 times] Load-path shadows: ~/.emacslisp/icicles/lacarte hides ~/.emacslisp/lacarte /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/23.4/lisp/language/thai-word /usr/share/emacs23/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp /usr/share/emacs23/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold /usr/share/emacs23/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex /usr/share/emacs23/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview /usr/share/emacs23/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite /usr/share/emacs23/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik /usr/share/emacs23/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl /usr/share/emacs23/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt /usr/share/emacs23/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex /usr/share/emacs23/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex /usr/share/emacs23/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x /usr/share/emacs23/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font /usr/share/emacs23/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar /usr/share/emacs23/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs /usr/share/emacs23/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style /usr/share/emacs23/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context /usr/share/emacs23/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info /usr/share/emacs23/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp /usr/share/emacs23/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en /usr/share/emacs23/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex /usr/share/emacs23/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf Features: (shadow sort message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils emacsbug mail-extr ispell debug jka-compr multi-isearch vc-hg face-remap image-file org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb longlines iswitchb two-column mb-depth info bookmark pp icicles icicles-mode icicles-cmd2 icicles-cmd1 cus-edit icicles-mcmd help-mode view image-dired format-spec dired regexp-opt doremi ring+ ring icicles-fn icicles-var icicles-opt ffap wid-edit thingatpt icicles-face hexrgb remember org-remember org-datetree org byte-opt warnings bytecomp byte-compile org-footnote org-src org-list org-faces org-compat org-macs easymenu time-date noutline outline easy-mmode edmacro kmacro disp-table saveplace uniquify advice help-fns advice-preload server whitespace battery cus-start cus-load slime-autoloads magit-install bbdb-autoloads preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting 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 loaddefs 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 dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) ------------=_1387475644-21508-1-- From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Caleb Wakeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2013 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 16190@debbugs.gnu.org Cc: Eli Zaretskii Reply-To: caleb@compwizard.net Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138777477427674 (code B ref 16190); Mon, 23 Dec 2013 05:00:02 +0000 Received: (at 16190) by debbugs.gnu.org; 23 Dec 2013 04:59:34 +0000 Received: from localhost ([127.0.0.1]:35187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vuxc5-0007CH-I6 for submit@debbugs.gnu.org; Sun, 22 Dec 2013 23:59:34 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.225]:36612 helo=cdptpa-oedge-vip.email.rr.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vuxc1-0007C4-Ny for 16190@debbugs.gnu.org; Sun, 22 Dec 2013 23:59:30 -0500 Received: from [24.58.56.153] ([24.58.56.153:54772] helo=[192.168.168.44]) by cdptpa-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id B9/B1-15079-033C7B25; Mon, 23 Dec 2013 04:59:29 +0000 Message-ID: <52B7BA11.10004@twcny.rr.com> Date: Sun, 22 Dec 2013 23:20:33 -0500 From: Caleb Wakeman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> In-Reply-To: <83haa4bubq.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) (paraphrased quotes) >>> That's the intended behavior >> Then its docstring is incorrect > Fair enough, fixed Erm, well... I've had several days to think it over, and I don't agree [that it's fixed]. Yes, the docstring is (was) incorrect; and if it hadn't been incorrect, I wouldn't have reported it as a bug. However, the function would still be doing 'The Wrong Thing' (for me, I can imagine that cases exist where this isn't), and if I ever used it again, it would only be because I forgot that it didn't do what I expected. I think this is also the point where if I want something more done, I really should do it myself. I'd take it on for sure if it were in elisp. I dunno if I could do it in C. This seems reasonable as a 'workaround' fix, though. [I'd agree that "Severity: minor" is correct.] (I can re-create my mental state leading up to actually sending the bug report, or share my mental image of what the function does, if either of those would be helpful.) From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Caleb Wakeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2013 13:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 16190@debbugs.gnu.org Cc: Eli Zaretskii Reply-To: caleb@compwizard.net Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.13878070151361 (code B ref 16190); Mon, 23 Dec 2013 13:57:02 +0000 Received: (at 16190) by debbugs.gnu.org; 23 Dec 2013 13:56:55 +0000 Received: from localhost ([127.0.0.1]:35498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv606-0000Ls-8G for submit@debbugs.gnu.org; Mon, 23 Dec 2013 08:56:54 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.225]:25128 helo=cdptpa-oedge-vip.email.rr.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv5zx-0000LV-Ga for 16190@debbugs.gnu.org; Mon, 23 Dec 2013 08:56:46 -0500 Received: from [24.58.56.153] ([24.58.56.153:39920] helo=[192.168.168.44]) by cdptpa-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id CB/0D-15079-C1148B25; Mon, 23 Dec 2013 13:56:44 +0000 Message-ID: <52B7CBAD.8080605@twcny.rr.com> Date: Mon, 23 Dec 2013 00:35:41 -0500 From: Caleb Wakeman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> In-Reply-To: <52B7BA11.10004@twcny.rr.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 X-Spam-Score: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) It occurred to me that there may be two separate "bugs", and me conflating them. First is "M-x capitalize-word has an incorrect docstring". That's been fixed (or I should say, I take your word for it). Second is "M-x capitalize-word does the wrong thing". Whether that's a bug may be open to debate (I think it is a bug, or at least a problem, obviously), but that hasn't changed. On 12/22/2013 11:20 PM, Caleb Wakeman wrote: > (paraphrased quotes) > >>> That's the intended behavior > >> Then its docstring is incorrect > > Fair enough, fixed > > Erm, well... > > I've had several days to think it over, and I don't agree [that it's > fixed]. Yes, the docstring is (was) incorrect; and if it hadn't been > incorrect, I wouldn't have reported it as a bug. > > However, the function would still be doing 'The Wrong Thing' (for me, I > can imagine that cases exist where this isn't), and if I ever used it > again, it would only be because I forgot that it didn't do what I expected. > > I think this is also the point where if I want something more done, I > really should do it myself. I'd take it on for sure if it were in > elisp. I dunno if I could do it in C. > > This seems reasonable as a 'workaround' fix, though. > > [I'd agree that "Severity: minor" is correct.] > > (I can re-create my mental state leading up to actually sending the bug > report, or share my mental image of what the function does, if either of > those would be helpful.) From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2013 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: caleb@compwizard.net Cc: 16190@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138781520318650 (code B ref 16190); Mon, 23 Dec 2013 16:14:01 +0000 Received: (at 16190) by debbugs.gnu.org; 23 Dec 2013 16:13:23 +0000 Received: from localhost ([127.0.0.1]:36092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv88A-0004qk-Ne for submit@debbugs.gnu.org; Mon, 23 Dec 2013 11:13:23 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:48827) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vv888-0004qY-8y for 16190@debbugs.gnu.org; Mon, 23 Dec 2013 11:13:21 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MY900C00P148U00@a-mtaout20.012.net.il> for 16190@debbugs.gnu.org; Mon, 23 Dec 2013 18:12:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MY900C7IP1H2R40@a-mtaout20.012.net.il>; Mon, 23 Dec 2013 18:12:53 +0200 (IST) Date: Mon, 23 Dec 2013 18:12:46 +0200 From: Eli Zaretskii In-reply-to: <52B7BA11.10004@twcny.rr.com> X-012-Sender: halo1@inter.net.il Message-id: <8361qf8s1t.fsf@gnu.org> References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 22 Dec 2013 23:20:33 -0500 > From: Caleb Wakeman > CC: Eli Zaretskii > > (paraphrased quotes) > >>> That's the intended behavior > >> Then its docstring is incorrect > > Fair enough, fixed > > Erm, well... > > I've had several days to think it over, and I don't agree [that it's > fixed]. Yes, the docstring is (was) incorrect; and if it hadn't been > incorrect, I wouldn't have reported it as a bug. > > However, the function would still be doing 'The Wrong Thing' (for me, I > can imagine that cases exist where this isn't), and if I ever used it > again, it would only be because I forgot that it didn't do what I expected. The 3 functions that change letter-case in words, capitalize-word, upcase-word, and downcase-word work in the same way when moving forward: they start with the current buffer position. If you want a function that capitalizes the word at point after looking back for its beginning, you need to code that using thing-at-point or some such. From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Josh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Dec 2013 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Eli Zaretskii Cc: caleb@compwizard.net, 16190@debbugs.gnu.org Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.13878252347028 (code B ref 16190); Mon, 23 Dec 2013 19:01:01 +0000 Received: (at 16190) by debbugs.gnu.org; 23 Dec 2013 19:00:34 +0000 Received: from localhost ([127.0.0.1]:36381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvAjw-0001pH-T2 for submit@debbugs.gnu.org; Mon, 23 Dec 2013 14:00:33 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:40427) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvAju-0001p6-Jx for 16190@debbugs.gnu.org; Mon, 23 Dec 2013 14:00:31 -0500 Received: by mail-wi0-f172.google.com with SMTP id en1so11255592wid.17 for <16190@debbugs.gnu.org>; Mon, 23 Dec 2013 11:00:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=e3voeUqWKR2M89ml6oETinoZmcUnUEsqFT38YoQ0wgo=; b=fAfoGmtyt4s6fWZosspBJhQUBvojErvEm/cBo1HXX9NB7gXJ5V/Z+UmWX+kcoXWVid UCphAsxeEz1wmOnxbTWmYawsfUOEKx7f4RvL/xh6W5F4cV73uOW9y5qhd26Fq5rQrKLV IKsXw5O9pYZHbMC0slEsJO+qMMVmbRHqbz1wHyBwiVzSBujFNMIcNPZ6Nd6gjUO8qsc7 L99s3AcTHbja9tCpphJ1YLon3iPd5FirgIp5eKLuSZtmNsmuAAfQvRF44Z1J+eh1jbhs 0IOQJX1tgXJctdf5VbVViAGKATGOxnnmUHWBftCy6wISutl7uQvmJkGydx+hjnf5/Zj6 MG4Q== X-Gm-Message-State: ALoCoQld9w7PWA3ewiuztpI+GRqyvTHyiUehtDil7/4IIv3jizA9sWSBE+nUjHhSr+bji5W7cpx5 X-Received: by 10.194.77.106 with SMTP id r10mr814918wjw.91.1387825229593; Mon, 23 Dec 2013 11:00:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.24.7 with HTTP; Mon, 23 Dec 2013 10:59:59 -0800 (PST) In-Reply-To: <8361qf8s1t.fsf@gnu.org> References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> <8361qf8s1t.fsf@gnu.org> From: Josh Date: Mon, 23 Dec 2013 10:59:59 -0800 X-Google-Sender-Auth: FvjPpIG_Xxai9cvYmz2sjgfN7eo Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Dec 23, 2013 at 8:12 AM, Eli Zaretskii wrote: > If you want a function that capitalizes the word at point after > looking back for its beginning, you need to code that using > thing-at-point or some such. When point is not already at the start of the word, `capitalize-word' can already do this pretty easily via `M-- M-c'. From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Kevin Rodgers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Dec 2013 03:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 16190@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138811507517721 (code B ref -1); Fri, 27 Dec 2013 03:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Dec 2013 03:31:15 +0000 Received: from localhost ([127.0.0.1]:45054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VwO8o-0004bi-Sa for submit@debbugs.gnu.org; Thu, 26 Dec 2013 22:31:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53489) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VwO8m-0004ba-Aa for submit@debbugs.gnu.org; Thu, 26 Dec 2013 22:31:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwO8f-0001zF-Ds for submit@debbugs.gnu.org; Thu, 26 Dec 2013 22:31:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwO8f-0001zB-BB for submit@debbugs.gnu.org; Thu, 26 Dec 2013 22:31:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwO8Z-0006dt-8p for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2013 22:31:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwO8T-0001y0-ER for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2013 22:30:59 -0500 Received: from plane.gmane.org ([80.91.229.3]:41794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwO8T-0001xk-7V for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2013 22:30:53 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VwO8Q-00085V-6E for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2013 04:30:50 +0100 Received: from 70-59-41-30.hlrn.qwest.net ([70.59.41.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Dec 2013 04:30:50 +0100 Received: from kevin.d.rodgers by 70-59-41-30.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Dec 2013 04:30:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Kevin Rodgers Date: Thu, 26 Dec 2013 20:30:34 -0700 Lines: 21 Message-ID: References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> <8361qf8s1t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 70-59-41-30.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) On 12/23/13 11:59 AM, Josh wrote: > On Mon, Dec 23, 2013 at 8:12 AM, Eli Zaretskii wrote: >> If you want a function that capitalizes the word at point after >> looking back for its beginning, you need to code that using >> thing-at-point or some such. > > When point is not already at the start of the word, `capitalize-word' > can already do this pretty easily via `M-- M-c'. So for the OP: (defun capitalize-word-at-point () "Capitalize the word at point (i.e. around point), without moving point." (interactive) (capitalize-word -1)) (global-set-key "\M-c" 'capitalize-word-at-point) ; was capitalize-word -- Kevin Rodgers Denver, Colorado, USA From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Josh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Dec 2013 05:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Kevin Rodgers Cc: 16190@debbugs.gnu.org Received: via spool by 16190-submit@debbugs.gnu.org id=B16190.138820872013478 (code B ref 16190); Sat, 28 Dec 2013 05:32:02 +0000 Received: (at 16190) by debbugs.gnu.org; 28 Dec 2013 05:32:00 +0000 Received: from localhost ([127.0.0.1]:47614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VwmVD-0003VJ-Uv for submit@debbugs.gnu.org; Sat, 28 Dec 2013 00:32:00 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:56753) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VwmVB-0003VA-BT for 16190@debbugs.gnu.org; Sat, 28 Dec 2013 00:31:57 -0500 Received: by mail-wi0-f172.google.com with SMTP id en1so14874670wid.11 for <16190@debbugs.gnu.org>; Fri, 27 Dec 2013 21:31:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=APfcrde1x22xoLm9tX3tggk717sdAJuN8oCHtJWmSXE=; b=LrxyfcI39royroIhs28NhZJMkiZQityCBt4m2safaztI5mckTAPSxhixGmTxqTiifg m1OqXOL2XKReuQcomMbTIT7rxNFsEEhNtKjwMA/5g/5DhZTxW+JQ4TArih4vCkwtae7I KJhiW4fz/mwIEqc080clt0sMZV2/tck8pPJ3PbFPPTbootziBJIZd3yI3cEKdqmD6jrM ehooFXsCMMTOg6kfN2E6mOXVp4owdplDilTxIIY+ZPVnCCyNM7yzvs/XFHJaWPO0zCEq YU7CaXW8VBN1Jr9EBS0A+jKVSDNTTM6Edz0kez9c7j3N/jI0M6HT2az9JLPeN5FuQDQo WIeg== X-Gm-Message-State: ALoCoQka+/JtA72oUsLLJ+tZWQH9OGatNtPDnNA3hjVggsSgmeKgkGhKOWj85UJqVGDZG24Ike0C X-Received: by 10.181.12.20 with SMTP id em20mr36559672wid.0.1388208716398; Fri, 27 Dec 2013 21:31:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.24.7 with HTTP; Fri, 27 Dec 2013 21:31:25 -0800 (PST) In-Reply-To: References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> <8361qf8s1t.fsf@gnu.org> From: Josh Date: Fri, 27 Dec 2013 21:31:25 -0800 X-Google-Sender-Auth: hCDq3cl7j9oI2FWg1ExBGjZTVPY Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Dec 26, 2013 at 7:30 PM, Kevin Rodgers wrote: > On 12/23/13 11:59 AM, Josh wrote: >> >> On Mon, Dec 23, 2013 at 8:12 AM, Eli Zaretskii wrote: >>> >>> If you want a function that capitalizes the word at point after >>> looking back for its beginning, you need to code that using >>> thing-at-point or some such. >> >> >> When point is not already at the start of the word, `capitalize-word' >> can already do this pretty easily via `M-- M-c'. > > (defun capitalize-word-at-point () > "Capitalize the word at point (i.e. around point), without moving point." > (interactive) > (capitalize-word -1)) Unfortunately it's not quite that simple, because calling that function when point is before the first character of a word will capitalize the preceding word instead of the word following point. Something like (defun capitalize-word-at-point () "Capitalize the word at point." (interactive) (save-excursion (forward-word) (backward-word) (capitalize-word 1))) should suffice, though there are probably more elegant approaches. From unknown Sun Sep 21 02:49:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16190: 23.4; M-x captialize-word works incorrectly Resent-From: Kevin Rodgers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Dec 2013 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: 16190@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13882591114158 (code B ref -1); Sat, 28 Dec 2013 19:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Dec 2013 19:31:51 +0000 Received: from localhost ([127.0.0.1]:48974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vwzby-00014z-0A for submit@debbugs.gnu.org; Sat, 28 Dec 2013 14:31:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52976) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vwzbt-00014m-Vy for submit@debbugs.gnu.org; Sat, 28 Dec 2013 14:31:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vwzbn-0006NE-4q for submit@debbugs.gnu.org; Sat, 28 Dec 2013 14:31:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vwzbn-0006NA-2A for submit@debbugs.gnu.org; Sat, 28 Dec 2013 14:31:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vwzbh-0004LG-4e for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2013 14:31:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vwzbb-0006Lu-AP for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2013 14:31:33 -0500 Received: from plane.gmane.org ([80.91.229.3]:57706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vwzbb-0006Ln-2o for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2013 14:31:27 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VwzbY-0003Zm-NP for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2013 20:31:24 +0100 Received: from 70-59-41-30.hlrn.qwest.net ([70.59.41.30]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Dec 2013 20:31:24 +0100 Received: from kevin.d.rodgers by 70-59-41-30.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Dec 2013 20:31:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ From: Kevin Rodgers Date: Sat, 28 Dec 2013 12:31:16 -0700 Lines: 54 Message-ID: References: <52AA8710.4030706@twcny.rr.com> <83sitpbis9.fsf@gnu.org> <87ppotuti1.fsf@rosalinde.fritz.box> <83haa4bubq.fsf@gnu.org> <52B7BA11.10004@twcny.rr.com> <8361qf8s1t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 70-59-41-30.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) On 12/27/13 10:31 PM, Josh wrote: > On Thu, Dec 26, 2013 at 7:30 PM, Kevin Rodgers > wrote: >> On 12/23/13 11:59 AM, Josh wrote: >>> >>> On Mon, Dec 23, 2013 at 8:12 AM, Eli Zaretskii wrote: >>>> >>>> If you want a function that capitalizes the word at point after >>>> looking back for its beginning, you need to code that using >>>> thing-at-point or some such. >>> >>> >>> When point is not already at the start of the word, `capitalize-word' >>> can already do this pretty easily via `M-- M-c'. >> >> (defun capitalize-word-at-point () >> "Capitalize the word at point (i.e. around point), without moving point." >> (interactive) >> (capitalize-word -1)) > > Unfortunately it's not quite that simple, because calling that function > when point is before the first character of a word will capitalize the > preceding word instead of the word following point. Something like > (defun capitalize-word-at-point () > "Capitalize the word at point." > (interactive) > (save-excursion > (forward-word) > (backward-word) > (capitalize-word 1))) > should suffice, though there are probably more elegant approaches. How about: (defun capitalize-word-at-point () "Capitalize the word at point. If point is within a word, don't move point." (interactive) (if (looking-at "\\b") (capitalize-word 1) (capitalize-word -1))) Or: (defadvice capitalize-word (before point-within-word activate) "When point is within a word, capitalize the word around point -- but only when called interactively." (if (and (called-interactively-p 'any) (not (looking-at "\\b"))) (backward-word (prefix-numeric-value current-prefix-arg)))) -- Kevin Rodgers Denver, Colorado, USA