From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: IMPORTANT Modified link escaping in Org mode Date: Sun, 13 Mar 2011 17:04:48 +0100 Message-ID: <87hbb70zxb.wl%dmaus@ictsoc.de> References: <87k4gysacq.wl%dmaus@ictsoc.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Mar_13_17:04:48_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=45809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pynmq-000318-4W for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 12:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pynmn-0006KP-Jh for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 12:04:54 -0400 Received: from mail.app1.xlhost.de ([213.202.242.117]:47007 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pynmn-0006Jq-Er for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 12:04:53 -0400 In-Reply-To: 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: Michael Brand Cc: David Maus , org-mode --pgp-sign-Multipart_Sun_Mar_13_17:04:48_2011-1 Content-Type: text/plain; charset=US-ASCII At Sun, 13 Mar 2011 14:37:05 +0100, Michael Brand wrote: > > Hi David > > The current version of dmaus/org-check-percent-escapes from Worg > http://orgmode.org/worg/org-hacks.html#check-old-link-escapes > loops forever in the outer while when used on a one line Org buffer > containing just [[http://www.orgmode.org]] except I hack something > like (goto-char end) behind the inner while. What am I doing wrong? > Did anybody else have this issue? Sorry, my fault. Forgot to move point forward after matching a link. I pushed this fixed version to Worg: #+begin_src emacs-lisp (defun dmaus/org-check-percent-escapes () "*Check buffer for possibly problematic old link escapes." (interactive) (when (eq major-mode 'org-mode) (let ((old-escapes '("%20" "%5B" "%5D" "%E0" "%E2" "%E7" "%E8" "%E9" "%EA" "%EE" "%F4" "%F9" "%FB" "%3B" "%3D" "%2B"))) (unless (boundp 'warning-suppress-types) (setq warning-suppress-types nil)) (widen) (show-all) (goto-char (point-min)) (while (re-search-forward org-any-link-re nil t) (let ((end (match-end 0))) (goto-char (match-beginning 0)) (while (re-search-forward "%[0-9a-zA-Z]\\{2\\}" end t) (let ((escape (match-string-no-properties 0))) (unless (member (upcase escape) old-escapes) (warn "Found unknown percent escape sequence %s at buffer %s, position %d" escape (buffer-name) (- (point) 3))))) (goto-char end)))))) #+end_src Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sun_Mar_13_17:04:48_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk186yAACgkQma24O1pEeOY9xgD+LvSh6tNSVHhoYNCsVjNs5d4p 1tvGLoHFbW/YuNEblqgA/RqJF/wouhyZ3YvieJV3HX4/du+7IkYeuYAceFmjfETB =1Pv/ -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Mar_13_17:04:48_2011-1--