Questions tagged [perl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

perl-mode brace indentation

How can I get perl-mode to indent: func({ foo => 'bar', }); as func({ foo => 'bar', }); without switching to cperl-mode?
marcantonio's user avatar
1 vote
1 answer
51 views

Minimizing imenu for cperl mode

Suppose we have a Spec_pages.pm file that looks like this: package WWW::Spec_pages; sub new sub get_news sub spec_page sub spec_page_subtype When I run M-x imenu, I get this: *Rescan* +Unsorted.List+...
user4035's user avatar
  • 1,059
1 vote
0 answers
42 views

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's user avatar
  • 818
0 votes
1 answer
45 views

Show line at opening brace when cursor is after the closing brace (Perl)

Something I like in Emacs is positioning the cursor after the closing brace/paren highlights the opening brace/paren. Even better, like in Emacs-Lisp mode, the opening ( line is displayed in the ...
Déjà vu's user avatar
  • 143
1 vote
2 answers
56 views

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 ...
Bion Pohl's user avatar
0 votes
1 answer
233 views

perl-mode indentation continuation

$defs = { "key1" => 1, # indented correct with tab "key2" => 2, # indented too much, should align with key1 "key3" => 3, # keeps indentation from here on }; With ...
Niels Larsen's user avatar
1 vote
0 answers
84 views

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 ...
huckfinn's user avatar
  • 115
1 vote
0 answers
32 views

mmm-mode strange behavior with perl-shell-script

Background: I've been working with a program that is about half Bash and half perl. I thought I'd give mmm-mode a try since it sounded like just the mode for me. I don't know lisp well enough to be ...
Erik Bennett's user avatar
2 votes
2 answers
255 views

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 ...
rajudev's user avatar
  • 163
1 vote
1 answer
149 views

How can I use Flycheck on Perl code that installs its dependencies with Carton?

Perl module dependency manager Carton installs dependencies into a subdirectory of the project directory, and expects perl to be run under carton exec to set the necessary environment variables to ...
mavit's user avatar
  • 211
3 votes
2 answers
636 views

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-...
nc.'s user avatar
  • 171
3 votes
1 answer
251 views

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: ...
Sean's user avatar
  • 939
2 votes
1 answer
503 views

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 ...
Frank Stallone's user avatar
2 votes
1 answer
269 views

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 ...
roadrider's user avatar
  • 123
1 vote
3 answers
164 views

Disable loop completion when programming perl

When I type a loop keyword (for, while, do) in perl program, emacs automatically inserts brackets and parenthesizes to complete the loop structure. I would like to disable this but I'm not sure what ...
gogators's user avatar
  • 153
1 vote
0 answers
38 views

Cperl font lock regions in here docs

I am having a problem in cperl-mode described in this question. Basically inserting a newline at the start of a line in here doc in cperl-mode is breaking the syntax highlighting. One of the answers ...
Prgrm.celeritas's user avatar
1 vote
2 answers
135 views

Cperl-mode syntax highlighting breaks when inserting a newline into a here doc

in cperl-mode, here docs are colored with a font-lock-string-face. However if you used any function that inserts a newline on a blank line (e.g. M-: (insert "\n")) it will cause all code after the ...
Prgrm.celeritas's user avatar
3 votes
1 answer
458 views

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-...
Prgrm.celeritas's user avatar
3 votes
1 answer
258 views

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 ...
Prgrm.celeritas's user avatar
2 votes
0 answers
51 views

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,...
DiamondGeezer's user avatar
5 votes
3 answers
152 views

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....
s_m's user avatar
  • 51
1 vote
1 answer
2k views

How to convert a MULE encoded file to UTF-8?

I am trying to modify a buffer written by desktop-save to a file. The file is named .emacs.desktop and I am trying to modify it from a Perl script. It turns out that it is saved in emacs-mule encoding....
Håkon Hægland's user avatar
1 vote
1 answer
142 views

perl syntax highlighting disactivated

I'm using emacs for perl scripting and for some unknown reason the syntax highlighting is inactivated when opening new or existing scripts. I'm wondering if I press a key unknowingly that ...
yahan's user avatar
  • 71
1 vote
0 answers
100 views

Read string at current cursor position instead of in minibuffer

I am trying to simplify user input of Pod formatting sequences in cperl-mode. For example, if you type C<hello>, C<> is a Pod formatting sequence for entering code, similar to the use of ...
Håkon Hægland's user avatar
2 votes
1 answer
463 views

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 ...
Håkon Hægland's user avatar
7 votes
1 answer
420 views

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 ...
Håkon Hægland's user avatar
3 votes
1 answer
79 views

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 ...
Håkon Hægland's user avatar