From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Emanuel Berg via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: a short comment to mark the occasion Date: Wed, 08 Apr 2020 05:57:55 +0200 Message-ID: <87lfn6sk70.fsf@ebih.ebihd> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="92177"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:M+Lv8LKYTjEx1ZqfjlN4pAehZCU= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 08 05:58:25 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jM1r5-000NrJ-R1 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Apr 2020 05:58:23 +0200 Original-Received: from localhost ([::1]:55722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM1r4-0003mL-SW for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 07 Apr 2020 23:58:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43918) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM1qn-0003m6-JS for help-gnu-emacs@gnu.org; Tue, 07 Apr 2020 23:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jM1qm-0005hc-Hl for help-gnu-emacs@gnu.org; Tue, 07 Apr 2020 23:58:05 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:49784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jM1qm-0005gc-CD for help-gnu-emacs@gnu.org; Tue, 07 Apr 2020 23:58:04 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jM1qk-000NTF-2y for help-gnu-emacs@gnu.org; Wed, 08 Apr 2020 05:58:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122764 Archived-At: 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