From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Zir6C2Nxol7pIgAA0tVLHw (envelope-from ) for ; Fri, 24 Apr 2020 04:56:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kIs0GWlxol4iHAAAB5/wlQ (envelope-from ) for ; Fri, 24 Apr 2020 04:56:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DEA3D9427D0 for ; Fri, 24 Apr 2020 04:56:08 +0000 (UTC) Received: from localhost ([::1]:49110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRqNi-00022D-Tn for larch@yhetil.org; Fri, 24 Apr 2020 00:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60270) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRqNL-000223-6K for emacs-orgmode@gnu.org; Fri, 24 Apr 2020 00:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRqNK-0000dt-Lj for emacs-orgmode@gnu.org; Fri, 24 Apr 2020 00:55:42 -0400 Received: from [183.249.128.92] (port=9550 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRqNJ-0000EH-0C for emacs-orgmode@gnu.org; Fri, 24 Apr 2020 00:55:42 -0400 Received: by dark.localdomain (Postfix, from userid 1000) id 88195241B60; Fri, 24 Apr 2020 12:55:30 +0800 (HKT) References: <5646c714-5861-0cb5-3342-a171c45755f7@ihm.name> User-agent: mu4e 1.4; emacs 28.0.50 From: stardiviner To: Marc Ihm Subject: Re: simple code to use focus-mode with org In-reply-to: <5646c714-5861-0cb5-3342-a171c45755f7@ihm.name> Date: Fri, 24 Apr 2020 12:55:27 +0800 Message-ID: <87r1wd32kg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: softfail client-ip=183.249.128.92; envelope-from=numbchild@gmail.com; helo=dark.localdomain X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 00:55:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 183.249.128.92 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: numbchild@gmail.com Cc: larstvei@ifi.uio.no, emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: 1.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [1.49 / 13.00]; HAS_REPLYTO(0.00)[numbchild@gmail.com]; GENERIC_REPUTATION(0.00)[-0.56228848178147]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_MISSING_CHARSET(2.50)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.21), country: US(-0.00), ip: 209.51.188.17(-0.56)]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[209.51.188.17:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[numbchild@gmail.com,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; URIBL_BLOCKED(0.00)[ihm.name:email,stardiviner.github.io:url]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; HAS_LIST_UNSUB(-0.01)[]; MIME_TRACE(0.00)[0:+]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none] X-TUID: InyTchI8asvC =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 This looks interesting, thanks. Marc Ihm writes: > Hi, > > when presenting things informally from org I often use the great focus-mo= de (see > https://github.com/larstvei/Focus) to keep my audience focused on the ind= ividual > nodes of my presentation: > > > (defun forward-heading (&optional N) > "Forward one orgmode-heading for thing-at-point" > (interactive "p") > (if (=3D N -1) > (outline-previous-heading) > (outline-next-heading))) > > (require 'thingatpt) > (require 'focus) > > (setq focus-mode-to-thing '((org-mode . heading))) > (focus-mode) > > > The only interesting thing here is the trivial function forward-heading, = which > allows focus-mode to handle org-nodes and focus on them. > The connection is made by setting focus-mode-to-thing; the symbol heading= leads > focus-mode to invoke forward-heading, see the documentation of thingatpt = for > details. > > Hope someone finds this useful. > > regards, > Marc =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6icT8UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsOnMwf+IBLbJnh4WSk3BzK9syarP75MI0oc G7LF6y9sBeDdTWJMcI0ogwmSWGN/AUbon8BLAcgUhemztAP91QXt94nb1hyZlQPR qY5OgAjYFlEfM3kKWt+T2Uexb0eqwyjR4BPKkyCzvbppuUQ8RXvQuFvVrhOz0yoj NB302fu94dMeBhtr3OKLpuKX7enl6UK3RH+Uw2/zCaAcpS1do/wbIEZ1/MwThQKN SAqI0QH2gX9Bn7Dbdza3rSP7G17Eu8VDpgScfS+cHFtZoHzOIyodi9wRgQ0MlUBv zgVFSr6qP+m/U/mvy9Zjf7zQWPEwiHiHxCmoh+7XWg4r71Wmvv2aU0ycGw=3D=3D =3DAQr+ =2D----END PGP SIGNATURE-----