Re: [BUG] Can't export bold html correctly after change org-emphasis-regexp-components [9.6.6 (release_9.6.6 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]
On Sat, Nov 4, 2023 at 8:40 PM Ihor Radchenko wrote: > > Haojun Bao writes: > > > 1. update org-emphasis-regexp-components, as I'm a Chinese, I added > > some of the chinese Punctuation Marks, like the following: > > ... > > 2. do M-x org-reload > > 3. Write a file with the following content, note that both hello is > > displayed as bold: > > > > *hello*:world > > > > *hello* world > > > > 4. C-c C-e to export it as html, only the second hello is in bold, the > > first hello is surrounded by the org bold marker '*'. > > Org markup syntax is not customizeable. You may consider using escape > character instead. See https://orgmode.org/manual/Escape-Character.html > > `org-emphasis-regexp-components' only affects the fontification, not > actual underlying markup. > > We are well aware about this problem for Chinese users. The proper > solution will involve alternative markup like @bold{...} or (maybe) > **creole inline markup**. But changing Org syntax is not something we > can take lightly. > See https://list.orgmode.org/orgmode/87a6b8pbhg@posteo.net/ > > Not a bug. > Canceled. Thank you very much! I will switch to use the zero-width-space happily. > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92>
[BUG] Can't export bold html correctly after change org-emphasis-regexp-components [9.6.6 (release_9.6.6 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. Steps to reproduce: 1. update org-emphasis-regexp-components, as I'm a Chinese, I added some of the chinese Punctuation Marks, like the following: (setq org-emphasis-regexp-components '( " !?;:,。、 \t('\"{(“「『" ; pre "- —;:,。、 \t.!,:!??;!'\")}()\\”」』" ; post, "-" must be the first! " \t\r\n" ; border *forbidden* "."; body-regexp 1 ; newline )) 2. do M-x org-reload 3. Write a file with the following content, note that both hello is displayed as bold: *hello*:world *hello* world 4. C-c C-e to export it as html, only the second hello is in bold, the first hello is surrounded by the org bold marker '*'. *hello*:world hello world 5. This works fine on Emacs 28.2 Emacs : GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2023-08-17 Package: Org mode version 9.6.6 (release_9.6.6 @ /Applications/Emacs.app/Contents/Resources/lisp/org/) current state: == (setq org-archive-location "%s_archive::* Archive" org-link-elisp-confirm-function 'yes-or-no-p org-directory "~/system-config/doc/projects" org-crypt-key nil org-hide-emphasis-markers t org-export-with-sub-superscripts '{} org-log-done 'time org-agenda-custom-commands '(("d" "Daily agenda and all TODOs" ((tags-todo "PRIORITY=\"A\"" ((org-agenda-overriding-header "High-priority unfinished tasks:"))) (agenda "" ((org-agenda-skip-function '(or (org-agenda-skip-entry-if 'todo 'done) (my-skip-entry?))) (org-agenda-ndays 1))) (alltodo "" ((org-agenda-skip-function '(or (air-org-skip-subtree-if-habit) (air-org-skip-subtree-if-priority 65) (my-skip-entry?) (org-agenda-skip-if nil '(scheduled deadline))) ) (org-agenda-overriding-header "ALL normal priority tasks:")) ) ) ((org-agenda-compact-blocks t))) ("N" "Notes" tags "NOTE" ((org-agenda-overriding-header "Notes") (org-tags-match-list-sublevels t))) ("R" . "Review") ("Rw" "Week in review" agenda "" ((org-agenda-files '("~/src/github/projects/weekly.org")) (org-agenda-show-all-dates t) (org-agenda-start-with-log-mode t) (org-agenda-start-with-clockreport-mode t) (org-agenda-archives-mode t) (org-agenda-hide-tags-regexp (concat org-agenda-hide-tags-regexp "\\|ARCHIVE")) (org-agenda-span 'week) (org-agenda-start-on-weekday nil) (org-agenda-overriding-header "Week in Review")) ("~/org/review/week.html")) ("Rd" "Day in review" agenda "" ((org-agenda-files '("~/src/github/projects/weekly.org")) (org-agenda-show-all-dates t) (org-agenda-start-with-log-mode t) (org-agenda-start-with-clockreport-mode t) (org-agenda-archives-mode t) (org-agenda-hide-tags-regexp (concat org-agenda-hide-tags-regexp "\\|ARCHIVE")) (org-agenda-span 'day) (org-agenda-overriding-header "Day in Review")) ("~/org/review/day.html")) ("Rm" "Month in review" agenda "" ((org-agenda-files '("~/src/github/projects/weekly.org")) (org-agenda-show-all-dates t) (org-agenda-start-with-log-mode t) (org-agenda-start-with-clockreport-mode t) (org-agenda-archives-mode t) (org-agenda-hide-tags-regexp (concat org-agenda-hide-tags-regexp "\\|ARCHIVE")) (org-agenda-span 'month) (org-agenda-start-day "01") (org-read-date-prefer-future nil) (org-agenda-overriding-header "Month in Review")) ("~/org/review/month.html")) ("g" "GTD" ((agenda "" nil) (tags "INBOX" ((org-agenda-overriding-header "Inbox") (org-tags-match-list-sublevels nil))) (stuck "" ((org-agenda-overriding-header "Stuck Projects") (org-agenda-tags-todo-honor-ignore-options t)
Re: [O] bug(?) ox-html always add a timestamp in comment which can't be customized away
Thanks, sorry for not checking the latest version. On Sat, Jun 8, 2013 at 2:04 PM, Nick Dokos wrote: > Haojun Bao writes: > > > Just checked, it is the same tag (release_8.0.3), there is no change > like in your code. > > > > Could you please run git blame on those lines? > > You need to upgrade to latest. Git blame says: > > , > | $ git blame -L 1509,1511 lisp/ox-html.el > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1509) (when > (plist-get info :time-stamp-file) > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1510) > (format-time-string > | d574bf52 (Kodi Arfer 2013-05-30 15:19:57 -0400 1511) (concat "\n"))) > ` > > and the commit shows the change from the code you see to the code I see: > > , > | nick@pierrot:~/src/emacs/org/org-mode$ git show d574bf52 > | commit d574bf522d1b2ac74cb4245f8742253bde7861df > | Author: Kodi Arfer > | Date: Thu May 30 15:19:57 2013 -0400 > | > | ox-html: Fix handling of time-stamp-file > | > | * lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp > | when :time-stamp-file is nil. > | > | TINYCHANGE > | > | diff --git a/lisp/ox-html.el b/lisp/ox-html.el > | index 297cb55..949c3ba 100644 > | --- a/lisp/ox-html.el > | +++ b/lisp/ox-html.el > | @@ -1506,10 +1506,9 @@ INFO is a plist used as a communication channel." > |"iso-8859-1"))) > | (concat > | (format "%s\n" title) > | - (format > | - (when :time-stamp-file > | - (format-time-string > | - (concat "\n" > | + (when (plist-get info :time-stamp-file) > | + (format-time-string > | + (concat "\n"))) > | (format > |(if (org-html-html5-p info) > | (org-html-close-tag "meta" " charset=\"%s\"" info) > ` > > Nick > > > > > On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos wrote: > > > > Haojun Bao writes: > > > > > The culprit code is the following: > > > > > > (when :time-stamp-file > > > (format-time-string > > > (concat "\n"))) > > > > > > This `when' condition is always true, because :time-stamp-file is a > > > keyword and always eval to itself, never to nil. > > > > > > So I think org-export-time-stamp-file should be used instead of > > > :time-stamp-file. > > > > > > > What version are you using? In the version I have, the code looks > like > > this: > > > > (when (plist-get info :time-stamp-file) > >(format-time-string > > (concat "\n"))) > > > > Org-mode version 8.0.3 (release_8.0.3-197-g221768) > > [nb: this version includes a few local commits (irrelevant to this > subject)] > > -- > > Nick > > > > -- > Nick > > >
Re: [O] bug(?) ox-html always add a timestamp in comment which can't be customized away
Just checked, it is the same tag (release_8.0.3), there is no change like in your code. Could you please run git blame on those lines? On Sat, Jun 8, 2013 at 1:30 PM, Nick Dokos wrote: > Haojun Bao writes: > > > The culprit code is the following: > > > > (when :time-stamp-file > > (format-time-string > > (concat "\n"))) > > > > This `when' condition is always true, because :time-stamp-file is a > > keyword and always eval to itself, never to nil. > > > > So I think org-export-time-stamp-file should be used instead of > > :time-stamp-file. > > > > What version are you using? In the version I have, the code looks like > this: > > (when (plist-get info :time-stamp-file) >(format-time-string > (concat "\n"))) > > Org-mode version 8.0.3 (release_8.0.3-197-g221768) > [nb: this version includes a few local commits (irrelevant to this > subject)] > -- > Nick > > >
[O] bug(?) ox-html always add a timestamp in comment which can't be customized away
The culprit code is the following: (when :time-stamp-file (format-time-string (concat "\n"))) This `when' condition is always true, because :time-stamp-file is a keyword and always eval to itself, never to nil. So I think org-export-time-stamp-file should be used instead of :time-stamp-file.