From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0BjuBZ0Rd2RrpgAASxT56A (envelope-from ) for ; Wed, 31 May 2023 11:21:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IH7UBZ0Rd2S8EgAAauVa8A (envelope-from ) for ; Wed, 31 May 2023 11:21:33 +0200 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 A4F812FDDB for ; Wed, 31 May 2023 11:21:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4I0M-0004HA-9G; Wed, 31 May 2023 05:20:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4I0J-0004H2-UP for emacs-orgmode@gnu.org; Wed, 31 May 2023 05:20:28 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4I0G-0005GJ-Cv for emacs-orgmode@gnu.org; Wed, 31 May 2023 05:20:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5D381240027 for ; Wed, 31 May 2023 11:20:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685524822; bh=BABa1F37NCAsn2Hki2mXE8FsgfxwezxRXssmiADA2cI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=UmJjaywcnEypPklapAfxlA+Nznq/Im2ZwYJPgoDRKUm9HtbNiuKY0hzHFAw3C+bO5 d6GEUSAXlbxlIgHoXIoX8/y6vRp1R6EVfHS0c9Ji8i+D8avzB4YhoM1JNXP8BFk3UI NZDb59FrXG4oYdfUh2g5XNxPZUqX7orc4CW6yx6Vfm6gLaKcCdIy+i5+3C91eD/Bx5 xwY0uBWuvd7MYvnWX4SreUm5hliM0DbAsQX3K1M0qSJjsTiSZIznK5TFMCtQZHHqvo U5AYBeMajzryPk7RNMqV/X2AUQvuDxrEbCovwHYWJ3XYCCopsa/G2MsgEUVVkn7oCv 6CtG92yAEvKMQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QWNys6DL2z9rxP; Wed, 31 May 2023 11:20:21 +0200 (CEST) From: Ihor Radchenko To: John Kitchin Cc: Emacs Orgmode Subject: Re: adding rules for flyspell In-Reply-To: References: Date: Wed, 31 May 2023 09:24:48 +0000 Message-ID: <87wn0on99b.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685524893; a=rsa-sha256; cv=none; b=VWzVc99QdStsxIurierf3r33nuUFriFKZH9/Sa54qkxjRzIRYQL+ouTQWPG1yFq/C+x+CT 8GGTEhOrtyKIrwqcXRwZ/C9i1Vu7aWb9Up7k1zX8MFgqyzA202thRi6oBQqSYd4Yj5fJmn HKDo6GBxtb5LAXK5qj+rJ179qb+55HSD9jkweL1Xl1pR1ruOFXO16OjCkMO6eriyUT9AaE KJrHhbL18Jrq+Jg7a//j9yV/KE2FOpeFJUzwVXHoVC1j1e7rNQ9WH7PPF2caR06p7KrLV/ V7UpAIk6hYpp4en1TPT7ToYB9qO95+puW7ipb4Yo9y1eHnHDIlxcpghysAtWVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UmJjaywc; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685524893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cjeqJQeQ+2yvrruB+m2nJAty4bVvoB7meYLO+oEA0U8=; b=H3zpgA+Cx3g+KmMZ4Tvbf62rpBAOB9cZQXKuYpzfn0A73Ej+Q292HDsa4kSMM3Y2TlL1S6 V5ANVDSpjT3er0zBQB3SGA0G+SPfI8iPjyfdwBPrrkQC1YTI9IDJ4Lb5QulVhImnlviVzt rgFXhDkUQpO74a07gV+6Sma1/cbHjgJq4TLiEIM1rmIgRo5hPcSIrZN7kxAwd08iFnzyvg ckqC+tcqhy6waEhXZdvw5MUK9677iXGYB/30e/HQ1cDgyO5rtQM7Q0nzW/Pcyw+Z2Qg9EY rEOEVoMKai7Z8P31GHKBsgocvQnPSuSBHAJOf3tFPY/NL/gaxPvoq3dCSUaT/g== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UmJjaywc; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.21 X-Spam-Score: -8.21 X-Migadu-Queue-Id: A4F812FDDB X-TUID: oVk1SZRwX2xX John Kitchin writes: > I use flyspell, and it looks like org-mode > sets flyspell-generic-check-word-predicate to be org-mode-flyspell-verify. Not directly. Rather we do (put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) Then, flyspell uses this symbol value as the default value for `flyspell-generic-check-word-predicate'. > I have a few places I would like to augment this to avoid flyspell overlays > in different places. In the past I have done this with around advice, which > was ok for one rule, but less desirable for many rules. > > does anyone do anything clever here? I am currently making a list of > predicate functions, and a generic function that runs each one, but I > wondered if there was another approach. thanks. AFAIK, there is no better interface provided by flyspell. The most reliable approach I may think of is storing the value of `flyspell-generic-check-word-predicate', and then replacing it with your function that calls the previous value and then does more checking as needed. Looking into the docstring, I feel that flyspell could be changed to accept a hook instead of a single function - the return values will fit well into `run-hook-with-args-until-success'. (defvar-local flyspell-generic-check-word-predicate nil "Function providing per-mode customization over which words are flyspelled. Returns t to continue checking, nil otherwise. Flyspell mode sets this variable to whatever is the `flyspell-mode-predicate' property of the major mode name.") This is something we can request from Emacs devs for future. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at