* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text @ 2018-02-20 18:16 Aaron Jensen 2018-02-20 19:33 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-20 18:16 UTC (permalink / raw) To: 30553 If you set `line-spacing' to more than 0, then any underlines appear below the line spacing rather than below the word being underlined. Typographically, this is probably wrong and it is ugly. Here's an example: https://cl.ly/3O1a2I160T0A/Image%202018-02-20%20at%2010.13.26%20AM.png Here it is at 10, for exaggerated affect: https://cl.ly/0s3v2j1U2a19/Image%202018-02-20%20at%2010.15.45%20AM.png Is it possible to draw the underline directly beneath the word instead? Thanks! In GNU Emacs 26.0.91 (build 1, x86_64-apple-darwin17.3.0, NS appkit-1561.20 Version 10.13.2 (Build 17C205)) of 2018-01-13 built on aaron-mbt.local Repository revision: 5dd0e5c54d29e81c07798a124295c8c3f016d621 Windowing system distributor 'Apple', version 10.3.1561 Recent messages: Saving file /Users/aaronjensen/.emacs.d/.cache/personal.org... Wrote /Users/aaronjensen/.emacs.d/.cache/personal.org Fetched data overwrote /Users/aaronjensen/.emacs.d/.cache/personal.org Added 5 events for today Saving file /Users/aaronjensen/.emacs.d/.cache/work.org... Wrote /Users/aaronjensen/.emacs.d/.cache/work.org Fetched data overwrote /Users/aaronjensen/.emacs.d/.cache/work.org Added 5 events for today Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus/HEAD-5dd0e5c --with-xml2 --without-dbus --with-gnutls --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained' Configured features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: eros-mode: t evil-org-mode: t org-bullets-mode: t org-indent-mode: t magit-auto-revert-mode: t global-git-gutter+-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t company-statistics-mode: t company-childframe-mode: t company-mode: t yas-global-mode: t yas-minor-mode: t recentf-mode: t desktop-save-mode: t buffer-face-mode: t auto-dim-other-buffers-mode: t global-wakatime-mode: t wakatime-mode: t evil-mc-mode: t hl-todo-mode: t global-spacemacs-whitespace-cleanup-mode: t spacemacs-whitespace-cleanup-mode: t ws-butler-global-mode: t ws-butler-mode: t winum-mode: t winner-mode: t pupo-mode: t purpose-mode: t volatile-highlights-mode: t global-vi-tilde-fringe-mode: t vi-tilde-fringe-mode: t save-place-mode: t savehist-mode: t projectile-rails-global-mode: t projectile-mode: t persp-mode: t global-origami-mode: t origami-mode: t Info-breadcrumbs-in-mode-line-mode: t flycheck-pos-tip-mode: t global-flycheck-mode: t flx-ido-mode: t eyebrowse-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-search-highlight-persist: t evil-search-highlight-persist: t show-smartparens-global-mode: t show-smartparens-mode: t evil-lion-mode: t evil-escape-mode: t eval-sexp-fu-flash-mode: t editorconfig-mode: t global-anzu-mode: t anzu-mode: t diff-auto-refine-mode: t counsel-mode: t ivy-mode: t delete-selection-mode: t clean-aindent-mode: t hybrid-mode: t which-key-mode: t override-global-mode: t global-undo-tree-mode: t undo-tree-mode: t flyspell-mode: t evil-mode: t evil-local-mode: t spacemacs-leader-override-mode: t global-spacemacs-leader-override-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t shell-dirtrack-mode: t ido-vertical-mode: t global-page-break-lines-mode: t page-break-lines-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: yas--auto-fill transient-mark-mode: t abbrev-mode: t Load-path shadows: /Users/aaronjensen/.emacs.d/elpa/26.0/develop/ht-20180129.1434/ht hides /Users/aaronjensen/.emacs.d/core/libs/ht /Users/aaronjensen/.emacs.d/elpa/26.0/develop/inf-ruby-20180121.2300/inf-ruby hides /usr/local/share/emacs/site-lisp/ruby/inf-ruby /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-stan hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-stan /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-exp hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-exp /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-J hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-J /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-eshell hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-eshell /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-emacs-lisp hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-emacs-lisp /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-gnus hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-gnus /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-css hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-css /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-lob hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-lob /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-forth hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-forth /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-macs hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-macs /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-version hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-version /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-scheme hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-scheme /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-abc hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-abc /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-C hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-C /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-capture hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-capture /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ref hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ref /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-clojure hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-clojure /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-mouse hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-mouse /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ledger hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ledger /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-ctags hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-ctags /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-entities hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-entities /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-archive hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-archive /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-screen hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-screen /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-haskell hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-haskell /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-asymptote hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-asymptote /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-mhe hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-mhe /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-table hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-table /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-keys hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-keys /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-org hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-org /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-plot hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-plot /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-awk hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-awk /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-groovy hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-groovy /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-octave hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-octave /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-faces hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-faces /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-colview hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-colview /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-R hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-R /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-timer hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-timer /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ebnf hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ebnf /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-mobile hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-mobile /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-fortran hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-fortran /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-shell hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-shell /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-perl hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-perl /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-sqlite hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-sqlite /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-sed hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-sed /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-list hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-list /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ruby hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ruby /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-eval hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-eval /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-habit hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-habit /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-clock hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-clock /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-html hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-html /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-src hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-src /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-lisp hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-lisp /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ditaa hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ditaa /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-pcomplete hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-pcomplete /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-lint hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-lint /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-rmail hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-rmail /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-latex hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-latex /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-sass hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-sass /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-io hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-io /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-tangle hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-tangle /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-calc hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-calc /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-java hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-java /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-icalendar hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-icalendar /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-eww hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-eww /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-md hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-md /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-beamer hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-beamer /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-element hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-element /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-protocol hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-protocol /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-mscgen hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-mscgen /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-gnuplot hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-gnuplot /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-latex hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-latex /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-id hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-id /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-vala hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-vala /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-man hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-man /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-feed hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-feed /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-lua hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-lua /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-table hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-table /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-ocaml hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-ocaml /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-coq hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-coq /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-picolisp hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-picolisp /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-indent hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-indent /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-lilypond hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-lilypond /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-matlab hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-matlab /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-datetree hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-datetree /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-python hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-python /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-bbdb hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-bbdb /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-makefile hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-makefile /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-duration hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-duration /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-agenda hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-agenda /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-dot hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-dot /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-js hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-js /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-publish hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-publish /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-inlinetask hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-inlinetask /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-org hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-org /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-core hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-core /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-compat hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-compat /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-docview hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-docview /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-odt hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-odt /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-plantuml hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-plantuml /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-ascii hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-ascii /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-loaddefs hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-loaddefs /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-w3m hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-w3m /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-bibtex hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-bibtex /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-info hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-info /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-hledger hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-hledger /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-maxima hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-maxima /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-macro hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-macro /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-sql hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-sql /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-attach hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-attach /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-processing hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-processing /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ox-texinfo hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ox-texinfo /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-irc hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-irc /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-crypt hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-crypt /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-footnote hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-footnote /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/org-install hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/org-install /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-comint hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-comint /Users/aaronjensen/.emacs.d/elpa/26.0/develop/org-plus-contrib-20180219/ob-shen hides /usr/local/Cellar/emacs-plus/HEAD-5dd0e5c/share/emacs/26.0.91/lisp/org/ob-shen Features: (flatui-theme magit-bookmark bookmark descr-text company-robe robe rubocop ruby-refactor ruby-tools evil-matchit enh-ruby-mode appt org-duration two-column iso-transl evil-nerd-commenter evil-nerd-commenter-operator evil-nerd-commenter-sdk company-tng cl-print ange-ftp debug trace misearch multi-isearch network-stream starttls mailalias smtpmail mwim shadow sort mail-extr emacsbug sendmail smex company-lua smartparens-lua lua-mode overseer pkg-info epl auto-compile packed elisp-slime-nav eros flycheck-package package-lint finder lispyville lispy iedit iedit-lib lispy-inline avy semantic/db semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet evil-ediff ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff edebug lispy-tags nameless eieio-opt speedbar sb-image ezimage dframe org-gcal org-archive request-deferred deferred request alert log4e notifications dbus xml gntp executable org-clock cal-iso diary-lib diary-loaddefs company-emoji company-emoji-list org-eldoc evil-org org-table ob-shell ob-ruby org-bullets org-download toc-org org-indent image-file org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader org-docview doc-view jka-compr org-bibtex bibtex org-bbdb org-w3m org-checklist org-inlinetask epa-file org-agenda smartparens-org ob-elixir ob-http ob-http-mode ob-restclient restclient ox-gfm ox-md ox-reveal ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox orgit org-element avl-tree generator magithub magithub-dash magithub-notification magithub-issue-view magithub-comment magithub-repo magithub-orgs magithub-issue-tricks magithub-issue-post magithub-edit-mode magithub-ci magithub-issue magithub-label magithub-user magithub-core magithub-faces magithub-settings smartparens-markdown markdown-mode ghub+ apiwrap apropos evil-magit git-rebase magit-gh-pulls gh gh-users gh-issues gh-pulls gh-repos gh-comments gh-gist gh-oauth gh-api logito gh-cache gh-auth gh-url url-http tls gnutls url-gw nsm magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-collab ghub url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert magit-process magit-margin magit-mode org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs git-gutter-fringe+ fringe-helper git-gutter+ git-commit with-editor magit-git magit-section magit-utils crm magit-popup async-bytecomp async log-edit message rmc puny rfc822 mml mml-sec epa gnus-util rmail rmail-loaddefs mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log shell-pop shrink-path vc-git open-junk-file eslintd-fix flow-minor-mode company-statistics company-files company-keywords company-capf company-dabbrev-code company-dabbrev company-flow company-childframe posframe company js-doc iswitchb js2-imenu-extras js2-refactor js2r-paredit js2r-conveniences js2r-conditionals js2r-wrapping js2r-functions js2r-vars multiple-cursors-core js2r-iife js2r-formatting js2r-helpers skewer-mode cache-table simple-httpd pp url-util add-node-modules-path goto-addr bug-reference auto-highlight-symbol highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters yasnippet-snippets yasnippet flycheck-credo flycheck-popup-tip popup elec-pair cursor-sensor rjsx-mode js2-mode smartparens-javascript js smartparens-html sgml-mode dom cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs editorconfig-core editorconfig-core-handle editorconfig-fnmatch colir counsel-projectile recentf tree-widget desktop frameset face-remap auto-dim-other-buffers wakatime-mode contextual-menubar quiet-emacs fill-or-unfill init-macos-terminal-copy-paste init-flyspell init-terminal-cursor evil-terminal-cursor-changer color init-org init-magit evil-mc evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars evil-mc-known-commands evil-mc-common hl-todo persistent-soft list-utils pcache eieio-base font-utils server zone spacemacs-whitespace-cleanup ws-butler winum winner spacemacs-purpose-popwin window-purpose-x imenu-list imenu window-purpose window-purpose-fixes window-purpose-prefix-overload window-purpose-switch let-alist window-purpose-layout window-purpose-core window-purpose-configuration window-purpose-utils volatile-highlights vi-tilde-fringe unicode-fonts tmux string-inflection smartparens-config smartparens-text smartparens-ruby saveplace savehist ruby-test-mode pcre2el rxt re-builder projectile-rails rake inflections inf-ruby ruby-mode smie projectile grep ibuf-ext ibuffer ibuffer-loaddefs popwin persp-mode osx-trash origami origami-parsers linum ivy-hydra info+ image-mode flycheck-pos-tip pos-tip flycheck-flow flycheck find-func flx-ido eyebrowse evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state smartparens evil-lion evil-indent-plus evil-exchange evil-escape evil-args eval-sexp-fu highlight font-lock+ frame-fns avoid eterm-256color f term ehelp xterm-color editorconfig noutline outline dtrt-indent doom-modeline evil-anzu anzu all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons memoize diff-hl vc-dir ewoc vc vc-dispatcher diff-mode counsel dired dired-loaddefs compile esh-util etags xref project swiper ivy flx delsel ivy-overlay ffap clean-aindent-mode adaptive-wrap gh-common gh-profile s marshal dash rx docker-tramp tramp-cache hybrid-mode exec-path-from-shell evil-evilified-state which-key use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core hydra lv cus-edit cus-start cus-load evil evil-integration undo-tree diff evil-maps evil-commands reveal flyspell ispell evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common windmove thingatpt rect evil-digraphs diminish evil-vars bind-map quelpa help-fns radix-tree package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr json map lisp-mnt hl-line xt-mouse autorevert filenotify cl-extra disp-table wid-edit monokai-theme info finder-inf patch-server init-sass init-php init-html init-evil tramp tramp-compat tramp-loaddefs trampver shell pcomplete comint ansi-color ring parse-time format-spec ido-vertical-mode ido core-spacemacs core-use-package-ext core-transient-state core-micro-state core-toggle core-keybindings core-fonts-support core-themes-support core-display-init core-jump core-release-management core-custom-settings core-configuration-layer eieio-compat core-spacemacs-buffer core-funcs core-dotspacemacs ht cl help-mode warnings package url-handlers url-parse auth-source cl-seq password-cache url-vars seq eieio byte-opt bytecomp byte-compile cconv eieio-core eieio-loaddefs epg epg-config core-command-line pcase core-debug edmacro kmacro derived cl-macs gv advice profiler easymenu cl-loaddefs cl-lib page-break-lines easy-mmode core-emacs-backports subr-x time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 2094262 454960) (symbols 48 107390 2) (miscs 40 7074 13436) (strings 32 407221 23617) (string-bytes 1 12803336) (vectors 16 196072) (vector-slots 8 5036841 263078) (floats 8 1174 1845) (intervals 56 94892 9101) (buffers 992 68)) ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-20 18:16 bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text Aaron Jensen @ 2018-02-20 19:33 ` Eli Zaretskii 2018-02-20 19:44 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-20 19:33 UTC (permalink / raw) To: Aaron Jensen; +Cc: 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Tue, 20 Feb 2018 10:16:46 -0800 > > If you set `line-spacing' to more than 0, then any underlines appear > below the line spacing rather than below the word being underlined. > Typographically, this is probably wrong and it is ugly. > > Here's an example: > https://cl.ly/3O1a2I160T0A/Image%202018-02-20%20at%2010.13.26%20AM.png > > Here it is at 10, for exaggerated affect: > > https://cl.ly/0s3v2j1U2a19/Image%202018-02-20%20at%2010.15.45%20AM.png > > Is it possible to draw the underline directly beneath the word instead? I cannot reproduce this. Could this be Darwin-specific? Did you try playing with the value of x-underline-at-descent-line? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-20 19:33 ` Eli Zaretskii @ 2018-02-20 19:44 ` Aaron Jensen 2018-02-21 1:46 ` Alp Aker 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-20 19:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 30553 On Tue, Feb 20, 2018 at 11:33 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Is it possible to draw the underline directly beneath the word instead? > > I cannot reproduce this. Could this be Darwin-specific? > > Did you try playing with the value of x-underline-at-descent-line? Ah, that was set to t in my configuration thanks to spacemacs. I can set it to nil and it's better, however, at least on darwin, the variable does not do what it says. It renders it well below the descent line in the case I described. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-20 19:44 ` Aaron Jensen @ 2018-02-21 1:46 ` Alp Aker 2018-02-21 4:23 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Alp Aker @ 2018-02-21 1:46 UTC (permalink / raw) To: Aaron Jensen; +Cc: 30553 [-- Attachment #1: Type: text/plain, Size: 295 bytes --] > Ah, that was set to t in my configuration thanks to spacemacs. I can > set it to nil and it's better, however, at least on darwin, the > variable does not do what it says. It renders it well below the > descent line in the case I described. That doesn't appear to be specific to the NS port. [-- Attachment #2: Type: text/html, Size: 393 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 1:46 ` Alp Aker @ 2018-02-21 4:23 ` Eli Zaretskii 2018-02-21 4:27 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-21 4:23 UTC (permalink / raw) To: Alp Aker; +Cc: 30553, aaronjensen > From: Alp Aker <alptekin.aker@gmail.com> > Date: Tue, 20 Feb 2018 20:46:26 -0500 > Cc: Eli Zaretskii <eliz@gnu.org>, 30553@debbugs.gnu.org > > > Ah, that was set to t in my configuration thanks to spacemacs. I can > > set it to nil and it's better, however, at least on darwin, the > > variable does not do what it says. It renders it well below the > > descent line in the case I described. > > That doesn't appear to be specific to the NS port. It's a documentation problem. I pushed a doc fix to the release branch. Can we close this bug, or is there something else to do here? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 4:23 ` Eli Zaretskii @ 2018-02-21 4:27 ` Aaron Jensen 2018-02-21 5:01 ` Alp Aker 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-21 4:27 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Tue, Feb 20, 2018 at 8:23 PM, Eli Zaretskii <eliz@gnu.org> wrote: > It's a documentation problem. I pushed a doc fix to the release > branch. > > Can we close this bug, or is there something else to do here? Personally, I'd prefer it worked as the original documentation said. Typographically, where it is is really bad and it's only an ok thing if line-spacing isn't set. Is the information available from the font to calculate placement below the descenders? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 4:27 ` Aaron Jensen @ 2018-02-21 5:01 ` Alp Aker 2018-02-21 6:03 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Alp Aker @ 2018-02-21 5:01 UTC (permalink / raw) To: Aaron Jensen; +Cc: 30553 [-- Attachment #1: Type: text/plain, Size: 451 bytes --] close 30553 quit On Tue, Feb 20, 2018 at 11:27 PM, Aaron Jensen <aaronjensen@gmail.com> wrote: > Is the information available from the font to calculate placement > below the descenders? In order to make use of font-specific information for the underline offset, you need to set x-use-underline-position-properties to a non-nil value. But note that not all fonts provide that info, and some that do specify a value that creates unsightly results. [-- Attachment #2: Type: text/html, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 5:01 ` Alp Aker @ 2018-02-21 6:03 ` Aaron Jensen 2018-02-21 13:47 ` Alp Aker 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-21 6:03 UTC (permalink / raw) To: Alp Aker; +Cc: 30553 On Tue, Feb 20, 2018 at 9:01 PM, Alp Aker <alptekin.aker@gmail.com> wrote: > In order to make use of font-specific information for the underline offset, > you > need to set x-use-underline-position-properties to a non-nil value. But > note that not > all fonts provide that info, and some that do specify a value that creates > unsightly results. Thanks, I'll give that a shot, though that wasn't exactly what I was asking about. I haven't seen the doc change that Eli Zaretskii has pushed because I can't seem to get to savannah, but I was suggesting that, given the name of the variable x-underline-at-descent-line, it'd be nice if the natural height of the font was used rather than the height + extra line spacing to determine where to place the underline. Does that make sense? Basically, it'd place the underline at the same place regardless of what line-spacing was set to (as if it were set to nil). ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 6:03 ` Aaron Jensen @ 2018-02-21 13:47 ` Alp Aker 2018-02-21 16:17 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Alp Aker @ 2018-02-21 13:47 UTC (permalink / raw) To: Aaron Jensen; +Cc: 30553 [-- Attachment #1: Type: text/plain, Size: 1202 bytes --] On Wed, Feb 21, 2018 at 1:03 AM, Aaron Jensen <aaronjensen@gmail.com> wrote: > Given the name of the variable x-underline-at-descent-line, it'd > be nice if the natural height of the font was used rather than the > height + extra line spacing to determine where to place the underline. > Does that make sense? Basically, it'd place the underline at the same > place regardless of what line-spacing was set to (as if it were set to > nil). Something like that should already be possible. Underline placement is determined by the following rules, considered in this order: 1. If x-underline-at-descent-line is non-nil, underline at the descent line, where the descent line is the bottom of the current glyph row, inclusive of extra line spacing. 2. If x-use-underline-position-properties is non-nil and the font has underline position info, use that. 3. If the current font can be determined, use half of the font's descent, "descent" here meaning the maximum amount by which a character from the font descends below the baseline. 4. Otherwise, use the default offset (1 point). The only one of these possibilities that should be affected a change in line spacing is 1. Is that not what you see? [-- Attachment #2: Type: text/html, Size: 2256 bytes --] ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 13:47 ` Alp Aker @ 2018-02-21 16:17 ` Aaron Jensen 2018-02-21 17:56 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-21 16:17 UTC (permalink / raw) To: Alp Aker; +Cc: 30553 On Wed, Feb 21, 2018 at 5:47 AM, Alp Aker <alptekin.aker@gmail.com> wrote: > On Wed, Feb 21, 2018 at 1:03 AM, Aaron Jensen <aaronjensen@gmail.com> wrote: > Something like that should already be possible. Underline placement is > determined by the following rules, considered in this order: > > 1. If x-underline-at-descent-line is non-nil, underline at the descent line, > where the descent line is the bottom of the current glyph row, inclusive of > extra line spacing. I'm specifically talking about this rule. I am suggesting that this change to not include the extra line spacing. Typographically, I cannot think of a good reason to include the extra line spacing. It ends up putting the underline above the next line effectively, which looks terrible (see my original screenshots). Given that rule #3 you mention below uses half the descent, it seems like the full descent + 1px could be used for this, which would put the underline in a sensible place (probably the place it is today when line-spacing is nil). > 2. If x-use-underline-position-properties is non-nil and the font has > underline > position info, use that. > > 3. If the current font can be determined, use half of the font's descent, > "descent" here meaning the maximum amount by which a character from the font > descends below the baseline. > > 4. Otherwise, use the default offset (1 point). > > The only one of these possibilities that should be affected a change in line > spacing is 1. Is that not what you see? > ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 16:17 ` Aaron Jensen @ 2018-02-21 17:56 ` Eli Zaretskii 2018-02-22 2:15 ` Aaron Jensen 2018-02-25 22:09 ` Aaron Jensen 0 siblings, 2 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-02-21 17:56 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 21 Feb 2018 08:17:34 -0800 > Cc: Eli Zaretskii <eliz@gnu.org>, 30553@debbugs.gnu.org > > On Wed, Feb 21, 2018 at 5:47 AM, Alp Aker <alptekin.aker@gmail.com> wrote: > > On Wed, Feb 21, 2018 at 1:03 AM, Aaron Jensen <aaronjensen@gmail.com> wrote: > > Something like that should already be possible. Underline placement is > > determined by the following rules, considered in this order: > > > > 1. If x-underline-at-descent-line is non-nil, underline at the descent line, > > where the descent line is the bottom of the current glyph row, inclusive of > > extra line spacing. > > I'm specifically talking about this rule. I am suggesting that this > change to not include the extra line spacing. Typographically, I > cannot think of a good reason to include the extra line spacing. It > ends up putting the underline above the next line effectively, which > looks terrible (see my original screenshots). Given that rule #3 you > mention below uses half the descent, it seems like the full descent + > 1px could be used for this, which would put the underline in a > sensible place (probably the place it is today when line-spacing is > nil). Feel free to submit patches to introduce this as yet another optional behavior. We cannot just throw out the current behavior, because it was with us since Emacs 21. Note that this feature has 3 implementations, one each in every GUI back-end we support. Thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 17:56 ` Eli Zaretskii @ 2018-02-22 2:15 ` Aaron Jensen 2018-02-22 6:26 ` Eli Zaretskii 2018-02-25 22:09 ` Aaron Jensen 1 sibling, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-22 2:15 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Wed, Feb 21, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: > Feel free to submit patches to introduce this as yet another optional > behavior. We cannot just throw out the current behavior, because it > was with us since Emacs 21. Understood, I don't think I'll do this as it's not a big deal to me given the other available settings (and I'd probably want to name it x-underline-at-descent-line, heh). I was merely providing feedback on the current behavior, which neither matches the variable name of `x-underline-at-descent-line`, nor match(ed?) the documentation so I assumed it was a bug, but it sounds like you don't consider it a bug and/or you'd rather not change it. Speaking of the manual, I didn't see the documentation change appear on master, so I cannot comment as to whether or not it makes the actual behavior more apparent. Thanks, Aaron ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-22 2:15 ` Aaron Jensen @ 2018-02-22 6:26 ` Eli Zaretskii 2018-02-22 6:29 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-22 6:26 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 21 Feb 2018 18:15:10 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > Speaking of the manual, I didn't see the documentation change appear > on master, so I cannot comment as to whether or not it makes the > actual behavior more apparent. I fixed the documentation on the emacs-26 branch, so you can look it up there, or you can wait for it to be merged to master sometime soon. Thanks. P.S. So is it okay to close this bug report now? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-22 6:26 ` Eli Zaretskii @ 2018-02-22 6:29 ` Aaron Jensen 2018-02-22 7:21 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-22 6:29 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Wed, Feb 21, 2018 at 10:26 PM, Eli Zaretskii <eliz@gnu.org> wrote: > I fixed the documentation on the emacs-26 branch, so you can look it > up there, or you can wait for it to be merged to master sometime soon. Ah, found it, thanks. That looks fine to me. Thank you for the update. > P.S. So is it okay to close this bug report now? I believe Alp Aker closed it some messages ago, but if it reopened or did not close then yes, please feel free. Thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-22 6:29 ` Aaron Jensen @ 2018-02-22 7:21 ` Eli Zaretskii 0 siblings, 0 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-02-22 7:21 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553-done > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 21 Feb 2018 22:29:33 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > > P.S. So is it okay to close this bug report now? > > I believe Alp Aker closed it some messages ago, but if it reopened or > did not close then yes, please feel free. Done, thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-21 17:56 ` Eli Zaretskii 2018-02-22 2:15 ` Aaron Jensen @ 2018-02-25 22:09 ` Aaron Jensen 2018-02-26 15:42 ` Eli Zaretskii 1 sibling, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-25 22:09 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 [-- Attachment #1: Type: text/plain, Size: 924 bytes --] On Wed, Feb 21, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: > Feel free to submit patches to introduce this as yet another optional > behavior. We cannot just throw out the current behavior, because it > was with us since Emacs 21. > > Note that this feature has 3 implementations, one each in every GUI > back-end we support. I changed my mind on this after discovering that these variables do not work as buffer local variables. Whatever the current buffer has it set to causes all other visible buffers to draw in that way, which causes underlines to jump around if they're set differently in different buffers. Please see attached patch. I don't have a windows or linux machine to test on, so if someone could do that it would be appreciated. There are some subtle differences in the original code which I tried to respect. I'm open to any advice on the naming/doc strings or implementation. Thanks! Aaron [-- Attachment #2: 0001-Add-x-underline-below-font-descent.patch --] [-- Type: application/octet-stream, Size: 4660 bytes --] From 93892660ffb3d0ee80dbf1fc1976a429e1f3f104 Mon Sep 17 00:00:00 2001 From: Aaron Jensen <aaronjensen@gmail.com> Date: Sun, 25 Feb 2018 14:06:49 -0800 Subject: [PATCH] Add x-underline-below-font-descent --- src/nsterm.m | 7 +++++++ src/w32term.c | 9 ++++++++- src/xterm.c | 15 +++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..bd2d887ba1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3495,6 +3495,8 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. /* Determine the offset of underlining from the baseline. */ if (x_underline_at_descent_line) position = descent - thickness; + else if (x_underline_below_font_descent && font) + position = s->y - s->ybase + font->height; else if (x_use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; @@ -9471,6 +9473,11 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFVAR_BOOL ("x-underline-below-font-descent", + x_underline_below_font_descent, + doc: /* SKIP: real doc in xterm.c. */); + x_underline_below_font_descent = 0; + /* Tell Emacs about this window system. */ Fprovide (Qns, Qnil); diff --git a/src/w32term.c b/src/w32term.c index 97afb678c1..dec382a2f2 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2493,7 +2493,9 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (x_underline_below_font_descent) + position = s->y - s->ybase + font->height; + else if (x_use_underline_position_properties && font->underline_position >= 0) position = font->underline_position; else @@ -7391,6 +7393,11 @@ the cursor have no effect. */); doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFVAR_BOOL ("x-underline-below-font-descent", + x_underline_below_font_descent + doc: /* SKIP: real doc in xterm.c. */); + x_underline_below_font_descent = 0; + DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); Vx_toolkit_scroll_bars = Qt; diff --git a/src/xterm.c b/src/xterm.c index 0d25c7f1a2..119e9943c2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3725,7 +3725,9 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum descent) / 2), with ROUND(x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (x_underline_below_font_descent && font) + position = s->y - s->ybase + font->height; + else if (x_use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; else if (font) @@ -13251,12 +13253,21 @@ small font display sizes. */); x_underline_at_descent_line, doc: /* Non-nil means to draw the underline at the same place as the descent line. (If `line-spacing' is in effect, that moves the underline lower by -that many pixels.) +that many pixels. If this is not what you want, see `x-underline-below-font-descent') A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = false; + DEFVAR_BOOL ("x-underline-below-font-descent", + x_underline_below_font_descent, + doc: /* Non-nil means to draw the underline below the font's descenders. +(Ignored if `x-underline-at-descent-line' is non-nil) +A value of nil means to draw the underline according to the value of the +variable `x-use-underline-position-properties', which is usually at the +baseline level. The default value is nil. */); + x_underline_below_font_descent = false; + DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, doc: /* Non-nil means that a mouse click to focus a frame does not move point. -- 2.15.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-25 22:09 ` Aaron Jensen @ 2018-02-26 15:42 ` Eli Zaretskii 2018-02-26 16:01 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-26 15:42 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Sun, 25 Feb 2018 14:09:46 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > I changed my mind on this after discovering that these variables do > not work as buffer local variables. Whatever the current buffer has it > set to causes all other visible buffers to draw in that way, which > causes underlines to jump around if they're set differently in > different buffers. > > Please see attached patch. I don't have a windows or linux machine to > test on, so if someone could do that it would be appreciated. There > are some subtle differences in the original code which I tried to > respect. I'm not sure I see the point of adding yet another variable. Don't you see the same problem with local values of that variable, like you saw with the 2 existing ones? In general, you cannot assume in display code that buffer-local variables have their expected values, because redisplay needs to redraw windows other than the selected one, and when it does so, the window's buffer is not made the current one in the full sense of the word. What you saw is the display engine using the value from the last buffer that was current before a redisplay cycle. So you need to explicitly access buffer-local values by calling buffer_local_value; see the examples of that in xdisp.c. If we want to allow users to make these variables buffer-local, the best way is to modify the display code to use their buffer-local values. That would be a cleaner solution, I think. But anyway, what is the use case where you need different values for these variables in different buffers? These variables were introduced to solve problems with semi-buggy fonts, and these problems are not limited to a single buffer. Also, if you set these variables to ignore the line-spacing, it will produce a reasonable display in a buffer without any line-spacing at all, so I wonder why you needed to make these local. Can you explain? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 15:42 ` Eli Zaretskii @ 2018-02-26 16:01 ` Aaron Jensen 2018-02-26 19:25 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-26 16:01 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Mon, Feb 26, 2018 at 7:42 AM, Eli Zaretskii <eliz@gnu.org> wrote: > I'm not sure I see the point of adding yet another variable. Don't > you see the same problem with local values of that variable, like you > saw with the 2 existing ones? Yes, but the point is actually that this is a setting I would be ok with for my entire frame. Whereas before I was using different underline settings depending on whether or not it was code or prose. > In general, you cannot assume in display code that buffer-local > variables have their expected values, because redisplay needs to > redraw windows other than the selected one, and when it does so, the > window's buffer is not made the current one in the full sense of the > word. What you saw is the display engine using the value from the > last buffer that was current before a redisplay cycle. So you need to > explicitly access buffer-local values by calling buffer_local_value; > see the examples of that in xdisp.c. Ok, that makes sense. Would you like me to make that change for all of them given my description below? Is there some performance penalty to this? > If we want to allow users to make these variables buffer-local, the > best way is to modify the display code to use their buffer-local > values. That would be a cleaner solution, I think. > > But anyway, what is the use case where you need different values for > these variables in different buffers? These variables were introduced > to solve problems with semi-buggy fonts, and these problems are not > limited to a single buffer. Also, if you set these variables to > ignore the line-spacing, it will produce a reasonable display in a > buffer without any line-spacing at all, so I wonder why you needed to > make these local. Can you explain? I briefly described this above, but here are some more details. Today, globally, I'm using: (setq x-underline-at-descent-line t) This was the default in spacemacs and it's likely because of #30609 (underlines drawn over descenders make text hard to read) and different colored underlines are used heavily with flycheck. And, in org-mode: (setq-local line-spacing 1) (setq-local x-underline-at-descent-line nil) (setq-local x-use-underline-position-properties t) For reasons that led me to create this initial bug report: x-underline-at-descent-line looks terrible when line-spacing > 0. With this variable, you are right, I no longer need to use `setq-local`, I can just set this variable globally and it will look reasonable for code and prose. That said, I'm not sure exactly what you meant by: "if you set these variables to ignore the line-spacing", are you referring to the new variable I introduced or are you OK with me making a change to x-underline-at-descent-line to ignore line spacing? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 16:01 ` Aaron Jensen @ 2018-02-26 19:25 ` Eli Zaretskii 2018-02-26 20:21 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-26 19:25 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Mon, 26 Feb 2018 08:01:03 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > > In general, you cannot assume in display code that buffer-local > > variables have their expected values, because redisplay needs to > > redraw windows other than the selected one, and when it does so, the > > window's buffer is not made the current one in the full sense of the > > word. What you saw is the display engine using the value from the > > last buffer that was current before a redisplay cycle. So you need to > > explicitly access buffer-local values by calling buffer_local_value; > > see the examples of that in xdisp.c. > > Ok, that makes sense. Would you like me to make that change for all of > them given my description below? "All" meaning the two involved in the underline position, right? Yes, that would be a good addition, I think. > Is there some performance penalty to this? Not really, no. If the variable is buffer-local, it will incur a small penalty, but we already have a couple of such variables elsewhere in the display, so I doubt one more will make any tangible difference. And for the usual case of a global symbol, there's no penalty beyond a function call. > I briefly described this above, but here are some more details. Today, > globally, I'm using: > > (setq x-underline-at-descent-line t) > > This was the default in spacemacs and it's likely because of #30609 > (underlines drawn over descenders make text hard to read) and > different colored underlines are used heavily with flycheck. So it's spacemacs' fault, perhaps exasperated by choosing some font and/or colors that make this issue more prominent. Right? Then how about asking the spacemacs developers to improve the situation on their end? > (setq-local line-spacing 1) > (setq-local x-underline-at-descent-line nil) > (setq-local x-use-underline-position-properties t) > > For reasons that led me to create this initial bug report: > x-underline-at-descent-line looks terrible when line-spacing > 0. > > With this variable, you are right, I no longer need to use > `setq-local`, I can just set this variable globally and it will look > reasonable for code and prose. Good, that's what I thought. > That said, I'm not sure exactly what you meant by: "if you set these > variables to ignore the line-spacing", are you referring to the new > variable I introduced or are you OK with me making a change to > x-underline-at-descent-line to ignore line spacing? I meant to suggest what you did: customize x-underline-at-descent-line such that it avoids the effect of line-spacing you didn't like. I assumed that such a setting will solve your problems everywhere. Nonetheless, making it possible to customize those locally for one buffer would be a good improvement, IMO. Thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 19:25 ` Eli Zaretskii @ 2018-02-26 20:21 ` Aaron Jensen 2018-02-26 20:41 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-26 20:21 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Mon, Feb 26, 2018 at 11:25 AM, Eli Zaretskii <eliz@gnu.org> wrote: > "All" meaning the two involved in the underline position, right? Yes, > that would be a good addition, I think. Ok, I'll submit a separate patch for that. > So it's spacemacs' fault, perhaps exasperated by choosing some font > and/or colors that make this issue more prominent. Right? Then how > about asking the spacemacs developers to improve the situation on > their end? No, spacemacs is setting x-underline-at-descent-line t because of bug#30609, I would guess. There's no other good way to deal with colored underlines as far as I can tell. This isn't a spacemacs issue. I didn't want to use x-underline-at-descent-line t because I wanted to use line-spacing in org-mode. Hence my situation and these bugs. >> With this variable, you are right, I no longer need to use >> `setq-local`, I can just set this variable globally and it will look >> reasonable for code and prose. > > Good, that's what I thought. By "this variable" I meant the one I introduced in my patch. Are you still interested in accepting that? Just to recap: 1. I will submit a patch to make the two existing underline variables work buffer local. 2. It would be great if we could figure out a way to address bug#30609. I believe it would alleviate much of the legibility issues around underlines when there are multiple colors, which could lead to x-underline-at-descent-line t not being necessary in spacemacs (and maybe other peoples configs who have set it for this reason). Do you think there is a path to this? (feel free to reply to this on bug#30609) 3. I have the previously attached patch which adds a new variable that draws the underline below the descenders rather than at the bottom of the overall descent. I believe that this is an improvement to x-underline-at-descent-line t and that if it existed I would encourage spacemacs to move to this (if bug#30609 was not addressed). I still need to make this patch work with buffer local as in [1.], but I want to be sure that you'd still be ok with this variable. Are you OK with this? >> That said, I'm not sure exactly what you meant by: "if you set these >> variables to ignore the line-spacing", are you referring to the new >> variable I introduced or are you OK with me making a change to >> x-underline-at-descent-line to ignore line spacing? > > I meant to suggest what you did: customize x-underline-at-descent-line > such that it avoids the effect of line-spacing you didn't like. I > assumed that such a setting will solve your problems everywhere. Got it. Unfortunately, that's not the case. Thanks! ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 20:21 ` Aaron Jensen @ 2018-02-26 20:41 ` Eli Zaretskii 2018-02-26 20:46 ` Eli Zaretskii 2018-02-26 21:05 ` Aaron Jensen 0 siblings, 2 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-02-26 20:41 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Mon, 26 Feb 2018 12:21:44 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > On Mon, Feb 26, 2018 at 11:25 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > "All" meaning the two involved in the underline position, right? Yes, > > that would be a good addition, I think. > > Ok, I'll submit a separate patch for that. Thanks. > > So it's spacemacs' fault, perhaps exasperated by choosing some font > > and/or colors that make this issue more prominent. Right? Then how > > about asking the spacemacs developers to improve the situation on > > their end? > > No, spacemacs is setting x-underline-at-descent-line t because of > bug#30609, I would guess. Bug#30609 does not describe a bug, IMO. Drawing display elements with background and decorations needs to be done in some order, and whatever order we chose, we will have some issues. AFAIU, the current order has the fewest issues, which only appear when certain fonts and/or certain colors are used. > By "this variable" I meant the one I introduced in my patch. Are you > still interested in accepting that? No, I don't think it will solve any problem that the two existing variables cannot. > 1. I will submit a patch to make the two existing underline variables > work buffer local. > > 2. It would be great if we could figure out a way to address > bug#30609. I don't see how, and I told that much in that bug report. But I'm far from being a GUI display expert, so maybe someone else will come up with a solution. > 3. I have the previously attached patch which adds a new variable that > draws the underline below the descenders rather than at the bottom of > the overall descent. IMO, it's better to make x-underline-at-descent-line a tristate variable than add another boolean. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 20:41 ` Eli Zaretskii @ 2018-02-26 20:46 ` Eli Zaretskii 2018-02-26 21:05 ` Aaron Jensen 1 sibling, 0 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-02-26 20:46 UTC (permalink / raw) To: aaronjensen; +Cc: alptekin.aker, 30553 > Date: Mon, 26 Feb 2018 22:41:33 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: alptekin.aker@gmail.com, 30553@debbugs.gnu.org > > IMO, it's better to make x-underline-at-descent-line a tristate > variable than add another boolean. Btw, there's also underline-minimum-offset. Did you try playing with it? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 20:41 ` Eli Zaretskii 2018-02-26 20:46 ` Eli Zaretskii @ 2018-02-26 21:05 ` Aaron Jensen 2018-02-27 14:19 ` Aaron Jensen 1 sibling, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-26 21:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Mon, Feb 26, 2018 at 12:41 PM, Eli Zaretskii <eliz@gnu.org> wrote: > Bug#30609 does not describe a bug, IMO. I hear you--I hesitated to report it as a bug. If you'd prefer I submit things like that to emacs-devel in the future I can do that instead. >> 2. It would be great if we could figure out a way to address >> bug#30609. > > I don't see how, and I told that much in that bug report. But I'm far > from being a GUI display expert, so maybe someone else will come up > with a solution. Understood, thanks. I'll think on it and look around. I have one idea that I'll repsond with. > IMO, it's better to make x-underline-at-descent-line a tristate > variable than add another boolean. I'd be happy to do that. I think that's a better solution. I assume that any non-nil other than some string or symbol (what is more common?) would behave as it does today and that that new value, maybe `font'? would behave as the new variable I introduced in my patch does. Does that sound right? Any advice on porting an existing boolean to a non-nil from a documentation or previous example standpoint would be helpful. Thank you. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-26 21:05 ` Aaron Jensen @ 2018-02-27 14:19 ` Aaron Jensen 2018-02-27 16:18 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-27 14:19 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 [-- Attachment #1: Type: text/plain, Size: 126 bytes --] Patch for buffer local underline position variables. I ended up making underline-minimum-offset buffer local capable as well. [-- Attachment #2: 0001-Allow-buffer-local-underline-position-vars.patch --] [-- Type: application/octet-stream, Size: 8276 bytes --] From cd1a52a0587822828836e7879b5ee1321595d60c Mon Sep 17 00:00:00 2001 From: Aaron Jensen <aaronjensen@gmail.com> Date: Tue, 27 Feb 2018 06:05:03 -0800 Subject: [PATCH] Allow buffer local underline position vars * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (x_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Allow buffer local underline position vars --- src/nsterm.m | 15 +++++++++++---- src/w32term.c | 12 +++++++++--- src/xterm.c | 15 +++++++++++---- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..7efd7cf887 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3487,23 +3487,26 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. { struct font *font = font_for_underline_metrics (s); unsigned long descent = s->y + s->height - s->ybase; + unsigned long minimum_offset = + buffer_local_value (Qunderline_minimum_offset, s->w->contents); /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) ? font->underline_thickness : 1; /* Determine the offset of underlining from the baseline. */ - if (x_underline_at_descent_line) + if (buffer_local_value (Qx_underline_at_descent_line, s->w->contents)) position = descent - thickness; - else if (x_use_underline_position_properties + else if (buffer_local_value (Qx_use_underline_position_properties, + s->w->contents) && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = lround (font->descent / 2); else - position = underline_minimum_offset; + position = minimum_offset; - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); /* Ensure underlining is not cropped. */ if (descent <= position) @@ -9465,11 +9468,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); + + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); /* Tell Emacs about this window system. */ Fprovide (Qns, Qnil); diff --git a/src/w32term.c b/src/w32term.c index 97afb678c1..1225776f4a 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2481,7 +2481,8 @@ x_draw_glyph_string (struct glyph_string *s) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line || !font) + if (buffer_local_value (Qx_underline_at_descent_line, s->w->contents) + || !font) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -2493,13 +2494,15 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (buffer_local_value (Qx_use_underline_position_properties, + s->w->contents) && font->underline_position >= 0) position = font->underline_position; else position = (font->descent + 1) / 2; } - position = max (position, underline_minimum_offset); + position = max (position, buffer_local_value (Qunderline_minimum_offset, + s->w->contents)); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -7385,11 +7388,14 @@ the cursor have no effect. */); x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); diff --git a/src/xterm.c b/src/xterm.c index 0d25c7f1a2..34c80c522b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3707,13 +3707,15 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset = + buffer_local_value (Qunderline_minimum_offset, s->w->contents); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line) + if (buffer_local_value (Qx_underline_at_descent_line, s->w->contents)) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -3725,15 +3727,16 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum descent) / 2), with ROUND(x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (buffer_local_value (Qx_use_underline_position_properties, + s->w->contents) && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = (font->descent + 1) / 2; else - position = underline_minimum_offset; + position = minimum_offset; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -13246,6 +13249,9 @@ UNDERLINE_POSITION font properties, set this to nil. You can also use `underline-minimum-offset' to override the font's UNDERLINE_POSITION for small font display sizes. */); x_use_underline_position_properties = true; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); + + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, @@ -13256,6 +13262,7 @@ A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = false; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, -- 2.15.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-27 14:19 ` Aaron Jensen @ 2018-02-27 16:18 ` Eli Zaretskii 2018-02-28 15:19 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-27 16:18 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Tue, 27 Feb 2018 06:19:00 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > Patch for buffer local underline position variables. I ended up making > underline-minimum-offset buffer local capable as well. Does that mean that underline-minimum-offset allows you to avoid problems with underline overwriting the descents? > + unsigned long minimum_offset = > + buffer_local_value (Qunderline_minimum_offset, s->w->contents); This isn't right. buffer_local_value returns a Lisp object, not an integer, so you need to convert it to an integer (or a boolean for other variables). And it can also return the symbol Qunbound, in which case we need a fallback. So we need something like Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, s->w->contents); if (INTEGERP (val)) minimum_offset = XFASTINT (val); else minimum_offset = 1; and similarly with other variables (except that a boolean variable will return a value of Qt or Qnil, not a number). > + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); I think this symbol should be in xdisp.c, where the variable is defined. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-27 16:18 ` Eli Zaretskii @ 2018-02-28 15:19 ` Aaron Jensen 2018-02-28 16:14 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-28 15:19 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 [-- Attachment #1: Type: text/plain, Size: 441 bytes --] On Tue, Feb 27, 2018 at 8:18 AM, Eli Zaretskii <eliz@gnu.org> wrote: > and similarly with other variables (except that a boolean variable > will return a value of Qt or Qnil, not a number). Thank you for the feedback. I used NILP and Fbuffer_local_value because I saw that used elsewhere. If that's not right, please let me know. > I think this symbol should be in xdisp.c, where the variable is > defined. Done. Patch attached, thanks! [-- Attachment #2: 0001-Allow-buffer-local-underline-position-vars.patch --] [-- Type: application/octet-stream, Size: 9849 bytes --] From b97379defb2e3e62783029d1236c724dad0efc23 Mon Sep 17 00:00:00 2001 From: Aaron Jensen <aaronjensen@gmail.com> Date: Wed, 28 Feb 2018 07:17:14 -0800 Subject: [PATCH] Allow buffer local underline position vars * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (x_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Allow buffer local underline position vars * src/xdisp.c: Add symbol --- src/nsterm.m | 19 +++++++++++++++---- src/w32term.c | 18 +++++++++++++++--- src/xdisp.c | 1 + src/xterm.c | 19 +++++++++++++++---- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..a004e73c4b 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3487,23 +3487,32 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. { struct font *font = font_for_underline_metrics (s); unsigned long descent = s->y + s->height - s->ybase; + unsigned long minimum_offset; + Lisp_Object val = Fbuffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) ? font->underline_thickness : 1; /* Determine the offset of underlining from the baseline. */ - if (x_underline_at_descent_line) + if (!NILP (Fbuffer_local_value (Qx_underline_at_descent_line, + s->w->contents))) position = descent - thickness; - else if (x_use_underline_position_properties + else if (!NILP (Fbuffer_local_value (Qx_use_underline_position_properties, + s->w->contents)) && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = lround (font->descent / 2); else - position = underline_minimum_offset; + position = minimum_offset; - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); /* Ensure underlining is not cropped. */ if (descent <= position) @@ -9465,11 +9474,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); /* Tell Emacs about this window system. */ Fprovide (Qns, Qnil); diff --git a/src/w32term.c b/src/w32term.c index 97afb678c1..c3fce0481c 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2475,13 +2475,22 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line || !font) + if (!NILP (Fbuffer_local_value (Qx_underline_at_descent_line, + s->w->contents)) + || !font) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -2493,13 +2502,14 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (!NILP (Fbuffer_local_value (Qx_use_underline_position_properties, + s->w->contents)) && font->underline_position >= 0) position = font->underline_position; else position = (font->descent + 1) / 2; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -7385,11 +7395,13 @@ the cursor have no effect. */); x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); diff --git a/src/xdisp.c b/src/xdisp.c index 9170d6b777..13f281e8ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -32978,6 +32978,7 @@ particularly when using variable `x-use-underline-position-properties' with fonts that specify an UNDERLINE_POSITION relatively close to the baseline. The default value is 1. */); underline_minimum_offset = 1; + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_BOOL ("display-hourglass", display_hourglass_p, doc: /* Non-nil means show an hourglass pointer, when Emacs is busy. diff --git a/src/xterm.c b/src/xterm.c index 0d25c7f1a2..abc9be12c9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3707,13 +3707,21 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line) + if (!NILP (Fbuffer_local_value (Qx_underline_at_descent_line, + s->w->contents))) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -3725,15 +3733,16 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum descent) / 2), with ROUND(x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (!NILP (Fbuffer_local_value (Qx_use_underline_position_properties, + s->w->contents)) && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = (font->descent + 1) / 2; else - position = underline_minimum_offset; + position = minimum_offset; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -13246,6 +13255,7 @@ UNDERLINE_POSITION font properties, set this to nil. You can also use `underline-minimum-offset' to override the font's UNDERLINE_POSITION for small font display sizes. */); x_use_underline_position_properties = true; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, @@ -13256,6 +13266,7 @@ A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = false; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, -- 2.15.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-28 15:19 ` Aaron Jensen @ 2018-02-28 16:14 ` Eli Zaretskii 2018-02-28 17:41 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-28 16:14 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 28 Feb 2018 07:19:02 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > Thank you for the feedback. I used NILP and Fbuffer_local_value > because I saw that used elsewhere. If that's not right, please let me > know. Fbuffer_local_value can signal an error, which is a no-no in display code. So it's best not to use it. buffer_local_value is better in that regard, I think (although for built-in variables, I think the danger is mainly academic). Otherwise, I think the patch is good, thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-28 16:14 ` Eli Zaretskii @ 2018-02-28 17:41 ` Aaron Jensen 2018-02-28 17:56 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-02-28 17:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Wed, Feb 28, 2018 at 8:14 AM, Eli Zaretskii <eliz@gnu.org> wrote: > Fbuffer_local_value can signal an error, which is a no-no in display > code. So it's best not to use it. buffer_local_value is better in > that regard, I think (although for built-in variables, I think the > danger is mainly academic). Ah, that's good to know. When would it return Qunbound? It looked like from the docs it would return it if it wasn't bound in the buffer--does that mean it does or it doesn't fall back to the default value or the value set via setq? I'm afraid I don't know exactly how this works. Does this mean that I'd have to do similar code as you suggested for the int? Is there an example of coercing a potentially unbound bool? ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-28 17:41 ` Aaron Jensen @ 2018-02-28 17:56 ` Eli Zaretskii 2018-03-01 8:36 ` Aaron Jensen 0 siblings, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-02-28 17:56 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 28 Feb 2018 09:41:50 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > On Wed, Feb 28, 2018 at 8:14 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Fbuffer_local_value can signal an error, which is a no-no in display > > code. So it's best not to use it. buffer_local_value is better in > > that regard, I think (although for built-in variables, I think the > > danger is mainly academic). > > Ah, that's good to know. When would it return Qunbound? It looked like > from the docs it would return it if it wasn't bound in the > buffer--does that mean it does or it doesn't fall back to the default > value or the value set via setq? I'm afraid I don't know exactly how > this works. If there's no buffer-local value, it returns the global value. Only if the variable is entirely unbound (as in "void variable"), it will return Qunbound. > Does this mean that I'd have to do similar code as you suggested for > the int? Yes. > Is there an example of coercing a potentially unbound bool? Just treat Qunbound as the default value of the respective variable. Thanks. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-02-28 17:56 ` Eli Zaretskii @ 2018-03-01 8:36 ` Aaron Jensen 2018-03-08 6:31 ` Aaron Jensen 2018-03-10 11:18 ` Eli Zaretskii 0 siblings, 2 replies; 35+ messages in thread From: Aaron Jensen @ 2018-03-01 8:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 [-- Attachment #1: Type: text/plain, Size: 267 bytes --] On Wed, Feb 28, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: > Just treat Qunbound as the default value of the respective variable. Thank you for the assistance. New patch attached. Please let me know if there are any other improvements I can make. Thanks! [-- Attachment #2: 0001-Allow-buffer-local-underline-position-vars.patch --] [-- Type: application/octet-stream, Size: 10862 bytes --] From 51c2b003d4671114988924bd8a6cec5f8522a1c3 Mon Sep 17 00:00:00 2001 From: Aaron Jensen <aaronjensen@gmail.com> Date: Wed, 28 Feb 2018 07:17:14 -0800 Subject: [PATCH] Allow buffer local underline position vars * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (x_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Allow buffer local underline position vars * src/xdisp.c: Add symbol --- src/nsterm.m | 24 ++++++++++++++++++++---- src/w32term.c | 23 ++++++++++++++++++++--- src/xdisp.c | 1 + src/xterm.c | 24 ++++++++++++++++++++---- 4 files changed, 61 insertions(+), 11 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..b95d3b25d9 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3487,23 +3487,37 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. { struct font *font = font_for_underline_metrics (s); unsigned long descent = s->y + s->height - s->ybase; + unsigned long minimum_offset; + BOOL underline_at_descent_line, use_underline_position_properties; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); + val = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); /* Use underline thickness of font, defaulting to 1. */ thickness = (font && font->underline_thickness > 0) ? font->underline_thickness : 1; /* Determine the offset of underlining from the baseline. */ - if (x_underline_at_descent_line) + if (underline_at_descent_line) position = descent - thickness; - else if (x_use_underline_position_properties + else if (use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = lround (font->descent / 2); else - position = underline_minimum_offset; + position = minimum_offset; - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); /* Ensure underlining is not cropped. */ if (descent <= position) @@ -9465,11 +9479,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); /* Tell Emacs about this window system. */ Fprovide (Qns, Qnil); diff --git a/src/w32term.c b/src/w32term.c index 97afb678c1..47540ef72e 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2475,13 +2475,28 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + BOOL underline_at_descent_line, use_underline_position_properties; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); + val = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line || !font) + if (underline_at_descent_line + || !font) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -2493,13 +2508,13 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (use_underline_position_properties && font->underline_position >= 0) position = font->underline_position; else position = (font->descent + 1) / 2; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -7385,11 +7400,13 @@ the cursor have no effect. */); x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); diff --git a/src/xdisp.c b/src/xdisp.c index 9170d6b777..13f281e8ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -32978,6 +32978,7 @@ particularly when using variable `x-use-underline-position-properties' with fonts that specify an UNDERLINE_POSITION relatively close to the baseline. The default value is 1. */); underline_minimum_offset = 1; + DEFSYM (Qunderline_minimum_offset, "underline-minimum-offset"); DEFVAR_BOOL ("display-hourglass", display_hourglass_p, doc: /* Non-nil means show an hourglass pointer, when Emacs is busy. diff --git a/src/xterm.c b/src/xterm.c index 0d25c7f1a2..02f9e25c23 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3707,13 +3707,27 @@ x_draw_glyph_string (struct glyph_string *s) else { struct font *font = font_for_underline_metrics (s); + unsigned long minimum_offset; + BOOL underline_at_descent_line, use_underline_position_properties; + Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, + s->w->contents); + if (INTEGERP (val)) + minimum_offset = XFASTINT (val); + else + minimum_offset = 1; + val = buffer_local_value (Qx_underline_at_descent_line, + s->w->contents); + underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); + val = buffer_local_value (Qx_use_underline_position_properties, + s->w->contents); + use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; - if (x_underline_at_descent_line) + if (underline_at_descent_line) position = (s->height - thickness) - (s->ybase - s->y); else { @@ -3725,15 +3739,15 @@ x_draw_glyph_string (struct glyph_string *s) ROUND ((maximum descent) / 2), with ROUND(x) = floor (x + 0.5) */ - if (x_use_underline_position_properties + if (use_underline_position_properties && font && font->underline_position >= 0) position = font->underline_position; else if (font) position = (font->descent + 1) / 2; else - position = underline_minimum_offset; + position = minimum_offset; } - position = max (position, underline_minimum_offset); + position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ @@ -13246,6 +13260,7 @@ UNDERLINE_POSITION font properties, set this to nil. You can also use `underline-minimum-offset' to override the font's UNDERLINE_POSITION for small font display sizes. */); x_use_underline_position_properties = true; + DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, @@ -13256,6 +13271,7 @@ A value of nil means to draw the underline according to the value of the variable `x-use-underline-position-properties', which is usually at the baseline level. The default value is nil. */); x_underline_at_descent_line = false; + DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", x_mouse_click_focus_ignore_position, -- 2.15.1 ^ permalink raw reply related [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-03-01 8:36 ` Aaron Jensen @ 2018-03-08 6:31 ` Aaron Jensen 2018-03-08 13:45 ` Eli Zaretskii 2018-03-10 11:18 ` Eli Zaretskii 1 sibling, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-03-08 6:31 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553 On Thu, Mar 1, 2018 at 12:36 AM, Aaron Jensen <aaronjensen@gmail.com> wrote: > On Wed, Feb 28, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Just treat Qunbound as the default value of the respective variable. > > Thank you for the assistance. New patch attached. Please let me know > if there are any other improvements I can make. Ping on this, anything else or does this patch look ok? Thanks! ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-03-08 6:31 ` Aaron Jensen @ 2018-03-08 13:45 ` Eli Zaretskii 0 siblings, 0 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-03-08 13:45 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553 > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Wed, 7 Mar 2018 22:31:15 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > On Thu, Mar 1, 2018 at 12:36 AM, Aaron Jensen <aaronjensen@gmail.com> wrote: > > On Wed, Feb 28, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: > >> Just treat Qunbound as the default value of the respective variable. > > > > Thank you for the assistance. New patch attached. Please let me know > > if there are any other improvements I can make. > > Ping on this, anything else or does this patch look ok? Thanks! It's in my queue, if no one beats me to it. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-03-01 8:36 ` Aaron Jensen 2018-03-08 6:31 ` Aaron Jensen @ 2018-03-10 11:18 ` Eli Zaretskii 2018-03-10 17:47 ` Aaron Jensen 1 sibling, 1 reply; 35+ messages in thread From: Eli Zaretskii @ 2018-03-10 11:18 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553-done > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Thu, 1 Mar 2018 00:36:46 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553@debbugs.gnu.org > > On Wed, Feb 28, 2018 at 9:56 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Just treat Qunbound as the default value of the respective variable. > > Thank you for the assistance. New patch attached. Please let me know > if there are any other improvements I can make. Thanks, pushed to the master branch. For the future, please look at the log message that I committed, and follow that style in your contributions. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-03-10 11:18 ` Eli Zaretskii @ 2018-03-10 17:47 ` Aaron Jensen 2018-03-10 18:48 ` Eli Zaretskii 0 siblings, 1 reply; 35+ messages in thread From: Aaron Jensen @ 2018-03-10 17:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Alp Aker, 30553-done On Sat, Mar 10, 2018 at 3:18 AM, Eli Zaretskii <eliz@gnu.org> wrote: > Thanks, pushed to the master branch. > > For the future, please look at the log message that I committed, and > follow that style in your contributions. Thanks, will do. I tried to find a guide for those style messages but I couldn't so I did my best to piece it together from other commits. ^ permalink raw reply [flat|nested] 35+ messages in thread
* bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text 2018-03-10 17:47 ` Aaron Jensen @ 2018-03-10 18:48 ` Eli Zaretskii 0 siblings, 0 replies; 35+ messages in thread From: Eli Zaretskii @ 2018-03-10 18:48 UTC (permalink / raw) To: Aaron Jensen; +Cc: alptekin.aker, 30553-done > From: Aaron Jensen <aaronjensen@gmail.com> > Date: Sat, 10 Mar 2018 09:47:49 -0800 > Cc: Alp Aker <alptekin.aker@gmail.com>, 30553-done@debbugs.gnu.org > > > For the future, please look at the log message that I committed, and > > follow that style in your contributions. > > Thanks, will do. I tried to find a guide for those style messages but > I couldn't so I did my best to piece it together from other commits. The guidance is supposed to be in CONTRIBUTE, so if something there is unclear or missing, please point that out. ^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2018-03-10 18:48 UTC | newest] Thread overview: 35+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-02-20 18:16 bug#30553: 26.0.91; underline appears beneath line-spacing rather than beneath text Aaron Jensen 2018-02-20 19:33 ` Eli Zaretskii 2018-02-20 19:44 ` Aaron Jensen 2018-02-21 1:46 ` Alp Aker 2018-02-21 4:23 ` Eli Zaretskii 2018-02-21 4:27 ` Aaron Jensen 2018-02-21 5:01 ` Alp Aker 2018-02-21 6:03 ` Aaron Jensen 2018-02-21 13:47 ` Alp Aker 2018-02-21 16:17 ` Aaron Jensen 2018-02-21 17:56 ` Eli Zaretskii 2018-02-22 2:15 ` Aaron Jensen 2018-02-22 6:26 ` Eli Zaretskii 2018-02-22 6:29 ` Aaron Jensen 2018-02-22 7:21 ` Eli Zaretskii 2018-02-25 22:09 ` Aaron Jensen 2018-02-26 15:42 ` Eli Zaretskii 2018-02-26 16:01 ` Aaron Jensen 2018-02-26 19:25 ` Eli Zaretskii 2018-02-26 20:21 ` Aaron Jensen 2018-02-26 20:41 ` Eli Zaretskii 2018-02-26 20:46 ` Eli Zaretskii 2018-02-26 21:05 ` Aaron Jensen 2018-02-27 14:19 ` Aaron Jensen 2018-02-27 16:18 ` Eli Zaretskii 2018-02-28 15:19 ` Aaron Jensen 2018-02-28 16:14 ` Eli Zaretskii 2018-02-28 17:41 ` Aaron Jensen 2018-02-28 17:56 ` Eli Zaretskii 2018-03-01 8:36 ` Aaron Jensen 2018-03-08 6:31 ` Aaron Jensen 2018-03-08 13:45 ` Eli Zaretskii 2018-03-10 11:18 ` Eli Zaretskii 2018-03-10 17:47 ` Aaron Jensen 2018-03-10 18:48 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.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).