From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6daf9368 for ; Sat, 19 Oct 2019 22:37:26 +0000 (UTC) Received: (qmail 698 invoked by alias); 19 Oct 2019 22:37:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24367 Received: (qmail 15949 invoked by uid 1010); 19 Oct 2019 22:37:17 -0000 X-Qmail-Scanner-Diagnostics: from bird.elm.relay.mailchannels.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25601. spamassassin: 3.4.2. Clear:RC:0(23.83.212.17):SA:0(-2.0/5.0):. Processed in 19.223583 secs); 19 Oct 2019 22:37:17 -0000 X-Envelope-From: pedz@easesoftware.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf1.mailchannels.net designates 23.83.212.17 as permitted sender) X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Hysterical-Continue: 20c7cfda4317b543_1571524581975_3277925323 X-MC-Loop-Signature: 1571524581975:1755610845 X-MC-Ingress-Time: 1571524581974 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=i73muTp/lBt0krsXoaJyvlgtJLuvIlmJ0/8k+XSB0y0=; b=MJLW7e55ClypUVxvh5PpUstRSw BAlHa5ub4w4ejAZnsYouZIb70zKBKh6qdR1PItFkINw9vSTp3DEB991cmRt5+b61m4pmEtFTf41zi OxxcA2Oyke6hB1LnfZz+9L885Z5W53dVW5Bp0cDuA6Ej+EdO5q10gq15iP4DCyxVje34LPku7IRc+ J2cW7cZAAldiBSb4IY3pktmq/STqNQxSt/pBA7eX7y7lPD0dl/PF86r1me/EAGtgt7nS2bmVGFVux 205FMkYt8uTts2wcCYlmsYApUSaDF4m3d2QEYt8LhvIzxcqLXckedF9wmZ6Q9y4ANdyyuZCAVE+ZZ FC7CT5/Q==; From: Perry Smith Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Subject: Searching zshall man page in emacs Message-Id: Date: Sat, 19 Oct 2019 17:36:14 -0500 To: zsh-users X-Mailer: Apple Mail (2.3594.4.19) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com On Catalina, M-x man zshall returns a buffer but it has been narrowed to the first zsh page. So, C-x n w needs to be done so you can search all of the text. On Catalina, the descriptions such as compadd or what does %D do or what does -a do in a conditional are all indented seven spaces. So, to help speed up finding these items, I wrote some emacs code. Its damn awkward to navigate but it uses the standard ways of doing things. (defun zsh-manpage-search-regexp (string &optional lax) "Returns a string to search for entries in the zshall man page" (format "\n[A-Z ]*\n \\{7\\}%s%s" string (if lax "" "\\_>"))) (isearch-define-mode-toggle zsh-manpage "z" zsh-manpage-search-regexp "\ Searching zshall man page for where a concept is described") I'm using emacs 27 (a nightly build) but I believe all this will work in emacs 26 as well. The least painful method of using is to first do man of zshall as usual. widen the region. I would also turn case folding off. Then start your search with the usual C-s. It seems least painful to type out the whole word but your mileage may vary. Then shift into "zsh-manpage" mode by typing M-s z and then another C-s will bring you to the first hit. There are usually only one or two hits. You are still in isearch mode so all the twelve billion special bindings in that mode are still in effect. This is basically just like dropping into "word mode" or "symbol mode" -- think of it as "search zshall man page mode" :-) And there is nothing restricting this to just the zshall man page but I have no idea if the pattern will work in other man pages. A trailing \_> is added to force a word boundary so if you are looking for "function" you don't find "functions". This can be "relaxed" (to use their term) by typing M-s SPC although that UI seems a bit hostile to me... With the distribution I'm running, it looks like you need to start back over with the search to get that to work. So now I can find where _approximate is described with only about ten seconds of finger gymnastics. Enjoy pedz