From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Flyspell, org-mode, and urls Date: Wed, 03 Jun 2009 16:04:52 -0500 Message-ID: <87prdldo5n.fsf@fastmail.fm> References: <24D1E283-DB19-4835-83F2-02608843596B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBxcf-0006SF-Na for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 17:03:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBxcb-0006R9-RU for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 17:03:45 -0400 Received: from [199.232.76.173] (port=43977 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBxcb-0006R6-LV for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 17:03:41 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:51067) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MBxca-00089n-Q3 for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 17:03:40 -0400 In-Reply-To: <24D1E283-DB19-4835-83F2-02608843596B@gmail.com> (Carsten Dominik's message of "Wed, 3 Jun 2009 14:41:08 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Matthew Lundin , emacs org-mode mailing list Carsten Dominik writes: > On May 28, 2009, at 11:40 PM, Matthew Lundin wrote: > >> Hi everyone, >> >> If I might cheat a bit and ask a question that part org-mode, part >> another mode.... >> >> I have recently begun to use flyspell with org-mode. Everything works >> fine, but a minor problem arises when I type a url --- flyspell parses >> each element as a normal word, thus resulting in a multi-colored >> link. I >> couldn't find any way of customizing flyspell to exclude certain >> regexps. >> >> I noticed that muse mode has a function that prevents urls from being >> improperly "colorized." >> >> ,----[muse-mode.el:306-315] >> | (defun muse-mode-flyspell-p () >> | "Return non-nil if we should allow spell-checking to occur at >> point. >> | Otherwise return nil. >> | >> | This is used to keep links from being improperly colorized by >> flyspell." >> | (let ((pos (if (bobp) (point) (1- (point))))) >> | (and (not (get-text-property pos 'muse-no-flyspell)) >> | (not (get-text-property pos 'muse-link)) >> | (save-match-data >> | (null (muse-link-at-point)))))) >> `---- >> >> Would someone happen to know how to accomplish something similar in >> org-mode? > > We already have the exact same mechanism in place. The problem is that > flyspell-mode places the overlays *before* org sees that this is a link. > There, a mechanism is needed to actively strip flyspell overlays in > places where this is appropriate. Muse-mode had this, and so do we now. Thanks Carsten. It works very well now. - Matt