From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 05:18:57 2016 Received: (at submit) by debbugs.gnu.org; 30 May 2016 09:18:57 +0000 Received: from localhost ([127.0.0.1]:46856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7JLc-00063k-TH for submit@debbugs.gnu.org; Mon, 30 May 2016 05:18:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7JLa-00063Y-VS for submit@debbugs.gnu.org; Mon, 30 May 2016 05:18:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7JLV-0008PN-0k for submit@debbugs.gnu.org; Mon, 30 May 2016 05:18:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7JLU-0008Oa-Tb for submit@debbugs.gnu.org; Mon, 30 May 2016 05:18:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7JLS-0004qU-Bg for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 05:18:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7JLL-0008Ms-Vt for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 05:18:45 -0400 Received: from mail-lb0-x241.google.com ([2a00:1450:4010:c04::241]:35072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7JLL-0008Ma-NU for bug-gnu-emacs@gnu.org; Mon, 30 May 2016 05:18:39 -0400 Received: by mail-lb0-x241.google.com with SMTP id sh2so8313494lbb.2 for ; Mon, 30 May 2016 02:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=x1tNge9a4ZW25siFovyZhIBvf6AYAz8znfMj16jLW+o=; b=HeA8a3jUp9CSLjLNXvKaEEoY7Q/jPWFU447vZsFxh6e4EOWym0jFP4VuNdQc+X2L4N C+8PXagxFNAXJV9stsYGpFrMupCCqVs03WXWoWbK9v7EWxgI6WIgc/Fbll0O/dGlKLI5 D/HiBZpTJd7+FzTIIKdILNH8gtDDIcSANADM3uRz/o9OL8SK/ECS96WMbQDoRvENuA+n Fzjnth+pM2NKyI+AuNsKNdEgLPWv+eFBS+nwEuDcIUJWuOM9F2zJ/ddOo6rTnrjayJBw 6Vt0hhKGwjTeV3XtWeR2rzCB0xroVZKFA0DQb6ApTUKYJn/gRJvR1ndmNlZqaFh1TVQC 9SvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=x1tNge9a4ZW25siFovyZhIBvf6AYAz8znfMj16jLW+o=; b=bU7cOabQKh528wsAspbMPs6h3JsTFnywrkShhOPlhD5odWtU7iLHtRmA2bYC2xZxi1 7Wsxk08M5EV0pnGJuHIskwsFzwnGRyq6cMoTYgf1ahSBObj1AY8fuzUFjWDVobjV4xcP LAo7uO/01PO6tGpEcToZ3b0f7QDGuE6EUYcgZ7SfJmhlrGiW3sriFsZ1mG2/HO4zcVQv T+zCwetGY1ogLDqv10vw3rDBAw0eDOP+Rikt8jbbWRIBAwPLCMvOefJkahBKgIupEiaq Gih7EHsn7UkihSyorcxEruI35LjAkt12Q6+WiIJ7AUQ4SZG9y7WFzFyV2PRYcWCisrkM fEZQ== X-Gm-Message-State: ALyK8tKjEtOqTpg7xMqlIPU2FKMwKx/0qSYTeZh492oAwK0GpLIODQ5rS6/+4bEeFbLQgRxyRFUr8oxrfQX7/g== MIME-Version: 1.0 X-Received: by 10.112.76.102 with SMTP id j6mr8043330lbw.98.1464599918696; Mon, 30 May 2016 02:18:38 -0700 (PDT) Received: by 10.25.39.210 with HTTP; Mon, 30 May 2016 02:18:38 -0700 (PDT) Date: Mon, 30 May 2016 11:18:38 +0200 Message-ID: Subject: 25.0.92; Upcasing a rectangular region of text From: Dani Moncayo To: bug-gnu-emacs Content-Type: multipart/mixed; boundary=14dae9d248bce4a0a405340bbd5e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (----) --14dae9d248bce4a0a405340bbd5e Content-Type: text/plain; charset=UTF-8 0. emacs -Q 1. Eval: (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) 2. Visit the attached file. 3. Move point to just after the comma. 4. Define a *rectanguar* region: C-x C-n C-e 5. Downcase the rectangular region: C-x C-l 6. Repeat steps #3 to #5, but this time for upcasing the region instead of downcasing it ('C-x C-u' instead of 'C-x C-l'). The upcased text in the last step is not only the one marked by the rectangular region. The upcasing command acts as if a linear (i.e. non-rectangular) region was active at that moment. In GNU Emacs 25.0.92.1 (i686-pc-mingw32) of 2016-04-22 built on LEG570 Repository revision: 2b31a0c21e51d39a82572a32d2d31b5a2aa174a3 Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --host=i686-pc-mingw32' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ESN locale-coding-system: cp1252 -- Dani Moncayo --14dae9d248bce4a0a405340bbd5e Content-Type: application/octet-stream; name=test1 Content-Disposition: attachment; filename=test1 Content-Transfer-Encoding: base64 X-Attachment-Id: f_iotsyip90 SGVsbG8sIFRoaXMgbGl0dGxlIGZpbGUNCmlzIGFuIEV4YW1wbGUuDQo= --14dae9d248bce4a0a405340bbd5e-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 17:21:49 2016 Received: (at 23655) by debbugs.gnu.org; 30 May 2016 21:21:49 +0000 Received: from localhost ([127.0.0.1]:47812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7UdB-0008CS-6E for submit@debbugs.gnu.org; Mon, 30 May 2016 17:21:49 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:50098 helo=homiemail-a11.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7UdA-0008CL-7E for 23655@debbugs.gnu.org; Mon, 30 May 2016 17:21:48 -0400 Received: from homiemail-a11.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTP id 3C6AF6E06C; Mon, 30 May 2016 14:21:45 -0700 (PDT) Received: from localhost.linkov.net (85.253.58.75.cable.starman.ee [85.253.58.75]) (Authenticated sender: jurta@jurta.org) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTPA id 7067D6E06A; Mon, 30 May 2016 14:21:44 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#23655: 25.0.92; Upcasing a rectangular region of text Organization: LINKOV.NET References: Date: Tue, 31 May 2016 00:11:54 +0300 In-Reply-To: (Dani Moncayo's message of "Mon, 30 May 2016 11:18:38 +0200") Message-ID: <87inxv1c9x.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 23655 Cc: 23655@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (/) > 0. emacs -Q > 1. Eval: (put 'upcase-region 'disabled nil) > (put 'downcase-region 'disabled nil) > 2. Visit the attached file. > 3. Move point to just after the comma. > 4. Define a *rectanguar* region: C-x C-n C-e > 5. Downcase the rectangular region: C-x C-l > 6. Repeat steps #3 to #5, but this time for upcasing the region > instead of downcasing it ('C-x C-u' instead of 'C-x C-l'). > > The upcased text in the last step is not only the one marked by the > rectangular region. The upcasing command acts as if a linear > (i.e. non-rectangular) region was active at that moment. Thanks for the request. Since we were unable to find a way to support rectangular regions for all region-selecting commands en masse, here is a patch to implement this individually for =E2=80=98upcase-region=E2=80= =99: diff --git a/src/casefiddle.c b/src/casefiddle.c index c5bfa36..0a237d5 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -294,15 +294,31 @@ } } =20 -DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", +DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 3, + "(list (region-beginning) (region-end) (region-noncontiguous-p))"= , doc: /* Convert the region to upper case. In programs, wants two= arguments. These arguments specify the starting and ending character numbers of the region to operate on. When used as a command, the text between point and the mark is operated on. See also `capitalize-region'. */) - (Lisp_Object beg, Lisp_Object end) + (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) { - casify_region (CASE_UP, beg, end); + Lisp_Object bounds =3D Qnil; + + if (!NILP (region_noncontiguous_p)) + { + bounds =3D call1 (Fsymbol_value (intern ("region-extract-function"= )), + intern ("bounds")); + + while (CONSP (bounds)) + { + casify_region (CASE_UP, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); + bounds =3D XCDR (bounds); + } + } + else + casify_region (CASE_UP, beg, end); + return Qnil; } =20 diff --git a/src/search.c b/src/search.c index f39df67..7cb18a2 100644 --- a/src/search.c +++ b/src/search.c @@ -2691,7 +2691,8 @@ STRING that was matched (the original STRING itself= is not altered). =20 if (case_action =3D=3D all_caps) Fupcase_region (make_number (search_regs.start[sub]), - make_number (newpoint)); + make_number (newpoint), + Qnil); else if (case_action =3D=3D cap_initial) Fupcase_initials_region (make_number (search_regs.start[sub]), make_number (newpoint)); From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 05 17:23:50 2016 Received: (at 23655-done) by debbugs.gnu.org; 5 Jun 2016 21:23:50 +0000 Received: from localhost ([127.0.0.1]:55952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9fWQ-00009k-5G for submit@debbugs.gnu.org; Sun, 05 Jun 2016 17:23:50 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:60069 helo=homiemail-a22.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9fWO-00009b-B2 for 23655-done@debbugs.gnu.org; Sun, 05 Jun 2016 17:23:48 -0400 Received: from homiemail-a22.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTP id 85E30114067; Sun, 5 Jun 2016 14:23:47 -0700 (PDT) Received: from localhost.linkov.net (62.65.224.151.cable.starman.ee [62.65.224.151]) (Authenticated sender: jurta@jurta.org) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPA id B5D8E114066; Sun, 5 Jun 2016 14:23:46 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#23655: 25.0.92; Upcasing a rectangular region of text Organization: LINKOV.NET References: <87inxv1c9x.fsf@mail.linkov.net> Date: Mon, 06 Jun 2016 00:23:32 +0300 In-Reply-To: <87inxv1c9x.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 31 May 2016 00:11:54 +0300") Message-ID: <87inxnib3f.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23655-done Cc: 23655-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (/) >> 0. emacs -Q >> 1. Eval: (put 'upcase-region 'disabled nil) >> (put 'downcase-region 'disabled nil) >> 2. Visit the attached file. >> 3. Move point to just after the comma. >> 4. Define a *rectanguar* region: C-x C-n C-e >> 5. Downcase the rectangular region: C-x C-l >> 6. Repeat steps #3 to #5, but this time for upcasing the region >> instead of downcasing it ('C-x C-u' instead of 'C-x C-l'). >> >> The upcased text in the last step is not only the one marked by the >> rectangular region. The upcasing command acts as if a linear >> (i.e. non-rectangular) region was active at that moment. > > Thanks for the request. Since we were unable to find a way to support > rectangular regions for all region-selecting commands en masse, here > is a patch to implement this individually for =E2=80=98upcase-region=E2= =80=99: Pushed to master. From unknown Mon Aug 18 02:36:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Jul 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator