GNU bug report logs -
#43916
$$, $@, $bla colors in Perl mode vs. Shell-script mode
Previous Next
To reply to this bug, email your comments to 43916 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Sun, 11 Oct 2020 00:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 11 Oct 2020 00:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Looking at
print $$, $@, $bla
in Shell-script mode and Perl mode:
At least all three leading $ should look the same in the same file.
And they should all either be the same color, or different colors, from what
follows them.
So Perl mode has some work to do.
emacs-version "26.3"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Sun, 11 Oct 2020 04:36:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 43916 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> Looking at
> print $$, $@, $bla
> in Shell-script mode and Perl mode:
> At least all three leading $ should look the same in the same file.
Is this about Perl mode or shell-script-mode? In Perl mode, all the
four $'s look the same to me.
> And they should all either be the same color, or different colors, from what
> follows them.
The "bla" has a different colour, but I'm not sure why you think the "$"
should have the same colour as the "bla".
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Thu, 15 Oct 2020 23:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 43916 <at> debbugs.gnu.org (full text, mbox):
>>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
>> Looking at
>> print $$, $@, $bla
>> in Shell-script mode and Perl mode:
>> At least all three leading $ should look the same in the same file.
LI> Is this about Perl mode or shell-script-mode?
One must be wrong. They can't both be correct. I just don't know which.
Or maybe both aren't correct. Anyway their syntax can't be that
different.
LI> In Perl mode, all the four $'s look the same to me.
>> And they should all either be the same color, or different colors, from what
>> follows them.
LI> The "bla" has a different colour, but I'm not sure why you think the "$"
LI> should have the same colour as the "bla".
Anyway, no matter how you look at it, there is at least something wrong
with at least one of items in at least one of the modes!
If you say one item looks great, then you have to explain how another
item can use a different coloring rule.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Fri, 16 Oct 2020 05:08:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 43916 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> One must be wrong. They can't both be correct. I just don't know which.
> Or maybe both aren't correct. Anyway their syntax can't be that
> different.
Sure they can -- they're different languages, even if they use the same
symbols.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Sun, 18 Oct 2020 03:53:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 43916 <at> debbugs.gnu.org (full text, mbox):
>>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
>> One must be wrong. They can't both be correct. I just don't know which.
>> Or maybe both aren't correct. Anyway their syntax can't be that
>> different.
LI> Sure they can -- they're different languages, even if they use the same
LI> symbols.
OK but that doesn't explain the inconsistencies within the same language seen.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Mon, 19 Oct 2020 07:58:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 43916 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> OK but that doesn't explain the inconsistencies within the same language seen.
The $ is the same colour in Perl mode, so you'll have to be more
specific about what inconsistencies you're referring to.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Tue, 20 Oct 2020 11:42:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 43916 <at> debbugs.gnu.org (full text, mbox):
>>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
>> OK but that doesn't explain the inconsistencies within the same language seen.
LI> The $ is the same colour in Perl mode, so you'll have to be more
LI> specific about what inconsistencies you're referring to.
All I know is in perl mode,
$$, $@, $bla
BB, BB, BTTT (Black, Tan)
So it should be
BT, BT, BTTT like Shell-script mode,
or
BB, BB, BBBB
or
TT, TT, TTTT.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Wed, 21 Oct 2020 06:26:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 43916 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
On Tue, Oct 20, 2020 at 6:42 AM 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> wrote:
>
> >>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> LI> 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
>
> >> OK but that doesn't explain the inconsistencies within the same language seen.
>
> LI> The $ is the same colour in Perl mode, so you'll have to be more
> LI> specific about what inconsistencies you're referring to.
>
> All I know is in perl mode,
> $$, $@, $bla
> BB, BB, BTTT (Black, Tan)
>
> So it should be
> BT, BT, BTTT like Shell-script mode,
> or
> BB, BB, BBBB
> or
> TT, TT, TTTT.
I think what we have now makes sense. I've tried to attach a
screenshot of a -Q session but with (setq cperl-hairy t)
In essence, what I think I see is that cperl will color the whole
array or hash variable including the @ or % sigil when it used as
such, however, when a sigil is used to dereference only sigils is
colored for the hash or array - the scalar being derefered is colored
per scalar (e.g. tan). This is perhaps the most immediately obvious
difference between perl and cperl-mode and probably a big part of why
I think that cperl provides much better visual feedback than
perl-mode. (As an aside, I've long wondered if there are people who
perl-mode to cperl-mode and if disagreement about this drives that
preference.)
One thing I could wish for is that scalars used within hash and array
access would be colored just as they are otherwise, e.g. using the tan
color for the $scalar in $arr[$scalar] and $hash{$scalar}.
Otherwise I'm pretty happy; I've not found a better Perl editing
experience than Emacs cperl-mode.
Thanks for your work on this feature!
Corwin
[emacs_4h1pZBfvyO.png (image/png, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43916
; Package
emacs
.
(Wed, 21 Oct 2020 22:47:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 43916 <at> debbugs.gnu.org (full text, mbox):
That's great about cperl mode.
I was just talking about the default modes that emacs
chooses for
$ emacs fileA.sh fileB.pl
This bug report was last modified 4 years and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.