unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
@ 2020-10-10 23:04 積丹尼 Dan Jacobson
  2020-10-11  4:35 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-10 23:04 UTC (permalink / raw)
  To: 43916

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"





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-10 23:04 bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode 積丹尼 Dan Jacobson
@ 2020-10-11  4:35 ` Lars Ingebrigtsen
  2020-10-15 23:50   ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-11  4:35 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 43916

積丹尼 Dan Jacobson <jidanni@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-11  4:35 ` Lars Ingebrigtsen
@ 2020-10-15 23:50   ` 積丹尼 Dan Jacobson
  2020-10-16  5:07     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-15 23:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43916

>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-15 23:50   ` 積丹尼 Dan Jacobson
@ 2020-10-16  5:07     ` Lars Ingebrigtsen
  2020-10-18  3:52       ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16  5:07 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 43916

積丹尼 Dan Jacobson <jidanni@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-16  5:07     ` Lars Ingebrigtsen
@ 2020-10-18  3:52       ` 積丹尼 Dan Jacobson
  2020-10-19  7:57         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-18  3:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43916

>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-18  3:52       ` 積丹尼 Dan Jacobson
@ 2020-10-19  7:57         ` Lars Ingebrigtsen
  2020-10-19 15:29           ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-19  7:57 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 43916

積丹尼 Dan Jacobson <jidanni@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-19  7:57         ` Lars Ingebrigtsen
@ 2020-10-19 15:29           ` 積丹尼 Dan Jacobson
  2020-10-21  6:25             ` Corwin Brust
  0 siblings, 1 reply; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-19 15:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43916

>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> 積丹尼 Dan Jacobson <jidanni@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-19 15:29           ` 積丹尼 Dan Jacobson
@ 2020-10-21  6:25             ` Corwin Brust
  2020-10-21 22:45               ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 9+ messages in thread
From: Corwin Brust @ 2020-10-21  6:25 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: Lars Ingebrigtsen, 43916

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

Hi!

On Tue, Oct 20, 2020 at 6:42 AM 積丹尼 Dan Jacobson <jidanni@jidanni.org> wrote:
>
> >>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
> LI> 積丹尼 Dan Jacobson <jidanni@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

[-- Attachment #2: emacs_4h1pZBfvyO.png --]
[-- Type: image/png, Size: 25239 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
  2020-10-21  6:25             ` Corwin Brust
@ 2020-10-21 22:45               ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-21 22:45 UTC (permalink / raw)
  To: Corwin Brust; +Cc: Lars Ingebrigtsen, 43916

That's great about cperl mode.
I was just talking about the default modes that emacs
chooses for
$ emacs fileA.sh fileB.pl





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-21 22:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 23:04 bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode 積丹尼 Dan Jacobson
2020-10-11  4:35 ` Lars Ingebrigtsen
2020-10-15 23:50   ` 積丹尼 Dan Jacobson
2020-10-16  5:07     ` Lars Ingebrigtsen
2020-10-18  3:52       ` 積丹尼 Dan Jacobson
2020-10-19  7:57         ` Lars Ingebrigtsen
2020-10-19 15:29           ` 積丹尼 Dan Jacobson
2020-10-21  6:25             ` Corwin Brust
2020-10-21 22:45               ` 積丹尼 Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).