Questions tagged [programming]

39 questions
113
votes
9 answers

How can I get a ruler at column 80?

As a programmer, I want to see a ruler at a specific column (usually 80), both so I see when I cross that column, but also to see how close I am getting to it so I can reformat my code early. The options I have found so far are all not achieving…
Jorgen Schäfer
  • 3,899
  • 2
  • 17
  • 19
20
votes
3 answers

Track "TODO" items when writing code

Is there an easy way to create a list of "to-do" items on-the-fly when writing code? For example, suppose that I am writing a function write-this-now when I realize that I am also going to need to write a support function write-this-later. (defun…
nispio
  • 8,175
  • 2
  • 35
  • 73
15
votes
9 answers

How to edit elisp without getting lost in the parentheses

I'm modifying some elisp code from linum.el: (custom-set-variables '(linum-format 'dynamic)) (defadvice linum-update-window (around linum-dynamic activate) (let* ((w (length (number-to-string (+ (count-lines (point-min) (point-max)) 1)))) …
Zhro
  • 359
  • 3
  • 11
12
votes
2 answers

Display the beginning of a scope when it is out of screen

I would like to display the opening part of a scope when this one get out of screen. Example: namespace a { ... --------------------- <- display frame ... | }* | * when cursor is here display "namespace a"…
log0
  • 320
  • 2
  • 8
8
votes
2 answers

How to integrate SLIME with MIT Scheme?

I know basics of Common Lisp. I've learned it using Emacs + SLIME, and I must say that without these two I wouldn't learn too much - using bare REPL is tough job. However, SLIME makes a great job at turning REPL into great environment for…
MatthewRock
  • 1,453
  • 13
  • 27
8
votes
1 answer

How should comint-derived modes keep track of buffers and processes?

Having written a couple of custom comint-derived modes, I often find it tricky to decide how to keep track of buffers and processes: for instance, to associate different source buffers with different interpreters. Is it better to keep a reference…
user1968
7
votes
3 answers

How can I build a regexp insensitive to case?

I have a bunch of keywords: set write quit which each can be shortened down to one letter: s se set w wr wri writ write q qu qui quit Further, these keywords are case-insensitive, so the following are added to the mix: s S se sE Se SE ... w W…
Sean Allred
  • 6,861
  • 16
  • 85
5
votes
4 answers

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

I have this problem in JavaScript, but I understand the solution to it could be more general. My cursor (point) is on the name -or on the body- of a function, like this : function test() { // My cursor is here or anywhere between "function" and…
kotchwane
  • 481
  • 2
  • 12
5
votes
1 answer

Show current function in header line

I have used a package before which used the header line to show the name of the current function being edited. Whatever package it was, I don't have it installed now. What are my options for getting this sort of functionality? How can I have a…
nispio
  • 8,175
  • 2
  • 35
  • 73
5
votes
2 answers

How to show startup screen instead of scratch, when no file is opened?

Like a lot of people I think I activated inhibit-startup-screen because it’s ugly and tedious to always have your emacs horizontally split when you open a file with half taken by an useless startup screen… But I notice I find it better/more…
galex-713
  • 245
  • 2
  • 8
5
votes
1 answer

Display function arguments in echo area?

Is there a package to let emacs display the parameters of a function while typing? For example, if I were to start typing printf( in C, I would like it to display the format taken from man pages, kinda like auto-completion, but without actually…
CodeSammich
  • 365
  • 3
  • 12
4
votes
1 answer

Sleep until predicate is true

I want to sleep until a predicate is true, without blocking the rest of Emacs from executing. For example: (defun clock-striking-one-p () (eq clock 1)) (defun hickory-dickory-dock () (run-up-clock) (sleep-until clock-striking-one-p) …
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
3
votes
1 answer

How can I have a bracket guide when programming?

What I am looking for is a guide to show what area of the code a set of brackets covers. I am not referring to highlighting the match between parentheses or brackets but instead outlining the field between those brackets as show in here: This image…
qKweint
  • 90
  • 6
3
votes
2 answers

Retracing steps with emacs (When programming /exploring)

Often when fixing a bug or implementing a new feature in a code repository, I start off with an investigatory step. For example, I would have a lead, a word such as "Article" and I would start by grepping the codebase for "Article". Suppose there…
american-ninja-warrior
  • 3,773
  • 2
  • 21
  • 40
3
votes
1 answer

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

If I edit an executable script, say foo.sh, then upon saving emacs makes the backup file foo.sh~. That's all well and good, but if the original file has the executable bit set, then so does the backup. This is a little annoying; is there a way to…
greatBigDot
  • 153
  • 3
1
2 3