help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a short comment to mark the occasion


From: Emanuel Berg
Subject: a short comment to mark the occasion
Date: Wed, 08 Apr 2020 05:57:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

find or set a comment mark, with only one function to do
both things! Useful when you are proofreading/editing
a long document, e.g. a violent, immoral science fiction
novel featuring futuristic all-graphene sniper rifles
... and a hovercraft over an industrial swamp, where the
trajectory of the vehicle must be computed with the
outmost etc etc for the Kodak moment to appear... might
as well shoot - its not like a SINGLE BULLET ever
changed world history!

The comment style is LaTeX as it stands.

(defun find-here ()
  (interactive)
  (let ((start (point)))
    (goto-char (point-min))
    (let*((sign "%%%% hit123") ; change disaccording to need
          (hits (how-many sign (point-min) (point-max))) )
      (if (> hits 0)
          (progn
            (search-forward-regexp sign)
            (beginning-of-line)
            (recenter 1)
            (message "%d" hits) )
        (goto-char start)
        (insert sign) ))))
(defalias 'h #'find-here)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]