all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dr Rainer Woitok <rainer.woitok@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Box cursor at EoL
Date: Sun, 9 Oct 2022 17:31:55 +0200	[thread overview]
Message-ID: <25410.59755.350465.901619@tux.local> (raw)
In-Reply-To: Msg <jwvbkqm3184.fsf-monnier+emacs@gnu.org> of 2022-10-08 09:18:03 -0400 from help-gnu-emacs@gnu.org

Stefan,

On Saturday, 2022-10-08 09:18:03 -0400, you wrote:

> ...
> > Does that mean that even though there is a way  to maintain a frame spe-
> > cific cursor appearance  there is no way  to maintain a  window specific
> > one? :-(
> 
> Exactly: both the `cursor-type` variable and the `cursor-type`
> frame-parameters are used by the redisplay code to decide how to draw
> the cursor.  But the redisplay code does not look at any
> window-parameter for that, so you can't change the cursor-shape on
> a "per window" basis :-(
> 
> Maybe it's time for `M-x report-emacs-bug` and request a new feature.

Well,  before I request  a feature more or less  only benefitting me but
turning out to require a total redesign of Emacs  I'd like to first con-
tinue this discussion here :-)

1. Am I correct in assuming that when I request to display a buffer in a
   new frame this will also create a new window in that new frame?

   If this were true, I could forget frames and just search for a way to
   make use of the  `cursor-type´ windows parameter,  because this would
   also solve the "same buffer in another frame" case.

2. Running `C-h v cursor-type´ returns

      cursor-type is a variable defined in `C source code´.

      Its value is t

      Cursor to use when this buffer is in the selected window.
      Values are interpreted as follows:

        t               use the cursor specified for the frame
        nil             don't display a cursor
        box             display a filled box cursor
        (box . SIZE)    display a filled box cursor, but make it
                        hollow if cursor is under masked image larger than
                        SIZE pixels in either dimension.
        hollow          display a hollow box cursor
        bar             display a vertical bar cursor with default width
        (bar . WIDTH)   display a vertical bar cursor with width WIDTH
        hbar            display a horizontal bar cursor with default height
        (hbar . HEIGHT) display a horizontal bar cursor with height HEIGHT
        ANYTHING ELSE   display a hollow box cursor

      WIDTH and HEIGHT can't exceed the frame’s canonical character size.

      When the buffer is displayed in a non-selected window, the
      cursor's appearance is instead controlled by the variable
      `cursor-in-non-selected-windows´.

        Automatically becomes buffer-local when set.
        You can customize this variable.
        Probably introduced at or before Emacs version 21.1.

   That clearly states that this buffer local variable  either allows to
   use no cursor,  a locally defined cursor specification  or the cursor
   specification for the frame, but nothing else.

So I'd suggest extending the above list of special values for buffer lo-
cal variable `cursor-type´ with

      frame             use the cursor specified for the frame (same as
                        t but with improved documentation value for hu-
                        man readers)
      window            use the cursor specified for the window

and to add these two additional alternatives for the value of buffer lo-
cal variable `cursor-type´ to every relevant evaluation of it.

But since buffer local variable  `cursor-type´  is defined in  `C source
code´,  there is no easy way for me to receive an impression of how much
effort this change would require.

Comments anybody?

Sincerely,
  Rainer



  reply	other threads:[~2022-10-09 15:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 15:16 Box cursor at EoL Dr Rainer Woitok
2022-10-05 15:34 ` Marcus Harnisch
2022-10-06 15:53   ` Dr Rainer Woitok
2022-10-06 17:00     ` Marcus Harnisch
2022-10-06 19:34   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-10-06 20:09     ` Marcus Harnisch
2022-10-07  8:28     ` Dr Rainer Woitok
2022-10-07 11:11       ` Eli Zaretskii
2022-10-07 13:49         ` Robert Pluim
2022-10-07 14:56         ` Dr Rainer Woitok
2022-10-07 15:37           ` Eli Zaretskii
2022-10-08  9:03             ` Dr Rainer Woitok
2022-10-08  9:12               ` Eli Zaretskii
2022-10-08  9:37                 ` Dr Rainer Woitok
2022-10-08 10:13                   ` Eli Zaretskii
2022-10-08 13:18                   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-10-09 15:31                     ` Dr Rainer Woitok [this message]
2022-10-05 16:53 ` Eli Zaretskii
2022-10-05 23:44   ` Emanuel Berg
2022-10-17  3:34     ` Kenneth Goldman
2022-10-17  4:06       ` Emanuel Berg
2022-10-18 17:06         ` Kenneth Goldman
2022-10-18 23:07           ` Emanuel Berg
2022-10-06 16:02   ` Dr Rainer Woitok
2022-10-05 23:44 ` Emanuel Berg
  -- strict thread matches above, loose matches on Subject: below --
2022-10-18  8:29 Anders Munch
2022-10-18 10:22 ` Colin Baxter
2022-10-18 23:28   ` Emanuel Berg
2022-10-18 23:02 ` Emanuel Berg
2022-10-18 10:54 Anders Munch
2022-10-18 11:21 ` Colin Baxter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25410.59755.350465.901619@tux.local \
    --to=rainer.woitok@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.