Re: [PATCH] Adaptive Org faces in headings?

2020-09-19 Thread Sheng Yang
Thanks for the patch!
I noticed the patch also works for org-link, which had been a headache for me.

On Fri, Sep 18, 2020, at 04:52, Protesilaos Stavrou wrote:
> Ihor Radchenko  [2020-09-17, 16:25 +0800]:
> 
> > The attached patch seems to fix the issue.
> > Can anyone test?

I also tested, with the following org file. Works well with one exception: the 
underline for org-link, which remains the color of itself. The reason is that 
face org-link inherits face link, which has :underline t in its setting. 
Therefore, it should be the expected behavior.
> * test ~code~ =verb= [[link]]
>   #+begin_src emacs-lisp
> (set-face-attribute 'org-level-1 nil :height 3.0 :weight 'normal)
> (set-face-attribute 'org-level-1 nil :weight 'bold)
> (set-face-attribute 'org-level-1 nil :background "white")
> (set-face-attribute 'org-level-1 nil :overline "yellow")
> (set-face-attribute 'org-level-1 nil :underline "red")
>   #+end_src


Sheng Yang(杨圣), PhD student
Computer Science Department
University of Maryland, College Park
E-mail: sty...@fastmail.com
E-mail (old but still used): yangsheng6...@gmail.com



Bug: Macro incorrectly expanded when exporting to beamer [9.4 (nil @ /home/yangsheng/.emacs.d_doom_27/.local/straight/build/org-mode/)]

2020-02-17 Thread Sheng Yang


When exporting the following file to beamer,

'''
#+MACRO: SPAN @@html:$2@@
* test
- @@html:test@@
- a @@html:test@@
- {{{SPAN(emph,macro)}}}
- a {{{SPAN(emph,macro)}}}
'''

the output tex file (itemize part) is:

'''
\begin{itemize}
\item 
\item a
\itemmacro 
\item a
\end{itemize}
'''

While the correct export shold be:

'''
\begin{itemize}
\item 
\item a
\item
\item a
\end{itemize}
'''

This behavior appears on both Emacs 26.3 and Emacs 27 at 556cc727e5,
with org-mode from vanilla Emacs, and org-contrib at 2096c9c76. This
problem does not exist when exporting to LaTeX.

In case you need, the whole output file is:
'''
% Created 2020-02-17 一 06:13
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usetheme{default}
\author{Sheng Yang}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Sheng Yang},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 27.0.60 (Org mode 9.4)}, 
 pdflang={English}}
\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}

\begin{frame}[label={sec:orgb5f5f6a}]{test}
\begin{itemize}
\item 
\item a
\itemmacro 
\item a
\end{itemize}
\end{frame}
\end{document}
'''



Emacs  : GNU Emacs 27.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
 of 2020-02-17
Package: Org mode version 9.4 (nil @ 
/home/yangsheng/.emacs.d_doom_27/.local/straight/build/org-mode/)

current state:
==
(setq
 org-footnote-auto-label 'plain
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-fontify-whole-heading-line t
 org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA"
 org-link-shell-confirm-function 'yes-or-no-p
 org-mode-local-vars-hook '(eldoc-mode)
 org-babel-after-execute-hook '(org-redisplay-inline-images)
 org-insert-heading-respect-content t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-noter-insert-note-no-questions t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-follow-link-hook '(+org-delayed-recenter-h 
+nav-flash-delayed-blink-cursor-h)
 org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-highlight-sparse-tree-matches nil
 org-noter-auto-save-last-location t
 org-enforce-todo-dependencies t
 org-src-tab-acts-natively t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-special-ctrl-a/e t
 org-notmuch-open-function 'org-notmuch-follow-link
 org-agenda-files '("~/Documents/org/Research.org" "~/Documents/org/papers.org" 
"~/Documents/org/Tasks.org"
"~/Documents/org/Birthdays.org" "~/Documents/org/gcal.org" 
"~/Documents/org/Schedule.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-modules '(ol-bibtex)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-mode-hook '((closure (t) ( _) (add-hook 'before-save-hook 
'org-encrypt-entries nil t))
 er/add-org-mode-expansions yang/pangu-spacing-mode-on
 doom--setq-pangu-spacing-real-insert-separtor-for-org-mode-h 
LaTeX-math-mode org-tempo-setup
 yang/org-mode-setup #[0 "\301\211.\207" 
[imenu-create-index-function org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all 
append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
doom-disable-show-paren-mode-h
 doom-disable-show-trailing-whitespace-h 
+org-enable-auto-reformat-tables-h
 +org-enable-auto-update-cookies-h 
+org-unfold-to-2nd-level-or-point-h evil-org-mode
 org-bullets-mode toc-org-enable 
+evil-embrace-latex-mode-hook-h embrace-org-mode-hook
 org-eldoc-load org-journal-update-auto-mode-alist)
 org-clock-persist 'history
 org-export-with-smart-quotes t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-outline-path-complete-in-steps nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-finalize-hook '(+org-exclude-agenda-buffers-from-workspace-h)
 org-startup-indented t
 org-clock-history-length 23
 org-journal-mode-hook '((closure
  (org-journal-search-mode-abbrev-table 
org-journal-search-mode-syntax-table
   view-exit-ac