Skip to main content
57 votes

How can I get a ruler at column 80?

Are there any better alternatives? Emacs 27 (officially released 2020-08-11) added support for a fill-column indicator natively by way of the buffer-local minor mode[1] display-fill-column-indicator-...
Basil's user avatar
  • 12.6k
6 votes

Looking for a shortcut to select the function/method at point

Emacs calls a function definition a “defun”, because defun is the keyword¹ that starts a function definition starts in Lisp. Commands to move by defuns use the modifiers Ctrl+Alt: C-M-a and C-M-e to ...
Gilles 'SO- stop being evil''s user avatar
4 votes
Accepted

How can I have a bracket guide when programming?

It's based more on indentation level than "brackets", but does DarthFennec/highlight-indent-guides provide what you're looking for? From the README: This minor mode highlights indentation ...
nega's user avatar
  • 3,411
4 votes
Accepted

org-mode and export programming

I don't think you can do exactly what you want. But there are a few options that come close. If you don't want the source block included in your output, you can do this with the following block: #+...
Tyler's user avatar
  • 22.8k
3 votes
Accepted

Using Emacs to find and copy relevant database records

While, as others have pointed out, other tools might be more suitable for this job, it can certainly be done with Emacs. 1.9GB is not an unreasonably large file size for Emacs to handle on a somewhat ...
orgtre's user avatar
  • 1,130
3 votes
Accepted

Looking for a shortcut to select the function/method at point

See this part of the manual. Marking with C-M-h should work just fine. This runs mark-defun and marks the complete current function definition around point. Some nifty details: If your mark was ...
fpiper's user avatar
  • 491
2 votes

How can I build a regexp insensitive to case?

I have exactly the same issue in a different language (but similarly odd, from the sound of it). Let's start with a single keyword to match: "write" You can build up a solution starting with ...
mattsilver's user avatar
2 votes

Disable loop completion when programming perl

cperl creates abbreviations for perl keywords into ~/.emacs.d/abbrev_defs that trigger function cperl-electric-keyword that does the expansion. To remove the offending entries, call M-x edit-abbrevs, ...
Heikki's user avatar
  • 3,096
2 votes

Using Emacs to find and copy relevant database records

I am sharing my solution mainly for the comparison with AWK (see comments under NickD's answer), but also because it takes a slightly different approach than the solution by @orgtre: This solution '...
dalanicolai's user avatar
  • 7,985
1 vote

Is there a way to make dynamical representations of a visual type within emacs without the use of xwidgets?

Your question is not really answerable, but I’ll give you some background information. Emacs buffers can already display graphics. These can be raster graphics in several formats (such as gif, jpeg, ...
db48x's user avatar
  • 19.1k
1 vote

Using Emacs to find and copy relevant database records

Using Emacs for this problem is just not a good way to go about it. You can learn enough about awk in a few hours to deal with such problems and the advantage is a short program that runs relatively ...
NickD's user avatar
  • 33.6k
1 vote

Looking for a shortcut to select the function/method at point

I think I found it. Use C-M h, which is bound to mark-defun. The beauty of it is that it works not only on JavaScript, but also on Python, Elisp, or seemingly any other language. I found the solution ...
kotchwane's user avatar
  • 533
1 vote
Accepted

Tools to develop and debug ELISP code

Here is the beginnings of a list of useful techniques culled from the comments. Please add any others that you find useful by editing this answer: The elisp analog of sprinkling printfs in a program ...
1 vote

Looking for a shortcut to select the function/method at point

Install evil, evil-matchit, then press %. It supports many programming language, not just javascript. It can be extended easily by user to support new syntax and new languages.
chen bin's user avatar
  • 4,957
1 vote

Retracing steps with emacs (When programming /exploring)

Yes, Emacs bookmarks are a good answer for getting back to places later (and for restoring contexts later). But that means that you need to create a bookmark, e.g., perhaps guessing that you might ...
Drew's user avatar
  • 79.1k
1 vote
Accepted

How do I prevent backups of scripts from being made executable?

The variable backup-directory-alist tells emacs where to save the backups. Adding the following to your init file will set its value only if the executable bit is set. (defun make-executable-backup-...
matteol's user avatar
  • 2,088
1 vote
Accepted

Automatically break long function signatures, calls, etc

I've had good luck with multi-line which, without configuration, allows you to cycle through different white space policies with a single repeated key press. (use-package "multi-line" :bind ("C-;"))...
InHarmsWay's user avatar
  • 1,339
1 vote

Automatically break long function signatures, calls, etc

CC mode provides for automatically filling text in comments and strings out-of-the-box. See the description in the manual: Filling and Breaking By default, filling in CC mode ignores code. If you ...
Tyler's user avatar
  • 22.8k
1 vote
Accepted

Disable loop completion when programming perl

Since it looks like cperl-mode always rewrites its abbreviations, my previous answer is not a long term solution. A better solution is to run a hook after cperl has been loaded and redefine the cperl-...
Heikki's user avatar
  • 3,096
1 vote

Rearranging whitespace in sexps

You can use the command special-lispy-alt-multiline from abo-abo's lispy. In lispy-mode, it is bound to M. There is also a special-lispy-oneline command bound to O. If you are not familiar with lispy,...
Omar's user avatar
  • 4,852
1 vote

Rearranging whitespace in sexps

I "translate" manual steps into Emacs Lisp. It works in the following demos but it is not reliable (that is, it will produce unexpected results or even block your Emacs, if you run the commands at the ...
xuchunyang's user avatar
  • 14.8k
1 vote

How to make a Customize setting depend on another? or make a `setq` depend over a Customize setting?

Take a look at the keywords for defcustom: In particular, :set allows you to specify a function for setting the value of a variable. This means you can set the value of a variable based on that of ...
Tianxiang Xiong's user avatar
1 vote

How can I get a ruler at column 80?

Updated Answer Since Emacs 27, use display-fill-column-indicator-mode. In practice, one may utilize it by toggling the mode with a custom keybinding, like shown below: ;; Mnemonics: `b' Buffer, `i' ...
Y. E.'s user avatar
  • 817
1 vote

How can I get a ruler at column 80?

In Spacemacs this functionality is easily toggled using SPC t f. I'm not sure exactly how it is implemented but Spacemacs seems to use the fill-column-indicator package (defined in the .emacs.d/...
dalanicolai's user avatar
  • 7,985
1 vote

How can I get a ruler at column 80?

Since fill-column-indicator is quite heavy, this solution shows a character to the right of the current line. So when you're typing you can see the line limit before you exceed it. This defines the ...
ideasman42's user avatar
  • 9,157

Only top scored, non community-wiki answers of a minimum length are eligible