[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/)]

2023-11-03 Thread Haojun Bao
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: Exporting Hyperlinks ?

2023-11-03 Thread Samuel Wales
[again, the specific implementation or syntax isn't the issue for me
here, just hte ability to have global custom id in addition to
existing .org local custom id]



Re: Exporting Hyperlinks ?

2023-11-03 Thread Samuel Wales
[in case not obvious,  i used org-link-minor-mode to implement the
equivalent of global custom id's, including non-org.  i'd say, like,
";; mypackage-whatever-parsing-thingie".  that is a kludge if we can
do it right with an oref-concept-ish org minor mode, but it was hugely
useful.]



Re: Exporting Hyperlinks ?

2023-11-03 Thread Samuel Wales
to throw a cat among the pigeons, [[file:contacts.org::#custom_id][My
text]] made me think of the need for global custom id in addition to a
file-specific one like this.  idk what a good ui for it would be given
all the options we have considered over the years and recently.  just
thought to bring it up.

one thing i dislike is having to specify a file name in #+include or
links.  too brittle for my taste.  you change the file name and the
inclusion [transclusion package also?] or link is broken.  i'm ok with
org id most of the time but suepect global human-readable would be
really really useful.

imo huge value here.  in fact, i think we should allow human-readable
id's [/and/ org id's] in non-org files, such as .el.

oref seems to do this, but is not part of org and does not use org id
db yet, and some might or might not want a different syntax [no
opinion].

good concept.  as something similar, i found myself using
org-link-minor mode all the time for linking together, in comments,
parts of .el files, such as comments with distant code or code in
another file, or format statements with something that parses them but
is for whatever reason not nearby them.  and i also linked org with
.el so that org would do org things.  it made tses and links
clickable.  id markers [not implemented] would be even better as they
would allow instar and outstar formations and unbreakable bidir links
and tours/cycles and arbitrary graphs if those turn out to be desired.
if desired and not too complex, it could even hook up with the org
link insertion and editing mechanism in principle.

i did look at hyperbole both old and new, and found almost nothing
that i needed there.  just personal experience.

also, given especially the org-id stuff and other org aspects, i
actually think this kind of thing should NOT be a
separately-maintained package like oref, but should be a minor mode
that is part of the org-maintained codebase.  we do already have at
least one org minor mode for operating on non-org files.

of course, maintainers would have to be on board with it being part of
org-maintained code.  i just think org should branch out to this minor
mode.


On 11/3/23, Max Nikulin  wrote:
> On 03/11/2023 13:29, David Masterson wrote:
>> the generated LaTeX href looks like
>>
>>\href{contacts.tex}{My text}
>>
>> which looks wrong.
>
> Search part definitely should be retained.
>
> I have realized that in the LaTeX world inter-document cross-linking
> works differently. With the xr-hyper package, labels from another
> document may be used directly or with a prefix:
> https://texfaq.org/FAQ-extref
> It may be implemented for Org random labels.
>
> However I would strongly prefer PDF files having stable anchors based on
> CUSTOM_ID, not ones derived from section, figure, etc. counters. I am
> unsure if there is a package that allows to get such anchors out of the
> box.
>
> When I looked into the code for link targets resolution in the context
> of ox-html, I found it rather complicated.
>
>> I use publish for LaTex (org-latex-publish-to-pdf)
>
> Depending on your requirements, it might be possible to export to HTML
> files and then print them to PDF as a workaround. Chromium supports
> headless printing, so it should be scriptable. However to improve
> quality of formatting almost certainly heavy customization of CSS.
>
> I have realized that Chomium scrolls to proper position in PDF when it
> opens a file URI with #anchor part, but it does not update tab address
> bar when an internal link is clicked and it does not react when URL is
> edited to change #anchor part.
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: [FR] A more general case than footnotes

2023-11-03 Thread Karl Fogel

On 02 Nov 2023, Suhail Singh wrote:

Karl Fogel  writes:

My original announcement post from a year ago [2] is a good 
place to get a quick

overview of how oref.el works.

...

[2] 
https://lists.gnu.org/archive/html/emacs-humanities/2022-10/msg9.html



From [2]:
Thus, in "jones-interview.org" you might have this:

Blah blah blah and then she said that the rockets had reached 
speeds

of .3c in testing scenarios on a few occasions.  [ref:1c3a90a9]


Is it intended to be [ref:1c3a90a9] or is it supposed to be
[[ref:1c3a90a9]] (i.e., a regular link without description)?


The former: [ref:1c3a90a9]

oref.el isn't specific to Org Mode -- it's for use with any 
text-based format.  In fact, our company's typical usage involves 
references that cross between text files of different formats: 
e.g., LaTeX <--> Markdown, Org <--> DocBook Lite XML, etc.


Now, "[[ref:1c3a90a9]]" contains "[ref:1c3a90a9]" of course, so in 
an Org Mode file one could format oref origin links as regular Org 
Mode links without descriptions.  But personally I find that I'm 
never doing that -- I just put "[ref:1c3a90a9]".



On a related note, how are the references exported?


There is no provision for exporting.  That's an Org Mode concept, 
but not an oref.el concept.


Best regards,
-Karl



Re: Exporting Hyperlinks ?

2023-11-03 Thread Max Nikulin

On 03/11/2023 13:29, David Masterson wrote:

the generated LaTeX href looks like

   \href{contacts.tex}{My text}

which looks wrong.


Search part definitely should be retained.

I have realized that in the LaTeX world inter-document cross-linking 
works differently. With the xr-hyper package, labels from another 
document may be used directly or with a prefix:

https://texfaq.org/FAQ-extref
It may be implemented for Org random labels.

However I would strongly prefer PDF files having stable anchors based on 
CUSTOM_ID, not ones derived from section, figure, etc. counters. I am 
unsure if there is a package that allows to get such anchors out of the box.


When I looked into the code for link targets resolution in the context 
of ox-html, I found it rather complicated.



I use publish for LaTex (org-latex-publish-to-pdf)


Depending on your requirements, it might be possible to export to HTML 
files and then print them to PDF as a workaround. Chromium supports 
headless printing, so it should be scriptable. However to improve 
quality of formatting almost certainly heavy customization of CSS.


I have realized that Chomium scrolls to proper position in PDF when it 
opens a file URI with #anchor part, but it does not update tab address 
bar when an internal link is clicked and it does not react when URL is 
edited to change #anchor part.