From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#66050: Making perl-mode.el obsolete Date: Sun, 24 Sep 2023 19:40:10 -0300 Message-ID: <9915f301-1808-8548-df5e-040e3c028714@gmail.com> References: <4963b74f-7723-c473-afe3-2c3f84324217@gmail.com> <87jzsfw6t8.fsf@oook.m.uunet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17926"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: Corwin Brust , 66050@debbugs.gnu.org, Stefan Kangas , rms@gnu.org, monnier@iro.umontreal.ca To: Harald =?UTF-8?Q?J=C3=B6rg?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 00:41:02 2023 Return-path: Envelope-to: geb-bug-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 1qkXmg-0004ZZ-4E for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 00:41:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkXmV-0000pd-Tn; Sun, 24 Sep 2023 18:40:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkXmU-0000pV-FX for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:40:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkXmU-0004IO-5v for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:40:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkXmf-0007if-Vf for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 18:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 22:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66050 X-GNU-PR-Package: emacs Original-Received: via spool by 66050-submit@debbugs.gnu.org id=B66050.169559523629632 (code B ref 66050); Sun, 24 Sep 2023 22:41:01 +0000 Original-Received: (at 66050) by debbugs.gnu.org; 24 Sep 2023 22:40:36 +0000 Original-Received: from localhost ([127.0.0.1]:43728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXmF-0007hs-H5 for submit@debbugs.gnu.org; Sun, 24 Sep 2023 18:40:36 -0400 Original-Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]:53415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkXmB-0007hc-JY for 66050@debbugs.gnu.org; Sun, 24 Sep 2023 18:40:34 -0400 Original-Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1cc87405650so3211833fac.2 for <66050@debbugs.gnu.org>; Sun, 24 Sep 2023 15:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695595214; x=1696200014; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ey8WhHvoRJUB0BMcLDgqJxHUOkV26ZBDlI7pyf0Ryx8=; b=LpxtpLIl1jPth6GLCzDqiVEoI8YgTcJIKR1yEiGssd8gN0PxcmwWHYxNSk/FiXiwS3 K0F1KIHNGwBgTow5I9mSL54E/V2Nzy0R2AULo9ekfHfPnJ4sGSEpAQgOW61dTgJMvhMr y1XcQ7GNoBRBNquVafCymJPoYNLRHCTwa5C7z/FZm1ggKhe8qyfH2iYXhUcRUobsz5xF 8LvTN9DS8zm1BvraUD3OOTi6bcAn75HlIC940/NRsa2V6rMekrOkSD/P9lCrP6S/1+CF +R1Lla1+qrdY23+M+947OVotXiDX2liD1KDoMl8cq6RKX7vIvXQ/HaUEwaxVfCv6zogZ Kskw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695595214; x=1696200014; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ey8WhHvoRJUB0BMcLDgqJxHUOkV26ZBDlI7pyf0Ryx8=; b=kezPtNNC9ivR0jVfd5pHE60hASPcVqfpAyuPWtaeWQExrHfPzh8JH8Jaabbtftz61c xfwRx01Ilzh1D7gqQHovPCnNvyl6XTDqU9yoZTzCvgENLn6EQ1QoqOuSC/ul/dc/F3pH fbpnSRwHizW8Uhwfjhyh3YyBguqGYNwVQv84iyo2DLhIAf6n3SewLri3c9dBHnPcdY51 swGE8vlMcPM5I/nLb3XMy7zM5HaFPV+7uVHWzVmem0kPcSkJH3tzliIWBgvOHaWobI3c zFkYEIRZYuwbWQTWkl1Q3oUCEB0w20DDskZiu7CuUtcYZmeOu3kdYf9y2JB5epK5+Dyb Oa+A== X-Gm-Message-State: AOJu0YyE/4QmmkdTp6JGhPuvuh/OsfXIVQXmipII46T7RLvj5jFl1iVq lRFIdIYQXbgyxuR6GycqV44= X-Google-Smtp-Source: AGHT+IG1akCyUZ/tFIovBYs7S9Nd7WoxW/wN7ureNiCZbhJp9KqxaDxlxorkrj1/x9uC/14Nsur5CA== X-Received: by 2002:a05:6870:1602:b0:1bb:fa96:ae0e with SMTP id b2-20020a056870160200b001bbfa96ae0emr6518750oae.22.1695595213813; Sun, 24 Sep 2023 15:40:13 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id f18-20020a637552000000b005777a50c14csm6607816pgn.0.2023.09.24.15.40.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Sep 2023 15:40:13 -0700 (PDT) Content-Language: en-US In-Reply-To: <87jzsfw6t8.fsf@oook.m.uunet.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271280 Archived-At: On 24/9/23 19:21, Harald Jörg wrote: > Mauro Aranda writes: > >> In addition to what Jens Schmidt said, I can add that: >> >> 1. If I have something like: >> my $some_code = ""; >> $some_code.= q( >> my $counter = 0; >> ); >> >> If I put point at column 0 of the line "my $counter", and hit TAB, I get >> indentation in perl-mode. I don't in cperl-mode. I tried to look into >> options for making this work but I couldn't find anything. > > I consider the behavior of perl-mode to be a bug. > > Whatever is within the parens of q(...) is a string, and will be > assigned to the variable $some_code. By "indenting", perl-mode changes > the value of $some_code by adding spaces. In my opinion, indenting > should change the optical layout, but not the code! I might be completely wrong about this, but I have the feeling that TAB behaves differently because in perl-mode I see TAB is bound to indent-for-tab-command (this is not in emacs -Q, just in case it has something to do with that). So, TAB is not really indenting (as I said originally, sorry), but adding a TAB character upon request. And yes, in this case I want to change the code, so TAB is not doing anything incorrect here, I think. >> 2. While I'm typing the above string, I get messages about string/RE not >> found: >> End of ‘q( ... )’ string/RE not found: (scan-error Unbalanced >> parentheses 1092 1874) >> End of ‘q( ... )’ string/RE not found: (scan-error Unbalanced >> parentheses 1092 1918) [2 times] >> End of ‘q( ... )’ string/RE not found: (scan-error Unbalanced >> parentheses 1092 1962) [2 times] >> >> That's annoying. > > The message is technically correct, and generally I consider the ability > of cperl-mode to locate syntax errors useful. But I understand that it > can be annoying while you're typing (I myself don't see these messages > because I use paredit-mode, but I understand that not everyone wants > this electricity). I guess that a way to optionally suppress these > messages can be found. Sure is correct, but I'm used to see messages like those when I have really screwed up (typically editing an elisp file and making forward-sexp fail). Not while I'm typing. To me, it feels better to have kind of a visual indication, like when you are entering a string and everything fontifies as a string so you are reminded you better close it. >> So far, my settings for getting a perl-mode experience in cperl-mode, >> with emacs -Q: (taken from a custom file): >> '(cperl-highlight-variables-indiscriminately t) >> '(cperl-indent-level 4) >> '(cperl-indent-parens-as-block t) >> '(cperl-invalid-face 'default) > ,> >> '(cperl-array-face ((t (:inherit cperl-hash-face)))) >> '(cperl-hash-face ((t (:underline t :inherit >> font-lock-variable-name-face)))) >> '(cperl-nonoverridable-face ((t (:inherit default)))) > > Thanks for collecting this! > You're welcome. I'm still trying to figure out if there are more settings to tweak. Together with the settings that need to be added for a smooth perl-mode -> cperl-mode transition, they could be placed in a cperl-perl-mode-users-asylum-theme ;-)