New answers tagged

2

Here's an example of using format as well as performing both sets of replacements in a single pass by matching a regular expression: (goto-char (point-min)) (while (re-search-forward "\\(KR-?\\)MET" nil t) (replace-match (format "%s%d" (match-string 1) r) nil t)) Or adapting your concat approach: (concat (match-string ...


0

OK, here's what I am working with right now: (defun org-execute-file-search-in-fortran (s) "Find the link search string S as a key. May be a regex." (when (eq major-mode 'f90-mode) ;; Yes, we want to do the search in this file. (goto-char (point-min)) (if (string-match "^/\\(.*\\)/$" s) (progn ;; A regular ...


0

Not 100% sure if I understand your question, but you may want to try setting (setq outline-blank-line t). Non-nil means to leave unhidden blank line before heading.


0

If I were doing this as a one-time task, not expected to be done again, I would use keyboard macros with ordinary search (no regexps). It seems easiest to do it in two steps. First make sure there is one empty line before and after headers, and then change it to two before the main headers. So first f3 Define a macro C-s C-j # C-a ...


Top 50 recent answers are included