unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
@ 2020-09-13 20:02 Dale Sedivec
  2020-09-13 23:11 ` Lars Ingebrigtsen
  2020-09-13 23:37 ` Alan Third
  0 siblings, 2 replies; 19+ messages in thread
From: Dale Sedivec @ 2020-09-13 20:02 UTC (permalink / raw)
  To: 43381

The Emacs manual says[1], "the text shown under the cursor is drawn using
the frame’s background color."  However, on the NS port, the foreground
for text under the cursor seems to be taken from the face at point
rather than the frame's background color.

[1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Cursor-Display.html

To illustrate this, start emacs -Q and eval:

    (progn
      (switch-to-buffer (generate-new-buffer "test"))
      (insert (propertize "testing"
                          'face '((:background "blue" :foreground "white"))))
      (goto-char 1))

You should be in a new buffer with some white-on-blue text.  Put point
over any of that text and you should see the text under the default box
cursor becomes (a hard-to-read) blue-on-black, taking the background
color at point, rather than white-on-black, which it should be if it
took the frame's background color.

This became obvious to me when using the modus-vivendi theme in
combination with auto-highlight-symbol[2].  modus-vivendi uses a black
frame background and a white cursor.  auto-highlight-symbol gives the
symbol at point an orange background, so when it's highlighting the
symbol under the cursor, I end up with modus-vivendi's white cursor
background and an orange foreground.  This orange-on-white is kind of
unreadable.  If, instead, the cursor took the frame's background as its
foreground, I would have a more readable white cursor containing black
text (black-on-white).

[2]: https://github.com/gennad/auto-highlight-symbol



In GNU Emacs 27.1.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G6020))
of 2020-09-11 built on Dale.caliginous.net
Repository revision: f3373901e5cc6c198cc36af29f9e2f64402f3e9e
Repository branch: emacs-27
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.6

Recent messages:
Loading /Users/dale/.emacs.d/recipes/paredit-kill-whole-line...done
[2020-09-13 14:42:13.668218] ls does not support --dired; see ‘dired-use-ls-dired’ for more details.
Loading /Users/dale/.emacs.d/recipes/markdown-mode-copy-as-html-email...done
Loading /Users/dale/.emacs.d/recipes/markdown-mode-unindent-when-editing-code-blocks...done
[2020-09-13 14:42:13.768282] markdown-mode math support enabled
[2020-09-13 14:42:13.812945] Note: standard-indent adjusted to 2
[2020-09-13 14:42:14.531470] Starting new Ispell process /opt/local/bin/aspell with default dictionary...done
[2020-09-13 14:42:14.625218] For information about GNU Emacs and the GNU system, type C-h C-a.
[2020-09-13 14:42:14.654638] Package cl is deprecated
Wrote /Users/dale/.emacs.d/persp-confs/persp-auto-save [3 times]

Configured using:
'configure --with-ns --without-x --with-modules --with-xml2 --with-json
--with-cairo --with-gnutls --with-xpm --with-jpeg --with-tiff
--with-gif --with-png --with-rsvg'

Configured features:
RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM
NS MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  global-magit-file-mode: t
  magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  auto-highlight-symbol-mode: t
  company-prescient-mode: t
  company-tng-mode: t
  company-mode: t
  elpy-mode: t
  electric-pair-mode: t
  flyspell-mode: t
  goto-address-mode: t
  highlight-parentheses-mode: t
  show-paren-mode: t
  which-function-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  winum-mode: t
  winner-mode: t
  volatile-highlights-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  sticky-region-mode: t
  shackle-mode: t
  save-place-mode: t
  black-format-on-save-mode: t
  recentf-mode: t
  pyvenv-tracking-mode: t
  pyvenv-mode: t
  counsel-projectile-mode: t
  projectile-mode: t
  ivy-prescient-mode: t
  prescient-persist-mode: t
  persp-mode: t
  shell-dirtrack-mode: t
  nav-stack-mode: t
  minions-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  auto-frame-resize-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  dtrt-indent-global-mode: t
  dtrt-indent-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  counsel-mode: t
  ivy-mode: t
  delete-selection-mode: t
  clean-aindent-mode: t
  carousel-mode: t
  global-auto-revert-mode: t
  global-atomic-chrome-edit-mode: t
  global-anzu-mode: t
  anzu-mode: t
  el-patch-use-package-mode: t
  override-global-mode: t
  which-key-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  tooltip-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-stan hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-stan
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-exp hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-J hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-J
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-emacs-lisp hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-css hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-css
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-lob hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-irc hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-irc
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-forth hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-forth
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-macs hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-macs
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-version hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-version
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-scheme hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-abc hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-abc
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-C hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-C
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-capture hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-capture
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ref hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-clojure hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-mouse hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ledger hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ledger
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-ctags hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-entities hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-entities
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-archive hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-archive
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-screen hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-bibtex hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-bibtex
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-haskell hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-asymptote hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-asymptote
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-table hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-table
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-eww hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-eww
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-org hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-org
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-num hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-num
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-plot hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-plot
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-rmail hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-rmail
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-awk hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-groovy hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-groovy
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-octave hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-faces hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-faces
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-colview hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-colview
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-R hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-R
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-timer hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-timer
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ebnf hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ebnf
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-mobile hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-fortran hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-shell hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-shell
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-perl hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-sqlite hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-sed hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-sed
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-list hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-list
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ruby hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-eval hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-habit hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-habit
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-clock hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-clock
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-goto hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-goto
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-html hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-html
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-src hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-src
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-lisp hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-eshell hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-eshell
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ditaa hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-pcomplete hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-lint hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-lint
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-latex hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-sass hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-io hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-io
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-tangle hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-calc hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-java hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-java
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-icalendar hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-mhe hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-mhe
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-attach-git hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-attach-git
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-md hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-md
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-beamer hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-element hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-element
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-protocol hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-mscgen hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-mscgen
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-gnuplot hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-tempo hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-tempo
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-latex hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-w3m hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-w3m
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-id hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-id
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-vala hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-vala
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-man hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-man
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-feed hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-feed
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-lua hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-lua
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-table hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-table
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-ocaml hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-coq hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-coq
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-gnus hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-gnus
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-picolisp hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-picolisp
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-indent hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-indent
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-lilypond hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-matlab hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-datetree hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-docview hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-docview
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-python hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-python
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-makefile hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-duration hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-duration
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-agenda hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-dot hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-js hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-js
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-publish hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-inlinetask hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-org hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-org
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-keys hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-keys
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-core hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-core
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-compat hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-compat
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-odt hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-info hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-info
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-plantuml hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-eshell hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-eshell
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-ascii hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-loaddefs hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-hledger hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-hledger
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-maxima hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ol-bbdb hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ol-bbdb
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-macro hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-macro
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-sql hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-attach hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-attach
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-processing hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-processing
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ox-texinfo hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-crypt hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-footnote hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/org-install hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/org-install
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-comint hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint
/Users/dale/.emacs.d/elpa/org-plus-contrib-20200823/ob-shen hides /Users/dale/Applications/Emacs.app/Contents/Resources/lisp/org/ob-shen

Features:
(shadow sort mail-extr emacsbug sendmail amx frameset adaptive-wrap
smartparens-markdown markdown-mode edit-indirect whitespace wspc-hydra
rainbow-mode aggressive-indent paredit macrostep-c cmacexp macrostep
magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
magit-diff smerge-mode magit-core magit-autorevert magit-margin
magit-transient magit-process magit-mode git-commit transient magit-git
magit-section magit-utils crm log-edit pcvs-util add-log with-editor
async-bytecomp async bug-reference smartparens-c cc-mode-expansions
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs octave-expansions octave smie editorconfig-core
editorconfig-core-handle editorconfig-fnmatch auto-highlight-symbol
company-keywords company-etags company-gtags company-template
company-dabbrev-code company-dabbrev company-files company-capf
company-prescient company-tng company elpy elpy-rpc elpy-shell
elpy-profile elpy-django s elpy-refactor ido smartparens-python
elec-pair python-el-fgallina-expansions python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp
flyspell ispell goto-addr highlight-parentheses paren which-func
modus-vivendi-theme persistent-soft list-utils pcache eieio-compat
eieio-base font-utils haskell-snippets yasnippet-snippets yasnippet
ace-window winum winner windmove etags fileloop volatile-highlights
all-the-icons all-the-icons-faces data-material data-weathericons
data-octicons data-fileicons data-faicons data-alltheicons memoize
unicode-fonts undo-tree diff sticky-region smartparens-config
smartparens-org smartparens-text smartparens shackle trace server
saveplace reformatter recentf tree-widget pyvenv eshell esh-cmd esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
editorconfig counsel-projectile projectile grep ibuf-ext ibuffer
ibuffer-loaddefs ivy-prescient prescient bs persp-mode org-clock
ob-shell shell ob-sql ob-python ol-eww eww mm-url url-queue ol-rmail
ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy
url-expand url-methods url-history mailcap shr svg xml dom gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa epg epg-config mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils
ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m
org-tempo tempo org-id org-refile org-colview org-element avl-tree
generator the-org-mode-expansions org-insert-dblock org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete org-list org-faces org-entities time-date
noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol
org-keys org-compat org-macs org-loaddefs format-spec cal-menu calendar
cal-loaddefs nav-stack-ivy hydra lv nav-stack bilist multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect move-text minions smart-tabs
lisp-comment-dwim ivy-avy avy hl-todo flycheck-pos-tip pos-tip
flycheck-package package-lint imenu finder flycheck frame-resize hi-lock
cus-edit cus-start cus-load wid-edit expand-region text-mode-expansions
er-basic-expansions expand-region-core expand-region-custom dtrt-indent
diff-hl vc-dir ewoc vc vc-dispatcher counsel xdg xref project compile
comint ansi-color swiper ivy flx delsel ring ivy-faces ivy-overlay colir
color clean-aindent-mode carousel bookmark+ bookmark+-key derived
dired-x dired dired-loaddefs bookmark+-1 bookmark+-bmu bookmark+-lit
bookmark text-property-search pp blackout autorevert filenotify
atomic-chrome websocket url-cookie url-domsuf url-util bindat let-alist
anzu thingatpt underlings vc-git diff-mode find-func cl-extra el-patch
exec-path-from-shell bind-key easy-mmode which-key advice pcase dash
treepy quelpa mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr lisp-mnt help-fns radix-tree
help-mode jka-compr auto-compile packed finder-inf dsedivec-theme
autoloads tex-site edmacro kmacro rx cl info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib 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 tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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
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 threads kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 867073 60401)
(symbols 48 74053 7)
(strings 32 252460 22758)
(string-bytes 1 7748312)
(vectors 16 96650)
(vector-slots 8 1824340 60124)
(floats 8 1505 265)
(intervals 56 6735 83)
(buffers 1000 33))





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-13 20:02 bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port Dale Sedivec
@ 2020-09-13 23:11 ` Lars Ingebrigtsen
  2020-09-13 23:43   ` Alan Third
  2020-09-13 23:37 ` Alan Third
  1 sibling, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 23:11 UTC (permalink / raw)
  To: Dale Sedivec; +Cc: 43381

Dale Sedivec <dale@codefu.org> writes:

> The Emacs manual says[1], "the text shown under the cursor is drawn using
> the frame’s background color."  However, on the NS port, the foreground
> for text under the cursor seems to be taken from the face at point
> rather than the frame's background color.
>
> [1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Cursor-Display.html
>
> To illustrate this, start emacs -Q and eval:
>
>     (progn
>       (switch-to-buffer (generate-new-buffer "test"))
>       (insert (propertize "testing"
>                           'face '((:background "blue" :foreground "white"))))
>       (goto-char 1))

It's not just the NS port, apparently -- I get the same in Debian.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-13 20:02 bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port Dale Sedivec
  2020-09-13 23:11 ` Lars Ingebrigtsen
@ 2020-09-13 23:37 ` Alan Third
  1 sibling, 0 replies; 19+ messages in thread
From: Alan Third @ 2020-09-13 23:37 UTC (permalink / raw)
  To: Dale Sedivec; +Cc: 43381

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

On Sun, Sep 13, 2020 at 03:02:02PM -0500, Dale Sedivec wrote:
> The Emacs manual says[1], "the text shown under the cursor is drawn using
> the frame’s background color."  However, on the NS port, the foreground
> for text under the cursor seems to be taken from the face at point
> rather than the frame's background color.
> 
> [1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Cursor-Display.html
> 
> To illustrate this, start emacs -Q and eval:
> 
>     (progn
>       (switch-to-buffer (generate-new-buffer "test"))
>       (insert (propertize "testing"
>                           'face '((:background "blue" :foreground "white"))))
>       (goto-char 1))
> 
> You should be in a new buffer with some white-on-blue text.  Put point
> over any of that text and you should see the text under the default box
> cursor becomes (a hard-to-read) blue-on-black, taking the background
> color at point, rather than white-on-black, which it should be if it
> took the frame's background color.

The attached appears to fix it for me, however I'm not sure it's the
right fix. The X ports appear to have a much neater system for setting
the colours which may be worth emulating in the NS port.

-- 
Alan Third

[-- Attachment #2: 0001-Fix-NS-cursor-colors-bug-43381.patch --]
[-- Type: text/plain, Size: 2385 bytes --]

From 4c6509108bc2d3d9c37f88b1d915e8d04ce9a0c6 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Mon, 14 Sep 2020 00:19:05 +0100
Subject: [PATCH] Fix NS cursor colors (bug#43381)

* src/macfont.m (macfont_draw): Select the correct color when drawing
a cursor.
* src/nsterm.m (ns_draw_glyph_string): Don't fiddle with the face.
---
 src/macfont.m | 10 +++++++++-
 src/nsterm.m  | 14 --------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/src/macfont.m b/src/macfont.m
index 904814647f..a73c1f01fe 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2923,7 +2923,15 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
       CGAffineTransform atfm;
 
       CGContextScaleCTM (context, 1, -1);
-      CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND (context, face, s->f);
+
+      if (s->hl == DRAW_CURSOR && s->w->phys_cursor_type == FILLED_BOX_CURSOR)
+        {
+          struct face *frame_face = FRAME_DEFAULT_FACE (s->f);
+          CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND (context, frame_face, s->f);
+        }
+      else
+        CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND (context, face, s->f);
+
       if (macfont_info->synthetic_italic_p)
         atfm = synthetic_italic_atfm;
       else
diff --git a/src/nsterm.m b/src/nsterm.m
index 26059ab67c..7e3fb4a0cb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4397,13 +4397,6 @@ overwriting cursor (usually when cursor on a tab) */
         ns_maybe_dumpglyphs_background
           (s, s->first_glyph->type == COMPOSITE_GLYPH);
 
-      if (s->hl == DRAW_CURSOR && s->w->phys_cursor_type == FILLED_BOX_CURSOR)
-        {
-          unsigned long tmp = NS_FACE_BACKGROUND (s->face);
-          NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face);
-          NS_FACE_FOREGROUND (s->face) = tmp;
-        }
-
       {
         BOOL isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
 
@@ -4424,13 +4417,6 @@ overwriting cursor (usually when cursor on a tab) */
         ns_draw_text_decoration (s, s->face, col, s->width, s->x);
       }
 
-      if (s->hl == DRAW_CURSOR && s->w->phys_cursor_type == FILLED_BOX_CURSOR)
-        {
-          unsigned long tmp = NS_FACE_BACKGROUND (s->face);
-          NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face);
-          NS_FACE_FOREGROUND (s->face) = tmp;
-        }
-
       ns_unfocus (s->f);
       break;
 
-- 
2.26.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-13 23:11 ` Lars Ingebrigtsen
@ 2020-09-13 23:43   ` Alan Third
  2020-09-13 23:49     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 19+ messages in thread
From: Alan Third @ 2020-09-13 23:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, Dale Sedivec

On Mon, Sep 14, 2020 at 01:11:30AM +0200, Lars Ingebrigtsen wrote:
> Dale Sedivec <dale@codefu.org> writes:
> 
> > The Emacs manual says[1], "the text shown under the cursor is drawn using
> > the frame’s background color."  However, on the NS port, the foreground
> > for text under the cursor seems to be taken from the face at point
> > rather than the frame's background color.
> >
> > [1]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Cursor-Display.html
> >
> > To illustrate this, start emacs -Q and eval:
> >
> >     (progn
> >       (switch-to-buffer (generate-new-buffer "test"))
> >       (insert (propertize "testing"
> >                           'face '((:background "blue" :foreground "white"))))
> >       (goto-char 1))
> 
> It's not just the NS port, apparently -- I get the same in Debian.

Now you mention it, I can see that the X ports use the face colours as
well...

xterm.c:1518
      xgcv.background = s->f->output_data.x->cursor_pixel;
      xgcv.foreground = s->face->background;
           ^               ^
-- 
Alan Third





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-13 23:43   ` Alan Third
@ 2020-09-13 23:49     ` Lars Ingebrigtsen
  2020-09-14 14:52       ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 23:49 UTC (permalink / raw)
  To: Alan Third; +Cc: 43381, Dale Sedivec

Alan Third <alan@idiocy.org> writes:

> Now you mention it, I can see that the X ports use the face colours as
> well...
>
> xterm.c:1518
>       xgcv.background = s->f->output_data.x->cursor_pixel;
>       xgcv.foreground = s->face->background;
>            ^               ^

Yeah, it looks like it's been like that since at least the 90s.  So...
the documentation is just wrong?

I think it does sound like it would make sense to use the background
colour here for the face colour, though, since that's guaranteed to
stand out against the cursor colour, you'd think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-13 23:49     ` Lars Ingebrigtsen
@ 2020-09-14 14:52       ` Eli Zaretskii
  2020-09-14 22:10         ` Dale Sedivec
  2020-09-15 12:22         ` Lars Ingebrigtsen
  0 siblings, 2 replies; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-14 14:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 14 Sep 2020 01:49:43 +0200
> Cc: 43381@debbugs.gnu.org, Dale Sedivec <dale@codefu.org>
> 
> Alan Third <alan@idiocy.org> writes:
> 
> > Now you mention it, I can see that the X ports use the face colours as
> > well...
> >
> > xterm.c:1518
> >       xgcv.background = s->f->output_data.x->cursor_pixel;
> >       xgcv.foreground = s->face->background;
> >            ^               ^
> 
> Yeah, it looks like it's been like that since at least the 90s.  So...
> the documentation is just wrong?

Yes, the documentation is inaccurate: it describes what happens when
the text at point uses the default face.  When the face is not the
default, we merge that face into the cursor face, and that is what you
see.

We should fix the documentation.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-14 14:52       ` Eli Zaretskii
@ 2020-09-14 22:10         ` Dale Sedivec
  2020-09-15 14:20           ` Eli Zaretskii
  2020-09-15 12:22         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 19+ messages in thread
From: Dale Sedivec @ 2020-09-14 22:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, Lars Ingebrigtsen, alan

On Sep 14, 2020, at 09:52, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Mon, 14 Sep 2020 01:49:43 +0200
>> Cc: 43381@debbugs.gnu.org, Dale Sedivec <dale@codefu.org>
>> 
>> Alan Third <alan@idiocy.org> writes:
>> 
>>> Now you mention it, I can see that the X ports use the face colours as
>>> well...
>>> 
>>> xterm.c:1518
>>>      xgcv.background = s->f->output_data.x->cursor_pixel;
>>>      xgcv.foreground = s->face->background;
>>>           ^               ^
>> 
>> Yeah, it looks like it's been like that since at least the 90s.  So...
>> the documentation is just wrong?
> 
> Yes, the documentation is inaccurate: it describes what happens when
> the text at point uses the default face.  When the face is not the
> default, we merge that face into the cursor face, and that is what you
> see.
> 
> We should fix the documentation.

Understood.  Would it be appropriate for me to open a separate bug for the problem of the text under the box cursor being nearly unreadable, as in my example?  Maybe allowing the cursor face's :foreground to be used in preference to the background of the face at point?

Dale




^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-14 14:52       ` Eli Zaretskii
  2020-09-14 22:10         ` Dale Sedivec
@ 2020-09-15 12:22         ` Lars Ingebrigtsen
  2020-09-15 14:44           ` Eli Zaretskii
  1 sibling, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-15 12:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, alan, dale

Eli Zaretskii <eliz@gnu.org> writes:

>> > Now you mention it, I can see that the X ports use the face colours as
>> > well...
>> >
>> > xterm.c:1518
>> >       xgcv.background = s->f->output_data.x->cursor_pixel;
>> >       xgcv.foreground = s->face->background;
>> >            ^               ^
>> 
>> Yeah, it looks like it's been like that since at least the 90s.  So...
>> the documentation is just wrong?
>
> Yes, the documentation is inaccurate: it describes what happens when
> the text at point uses the default face.  When the face is not the
> default, we merge that face into the cursor face, and that is what you
> see.
>
> We should fix the documentation.

Or should we fix the code?  As the example demonstrates, this makes some
of the inverse-blinked text difficult to read.  Presumably the colour
distance between the cursor and the default face's background is more
legible?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-14 22:10         ` Dale Sedivec
@ 2020-09-15 14:20           ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-15 14:20 UTC (permalink / raw)
  To: Dale Sedivec; +Cc: 43381, larsi, alan

> From: Dale Sedivec <dale@codefu.org>
> Date: Mon, 14 Sep 2020 17:10:30 -0500
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,
>  alan@idiocy.org,
>  43381@debbugs.gnu.org
> 
> > We should fix the documentation.
> 
> Understood.  Would it be appropriate for me to open a separate bug for the problem of the text under the box cursor being nearly unreadable, as in my example?

Feel free.  I don't yet see how this could be solved, but a bug report
cannot hurt.

> Maybe allowing the cursor face's :foreground to be used in preference to the background of the face at point?

That'd be contrary to what Emacs does with faces in every other
situation, so I prefer not to consider such a solution, certainly not
as the first alternative.

Thanks.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-15 12:22         ` Lars Ingebrigtsen
@ 2020-09-15 14:44           ` Eli Zaretskii
  2020-09-15 14:55             ` Eli Zaretskii
  2020-09-17 14:36             ` Lars Ingebrigtsen
  0 siblings, 2 replies; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-15 14:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: alan@idiocy.org,  43381@debbugs.gnu.org,  dale@codefu.org
> Date: Tue, 15 Sep 2020 14:22:20 +0200
> 
> > We should fix the documentation.
> 
> Or should we fix the code?  As the example demonstrates, this makes some
> of the inverse-blinked text difficult to read.

Any specific suggestions for a fix?

> Presumably the colour distance between the cursor and the default
> face's background is more legible?

If you imply that we should sometimes refuse to merge faces, I'd
object to that, since we never do such things anywhere.

Maybe it's enough to define (and handle) a distant-foreground color
for the cursor face?





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-15 14:44           ` Eli Zaretskii
@ 2020-09-15 14:55             ` Eli Zaretskii
  2020-09-17 14:36             ` Lars Ingebrigtsen
  1 sibling, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-15 14:55 UTC (permalink / raw)
  To: larsi; +Cc: 43381, alan, dale

> Date: Tue, 15 Sep 2020 17:44:08 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 43381@debbugs.gnu.org, alan@idiocy.org, dale@codefu.org
> 
> > Or should we fix the code?  As the example demonstrates, this makes some
> > of the inverse-blinked text difficult to read.
> 
> Any specific suggestions for a fix?
> 
> > Presumably the colour distance between the cursor and the default
> > face's background is more legible?
> 
> If you imply that we should sometimes refuse to merge faces, I'd
> object to that, since we never do such things anywhere.
> 
> Maybe it's enough to define (and handle) a distant-foreground color
> for the cursor face?

Oh, and of course the documentation should be fixed regardless, as it
is inaccurate, and will continue to be inaccurate even if we fix this
in some way.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-15 14:44           ` Eli Zaretskii
  2020-09-15 14:55             ` Eli Zaretskii
@ 2020-09-17 14:36             ` Lars Ingebrigtsen
  2020-09-17 14:50               ` Eli Zaretskii
  1 sibling, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-17 14:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, alan, dale

Eli Zaretskii <eliz@gnu.org> writes:

>> Or should we fix the code?  As the example demonstrates, this makes some
>> of the inverse-blinked text difficult to read.
>
> Any specific suggestions for a fix?

That we do what the documentation suggests -- use the frame background
(i.e., the default face background) as the face foreground of the
character under point.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-17 14:36             ` Lars Ingebrigtsen
@ 2020-09-17 14:50               ` Eli Zaretskii
  2020-09-17 15:06                 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-17 14:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: alan@idiocy.org,  43381@debbugs.gnu.org,  dale@codefu.org
> Date: Thu, 17 Sep 2020 16:36:52 +0200
> 
> > Any specific suggestions for a fix?
> 
> That we do what the documentation suggests -- use the frame background
> (i.e., the default face background) as the face foreground of the
> character under point.

What if that character has a non-default foreground color?  If we
disregard it, all the characters will look the same when under the
cursor, regardless of their original face.

Besides, this is different from every other place in Emacs where we
have more than one source for face information: we always merge all
the faces.

So I cannot say I like this proposal.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-17 14:50               ` Eli Zaretskii
@ 2020-09-17 15:06                 ` Lars Ingebrigtsen
  2020-09-17 15:14                   ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-17 15:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, alan, dale

Eli Zaretskii <eliz@gnu.org> writes:

> What if that character has a non-default foreground color?  If we
> disregard it, all the characters will look the same when under the
> cursor, regardless of their original face.

Hm...  I don't quite follow.  The character under point will have the
cursor colour as the background colour, and it doesn't matter what the
foreground colour of that character is: Today the foreground colour
(when the cursor is over the character) is the character's background
colour, but the proposal is to change that to use the default face's
background colour instead.  (Which is pretty much guaranteed to be
different that the cursor's colour.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-17 15:06                 ` Lars Ingebrigtsen
@ 2020-09-17 15:14                   ` Eli Zaretskii
  2020-09-18 11:06                     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-17 15:14 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: alan@idiocy.org,  43381@debbugs.gnu.org,  dale@codefu.org
> Date: Thu, 17 Sep 2020 17:06:31 +0200
> 
> The character under point will have the cursor colour as the
> background colour, and it doesn't matter what the foreground colour
> of that character is: Today the foreground colour (when the cursor
> is over the character) is the character's background colour, but the
> proposal is to change that to use the default face's background
> colour instead.

I understand.  The result will be that every character under cursor
will look the same regardless of its original face colors.  Which is
both losing information and different from the face-merging we do
everywhere else.

The original problem, AFAIU, was not that we behave as we do, but that
the result is almost illegible in some situations.  The solution to
that doesn't have to be what you propose, it can be something else,
which doesn't ignore our usual face-merging.  We just need to use a
mechanism we have for this purpose: the distant-foreground color of a
face.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-17 15:14                   ` Eli Zaretskii
@ 2020-09-18 11:06                     ` Lars Ingebrigtsen
  2020-09-18 11:37                       ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-18 11:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, alan, dale

Eli Zaretskii <eliz@gnu.org> writes:

> I understand.  The result will be that every character under cursor
> will look the same regardless of its original face colors.

Oh, I didn't think of that as an issue...  I mean, the cursor blinks (by
default), so...  does anybody care?

> Which is both losing information and different from the face-merging
> we do everywhere else.
>
> The original problem, AFAIU, was not that we behave as we do, but that
> the result is almost illegible in some situations.

Yup.

> The solution to that doesn't have to be what you propose, it can be
> something else, which doesn't ignore our usual face-merging.  We just
> need to use a mechanism we have for this purpose: the
> distant-foreground color of a face.

The vast majority of faces don't have a distant-foreground, I think?
And that's in relation to the region face, not the cursor?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-18 11:06                     ` Lars Ingebrigtsen
@ 2020-09-18 11:37                       ` Eli Zaretskii
  2020-09-18 13:07                         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-18 11:37 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: alan@idiocy.org,  43381@debbugs.gnu.org,  dale@codefu.org
> Date: Fri, 18 Sep 2020 13:06:16 +0200
> 
> > The solution to that doesn't have to be what you propose, it can be
> > something else, which doesn't ignore our usual face-merging.  We just
> > need to use a mechanism we have for this purpose: the
> > distant-foreground color of a face.
> 
> The vast majority of faces don't have a distant-foreground, I think?
> And that's in relation to the region face, not the cursor?

I thought to define it only for the cursor face.  And if that needs
some special treatment on the C level, it shouldn't be hard to tweak
that.





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-18 11:37                       ` Eli Zaretskii
@ 2020-09-18 13:07                         ` Lars Ingebrigtsen
  2020-09-18 13:18                           ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-18 13:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43381, alan, dale

Eli Zaretskii <eliz@gnu.org> writes:

>> The vast majority of faces don't have a distant-foreground, I think?
>> And that's in relation to the region face, not the cursor?
>
> I thought to define it only for the cursor face.  And if that needs
> some special treatment on the C level, it shouldn't be hard to tweak
> that.

Ah, right...  but then that'd be used on all characters the cursor is
over, no matter what the background colour of the cursor is?  Isn't that
the same information loss you were worried about, only with a different
colour?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 19+ messages in thread

* bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port
  2020-09-18 13:07                         ` Lars Ingebrigtsen
@ 2020-09-18 13:18                           ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2020-09-18 13:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43381, alan, dale

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: alan@idiocy.org,  43381@debbugs.gnu.org,  dale@codefu.org
> Date: Fri, 18 Sep 2020 15:07:05 +0200
> 
> > I thought to define it only for the cursor face.  And if that needs
> > some special treatment on the C level, it shouldn't be hard to tweak
> > that.
> 
> Ah, right...  but then that'd be used on all characters the cursor is
> over, no matter what the background colour of the cursor is?

No, only when the contrast with the other color is too low.





^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-09-18 13:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-13 20:02 bug#43381: 27.1.50; Maybe wrong cursor FG color in NS port Dale Sedivec
2020-09-13 23:11 ` Lars Ingebrigtsen
2020-09-13 23:43   ` Alan Third
2020-09-13 23:49     ` Lars Ingebrigtsen
2020-09-14 14:52       ` Eli Zaretskii
2020-09-14 22:10         ` Dale Sedivec
2020-09-15 14:20           ` Eli Zaretskii
2020-09-15 12:22         ` Lars Ingebrigtsen
2020-09-15 14:44           ` Eli Zaretskii
2020-09-15 14:55             ` Eli Zaretskii
2020-09-17 14:36             ` Lars Ingebrigtsen
2020-09-17 14:50               ` Eli Zaretskii
2020-09-17 15:06                 ` Lars Ingebrigtsen
2020-09-17 15:14                   ` Eli Zaretskii
2020-09-18 11:06                     ` Lars Ingebrigtsen
2020-09-18 11:37                       ` Eli Zaretskii
2020-09-18 13:07                         ` Lars Ingebrigtsen
2020-09-18 13:18                           ` Eli Zaretskii
2020-09-13 23:37 ` Alan Third

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).