emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	emacs-orgmode@gnu.org, 10071@debbugs.gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: bug#10071: 24.0.91; Emacs runtime crashes while exporting an org file
Date: Fri, 18 Nov 2011 22:29:16 +0530	[thread overview]
Message-ID: <8162ih9xjv.fsf@gmail.com> (raw)
In-Reply-To: <87vcqh1t9s.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 18 Nov 2011 13:58:55 +0100")


Eli, Thanks for the clue and Stefan, thanks for the fix meanwhile. The
minimal snippet that captures the root cause follows down below.

Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Ccing Nicolas to attract his attention.
>>
>> Refer http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10071 
>
> I cannot reproduce it on development version of Org mode (nor in stable
> version), GNU Emacs 24.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version
> 3.2.1).
>
> Jambunathan, can you debug `org-export-normalize-links' before Emacs
> crashes?



#+begin_src emacs-lisp
;; install blah in the run-time
(defun blah () 
  (goto-char (point-min))
  (while (re-search-forward
	  "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]" nil t)
    (goto-char (1- (match-end 0)))
    (org-if-unprotected
     (let* ((xx (match-string 1))
	    (s (concat "[[" xx "][" xx "]]")))
       (replace-match s t t)))))
#+end_src


;; eval the 3 forms in sequence. Note that the third form will crash
;; emacs

#+begin_src emacs-lisp
;; form 1
;; here link < buffer
;; link *is* decorated
(with-temp-buffer
  ;; (insert "[[http://www.google.com]]")
  (insert "[[http://www.google.com]]a")	; Note the extra "a" at the
					; end
  (add-text-properties (point-min) (point-max)
  		       '(org-caption nil org-caption-shortn nil
  				     org-label nil org-attributes nil))
  (blah))
#+end_src


#+begin_src emacs-lisp
;; form 2
;; here link = buffer
;; link is *not* decorated
(with-temp-buffer
  (insert "[[http://www.google.com]]")
  ;; (insert "[[http://www.google.com]]a")
  
  ;; (add-text-properties (point-min) (point-max)
  ;; 		       '(org-caption nil org-caption-shortn nil
  ;; 				     org-label nil org-attributes nil))

  (blah))
#+end_src


#+begin_src emacs-lisp
;; form 3
;; here link = buffer
;; link *is* decorated
(with-temp-buffer
  (insert "[[http://www.google.com]]")
  ;; (insert "[[http://www.google.com]]a")
  (add-text-properties (point-min) (point-max)
  		       '(org-caption nil org-caption-shortn nil
  				     org-label nil org-attributes nil))
  (blah))
#+end_src



> Regards,

      reply	other threads:[~2011-11-18 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18  7:55 24.0.91; Emacs runtime crashes while exporting an org file Jambunathan K
2011-11-18  8:39 ` bug#10071: " Eli Zaretskii
2011-11-18 11:51   ` Jambunathan K
2011-11-18 12:58     ` Nicolas Goaziou
2011-11-18 16:59       ` Jambunathan K [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8162ih9xjv.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=10071@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).