From unknown Tue Jun 17 20:21:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16078 <16078@debbugs.gnu.org> To: bug#16078 <16078@debbugs.gnu.org> Subject: Status: Extensive docs and tests for `ruby-forward-string' (PATCH) Reply-To: bug#16078 <16078@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:21:03 +0000 retitle 16078 Extensive docs and tests for `ruby-forward-string' (PATCH) reassign 16078 emacs submitter 16078 Cameron Desautels severity 16078 wishlist tag 16078 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 12:16:10 2013 Received: (at submit) by debbugs.gnu.org; 6 Dec 2013 17:16:11 +0000 Received: from localhost ([127.0.0.1]:34396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Voz0b-0000BU-U0 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 12:16:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41528) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Voz0Z-0000BL-14 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 12:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Voz0W-00083U-Vq for submit@debbugs.gnu.org; Fri, 06 Dec 2013 12:16:06 -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.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]:34103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voz0W-00083Q-SP for submit@debbugs.gnu.org; Fri, 06 Dec 2013 12:16:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voz0R-0007Dp-56 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 12:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Voz0M-00081n-3w for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 12:15:59 -0500 Received: from mail-bk0-x22d.google.com ([2a00:1450:4008:c01::22d]:38455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voz0L-00081V-H9 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 12:15:54 -0500 Received: by mail-bk0-f45.google.com with SMTP id mx13so400883bkb.4 for ; Fri, 06 Dec 2013 09:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nLFRGqEzP73e6drjLX1TqQ/egZhvXkxoozz8BWZSdnM=; b=JUCYhn2U1kj33uaNKOk9DOBhpZYCFTwuB13Vmx5l6bOpuXez+CmIt1kNpSrsNfJgOQ 0nOWPpvt/gGFUXb7UQL9Z0I+PNTf6OH9uQA3r+4km5daONk1UfuivRuXIioaebjHUXpz wryWbPRlMsmt5DDlKswO3vouemPTqeljbjzDVwpBcJ6XNIsbc+ckXZJVdlv/gqjaGNr6 qXu12JSoabMBotGd3+Z7rCdxS5Crslug93HlplqmY54S3+jYlE8AbT32xj35cZ3268lq qUxV1sU13xj24Ye4DeWYs8Cr/kpU4sDEb2kQBxce/WgtjFWFDuwL/05BL4+Dm9sTkhBU fHXA== MIME-Version: 1.0 X-Received: by 10.204.101.68 with SMTP id b4mr1486053bko.20.1386350152168; Fri, 06 Dec 2013 09:15:52 -0800 (PST) Received: by 10.205.26.197 with HTTP; Fri, 6 Dec 2013 09:15:52 -0800 (PST) Date: Fri, 6 Dec 2013 11:15:52 -0600 Message-ID: Subject: Extensive docs and tests for `ruby-forward-string' (PATCH) From: Cameron Desautels To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=001a113356c05aecea04ece0ccce X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.0 (----) X-Debbugs-Envelope-To: submit 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.0 (----) --001a113356c05aecea04ece0ccce Content-Type: text/plain; charset=ISO-8859-1 The attached patch adds extensive documentation and tests to the `ruby-forward-string' function. This may seem an odd function to document thoroughly, but I spent quite a while wrapping my head around the exact behavior and I want to spare the next person. It also underlies some important parsing functionality in ruby-mode. Note the one test which is expected to fail: this represents an outstanding bug in `ruby-forward-string`. I'll be (immediately) following this report with a patch which fixes *that* issue, but it didn't seem prudent to combine the commits. -- Cameron Desautels --001a113356c05aecea04ece0ccce Content-Type: text/plain; charset=US-ASCII; name="ruby-forward-string-docs-and-tests.diff" Content-Disposition: attachment; filename="ruby-forward-string-docs-and-tests.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hovoyak50 KioqIGxpc3AvcHJvZ21vZGVzL3J1YnktbW9kZS5lbC5vcmlnCTIwMTMtMTItMDYgMTA6NTY6NTIu MDAwMDAwMDAwIC0wNjAwCi0tLSBsaXNwL3Byb2dtb2Rlcy9ydWJ5LW1vZGUuZWwgICAgIAkyMDEz LTEyLTA2IDEwOjU0OjA3LjAwMDAwMDAwMCAtMDYwMAoqKioqKioqKioqKioqKioKKioqIDc5MSw3 OTcgKioqKgogICAgICAgICAgICAgICAgICAgICh0IG5pbCkpKSkpKSkpKQoKICAoZGVmdW4gcnVi eS1mb3J3YXJkLXN0cmluZyAodGVybSAmb3B0aW9uYWwgZW5kIG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92ZS10byAiPGZvbzw+IiAgIj48IiBuaWwpCisgICAocnVieS1mb3J3YXJkLXN0cmlu Zy1zaG91bGQtbW92ZS10byAiPGZvbzw+PiIgIj48IiA4KQorICAgKHJ1YnktZm9yd2FyZC1zdHJp bmctc2hvdWxkLW1vdmUtdG8gIjw8Pjw+PiIgICI+PCIgNykKKyAgIChydWJ5LWZvcndhcmQtc3Ry aW5nLXNob3VsZC1tb3ZlLXRvICI+PCIgICAgICAiPjwiIG5pbCkKKyAgIChydWJ5LWZvcndhcmQt c3RyaW5nLXNob3VsZC1tb3ZlLXRvICIvZm9vIiAgICAiLyIgIG5pbCkpCisKKyAoZXJ0LWRlZnRl c3QgcnVieS1mb3J3YXJkLXN0cmluZy1jYW4tc2tpcC1pbnRlcnBvbGF0aW9ucyAoKQorICAgKHJ1 YnktZm9yd2FyZC1zdHJpbmctc2hvdWxkLW1vdmUtdG8gIjxmI3s+fW8+IiAiPjwiIDYgbmlsKQor ICAgKHJ1YnktZm9yd2FyZC1zdHJpbmctc2hvdWxkLW1vdmUtdG8gIjxmI3s+fW8+IiAiPjwiIDkg dCkKKyAgIChydWJ5LWZvcndhcmQtc3RyaW5nLXNob3VsZC1tb3ZlLXRvICIvZiN7L31vLyIgIi8i ICA2IG5pbCkKKyAgIChydWJ5LWZvcndhcmQtc3RyaW5nLXNob3VsZC1tb3ZlLXRvICIvZiN7L31v LyIgIi8iICA5IHQpKQoKICAocHJvdmlkZSAncnVieS1tb2RlLXRlc3RzKQo= --001a113356c05aecea04ece0ccce-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 22:23:03 2013 Received: (at 16078) by debbugs.gnu.org; 7 Dec 2013 03:23:03 +0000 Received: from localhost ([127.0.0.1]:35273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp8Tu-0000rN-Kw for submit@debbugs.gnu.org; Fri, 06 Dec 2013 22:23:02 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:39506) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp8Tr-0000qr-Sy for 16078@debbugs.gnu.org; Fri, 06 Dec 2013 22:23:00 -0500 Received: by mail-ea0-f171.google.com with SMTP id h10so609889eak.16 for <16078@debbugs.gnu.org>; Fri, 06 Dec 2013 19:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=yZDR6x18kZad1KIqCmJvZjb30iOP+BOR1b5OZ6h5FD8=; b=bWSxmCghnj4P9Gzrg5cYnHmFHO5VG/7/FZRmd6RgMk0RrrAXYBlN3EU9BD5jJBRivB 4kMG7nRcPgAJrjO65YNv5jQAsm/0UYb1yzNpb4SG8v5gnhrrOiIxpEF/+m6r0E0FIgeu h7rIV6k5aAmLbX6O/nZpQHFCPWX5Ha4GadCRbGFqTx0MrZCKmXmIW51tXkJ8EAPx6lkZ HmMrxPVwLn+ntLpr+y5NSSSmRVKR6LAUOK6fzc5F7QKH3P1uAlyO+ZwMsU8XuivtB2b1 McCYoJtcENwKRoakllHdRSy1nUOfc7xwVtnrNTwtd3ttuMz2HX8WjmBPV40ixcodZNv6 UAgQ== X-Received: by 10.15.53.193 with SMTP id r41mr4906930eew.2.1386386579204; Fri, 06 Dec 2013 19:22:59 -0800 (PST) Received: from axl ([62.228.136.233]) by mx.google.com with ESMTPSA id 4sm1977032eed.14.2013.12.06.19.22.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Dec 2013 19:22:58 -0800 (PST) From: Dmitry Gutov To: Cameron Desautels Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) References: Date: Sat, 07 Dec 2013 05:22:55 +0200 In-Reply-To: (Cameron Desautels's message of "Fri, 6 Dec 2013 11:15:52 -0600") Message-ID: <8761r1wdio.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16078 Cc: 16078@debbugs.gnu.org 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 (/) Hi Cameron, Cameron Desautels writes: > The attached patch adds extensive documentation and tests to the > `ruby-forward-string' function. > > This may seem an odd function to document thoroughly, but I spent > quite a while wrapping my head around the exact behavior and I want to > spare the next person. It also underlies some important parsing > functionality in ruby-mode. Thank you for your effort, but it probably would've been more valuable a few months ago or earlier. The ruby-mode that will be released with Emacs 24.4 has switched to using SMIE for indentation and sexp navigation by default, and it leaves quite a bit of the old, undocumented code unused. Whatever code examples and functionality didn't work for you, have you tried them with the current trunk? We can still use the two patches, of course, since the old indentation engine can still be enabled with `(setq ruby-use-smie nil)', but they exceed the 15 line limit and will require copyright assignment (AFAIR, we do require those even for test code). Have you signed, or are you willing to sign the copyright assignment papers? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 07 21:29:23 2013 Received: (at 16078) by debbugs.gnu.org; 8 Dec 2013 02:29:24 +0000 Received: from localhost ([127.0.0.1]:37261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VpU7W-0002lx-Gh for submit@debbugs.gnu.org; Sat, 07 Dec 2013 21:29:23 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:53074) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VpU7R-0002ll-1u for 16078@debbugs.gnu.org; Sat, 07 Dec 2013 21:29:17 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so3131189pdj.40 for <16078@debbugs.gnu.org>; Sat, 07 Dec 2013 18:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=p6oRIhz8FwOHy2aJcL5FCb/wvnSo4kVM/TekTsslh/4=; b=bScLfC/evOSadz66aGuprOTRAgSOtB46hSeW9ebDk9O/x1/Q1prICxZM5yCNMZa3Vx 1ad2jSo9rVKBTbqf1oKDdiqTaUvUcLPSvGkMWZpkpiwV2HVGNGgmzc9YzdDljp9YypbG fdsGcBcRXeg6+vtUhYurZKqSoIsVj6pWjz6EUcJbXJ83XEM3n3cbKhY6uM+dd6iPhWG+ ULnc1L1Il4GMxn7uLAiofRFt+e1UHgjm8fNt4ZcUk63K8ddp+OXijSEhNgLkhYmilxCB O1RXM2T+4tdXcC+T8YpZROC7cY6oanT811RlkPU4vTes5S9RXoGw6yiXljwQS7cK8NWa BLGw== MIME-Version: 1.0 X-Received: by 10.66.159.234 with SMTP id xf10mr13108847pab.139.1386469755670; Sat, 07 Dec 2013 18:29:15 -0800 (PST) Received: by 10.70.50.228 with HTTP; Sat, 7 Dec 2013 18:29:15 -0800 (PST) In-Reply-To: <8761r1wdio.fsf@yandex.ru> References: <8761r1wdio.fsf@yandex.ru> Date: Sat, 7 Dec 2013 20:29:15 -0600 Message-ID: Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) From: Cameron Desautels To: Dmitry Gutov Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 16078 Cc: 16078@debbugs.gnu.org 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.0 (/) Hi Dmitry, Thank you for explaining the recent changes. I did see a lot of duplicated parsing code and wasn't completely sure what the reason for it was. I read up a bit on SMIE so that makes sense now. However, I've done additional testing on the current trunk and the issue persists. As a minimal example to recreate the issue, create a new file with the following contents (indentation removed): def foo %^bar^ end Turn on ruby-mode, and run `imenu-add-menubar-index'. You will get the following error: Error in menu-bar-update-hook (imenu-update-menubar): (invalid-regexp "Unmatched [ or [^") (Note that if you run it again it will appear to work--run `imenu' to see the error again.) This stems from the bug in `ruby-forward-string' that my patch fixes. I have not signed the copyright assignment papers but I am willing. Thanks. -- Cameron Desautels On Fri, Dec 6, 2013 at 9:22 PM, Dmitry Gutov wrote: > Hi Cameron, > > Cameron Desautels writes: > >> The attached patch adds extensive documentation and tests to the >> `ruby-forward-string' function. >> >> This may seem an odd function to document thoroughly, but I spent >> quite a while wrapping my head around the exact behavior and I want to >> spare the next person. It also underlies some important parsing >> functionality in ruby-mode. > > Thank you for your effort, but it probably would've been more valuable a > few months ago or earlier. The ruby-mode that will be released with > Emacs 24.4 has switched to using SMIE for indentation and sexp > navigation by default, and it leaves quite a bit of the old, > undocumented code unused. > > Whatever code examples and functionality didn't work for you, have you > tried them with the current trunk? > > We can still use the two patches, of course, since the old indentation > engine can still be enabled with `(setq ruby-use-smie nil)', but they > exceed the 15 line limit and will require copyright assignment (AFAIR, > we do require those even for test code). Have you signed, or are you > willing to sign the copyright assignment papers? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 08 23:07:53 2013 Received: (at 16078) by debbugs.gnu.org; 9 Dec 2013 04:07:53 +0000 Received: from localhost ([127.0.0.1]:39168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vps8P-0003E6-0e for submit@debbugs.gnu.org; Sun, 08 Dec 2013 23:07:53 -0500 Received: from mail-ea0-f180.google.com ([209.85.215.180]:41800) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vps8N-0003Dw-1n for 16078@debbugs.gnu.org; Sun, 08 Dec 2013 23:07:51 -0500 Received: by mail-ea0-f180.google.com with SMTP id f15so1292365eak.39 for <16078@debbugs.gnu.org>; Sun, 08 Dec 2013 20:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=O05byTcWMoRRsfgWR1A0Zl20tH8/m/Gds1PmS+oquhY=; b=K20EPxTyM/VFsxIj8R3W3mQ/x+GQjrpZkrzTuNHpC4WR5JAhv518H/M49+28Os0NKE Fg2OVB2R6OtOzBR8X/mopfw752zZ3uejEeowm/GuDp63PzVp5L2xvYHYahAdYsbT+poL nDbwEfvozz7HkcXDALsOVybj4ZyO6dGrrt8UVDTtwBzgilxrFqUy6eOjSh1u0NtHkdKG HRjtBisHuk/agAyFDamHFzIUSJyM6Dnug2KAfwv3cl8MmT1tL8OjT7dWhAftnXjUfwdE DRpMqgztC1ca+wDNJxWI8JUx/P3f/4B1iZ3l9EDoHGV2xW8tpe5uvrDYY/BzOiZP3XPR HSsw== X-Received: by 10.15.76.6 with SMTP id m6mr11218438eey.37.1386562070344; Sun, 08 Dec 2013 20:07:50 -0800 (PST) Received: from [192.168.10.2] ([62.228.136.233]) by mx.google.com with ESMTPSA id l4sm23902206een.13.2013.12.08.20.07.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 20:07:49 -0800 (PST) Message-ID: <52A54210.6000802@yandex.ru> Date: Mon, 09 Dec 2013 06:07:44 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Cameron Desautels Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) References: <8761r1wdio.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16078 Cc: 16078@debbugs.gnu.org, Glenn Morris 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 08.12.2013 04:29, Cameron Desautels wrote: > Thank you for explaining the recent changes. I did see a lot of > duplicated parsing code and wasn't completely sure what the reason for > it was. I read up a bit on SMIE so that makes sense now. Even without SMIE, there already was duplication between `ruby-syntax-propertize-function' (and its handling of string interpolations and percent literals) and the manual parsing of them in `ruby-parse-partial' and `ruby-forward-string'. So, if I were going to untangle that code, first I'd have tried to replace all the uses of `ruby-forward-string' with `forward-sexp', and maybe `narrow-to-region', to handle the END parameter. We already know where those literals end, no need to read them char-by-char again. > As a minimal example to recreate the issue, create a new file with the > following contents (indentation removed): > > def foo > %^bar^ > end Thank you for the example. > Turn on ruby-mode, and run `imenu-add-menubar-index'. You will get > the following error: I've now also fixed it not to call `ruby-parse-partial' when SMIE is used. This leaves `ruby-move-to-block' as the only function that still requires the old indentation engine to work. Not sure yet how to rewrite it in terms of sexp navigation or other SMIE-specific functions. > I have not signed the copyright assignment papers but I am willing. For now I've installed everything except the tests. Combined with your patch for #16046, the docstring and the patch in #16079 go over the 15 lines limit, though not far. If the more experienced contributors say it's too much, we can remove the docstring. For the tests, though, and any further patches, the assignment will be required. Glenn, could you send the form? Speaking of the tests, though, the way they are now, they only cover one parsing/indentation engine. If they were written to be more high-level, say, testing indentation or the IMenu index generation, they could touch both engines, which would be better. Although if `ruby-forward-string' were replaced with `forward-sexp', there probably would be no need for most of the new tests, since the code would handle all cases uniformly. N.B.: Your example above also uncovered an indentation bug when using SMIE. Gonna fix that shortly. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 17:49:01 2013 Received: (at 16078) by debbugs.gnu.org; 11 Dec 2013 22:49:01 +0000 Received: from localhost ([127.0.0.1]:44363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqsaS-0004jh-PI for submit@debbugs.gnu.org; Wed, 11 Dec 2013 17:49:01 -0500 Received: from mail-pb0-f50.google.com ([209.85.160.50]:54305) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqsaR-0004jZ-9N for 16078@debbugs.gnu.org; Wed, 11 Dec 2013 17:48:59 -0500 Received: by mail-pb0-f50.google.com with SMTP id rr13so10852672pbb.37 for <16078@debbugs.gnu.org>; Wed, 11 Dec 2013 14:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fFzXAYgDUI8dFyzzeeU3AyM0Vs0TWWzkiGABWvZiFJU=; b=LbbbimfHnvrF1DdteeniNg4bQL/DaQ+2kIXD8jaxR12t7onsXpFgjT9vIkEJtwH8dN 0fgeNlMT9TaYyfbkqwQF1PT1KXcsLTpuwsaj1H+OnodZd4orRBvuiI5eHtHG4vIFmY5D zctIk4J6jew3vpJLvmrSdwzE5DBsWsbfs8sBrbK+CaQZm3doGLVBqgShXVrj51NhUpM8 OADBy/+LQD7uH1lqZN5TlimnfC3F+vz4GwTUO13oeWSm1lH35ZJ8fTfHDzXCg8hPtJQZ CB0rEuVYB1iJfSZ1k3GxbN48PhtgaZPLRFl7dF2rO8wUT1nBqMPx6Cz5r6RcEWDaCMbu nqAw== MIME-Version: 1.0 X-Received: by 10.68.245.200 with SMTP id xq8mr5501898pbc.21.1386802138363; Wed, 11 Dec 2013 14:48:58 -0800 (PST) Received: by 10.70.50.231 with HTTP; Wed, 11 Dec 2013 14:48:58 -0800 (PST) In-Reply-To: <52A54210.6000802@yandex.ru> References: <8761r1wdio.fsf@yandex.ru> <52A54210.6000802@yandex.ru> Date: Wed, 11 Dec 2013 16:48:58 -0600 Message-ID: Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) From: Cameron Desautels To: Dmitry Gutov Content-Type: multipart/alternative; boundary=047d7b1636c3d4bc6c04ed4a087e X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16078 Cc: 16078@debbugs.gnu.org, Glenn Morris 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 (/) --047d7b1636c3d4bc6c04ed4a087e Content-Type: text/plain; charset=ISO-8859-1 On Sun, Dec 8, 2013 at 10:07 PM, Dmitry Gutov wrote: > Speaking of the tests, though, the way they are now, they only cover one > parsing/indentation engine. If they were written to be more high-level, > say, testing indentation or the IMenu index generation, they could touch > both engines, which would be better. I agree completely. But I didn't have my head around how all of the code worked and I wanted to contribute as I could. Plus I though it would be best to include some tests for my work, even if they weren't as high level as would be ideal. Let me know what else you need from me. -- Cameron Desautels --047d7b1636c3d4bc6c04ed4a087e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Sun, Dec 8, 2013 at 10:07 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
Speaking of the tests, though, the way they = are now, they only cover one parsing/indentation engine. If they were writt= en to be more high-level, say, testing indentation or the IMenu index gener= ation, they could touch both engines, which would be better.

I agree completely. But I didn't have my head around how all = of the code worked and I wanted to contribute as I could. Plus I though it = would be best to include some tests for my work, even if they weren't a= s high level as would be ideal.

Let me know= what else you need from me.

--
Cameron Desau= tels <camdez@gmail.com>
--047d7b1636c3d4bc6c04ed4a087e-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 22:36:32 2013 Received: (at 16078) by debbugs.gnu.org; 15 Dec 2013 03:36:32 +0000 Received: from localhost ([127.0.0.1]:50567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vs2VL-0002eL-Mw for submit@debbugs.gnu.org; Sat, 14 Dec 2013 22:36:31 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:52386) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vs2VK-0002eE-5V for 16078@debbugs.gnu.org; Sat, 14 Dec 2013 22:36:30 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so1543468eaj.26 for <16078@debbugs.gnu.org>; Sat, 14 Dec 2013 19:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Qo+NtFDagatWLCeUEWNjEcE89UsZXST9FAhkCk13cF8=; b=rnnCA2krLKJc2Uu2ZmOwp9HSCuxGY0Hum9bWlgOkoJ7NRdbl26Qln1JHvlRegzyoWp 2fKsElHZQqOSfb5OlDxdxXO0eMpgpvhj7GWpBHesmFvYSlwcnKGzPLvD8e/O9d1ZftDO rrOr5esdcCH/1M2kh5xrF0XK0ueZhCiZLU/2y/BoFJSEFEe1+BQ9as+jOe2fL8Mgav08 Mr06BJ/rU9MHbydkTzSqYGvb+Sf1IgwNA7THVqWwfN1Wv/wkKos14xWExDaJP3XOFICe odZTvep7NLzYmTRpN9PVBqoPBHAaVboNe3Vc5xRp3mWlSxdiPLFGYxvh1aUA5URYAJ0V Fs5Q== X-Received: by 10.15.75.68 with SMTP id k44mr10076733eey.57.1387078589451; Sat, 14 Dec 2013 19:36:29 -0800 (PST) Received: from [192.168.10.2] ([83.168.26.131]) by mx.google.com with ESMTPSA id v7sm25420469eel.2.2013.12.14.19.36.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Dec 2013 19:36:28 -0800 (PST) Message-ID: <52AD23B9.3020701@yandex.ru> Date: Sun, 15 Dec 2013 05:36:25 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Cameron Desautels Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) References: <8761r1wdio.fsf@yandex.ru> <52A54210.6000802@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16078 Cc: 16078@debbugs.gnu.org, Glenn Morris 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 12.12.2013 00:48, Cameron Desautels wrote: > I agree completely. But I didn't have my head around how all of the code > worked and I wanted to contribute as I could. Plus I though it would be > best to include some tests for my work, even if they weren't as high > level as would be ideal. > > Let me know what else you need from me. I'm sure someone will send you the papers to sign, sooner or later. In the meantime, you could rewrite the tests to be more high-level, or work on replacing the uses of `ruby-forward-string' with `forward-sexp' (like I described earlier) if you have the time. If not, that's okay too. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 09:55:35 2015 Received: (at 16078-done) by debbugs.gnu.org; 15 Nov 2015 14:55:35 +0000 Received: from localhost ([127.0.0.1]:38919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxyiM-0005yC-C3 for submit@debbugs.gnu.org; Sun, 15 Nov 2015 09:55:34 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:32888) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zxyi0-0005uK-JD for 16078-done@debbugs.gnu.org; Sun, 15 Nov 2015 09:55:31 -0500 Received: by wmec201 with SMTP id c201so142142643wme.0 for <16078-done@debbugs.gnu.org>; Sun, 15 Nov 2015 06:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=PpBWix+g7nSorazhcneZ/QffYpSllyg+k9Skz6BIlG8=; b=vIYLpRZC8rEeoKBqN3l86kFzEcD/fer2UE63SDdmWAK4um8c6BlyVwCSA1VzOv8j/P yDnU/tcPCie6SQyCSGWH0ECMIXgs853m1nw4GkYiS0adcSnlmSQyagiLP/kelGwe0gZI Li/wiDGYd578vJ7n9sK97vze4hXoQQQqMN7TuXRdAWh9Qn8Ca/RWVVU36Ie50PYS13VD H7ERUKhCIFl9rDOVu4aKZOiJ1Z/yZJs6Y49O1jJcFUXP966gC6OBLapaboeneyWWROT+ JVVIVqQPFai/Z1QcbjUi/ROxzVKoMh9E4hQmgGzo7eK/bDS5ioLOFRWfQacBkmD3cKBi PhWQ== X-Received: by 10.28.222.138 with SMTP id v132mr13655366wmg.23.1447599311959; Sun, 15 Nov 2015 06:55:11 -0800 (PST) Received: from axl ([185.105.175.24]) by smtp.gmail.com with ESMTPSA id 200sm2561657wmn.11.2015.11.15.06.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Nov 2015 06:55:10 -0800 (PST) From: Dmitry Gutov To: Cameron Desautels Subject: Re: bug#16078: Extensive docs and tests for `ruby-forward-string' (PATCH) References: <8761r1wdio.fsf@yandex.ru> <52A54210.6000802@yandex.ru> <52AD23B9.3020701@yandex.ru> Date: Sun, 15 Nov 2015 16:55:09 +0200 In-Reply-To: <52AD23B9.3020701@yandex.ru> (Dmitry Gutov's message of "Sun, 15 Dec 2013 05:36:25 +0200") Message-ID: <86y4dzia7m.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16078-done Cc: 16078-done@debbugs.gnu.org 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 (/) Cameron, Nothing has happened here for a while, so I'm closing this bug. Thanks again for the contribution, even if we only accepted a part of it. From unknown Tue Jun 17 20:21:03 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, 14 Dec 2015 12: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