Skip to main content

Questions tagged [lines]

The tag has no usage guidance.

2 votes
1 answer
42 views

How to remove trailing '$' character

I'm very new to Emacs. Emacs renders all lines with $ appended. I want to remove them. I think Emacs is visualizing a new line character as $, so I searched for options related to newline or ...
nuron's user avatar
  • 21
0 votes
1 answer
51 views

alphanumeric sort of a region

Assuming your buffer content is similar to this: x1_y1_text_x3_y1 x1_y1_text_x3_y10 x1_y1_text_x3_y11 x1_y1_text_x3_y12 x1_y1_text_x3_y2 x1_y1_text_x3_y3 x2_y1_text_x3_y20 .... how to get the region ...
Clement's user avatar
0 votes
1 answer
72 views

evil-delete-line deletes hidden children in org-mode

Calling evil-delete-line from a headline is deleting hidden children. Same behavior with evil-change-line. On a collapsed outline tree how can I delete from the cursor to the end of line while keeping ...
cochrane12's user avatar
1 vote
1 answer
34 views

What is the default value of TRY-VSCROLL in `(previous-line &optional ARG TRY-VSCROLL)`?

The documentation shown with Ctrl h k up states: <up> runs the command previous-line (found in global-map), which is an interactive byte-compiled Lisp function in ‘simple.el’. It is bound to C-...
oOosys's user avatar
  • 475
1 vote
1 answer
82 views

delete backwards until indentation

In my config I have (bind-keys* ("C-<backspace>" . (lambda () (interactive) (kill-line 0)))) which deletes the entire line backwards until column position 0. I would like to only ...
CD86's user avatar
  • 573
0 votes
1 answer
17 views

Count unhidden lines from hide-lines?

I want to count the number of lines shown with hide-lines-matching. count-lines seems to return the wrong number. (length hide-lines-invisible-areas) seems to be related in that we hide the regions ...
Att Righ's user avatar
  • 775
0 votes
1 answer
104 views

Undo one specific line in a text file within Emacs

Usually when doing the normal undo it will undo all code changes since you went into insert-mode (for me it's evil-undo). I was wondering if it were possible to implement a function that will only ...
Finbar Cowan's user avatar
0 votes
2 answers
139 views

Sorting lines based on numbers in unicode

I want to sort some text in emacs that is based on a field that contains verse numbers in unicode (devanagari). The text is like this: Verse text bla १०.३ #10.3 Verse text blah This is १.१९ #1.19 ...
linuxfan's user avatar
  • 209
2 votes
1 answer
226 views

Unrestricted movement of lines Alt-Up/Down

I'm learning Orgmode and moving lines (headers, checkbox items) up and down. These movement are restrited to a tree part of the line (header section, checkbox list): * Here is a list - Item 1 - Item ...
Evgeny's user avatar
  • 133
2 votes
3 answers
280 views

Show only one or two lines of a buffer

I need to check numbers in a buffer each on a line against an external paper sheet To make this easier I would like to make the window very narrow to see only one (or max. two) lines. However shrink-...
halloleo's user avatar
  • 1,355
1 vote
1 answer
1k views

How to get line number for a given buffer position in a performant way?

I have list of buffer positions and I want to get the numbers of the lines at those positions. Is there a better way to do that then using with-current-buffer, goto-point and get-thing-at-point 'line? ...
jm4562's user avatar
  • 99
3 votes
3 answers
606 views

Delete duplicate lines, with partial match

Sample text: This is first line.a This is over_second line. This is over_fourth line. This is third line. This is over_fourth delete it. This is over_fourth and one more. This is over_second with ...
msinfo's user avatar
  • 177
0 votes
1 answer
136 views

Is arbitrary buffer position at the beginning of a line?

What's the simplest way to check whether a given point value p is at the beginning of some line or not? Is there anything simpler than (save-excursion (goto-char p) (= p (point-at-bol))) or (member (...
Lassi's user avatar
  • 377
17 votes
2 answers
8k views

How to count the number of lines in the region?

Is there a command similar to count-words-region to count the total number of lines of a selected region?
Name's user avatar
  • 7,935