From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug: Store link to Wanderlust message fails when subject contains encoded characters [6.33trans (release_6.33f.173.g8f17)] Date: Sun, 3 Jan 2010 19:42:15 +0100 Message-ID: <8982A02B-40A8-47E4-8074-F273833895F9@gmail.com> References: <87d41t1r7g.wl%maus.david@gmail.com> <08FF3DED-488D-46F5-871E-BE3E273103D1@gmail.com> <87skan9hz0.wl%maus.david@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRVPD-0000Z3-FI for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 13:42:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRVP9-0000YU-Nz for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 13:42:23 -0500 Received: from [199.232.76.173] (port=55196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRVP9-0000YR-Hg for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 13:42:19 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:65226) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRVP9-00087t-36 for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 13:42:19 -0500 Received: by ewy24 with SMTP id 24so17272679ewy.26 for ; Sun, 03 Jan 2010 10:42:18 -0800 (PST) In-Reply-To: <87skan9hz0.wl%maus.david@gmail.com> 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: David Maus Cc: emacs-orgmode@gnu.org Hi David, this is a weird bug. I'd say it is a bug in `format', which does =20 something bad with properties because a format like "%.30s" is used to shorten a =20= string while properties in that string exist beyond that shortened part. On Jan 3, 2010, at 7:11 PM, David Maus wrote: > At Sun, 3 Jan 2010 14:40:58 +0100, > Carsten Dominik wrote: >> >> Hi David, >> >> could you please provide a full backtrace for this bug? >> > > Backtrace attached. > > My first guess on why it happens was wrong, as expected: There are > messages with encoded umlauts that do not cause this error. This would fit with my observation, if the propertized part is not =20 outside the part that gets formatted into the string. Would you like to try to make a patch which does remove the text properties for this case? - Carsten > > Regards > > -- David > > --=20 > OpenPGP... 0x99ADB83B5A4478E6 > Jabber.... dmjena@jabber.org > Email..... maus.david@gmail.com > ICQ....... 241051416 > > Debugger entered--Lisp error: (args-out-of-range 30 45) > format("%.30s" #("Online-Pornografie: China nimmt Tausende =20 > Verd=E4chtige fest" 45 57 (charset latin-iso8859-1))) > (setq rpl (format (concat ... "s") (cdr e))) > (while (string-match re string) (setq rpl (format ... ...)) (setq =20 > string (replace-match rpl t t string))) > (while (setq e (pop table)) (setq re (concat "%-?[0-9.]*" ...)) =20 > (while (string-match re string) (setq rpl ...) (setq string ...))) > (let ((case-fold-search nil) e re rpl) (while (setq e ...) (setq =20 > re ...) (while ... ... ...)) string) > org-replace-escapes("Email from %f: %.30s" (("%c") ("%F" . "rss-=20 > hash (SpiegelSchlagzeilen)") ("%f" . "SpiegelSchlagzeilen") ("%T") =20 > ("%t" . "?") ("%s" . #("Online-Pornografie: China nimmt Tausende =20 > Verd=E4chtige fest" 45 57 ...)) ("%m" . =20 > ""))) > (let* ((p org-store-link-plist) (to ...) (from ...) (table ...)) =20 > (when (string-match "%c" fmt) (if ... ... ...)) (org-replace-escapes =20= > fmt table)) > org-email-link-description() > org-wl-store-link() > run-hook-with-args-until-success(org-wl-store-link) > (cond ((run-hook-with-args-until-success ...) (setq link ... =20 > desc ...)) ((equal ... "*Org Edit Src Example*") =20 > (let ... ... ... ... ... ... ... ...)) ((equal ... ...) =20 > (let ... ...)) ((eq major-mode ...) (let ... ... ...)) ((eq major-=20 > mode ...) (setq cpltxt ... link ...) (org-store-link-props :type =20 > "w3" :url ...)) ((eq major-mode ...) (setq cpltxt ... link ...) (org-=20= > store-link-props :type "w3m" :url ...)) ((setq search ...) (setq =20 > link ...) (setq cpltxt ...)) ((eq major-mode ...) (setq cpltxt ... =20 > link ...) (org-store-link-props :type "image" :file buffer-file-=20 > name)) ((eq major-mode ...) (setq cpltxt ... link ...)) ((and buffer-=20= > file-name ...) (setq custom-id ...) (cond ... ... ...)) ((buffer-=20 > file-name ...) (setq cpltxt ...) (when ... ... ...) (setq link ...)) =20= > ((interactive-p) (error "Cannot link to a buffer which is not =20 > visiting a file")) (t (setq link nil))) > (let ((outline-regexp ...) link cpltxt desc description search txt =20= > custom-id) (cond (... ...) (... ...) (... ...) (... ...) =20 > (... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ...) =20 > (... ... ...) (... ... ... ...) (... ...) (t ...)) (if (consp link) =20= > (setq cpltxt ... link ...)) (setq link (or link cpltxt) desc (or =20 > desc cpltxt)) (if (equal desc "NONE") (setq desc nil)) (if (and ... =20= > link) (progn ... ... ...) (and link ...))) > org-store-link(nil) > call-interactively(org-store-link nil nil) - Carsten