Questions tagged [newlines]
The newlines tag has no summary.
69 questions
0 votes
2 answers
97 views
Using open-line with a negative argument?
When you type C-o (open-line), it opens a newline without moving the point; with a positive prefix, it opens that many newlines. I expected that you can give the command a negative argument and then ...
0 votes
1 answer
65 views
In an Elisp regexp, does anchor `^` not work with new line in front?
In an Elisp regexp, when I want to specify a pattern across two consecutive lines, I found that ^J^.* (^J is new line, and ^ is anchor of the beginning of a line) doesn't work, but ^J.* works. I was ...
0 votes
1 answer
54 views
Is the '$' (end of line anchor) somehow concurrent with the '\n' (newline)? Please explain these results
In normal regex, I would expect the following to be true: (should (equal (string-match "^abc$\nx" "abc\nx ") 0)) ;; nope! nil (should (equal (string-match "^abc\n$x" &...
0 votes
1 answer
218 views
Add "carriage returns" (extra line) after all entries in document [examples added]
I've noticed that Emacs will preserve an extra line (carriage return) between items, but if I manually edit the file, this extra spacing can fall apart. For example, I've found that entries need 2 ...
1 vote
1 answer
64 views
Search and replace to merge or eliminate text lines
A WinRAR command (rar vt -pmypassword -v myarc.part01.rar >source.txt) produces detailed information on files contained in .rar files or segments (e.g., filename.part01.rar). Here's an example for ...
0 votes
0 answers
43 views
Using terpri to insert newlines in buffer
I am using (insert "\n") to insert a newline in a specified buffer. Is this the recommended way to do it? I have seen (terpri) but cannot get it to make a newline. (defun fire-clock (bufrn)...
0 votes
1 answer
63 views
Newlines when using message
Is this the way to add newlines to message string? (message "Some string \n Another string")
2 votes
1 answer
75 views
How can I make isearch match phrases across line breaks?
Suppose I have a text document (e.g. org-mode, Markdown, etc.) in which I would like to search for the phrase "hello world". Unfortunately, if paragraphs in this document are filled (e.g. ...