Quantcast

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
Hi,
     Essentially "cperl-mode" has long surpassed "perl-mode" within
the Perl community. The fact that perl-mode is the default is a
barrier to encouraging emacs use within the Perl community.

I was informed that I should post this as a bug here after I made the
following enquiry to the emacs developer mailing list:


"As an emacs evangelist in the Perl community I like to give
peopleadvise on how to get started using emacs for Perl
development.Unfortunately step 1 is to tell them that whilst the
standard emacsperl-mode isn't very good, it can be easily be swapped
for the vastlysuperior cperl-mode via a quick modification to their
.emacsfile... Getting them start hacking around in their configuration
filesisn't always the best start for people who are trying emacs for
thefirst time.
After a recent debate on the Perl subreddit I thought I'd come and
atleast ask the question: What are the chances of changing the
defaultemacs mode for Perl to cperl-mode? I realise that changing such
thingsfrom underneath users is probably something which you don't
undertakelightly, but cperl-mode seems to be mature and also the
establishedfavourite with developers, so I'd say there is a strong
case for this."
If this was the wrong follow-up course of action I apologise.

Thanks,
  Joe



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Richard Stallman
The reason I did not make cperl mode the default, years ago, was that some
users preferred the older perl mode.  They thought cperl had some drawbacks.
And the author of cperl mode was unwilling to fix them.

I don't recall what those drawbacks were -- I never used Perl -- and I
don't know if this is still true.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use free telephony http://directory.fsf.org/category/tel/



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
On 2 February 2012 13:25, Richard Stallman <[hidden email]> wrote:

> I don't recall what those drawbacks were -- I never used Perl -- and I
> don't know if this is still true.

Although this is far from a scientific survey, the discussion which lead to
this bug (which took place on the perl reddit group) seemed to show that
most people now use cperl-mode over perl-mode. And there was some
discussion of the fact that the default of perl-mode was a barrier to new
users getting the best experience.

I could attempt to post in Perl spaces and see if anyone knows what
the shortcomings of cperl-mode might be. Perhaps there will be some
people who remember the orignal concerns were, and whether they were
ever addressed.

Thanks,
  Joe.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Ted Zlatanov
In reply to this post by draxil
On Thu, 2 Feb 2012 13:59:39 +0000 joe higton <[hidden email]> wrote:

jh> On 2 February 2012 13:25, Richard Stallman <[hidden email]> wrote:
>> I don't recall what those drawbacks were -- I never used Perl -- and I
>> don't know if this is still true.

jh> Although this is far from a scientific survey, the discussion which lead to
jh> this bug (which took place on the perl reddit group) seemed to show that
jh> most people now use cperl-mode over perl-mode. And there was some
jh> discussion of the fact that the default of perl-mode was a barrier to new
jh> users getting the best experience.

jh> I could attempt to post in Perl spaces and see if anyone knows what
jh> the shortcomings of cperl-mode might be. Perhaps there will be some
jh> people who remember the orignal concerns were, and whether they were
jh> ever addressed.

I've been using cperl-mode for a while, and it has many enhancements
over perl-mode.  Ilya's version has diverged from the cperl-mode in GNU
Emacs, though, and I believe Ilya's version has a slight edge.  I
brought that up:

http://thread.gmane.org/gmane.emacs.devel/115635/focus=115643

http://thread.gmane.org/gmane.emacs.help/67570/focus=67653

Ilya has not followed up on emacs-devel and neither side seems
interested in an ongoing synchronization.

Ted




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
> I've been using cperl-mode for a while, and it has many enhancements
> over perl-mode.  Ilya's version has diverged from the cperl-mode in GNU
> Emacs, though, and I believe Ilya's version has a slight edge.

We've sync'd Ilya's cperl-mode in the past.  If it needs to be updated,
it can be sync'd again (AFAIK, the two cperl-mode versions have
slightly diverged, indeed, but not that much: we try to keep our local
changes small).

BTW, this "problematic maintainership" is one hurdle to making
cperl-mode the default Perl mode, indeed.  That's one of the reasons why
I've invested some time to improve perl-mode (even tho I don't use it
myself).


        Stefan



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
After posting to here I posted questions regarding this to comp.lang.perl.misc and comp.emacs . I got very little response, apart from an anecdotal report that the maintainer was stuck on emacs 18 and refused to update his code.

I would say that my personal experience, and that of the people in the more active perl community spaces which I have consulted, the stock version of cperl-mode included in the emacs distribution is still far superior to the default perl-mode.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
> I would say that my personal experience, and that of the people in the more
> active perl community spaces which I have consulted, the stock version of
> cperl-mode included in the emacs distribution is still far superior to the
> default perl-mode.

The main problem is that the cperl-mode code's maintainership has some
problems (poor communication and some disagreements between Ilya and the
Emacs team).

Also, missing from your request is concrete reasons, other than "it
seems to be more popular".


        Stefan



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
Well the main problem is, we as emacs favouring perl people, want to be able to say with confidence "use emacs for Perl, it's really good" and not "use emacs for Perl, it's really good! But first you need to make these changes to your .emacs file". Obviously those of us in the know are fine, but we're trying to improve the experience for others.

If that's not a good enough reason to upset the apple cart I will happily crawl back under my rock. It's just a shame not to be able to evangelise on a level playing field with advocates for other editing solutions.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
Oh, I see that maybe you were asking more specifically about the reasons for cperl-mode being a better replacement?

Last time I used perl-mode *was* a long time ago, but it had broken syntax highlighting and things like indentation couldn't take account of perl syntax very well.

Perhaps I should try and look at the latest perl mode for a fair comparison, and or to remember what else I hated and whether any of it is still true.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Glenn Morris-3
draxil wrote:

> Last time I used perl-mode *was* a long time ago, but it had broken syntax
> highlighting and things like indentation couldn't take account of perl
> syntax very well.

This is all very vague.

From a maintenance point of view, cperl-mode.el is 9 times longer than
perl-mode.el. You may say "it's 9 times better", but to me it seems
overly complicated. This, plus the fact that we effectively are not
allowed to ever simplify away any of the huge amount of compatibility
cruft for ancient Emacs versions (Emacs 19!) that it contains, makes it
much less appealing as a default from that viewpoint.

I think you are much more likely to get a response by filing specific
bug reports about areas where perl-mode.el is lacking.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Glenn Morris-3
In reply to this post by Stefan Monnier
Stefan Monnier wrote:

> The main problem is that the cperl-mode code's maintainership has some
> problems (poor communication and some disagreements between Ilya and the
> Emacs team).

Note that there does not seem to have been an upstream release for ~ 4+
years, AFAICS. The traditional upstream location is 403 today, but
exists in search engines caches.
A braver man than I has already forked it some years ago;
https://github.com/jrockway/cperl-mode

(I'm not volunteering to do anything! :) )



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
In reply to this post by draxil
> Last time I used perl-mode *was* a long time ago, but it had broken syntax
> highlighting and things like indentation couldn't take account of perl
> syntax very well.

Syntax highlighting has been improved significantly.  It's not as gaudy
as cperl-mode, but in terms of not-getting-confused it's not too far
from cperl-mode, in my experience.  Of course, I'm biased, since I wrote
all that perl-mode syntax-highlighting code.

> Perhaps I should try and look at the latest perl mode for a fair comparison,
> and or to remember what else I hated and whether any of it is still true.

I don't have much time to devote to it, but I generally try to fix bugs
in perl-mode (especially syntax-highlighting and indentation ones), and
I'm willing to try to retrofit specific cperl-mode features into it.


        Stefan



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
In reply to this post by Glenn Morris-3
>> The main problem is that the cperl-mode code's maintainership has some
>> problems (poor communication and some disagreements between Ilya and the
>> Emacs team).
> Note that there does not seem to have been an upstream release for ~ 4+
> years, AFAICS.  The traditional upstream location is 403 today, but
> exists in search engines caches.
> A braver man than I has already forked it some years ago;
> https://github.com/jrockway/cperl-mode

Let me put it some other way:

If/when someone is willing and able to take over maintenance of
cperl-mode (starting with cleaning up the Emacs-19-style-code-cruft),
then I might consider switching the default to cperl-mode.

But it might be easier to start from perl-mode and add cperl-mode chunks
to it.


        Stefan



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

draxil
Thanks, that sounds very reasonable. I'll try and get myself some guinea pig time working with perl-mode and see if I can persuade others to do the same. Then we can provide more specific & constrictive feedback on perl-mode in it's current guise.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Glenn Morris-3
In reply to this post by Stefan Monnier

Is cperl-mode.el in Emacs still not to be modified?
If someone reports a bug in cperl-mode can it be fixed without deferring
to upstream?
(I have no interest in modifying it, but in the past you've basically
said not to change it, IIUC.)



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
> Is cperl-mode.el in Emacs still not to be modified?

Yes.

> If someone reports a bug in cperl-mode can it be fixed without deferring
> to upstream?

Depends on the specific bug.

> (I have no interest in modifying it, but in the past you've basically
> said not to change it, IIUC).

That hasn't changed.  And it won't change until either our cperl-mode is
considered the upstream, or until there's a good two-way sync going on
between the upstream and our version.


        Stefan



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Richard Stallman
In reply to this post by draxil
ISTR that I polled the users once about whether to make CPerl mode the
default for Perl programs, but they were not in favor of the change.

Of course, things may be different now.  But this is the sort of thing
it is good to poll the users about.

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Jonathan Rockway
In reply to this post by Stefan Monnier
Cleaning up the cruft sounds like a good idea.  I will play around with that in the next few days and let you know how it goes.

(I'm somewhat surprised that anyone uses perl-mode; cperl-mode is ... interesting code-wise, but it does work really, really well.)

On Thu, Oct 25, 2012 at 2:25 PM, Stefan Monnier <[hidden email]> wrote:
>> The main problem is that the cperl-mode code's maintainership has some
>> problems (poor communication and some disagreements between Ilya and the
>> Emacs team).
> Note that there does not seem to have been an upstream release for ~ 4+
> years, AFAICS.  The traditional upstream location is 403 today, but
> exists in search engines caches.
> A braver man than I has already forked it some years ago;
> https://github.com/jrockway/cperl-mode

Let me put it some other way:

If/when someone is willing and able to take over maintenance of
cperl-mode (starting with cleaning up the Emacs-19-style-code-cruft),
then I might consider switching the default to cperl-mode.

But it might be easier to start from perl-mode and add cperl-mode chunks
to it.


        Stefan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Merten
In reply to this post by Richard Stallman
3 days ago Richard Stallman wrote:
> Of course, things may be different now.  But this is the sort of thing
> it is good to poll the users about.

From my `.emacs`:

     (defalias 'perl-mode 'cperl-mode)

So: +1 for using `cperl-mode' as the default.


                                                Grüße

                                                Stefan

attachment0 (315 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#10688: The default mode for Perl should be cperl-mode instead of perl-mode

Stefan Monnier
In reply to this post by Jonathan Rockway
> (I'm somewhat surprised that anyone uses perl-mode; cperl-mode is ...
> interesting code-wise, but it does work really, really well.)

perl-mode is the default, so you can expect many people to use it.
Also, I stick to perl-mode (for the few times I use Perl) because it is
the default (dog-fooding and things like that).

Also the perl-mode was more amenable to experimentation (I used it as
a play ground for the fancier syntactic fontification, e.g. it was
a large part of the motivation for font-lock-syntactic-face-function).


        Stefan



12
Loading...