Questions tagged [perl]

27 questions
7
votes
1 answer

Use font-lock mode on only part of buffer

I am trying to add a comment feature to Pod documentation for Perl scripts, and I would like to highligh Pod comments with a special face. A simple prototype Perl script could be: #! /usr/bin/env perl use strict; use warnings; print "Hello\n"; # a…
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
5
votes
3 answers

Is there any setting in Emacs to choose perlbrew over perl?

I have a Perl project (developed in Ubuntu 14.04) which cannot be built on perl 5.18.2, but it works on Perlbrew 5.22.0. I have tried to use M-x perldb in Emacs but it looks like Emacs calls Perl 5.18.2 by default. Is there a way to choose Perlbrew…
s_m
  • 51
  • 3
3
votes
1 answer

Match Perl identifier using re-search

I am trying to match a Perl identifier at the point, like My::Module::dummy_func. I'd like to start simple and require a valid identifier as follows: restricted to a single line starts with a space ends with a ( So if point is at a colon in this…
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
3
votes
2 answers

How can I set my Flycheck Perl include path?

I am using Flycheck using use-package like so: (use-package flycheck :ensure t :init (global-flycheck-mode)) I followed https://randstructure.wordpress.com/2015/06/21/using-emacs-flycheck-with-perl-and-perlbrew/ and tried adding…
nc.
  • 171
  • 5
3
votes
1 answer

Electric indent not indenting closing brace in perl-mode

Starting with emacs -Q, I open a C file a.c and a Perl file a.pl. I turn on electric-pair-mode and electric-indent-mode in each. In a.c, I enter the following, where the | shows the cursor position: int foo() { if (bar) {|} } I press Enter and…
Sean
  • 929
  • 4
  • 13
3
votes
1 answer

modify syntax table for strings in perl modes

My company uses a version of Perl where you can define by binary number using something like my $var = 'b010110110; etc. Problem is both perl-mode and cperl-mode interpret ' as the start of the string and will apply a string font lock to everything…
2
votes
1 answer

How to get correct indentation for the closing parenthesis in cperl-mode?

I have problems with correct alignment of the closing parenthesis in cperl-mode. For example consider the following Perl code: my $a = func1( Module::test() ); my $b = func2( test() ); my $c = func3( Module::test(), ); We see that…
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
2
votes
2 answers

Perl script to fetch mail folders, for use with mbsync or offlineimap

I have been looking at various email setups using different tools within Emacs for the last few months. I looked at various email setups using Gnus, mew, mu4e, wanderlust etc. While reading one of the setups on some blog, I was trying to setup…
rajudev
  • 163
  • 6
2
votes
1 answer

Are there any Perl options for company mode?

The only code completion I've found was PlSense but as far as I can see the only options with Emacs using autocomplete among other dependencies. While I don't mind that if I can try to stick to doing my completions with as little dependency purpose…
2
votes
1 answer

perlcritic mode with cperl mode

I am trying to get the perlcritic minor mode (v 1.10) to work with the cperl mode. What happens is that the minor mode is activated for the buffer but is then deactivated. I've used edebug to try to figure out what's going on by instrumenting the…
roadrider
  • 123
  • 3
2
votes
1 answer

add a rule to syntax-propertize-rules

I have an issue outlined here that I was able to find a partial solution for. The problem involved changing perl-modes syntax table. One of the commenters pointed me to the function syntax-propertize-function. Within it, there is macro called…
2
votes
0 answers

Using hideshow with Perl code / POD

I've got emacs' HideShow mode working well with Perl code (let's face it, it's a doddle), but I don't know if it's even possible to get it to fold POD comments as well. Has anyone done this (and if so, how, please)? (Note: when asked about this on…
1
vote
0 answers

Emacs Mode to edit template toolkit files

Is there a mode to edit template toolkit files ? Web-Mode works decently, but maybe some modes can be combined to proved some specific Perl-editing-Funcitonality?
serv-inc
  • 816
  • 6
  • 26
1
vote
2 answers

How do I get the name of the file being executed in a perldb-mode-hook?

I've been adding some modifications to the perldb which goes through gud. When started it calls its perldb-mode-hook so that and .perldb is where I'm working. From within the hook I can get the buffer name which is in the form *gud-script.pl* and…
Bion Pohl
  • 11
  • 3
1
vote
0 answers

Emacs PDE seems to ignore PERL5LIB environmet variable to use @INC

I'm using emacs 26.3 under FreeBSD 12 environment and try to use PDE. My problem is that in the runtime environment the modules (@INC array) are properly addressed by the PERL5LIB variable. But using emacs and PDE or flycheck, flymake the local…
huckfinn
  • 113
  • 5
1
2