From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: upcase-initials-region on show-duvall-jefferies-etal-1993 Date: Fri, 7 May 2021 04:26:49 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9494"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 07 04:27:45 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1leqDR-0002Nv-6Q for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 04:27:45 +0200 Original-Received: from localhost ([::1]:34780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leqDQ-00019c-3e for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 06 May 2021 22:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leqCb-0000iN-F5 for help-gnu-emacs@gnu.org; Thu, 06 May 2021 22:26:53 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:60733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leqCZ-0005oE-Gc for help-gnu-emacs@gnu.org; Thu, 06 May 2021 22:26:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620354409; bh=AexM+Vqi0RkZBdT1kU3f4mO0Djt3EVBzpVOhVM/MwCE=; h=X-UI-Sender-Class:From:To:Subject:Date; b=KesuSjT8U3e1TDwoiMLAzasn/zLW0ehIplmux+V7urJmlMsqCAQQvGS6UTPp+OyLr Eb5hPjC7OZsvRJj/5uD2bMfUWAXcZhaVKQVdgBUIYVHQxkXXIMd26PeDllfeSPuRZU ZyAX9yqNc/pnn9RdZZe1K0ILRxctdUflYsy3U29U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs12.server.lan [172.19.170.180]) (via HTTP); Fri, 7 May 2021 04:26:49 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:lAA29MoQicUobtV80BJCekc0rX2nYA9lNEWNq3zm+b2DIuaR+CANZjc1pDqK6ACUEBzoS ySEorGQwpAPwVYtPfA8YgXIRBBZWP+jVwdUufdl3IbAH52OFLpXQsMMR+n//5HW35jI5HPPS/Iwn rCnm/n84ZXsOhgV0rrNt7WMsY+cXitjPQqG5XOdRU/+d33dmB82kZf2cE4B/T3B9g4uOAZc2eHi4 DOaKbmmCjN1IqnG2H0DUCJc2bSzQuuY1WGbxtwMnCxSVQsDz1VRRhGpOXobrUfd+Z4tzUQx9bik7 60= X-UI-Out-Filterresults: notjunk:1;V03:K0:GLsDAWy2vL0=:QQ1sYh9FLkrtqtp2+bKWcE IdkkyMQ4Hz01Z+NwiRCPWBRSu7GKZ7yGsxu60pRqDuUwXnTx0zfBfNAcFvEpQIVqrYszFjDzC BE+s/3MxWmIKFsSEsV/DnI6nwW+KrgVl/PWbfBqeZW8H3aK34B38epaceplxhnVPLdBhqi22h RpP+sDs4ne1nCTHip17tVjU9msmUWIH84sCM/LA7naSH70KiOFgsDplMXve+0r6GK8CetFKbw eDXsrP/UJLJ4SqjXHFHuLAVJbGYPmRozvote7OHNp0EsfNlPWqx7NtQ3sDzEnE7Fgu1eIAm7q 9Afd4L1AAIHUj14qicR0uR/GeaX3ph9JOTucEQiaI0Evscjrrj5/6AOxjIDcqcjo4bsiCRPv6 lgYlzpZf5ZwyM6ty8RDX/A9/oMa1wHABHo9Sub5qN0+pH4f0E9MCoUQA1J5QjRb/ZxeqWd55Y 7ytJwMTUkl++90AVnRJ9R9U9CnDzzzWRZKSxRi0VPY5WPDGGFJBbelkMkGSMACxuTsFxd2gAO t6ZIxURuU4JsIFREoTV3jlDsRhMt7jz90ww0LVcY8odQ+UYoB24+QRfPt5JESk4ckZv9ZXKbN iG7sz8az0/A0Z9oPKnmG5buITZXkjjknzZYMiszBxFhoFf0zZsQMUyyt6wfGfIyLoqDBm3H4A sHfgw/3V2dMcs1SzvUML+LuGGOwBcMcUiBZNsc6EhtEaEsenaYx5vs1PeQT7SEflULiH5Ccn1 ADQtgqkRzM4lk59c/kpNtFHthZFNdAseuptWNLnQQOlKVH4M+Vz1vcXdpPyTqburMY5OIM8y Received-SPF: pass client-ip=212.227.17.21; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129541 Archived-At: I have strings in a file of the form "Show-Duvall-Jefferies-etAl-1993". Would like to switch between the following three versions "Show-Duvall-Jefferies-Etal-1993" ; "SHOW-DUVALL-JEFFERIES-ETAL-1993" ; can be done with upcase-region "show-duvall-jefferies-etal-1993" ; can be done with downcase-region "Show-Duvall-Jefferies-Etal-1993" ; cannot be done with upcase-initials-r= egion I am getting the bounds ($ma $mb) for the string like this (defun alnum-dash-bounds () "Gets bounds of a subword unit defined by [:alnum:] and dash." (let ( ($bounds nil) $ma $mb ) (skip-chars-backward "[:alnum:]-") ; same as ""[a-zA-Z0-9]-" (setq $ma (point)) (skip-chars-forward "[:alnum:]-") (setq $mb (point)) (cons $ma $mb) ))