all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Current column in non-selected (inactive) window.
@ 2018-09-18  1:24 Keith David Bershatsky
  0 siblings, 0 replies; only message in thread
From: Keith David Bershatsky @ 2018-09-18  1:24 UTC (permalink / raw)
  To: Emacs Devel

I am working on feature requests #17684 (crosshairs) and #22873 (multiple fake cursors).  [Crosshairs changes colors depending upon whether the current column is odd/even numbered, or beyond the fill-column.]

I was unable to find a built-in way to obtain the current column of point in the non-selected (inactive) window.  I believe the problem is that current_column and its underling functions use PT and PT_BYTE, which is not the same as the window_point in the non-selected (inactive) window.

I resolved the issue by creating a new function (nearly identical to current_column and its underlying functions) that now take an argument for a particular point of interest, and I am using Fwindow_point to get that interesting point.  I replaced all PT with my particular point of interest, and in a couple of places, I replaced PT_BYTE with CHAR_TO_BYTE (point_of_interest).

Other than creating those new functions as described above, is there a built-in mechanism to get the current column in a non-selected (inactive) window?

If nothing exists, perhaps this new feature might be useful to other users in the future?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-18  1:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18  1:24 Current column in non-selected (inactive) window Keith David Bershatsky

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.