From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gD+VNwYqhWKHaAEAbAwnHQ (envelope-from ) for ; Wed, 18 May 2022 19:16:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GG6dNgYqhWLEewAAG6o9tA (envelope-from ) for ; Wed, 18 May 2022 19:16:54 +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 38B3218785 for ; Wed, 18 May 2022 19:16:54 +0200 (CEST) Received: from localhost ([::1]:44274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrNI4-0004hK-Hk for larch@yhetil.org; Wed, 18 May 2022 13:16:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrNGD-0004gm-CA for emacs-orgmode@gnu.org; Wed, 18 May 2022 13:14:57 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrNG9-0004Zt-PE for emacs-orgmode@gnu.org; Wed, 18 May 2022 13:14:56 -0400 Received: by mail-wm1-x32b.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so3566706wmj.1 for ; Wed, 18 May 2022 10:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=M5Ur2HZPnT5X/uBGodtm2zwtFr56czPXawjxgFb1jqE=; b=erX5UrlNSYvRbKBIv5Q0x814sv66REKFtmCXkYq3vgtauk5I2FK9lBgG/2+B872Rmu 6zaDOVvM0B5BUXHyBRbCTZE6WyoqW4DwcEEPnrNf5bMr9pM0nXfI8q1tqX0pMKOo2iZY yzupIMk3wdLv6sP1uPJeWbyXU+iqsGSeHVPsjnDrH8n/UdLuUKPHbrIroMZacmhDogzQ TnHsMPMce/YhzaUHTWU3el6+7YFToM7zQzrzrrX+ZCb7yHNAQ8CtGlCwCIl14jWgvR2u TU81hX+fnbLe4UwRRjgBLAJAgJ/erRP3Pf4XQjbpK66Ii4BVPy42bgs3ItUo4lPdb/Dw jk7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=M5Ur2HZPnT5X/uBGodtm2zwtFr56czPXawjxgFb1jqE=; b=2WyVCRNpMJhGIDCTbyrv3JHOy1dMYz13i8iQiv6D73VOkeMkAunqwNRp9CzM5GQBUA IlUXKg4FzZynHF4WakpE3mhgfs/G1VFE1tGPcIbGaYD/1hz4VCedcwMGhEdMoFzxNmjb 5ISdRyYDy0YSwsCUjoueMDZ5OPcny00rR3jWxI44hS9Mc0QvfEzG4B0dZdnHYHF58c5X woo+RhWyKOwVZEnZPnBBFSpH2dS8KFPkP8FWWrbdqDgw+V8O9KKUN5FyudAvnFJu5zEU xxBG0TVrWPlT8/OxQWtL+p4FIJP8OAxxVmqNhlGhTTlBNfeee9yYGWVDrigmMI5QrNyp r+EA== X-Gm-Message-State: AOAM531lkJnB9rcGbSMMrxrpP03Xq1lmidEipma8FCXsy+8xxFBy04gs FeDc9wNVaDrRnP+hFe8WAaQbEBCTDVsE5Q== X-Google-Smtp-Source: ABdhPJwhdjkjRkGTh90RdapL5wS7eBZSuM6gkSbWumuAnFHhOaUjBhdoczzvyHPPmbyt39D38F5uQg== X-Received: by 2002:a05:600c:358d:b0:394:8343:a67a with SMTP id p13-20020a05600c358d00b003948343a67amr846928wmq.189.1652894091807; Wed, 18 May 2022 10:14:51 -0700 (PDT) Received: from Home-Mac ([94.230.83.63]) by smtp.gmail.com with ESMTPSA id j24-20020adfa558000000b0020e609dd274sm2569591wrb.76.2022.05.18.10.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 10:14:51 -0700 (PDT) From: Daniel Fleischer To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] HTML export of buffer with fringe indicators References: <87v8u30zn7.fsf@localhost> Date: Wed, 18 May 2022 20:14:48 +0300 In-Reply-To: <87v8u30zn7.fsf@localhost> (Ihor Radchenko's message of "Wed, 18 May 2022 20:54:36 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=danflscr@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652894214; 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=M5Ur2HZPnT5X/uBGodtm2zwtFr56czPXawjxgFb1jqE=; b=flhhYMJHgKXrnfmM3EWs1yftebSa21/YHRYwMUPohPlwmwFy6BL+T5tv66MudwgIUOusAk cx5Rzmi99UUMPzZWEMkjiI44hI5u0VC4sCAd6/pzkNYTq1G6z3Hk02zfbOpQbnbgvie8OD PM/YVIOnmks1ryZU5ZUgHLtygR5GUst8jxm/AhunaePnkRtQCsh/A8aSaf1JMoiws9N5ul 08XvEQ030usDZtUOniGsFzpS6+D4GnlKV+7+IAIzYDkcRx4e82/IfRGHXM2WUjJNeK08j1 A9es4hkPzqIHrL4Ku0iXq7GxaKexuqC2SKgiiO4To5wSITbSMrlMCy6EIm0mvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652894214; a=rsa-sha256; cv=none; b=YZxWQltf5/r9Szr0DNMgthkQBu7JPkxeTYXurK8g6iBz1Yq5qmI9EiHjJc5fXe99riIt9z 1p5p9lw7z8jPw1TEfxcp89JWDZHVdhuHqmvPlij1EqLIvetSXYkHmMfWyr8h7EDCpl4gjN 3Ld8Hx+ut+aSNIcPWX3bjA7Y5LNjIezjcN1LLxatXgAgVl51g8IfjdunhDwNl61Dmx8Oz+ eYKeQAYo4l389emnzQpglamcmYaCl3vdfWtIfpyoDutB1N4/w8LEo3bQXhZ3OX9DpIKnP5 xZ6D0YCWTdL9NtX1H2TYhcnCJQRIstDiW6NUS5QWWxB5Fcy0VVYFwrHNix55sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=erX5UrlN; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -4.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=erX5UrlN; dmarc=pass (policy=none) header.from=gmail.com; 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-Queue-Id: 38B3218785 X-Spam-Score: -4.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: K1/nQ3rQMjBx --=-=-= Content-Type: text/plain Ihor Radchenko [2022-05-18 Wed 20:54] wrote: > Can you set debug-on-error to t and share the full backtrace? Attached. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: backtrace Debugger entered--Lisp error: (args-out-of-range " " 0 -3) substring(" " 0 -3) (cons (substring text strpos addpos) textlist) (setq textlist (cons (substring text strpos addpos) textlist)) (let ((addpos (car add)) (addtext (cdr add))) (setq textlist (cons (subst= ring text strpos addpos) textlist)) (setq textlist (cons addtext textlist))= (setq strpos addpos)) (let ((add (car --dolist-tail--))) (let ((addpos (car add)) (addtext (cdr= add))) (setq textlist (cons (substring text strpos addpos) textlist)) (set= q textlist (cons addtext textlist)) (setq strpos addpos)) (setq --dolist-ta= il-- (cdr --dolist-tail--))) (while --dolist-tail-- (let ((add (car --dolist-tail--))) (let ((addpos (= car add)) (addtext (cdr add))) (setq textlist (cons (substring text strpos = addpos) textlist)) (setq textlist (cons addtext textlist)) (setq strpos add= pos)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- (cl-stable-sort additions #'< :key #'car))) (while= --dolist-tail-- (let ((add (car --dolist-tail--))) (let ((addpos (car add)= ) (addtext (cdr add))) (setq textlist (cons (substring text strpos addpos) = textlist)) (setq textlist (cons addtext textlist)) (setq strpos addpos)) (s= etq --dolist-tail-- (cdr --dolist-tail--))))) (let ((textlist nil) (strpos 0)) (let ((--dolist-tail-- (cl-stable-sort a= dditions #'< :key #'car))) (while --dolist-tail-- (let ((add (car --dolist-= tail--))) (let ((addpos (car add)) (addtext (cdr add))) (setq textlist (con= s (substring text strpos addpos) textlist)) (setq textlist (cons addtext te= xtlist)) (setq strpos addpos)) (setq --dolist-tail-- (cdr --dolist-tail--))= ))) (setq textlist (cons (substring text strpos) textlist)) (apply #'concat= (nreverse textlist))) (if additions (let ((textlist nil) (strpos 0)) (let ((--dolist-tail-- (cl= -stable-sort additions #'< :key #'car))) (while --dolist-tail-- (let ((add = (car --dolist-tail--))) (let ((addpos ...) (addtext ...)) (setq textlist (c= ons ... textlist)) (setq textlist (cons addtext textlist)) (setq strpos add= pos)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq textlist (cons = (substring text strpos) textlist)) (apply #'concat (nreverse textlist))) te= xt) (let (additions) (let ((--dolist-tail-- (overlays-in beg end))) (while --= dolist-tail-- (let ((overlay (car --dolist-tail--))) (let ((before (overlay= -get overlay ...)) (after (overlay-get overlay ...))) (if after (progn (set= q additions ...))) (if before (progn (setq additions ...)))) (setq --dolist= -tail-- (cdr --dolist-tail--))))) (if additions (let ((textlist nil) (strpo= s 0)) (let ((--dolist-tail-- (cl-stable-sort additions #'< :key #'car))) (w= hile --dolist-tail-- (let ((add ...)) (let (... ...) (setq textlist ...) (s= etq textlist ...) (setq strpos addpos)) (setq --dolist-tail-- (cdr --dolist= -tail--))))) (setq textlist (cons (substring text strpos) textlist)) (apply= #'concat (nreverse textlist))) text)) htmlize-add-before-after-strings(4 5 " ") (setq text (htmlize-add-before-after-strings beg end text)) (let ((text (buffer-substring-no-properties beg end))) (htmlize-copy-prop= 'display beg end text) (htmlize-copy-prop 'htmlize-link beg end text) (set= q text (htmlize-add-before-after-strings beg end text)) text) htmlize-get-text-with-display(4 5) (cons (htmlize-get-text-with-display pos next-change) visible-list) (setq visible-list (cons (htmlize-get-text-with-display pos next-change) = visible-list)) (cond ((eq show t) (setq visible-list (cons (htmlize-get-text-with-displa= y pos next-change) visible-list))) ((and (eq show 'ellipsis) (not (eq last-= show 'ellipsis)) (setq visible-list (cons htmlize-ellipsis visible-list))))) (while (< pos end) (setq invisible (get-char-property pos 'invisible) nex= t-change (htmlize-next-change pos 'invisible end) show (htmlize-decode-invi= sibility-spec invisible)) (cond ((eq show t) (setq visible-list (cons (html= ize-get-text-with-display pos next-change) visible-list))) ((and (eq show '= ellipsis) (not (eq last-show 'ellipsis)) (setq visible-list (cons htmlize-e= llipsis visible-list))))) (setq pos next-change last-show show)) (let ((pos beg) visible-list invisible show last-show next-change) (while= (< pos end) (setq invisible (get-char-property pos 'invisible) next-change= (htmlize-next-change pos 'invisible end) show (htmlize-decode-invisibility= -spec invisible)) (cond ((eq show t) (setq visible-list (cons (htmlize-get-= text-with-display pos next-change) visible-list))) ((and (eq show 'ellipsis= ) (not (eq last-show 'ellipsis)) (setq visible-list (cons htmlize-ellipsis = visible-list))))) (setq pos next-change last-show show)) (htmlize-concat (n= reverse visible-list))) htmlize-buffer-substring-no-invisible(4 5) (let ((text (htmlize-buffer-substring-no-invisible beg end))) (if trailin= g-ellipsis (progn (setq text (htmlize-trim-ellipsis text)))) (if (> (length= text) 0) (progn (setq trailing-ellipsis (get-text-property (1- (length tex= t)) 'htmlize-ellipsis text)))) (if htmlize-untabify (progn (setq text (html= ize-untabify-string text (current-column))))) (setq text (htmlize-string-to= -html text)) (cl-values text trailing-ellipsis)) htmlize-extract-text(4 5 nil) (let ((--cl-var-- (htmlize-extract-text (point) next-change trailing-elli= psis))) (prog1 (setq text (car --cl-var--)) (setq trailing-ellipsis (nth 1 = --cl-var--)))) (while (not (eobp)) (setq next-change (htmlize-next-face-change (point)))= (setq face-list (htmlize-faces-at-point) fstruct-list (delq nil (mapcar #'= (lambda (f) (gethash f face-map)) face-list))) (let ((--cl-var-- (htmlize-e= xtract-text (point) next-change trailing-ellipsis))) (prog1 (setq text (car= --cl-var--)) (setq trailing-ellipsis (nth 1 --cl-var--)))) (if (> (length = text) 0) (progn (if (not (cl-equalp fstruct-list last-fstruct-list)) (progn= (funcall close-markup) (setq last-fstruct-list fstruct-list close-markup (= funcall text-markup fstruct-list htmlbuf)))) (princ text htmlbuf))) (goto-c= har next-change)) (let ((text-markup (htmlize-method-function 'text-markup)) next-change te= xt face-list trailing-ellipsis fstruct-list last-fstruct-list (close-markup= #'(lambda nil))) (goto-char (point-min)) (while (not (eobp)) (setq next-ch= ange (htmlize-next-face-change (point))) (setq face-list (htmlize-faces-at-= point) fstruct-list (delq nil (mapcar #'(lambda (f) (gethash f face-map)) f= ace-list))) (let ((--cl-var-- (htmlize-extract-text (point) next-change tra= iling-ellipsis))) (prog1 (setq text (car --cl-var--)) (setq trailing-ellips= is (nth 1 --cl-var--)))) (if (> (length text) 0) (progn (if (not (cl-equalp= fstruct-list last-fstruct-list)) (progn (funcall close-markup) (setq last-= fstruct-list fstruct-list close-markup (funcall text-markup fstruct-list ht= mlbuf)))) (princ text htmlbuf))) (goto-char next-change)) (funcall close-ma= rkup)) (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map (htmlize-make-f= ace-map (if (memql 'default buffer-faces) buffer-faces (cons 'default buffe= r-faces)))) (places (cl-gensym)) (title (if (buffer-file-name) (file-name-n= ondirectory (buffer-file-name)) (buffer-name)))) (if htmlize-generate-hyper= links (progn (htmlize-create-auto-links))) (if htmlize-replace-form-feeds (= progn (htmlize-shadow-form-feeds))) (save-current-buffer (set-buffer htmlbu= f) (buffer-disable-undo) (insert (funcall (htmlize-method-function 'doctype= )) 10 (format "\n" htmlize-versio= n htmlize-output-type) "\n ") (put places 'head-start (point-marker)= ) (insert "\n" " " (htmlize-protect-string title) "= \n" (if htmlize-html-charset (format (concat " \n") htmlize-html-chars= et) "") htmlize-head-tags) (funcall (htmlize-method-function 'insert-head) = buffer-faces face-map) (insert " ") (put places 'head-end (point-ma= rker)) (insert "\n ") (put places 'body-start (point-marker)) (insert (fun= call (htmlize-method-function 'body-tag) face-map) "\n ") (put places 'c= ontent-start (point-marker)) (insert (funcall (htmlize-method-function 'pre= -tag) face-map) "\n")) (let ((text-markup (htmlize-method-function 'text-ma= rkup)) next-change text face-list trailing-ellipsis fstruct-list last-fstru= ct-list (close-markup #'(lambda nil))) (goto-char (point-min)) (while (not = (eobp)) (setq next-change (htmlize-next-face-change (point))) (setq face-li= st (htmlize-faces-at-point) fstruct-list (delq nil (mapcar #'(lambda ... ..= .) face-list))) (let ((--cl-var-- (htmlize-extract-text (point) next-change= trailing-ellipsis))) (prog1 (setq text (car --cl-var--)) (setq trailing-el= lipsis (nth 1 --cl-var--)))) (if (> (length text) 0) (progn (if (not (cl-eq= ualp fstruct-list last-fstruct-list)) (progn (funcall close-markup) (setq l= ast-fstruct-list fstruct-list close-markup ...))) (princ text htmlbuf))) (g= oto-char next-change)) (funcall close-markup)) (save-current-buffer (set-bu= ffer htmlbuf) (insert "") (put places 'content-end (point-marker)) (i= nsert "\n ") (put places 'body-end (point-marker)) (insert "\n\n") (htmlize-defang-local-variables) (goto-char (point-min)) (if htmlize= -html-major-mode (progn (funcall htmlize-html-major-mode))) (set (make-loca= l-variable 'htmlize-buffer-places) (symbol-plist places)) (run-hooks 'htmli= ze-after-hook) (buffer-enable-undo)) (setq completed t) htmlbuf) (unwind-protect (let* ((buffer-faces (htmlize-faces-in-buffer)) (face-map= (htmlize-make-face-map (if (memql 'default buffer-faces) buffer-faces (con= s 'default buffer-faces)))) (places (cl-gensym)) (title (if (buffer-file-na= me) (file-name-nondirectory (buffer-file-name)) (buffer-name)))) (if htmliz= e-generate-hyperlinks (progn (htmlize-create-auto-links))) (if htmlize-repl= ace-form-feeds (progn (htmlize-shadow-form-feeds))) (save-current-buffer (s= et-buffer htmlbuf) (buffer-disable-undo) (insert (funcall (htmlize-method-f= unction 'doctype)) 10 (format "\n= " htmlize-version htmlize-output-type) "\n ") (put places 'head-star= t (point-marker)) (insert "\n" " " (htmlize-protect-string = title) "\n" (if htmlize-html-charset (format (concat " \n") ht= mlize-html-charset) "") htmlize-head-tags) (funcall (htmlize-method-functio= n 'insert-head) buffer-faces face-map) (insert " ") (put places 'he= ad-end (point-marker)) (insert "\n ") (put places 'body-start (point-marke= r)) (insert (funcall (htmlize-method-function 'body-tag) face-map) "\n "= ) (put places 'content-start (point-marker)) (insert (funcall (htmlize-meth= od-function 'pre-tag) face-map) "\n")) (let ((text-markup (htmlize-method-f= unction 'text-markup)) next-change text face-list trailing-ellipsis fstruct= -list last-fstruct-list (close-markup #'(lambda nil))) (goto-char (point-mi= n)) (while (not (eobp)) (setq next-change (htmlize-next-face-change (point)= )) (setq face-list (htmlize-faces-at-point) fstruct-list (delq nil (mapcar = #'... face-list))) (let ((--cl-var-- (htmlize-extract-text ... next-change = trailing-ellipsis))) (prog1 (setq text (car --cl-var--)) (setq trailing-ell= ipsis (nth 1 --cl-var--)))) (if (> (length text) 0) (progn (if (not ...) (p= rogn ... ...)) (princ text htmlbuf))) (goto-char next-change)) (funcall clo= se-markup)) (save-current-buffer (set-buffer htmlbuf) (insert "") (pu= t places 'content-end (point-marker)) (insert "\n ") (put places 'b= ody-end (point-marker)) (insert "\n\n") (htmlize-defang-local-variab= les) (goto-char (point-min)) (if htmlize-html-major-mode (progn (funcall ht= mlize-html-major-mode))) (set (make-local-variable 'htmlize-buffer-places) = (symbol-plist places)) (run-hooks 'htmlize-after-hook) (buffer-enable-undo)= ) (setq completed t) htmlbuf) (if (not completed) (progn (kill-buffer htmlb= uf))) (htmlize-delete-tmp-overlays)) (let ((htmlbuf (generate-new-buffer (if (buffer-file-name) (htmlize-make-= file-name (file-name-nondirectory (buffer-file-name))) "*html*"))) (complet= ed nil)) (unwind-protect (let* ((buffer-faces (htmlize-faces-in-buffer)) (f= ace-map (htmlize-make-face-map (if (memql ... buffer-faces) buffer-faces (c= ons ... buffer-faces)))) (places (cl-gensym)) (title (if (buffer-file-name)= (file-name-nondirectory (buffer-file-name)) (buffer-name)))) (if htmlize-g= enerate-hyperlinks (progn (htmlize-create-auto-links))) (if htmlize-replace= -form-feeds (progn (htmlize-shadow-form-feeds))) (save-current-buffer (set-= buffer htmlbuf) (buffer-disable-undo) (insert (funcall (htmlize-method-func= tion 'doctype)) 10 (format "\n" h= tmlize-version htmlize-output-type) "\n ") (put places 'head-start (= point-marker)) (insert "\n" " " (htmlize-protect-string tit= le) "\n" (if htmlize-html-charset (format (concat " \n") htmli= ze-html-charset) "") htmlize-head-tags) (funcall (htmlize-method-function '= insert-head) buffer-faces face-map) (insert " ") (put places 'head-= end (point-marker)) (insert "\n ") (put places 'body-start (point-marker))= (insert (funcall (htmlize-method-function 'body-tag) face-map) "\n ") (= put places 'content-start (point-marker)) (insert (funcall (htmlize-method-= function 'pre-tag) face-map) "\n")) (let ((text-markup (htmlize-method-func= tion 'text-markup)) next-change text face-list trailing-ellipsis fstruct-li= st last-fstruct-list (close-markup #'(lambda nil))) (goto-char (point-min))= (while (not (eobp)) (setq next-change (htmlize-next-face-change (point))) = (setq face-list (htmlize-faces-at-point) fstruct-list (delq nil (mapcar ...= face-list))) (let ((--cl-var-- ...)) (prog1 (setq text ...) (setq trailing= -ellipsis ...))) (if (> (length text) 0) (progn (if ... ...) (princ text ht= mlbuf))) (goto-char next-change)) (funcall close-markup)) (save-current-buf= fer (set-buffer htmlbuf) (insert "") (put places 'content-end (point-= marker)) (insert "\n ") (put places 'body-end (point-marker)) (inse= rt "\n\n") (htmlize-defang-local-variables) (goto-char (point-min)) = (if htmlize-html-major-mode (progn (funcall htmlize-html-major-mode))) (set= (make-local-variable 'htmlize-buffer-places) (symbol-plist places)) (run-h= ooks 'htmlize-after-hook) (buffer-enable-undo)) (setq completed t) htmlbuf)= (if (not completed) (progn (kill-buffer htmlbuf))) (htmlize-delete-tmp-ove= rlays))) (save-excursion (save-excursion (run-hooks 'htmlize-before-hook)) (htmliz= e-ensure-fontified) (clrhash htmlize-extended-character-cache) (clrhash htm= lize-memoization-table) (let ((htmlbuf (generate-new-buffer (if (buffer-fil= e-name) (htmlize-make-file-name (file-name-nondirectory ...)) "*html*"))) (= completed nil)) (unwind-protect (let* ((buffer-faces (htmlize-faces-in-buff= er)) (face-map (htmlize-make-face-map (if ... buffer-faces ...))) (places (= cl-gensym)) (title (if (buffer-file-name) (file-name-nondirectory ...) (buf= fer-name)))) (if htmlize-generate-hyperlinks (progn (htmlize-create-auto-li= nks))) (if htmlize-replace-form-feeds (progn (htmlize-shadow-form-feeds))) = (save-current-buffer (set-buffer htmlbuf) (buffer-disable-undo) (insert (fu= ncall (htmlize-method-function ...)) 10 (format "\n" htmlize-version htmlize-output-type) "\n ") (put= places 'head-start (point-marker)) (insert "\n" " " (htmli= ze-protect-string title) "\n" (if htmlize-html-charset (format ... = htmlize-html-charset) "") htmlize-head-tags) (funcall (htmlize-method-funct= ion 'insert-head) buffer-faces face-map) (insert " ") (put places '= head-end (point-marker)) (insert "\n ") (put places 'body-start (point-mar= ker)) (insert (funcall (htmlize-method-function ...) face-map) "\n ") (p= ut places 'content-start (point-marker)) (insert (funcall (htmlize-method-f= unction ...) face-map) "\n")) (let ((text-markup (htmlize-method-function .= ..)) next-change text face-list trailing-ellipsis fstruct-list last-fstruct= -list (close-markup #'...)) (goto-char (point-min)) (while (not (eobp)) (se= tq next-change (htmlize-next-face-change ...)) (setq face-list (htmlize-fac= es-at-point) fstruct-list (delq nil ...)) (let (...) (prog1 ... ...)) (if (= > ... 0) (progn ... ...)) (goto-char next-change)) (funcall close-markup)) = (save-current-buffer (set-buffer htmlbuf) (insert "") (put places 'co= ntent-end (point-marker)) (insert "\n ") (put places 'body-end (poi= nt-marker)) (insert "\n\n") (htmlize-defang-local-variables) (goto-c= har (point-min)) (if htmlize-html-major-mode (progn (funcall htmlize-html-m= ajor-mode))) (set (make-local-variable 'htmlize-buffer-places) (symbol-plis= t places)) (run-hooks 'htmlize-after-hook) (buffer-enable-undo)) (setq comp= leted t) htmlbuf) (if (not completed) (progn (kill-buffer htmlbuf))) (htmli= ze-delete-tmp-overlays)))) htmlize-buffer-1() (save-restriction (narrow-to-region beg end) (htmlize-buffer-1)) (let ((htmlbuf (save-restriction (narrow-to-region beg end) (htmlize-buff= er-1)))) (if (interactive-p) (progn (switch-to-buffer htmlbuf))) htmlbuf) htmlize-region(1 22) org-html-htmlize-region-for-paste(1 22) org-html-fontify-code("def hello():\n pass" "python") org-html-do-format-code("def hello():\n pass" "python" nil t nil nil) org-html-format-code((src-block (:language "python" :switches nil :parame= ters nil :begin 77 :end 128 :number-lines nil :preserve-indent nil :retain-= labels t :use-labels t :label-fmt nil :value "def hello():\n pass\n" :po= st-blank 0 :post-affiliated 77 ...)) (:export-options (subtree) :back-end #= s(org-export-backend :name html :parent nil :transcoders (... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... = ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((b= old . org-html-bold) (center-block . org-html-center-block) (clock . org-ht= ml-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block = . org-html-dynamic-block) (entity . org-html-entity) (example-block . org-h= tml-example-block) (export-block . org-html-export-block) (export-snippet .= org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-re= ference . org-html-footnote-reference) (headline . org-html-headline) (hori= zontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline= -src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html-i= nner-template) (italic . org-html-italic) (item . org-html-item) (keyword .= org-html-keyword) (latex-environment . org-html-latex-environment) (latex-= fragment . org-html-latex-fragment) (line-break . org-html-line-break) (lin= k . org-html-link) (node-property . org-html-node-property) (paragraph . or= g-html-paragraph) ...) :exported-data # :input-buffer "=D7=9B=D7=AA=D7=99=D7=91=D7=94.txt" :input-file "/Users/da= nielfleischer/Doc..." :html-doctype "xhtml-strict" :html-container "div" :h= tml-content-class "content" :description nil :keywords nil :html-html5-fanc= y t :html-link-use-abs-url nil ...)) org-html-src-block((src-block (:language "python" :switches nil :paramete= rs nil :begin 77 :end 128 :number-lines nil :preserve-indent nil :retain-la= bels t :use-labels t :label-fmt nil :value "def hello():\n pass\n" :post= -blank 0 :post-affiliated 77 ...)) nil (:export-options (subtree) :back-end= #s(org-export-backend :name html :parent nil :transcoders (... ... ... ...= ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ..= . ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ..= . ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (..= . ... ...) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist (= (bold . org-html-bold) (center-block . org-html-center-block) (clock . org-= html-clock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-bloc= k . org-html-dynamic-block) (entity . org-html-entity) (example-block . org= -html-example-block) (export-block . org-html-export-block) (export-snippet= . org-html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-= reference . org-html-footnote-reference) (headline . org-html-headline) (ho= rizontal-rule . org-html-horizontal-rule) (inline-src-block . org-html-inli= ne-src-block) (inlinetask . org-html-inlinetask) (inner-template . org-html= -inner-template) (italic . org-html-italic) (item . org-html-item) (keyword= . org-html-keyword) (latex-environment . org-html-latex-environment) (late= x-fragment . org-html-latex-fragment) (line-break . org-html-line-break) (l= ink . org-html-link) (node-property . org-html-node-property) (paragraph . = org-html-paragraph) ...) :exported-data # :input-buffer "=D7=9B=D7=AA=D7=99=D7=91=D7=94.txt" :input-file "/Users/= danielfleischer/Doc..." :html-doctype "xhtml-strict" :html-container "div" = :html-content-class "content" :description nil :keywords nil :html-html5-fa= ncy t :html-link-use-abs-url nil ...)) org-export-data((src-block (:language "python" :switches nil :parameters = nil :begin 77 :end 128 :number-lines nil :preserve-indent nil :retain-label= s t :use-labels t :label-fmt nil :value "def hello():\n pass\n" :post-bl= ank 0 :post-affiliated 77 ...)) (:export-options (subtree) :back-end #s(org= -export-backend :name html :parent nil :transcoders (... ... ... ... ... ..= . ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... .= .. ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... .= ..) :blocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold .= org-html-bold) (center-block . org-html-center-block) (clock . org-html-cl= ock) (code . org-html-code) (drawer . org-html-drawer) (dynamic-block . org= -html-dynamic-block) (entity . org-html-entity) (example-block . org-html-e= xample-block) (export-block . org-html-export-block) (export-snippet . org-= html-export-snippet) (fixed-width . org-html-fixed-width) (footnote-referen= ce . org-html-footnote-reference) (headline . org-html-headline) (horizonta= l-rule . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-= block) (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-= template) (italic . org-html-italic) (item . org-html-item) (keyword . org-= html-keyword) (latex-environment . org-html-latex-environment) (latex-fragm= ent . org-html-latex-fragment) (line-break . org-html-line-break) (link . o= rg-html-link) (node-property . org-html-node-property) (paragraph . org-htm= l-paragraph) ...) :exported-data # :in= put-buffer "=D7=9B=D7=AA=D7=99=D7=91=D7=94.txt" :input-file "/Users/danielf= leischer/Doc..." :html-doctype "xhtml-strict" :html-container "div" :html-c= ontent-class "content" :description nil :keywords nil :html-html5-fancy t := html-link-use-abs-url nil ...)) #f(compiled-function (element) #)((src-block= (:language "python" :switches nil :parameters nil :begin 77 :end 128 :numb= er-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt= nil :value "def hello():\n pass\n" :post-blank 0 :post-affiliated 77 :m= ode top-comment :granularity nil :parent (section (:begin 77 :end 128 :cont= ents-begin 77 :contents-end 128 :robust-begin 77 :robust-end 126 :post-blan= k 0 :post-affiliated 77 :mode first-section :granularity nil :parent (org-d= ata (:begin 1 :contents-begin 1 :contents-end 1223774 :end 1223775 :robust-= begin 3 :robust-end 1223772 :post-blank 1 :post-affiliated 1 :path "/Users/= danielfleischer/Documents/My Files/Org/=D7=9B=D7=AA=D7=99=D7=91..." :mode o= rg-data :CATEGORY "=D7=9B=D7=AA=D7=99=D7=91=D7=94" :granularity nil) #35)) = #1)))) mapconcat(#f(compiled-function (element) #) = ((src-block (:language "python" :switches nil :parameters nil :begin 77 :en= d 128 :number-lines nil :preserve-indent nil :retain-labels t :use-labels t= :label-fmt nil :value "def hello():\n pass\n" :post-blank 0 :post-affil= iated 77 :mode top-comment :granularity nil :parent (section (:begin 77 :en= d 128 :contents-begin 77 :contents-end 128 :robust-begin 77 :robust-end 126= :post-blank 0 :post-affiliated 77 :mode first-section :granularity nil :pa= rent (org-data (:begin 1 :contents-begin 1 :contents-end 1223774 :end 12237= 75 :robust-begin 3 :robust-end 1223772 :post-blank 1 :post-affiliated 1 :pa= th "/Users/danielfleischer/Documents/My Files/Org/=D7=9B=D7=AA=D7=99=D7=91.= .." :mode org-data :CATEGORY "=D7=9B=D7=AA=D7=99=D7=91=D7=94" :granularity = nil) #37)) . #2)))) "") org-export-data((section (:begin 77 :end 128 :contents-begin 77 :contents= -end 128 :robust-begin 77 :robust-end 126 :post-blank 0 :post-affiliated 77= :mode first-section :granularity nil :parent (org-data ... #1)) (src-block= (:language "python" :switches nil :parameters nil :begin 77 :end 128 :numb= er-lines nil :preserve-indent nil :retain-labels t :use-labels t :label-fmt= nil :value "def hello():\n pass\n" :post-blank 0 :post-affiliated 77 ..= .))) (:export-options (subtree) :back-end #s(org-export-backend :name html = :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ... ... ... ...) :filters (... ... ...) :blocks nil :menu (104 = "Export to HTML" ...)) :translate-alist ((bold . org-html-bold) (center-blo= ck . org-html-center-block) (clock . org-html-clock) (code . org-html-code)= (drawer . org-html-drawer) (dynamic-block . org-html-dynamic-block) (entit= y . org-html-entity) (example-block . org-html-example-block) (export-block= . org-html-export-block) (export-snippet . org-html-export-snippet) (fixed= -width . org-html-fixed-width) (footnote-reference . org-html-footnote-refe= rence) (headline . org-html-headline) (horizontal-rule . org-html-horizonta= l-rule) (inline-src-block . org-html-inline-src-block) (inlinetask . org-ht= ml-inlinetask) (inner-template . org-html-inner-template) (italic . org-htm= l-italic) (item . org-html-item) (keyword . org-html-keyword) (latex-enviro= nment . org-html-latex-environment) (latex-fragment . org-html-latex-fragme= nt) (line-break . org-html-line-break) (link . org-html-link) (node-propert= y . org-html-node-property) (paragraph . org-html-paragraph) ...) :exported= -data # :input-buffer "=D7=9B=D7=AA=D7= =99=D7=91=D7=94.txt" :input-file "/Users/danielfleischer/Doc..." :html-doct= ype "xhtml-strict" :html-container "div" :html-content-class "content" :des= cription nil :keywords nil :html-html5-fancy t :html-link-use-abs-url nil .= ..)) #f(compiled-function (element) #)((section (= :begin 77 :end 128 :contents-begin 77 :contents-end 128 :robust-begin 77 :r= obust-end 126 :post-blank 0 :post-affiliated 77 :mode first-section :granul= arity nil :parent (org-data (:begin 1 :contents-begin 1 :contents-end 12237= 74 :end 1223775 :robust-begin 3 :robust-end 1223772 :post-blank 1 :post-aff= iliated 1 :path "/Users/danielfleischer/Documents/My Files/Org/=D7=9B=D7=AA= =D7=99=D7=91..." :mode org-data :CATEGORY "=D7=9B=D7=AA=D7=99=D7=91=D7=94" = :granularity nil) #1)) (src-block (:language "python" :switches nil :parame= ters nil :begin 77 :end 128 :number-lines nil :preserve-indent nil :retain-= labels t :use-labels t :label-fmt nil :value "def hello():\n pass\n" :po= st-blank 0 :post-affiliated 77 :mode top-comment :granularity nil :parent #= 1)))) mapconcat(#f(compiled-function (element) #) = ((section (:begin 77 :end 128 :contents-begin 77 :contents-end 128 :robust-= begin 77 :robust-end 126 :post-blank 0 :post-affiliated 77 :mode first-sect= ion :granularity nil :parent (org-data (:begin 1 :contents-begin 1 :content= s-end 1223774 :end 1223775 :robust-begin 3 :robust-end 1223772 :post-blank = 1 :post-affiliated 1 :path "/Users/danielfleischer/Documents/My Files/Org/= =D7=9B=D7=AA=D7=99=D7=91..." :mode org-data :CATEGORY "=D7=9B=D7=AA=D7=99= =D7=91=D7=94" :granularity nil) . #2)) (src-block (:language "python" :swit= ches nil :parameters nil :begin 77 :end 128 :number-lines nil :preserve-ind= ent nil :retain-labels t :use-labels t :label-fmt nil :value "def hello():\= n pass\n" :post-blank 0 :post-affiliated 77 :mode top-comment :granulari= ty nil :parent #3)))) "") org-export-data((org-data (:begin 1 :contents-begin 1 :contents-end 12237= 74 :end 1223775 :robust-begin 3 :robust-end 1223772 :post-blank 1 :post-aff= iliated 1 :path "/Users/danielfleischer/Doc..." :mode org-data :CATEGORY "= =D7=9B=D7=AA=D7=99=D7=91=D7=94" :granularity nil) (section (:begin 77 :end = 128 :contents-begin 77 :contents-end 128 :robust-begin 77 :robust-end 126 := post-blank 0 :post-affiliated 77 :mode first-section :granularity nil :pare= nt #1) (src-block ...))) (:export-options (subtree) :back-end #s(org-export= -backend :name html :parent nil :transcoders (... ... ... ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ...) :bl= ocks nil :menu (104 "Export to HTML" ...)) :translate-alist ((bold . org-ht= ml-bold) (center-block . org-html-center-block) (clock . org-html-clock) (c= ode . org-html-code) (drawer . org-html-drawer) (dynamic-block . org-html-d= ynamic-block) (entity . org-html-entity) (example-block . org-html-example-= block) (export-block . org-html-export-block) (export-snippet . org-html-ex= port-snippet) (fixed-width . org-html-fixed-width) (footnote-reference . or= g-html-footnote-reference) (headline . org-html-headline) (horizontal-rule = . org-html-horizontal-rule) (inline-src-block . org-html-inline-src-block) = (inlinetask . org-html-inlinetask) (inner-template . org-html-inner-templat= e) (italic . org-html-italic) (item . org-html-item) (keyword . org-html-ke= yword) (latex-environment . org-html-latex-environment) (latex-fragment . o= rg-html-latex-fragment) (line-break . org-html-line-break) (link . org-html= -link) (node-property . org-html-node-property) (paragraph . org-html-parag= raph) ...) :exported-data # :input-buf= fer "=D7=9B=D7=AA=D7=99=D7=91=D7=94.txt" :input-file "/Users/danielfleische= r/Doc..." :html-doctype "xhtml-strict" :html-container "div" :html-content-= class "content" :description nil :keywords nil :html-html5-fancy t :html-li= nk-use-abs-url nil ...)) org-export-as(html t nil nil (:output-file "=D7=9B=D7=AA=D7=99=D7=91=D7= =94.html")) org-export-to-file(html "=D7=9B=D7=AA=D7=99=D7=91=D7=94.html" nil t nil n= il nil) org-html-export-to-html(nil t nil nil) (org-open-file (org-html-export-to-html nil s v b)) (if a (org-html-export-to-html t s v b) (org-open-file (org-html-export-t= o-html nil s v b))) (lambda (a s v b) (if a (org-html-export-to-html t s v b) (org-open-file = (org-html-export-to-html nil s v b))))(nil t nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) command-execute(org-export-dispatch) --=-=-= Content-Type: text/plain Thanks, -- Daniel Fleischer --=-=-=--