all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: martin rudalics <rudalics@gmx.at>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: On removing sequence_number from window structure
Date: Sun, 10 Feb 2013 11:57:10 +0200	[thread overview]
Message-ID: <87r4kor0iy.fsf@mail.jurta.org> (raw)
In-Reply-To: <51168276.9070106@gmx.at> (martin rudalics's message of "Sat, 09 Feb 2013 18:08:06 +0100")

> Window parameters mean that one has to externally manage some sort of
> mechanism to assign unique identifiers (strings or numbers) and run on
> `window-configuration-change-hook' first a function to detect for each
> split the new parent window and the new live window and assign them
> the appropriate values.

This is just 10 lines of code:

(defvar window-identification-count 0)
(defvar window-identification-table (make-hash-table :weakness 'key :test 'eq))
(defun window-identification-update ()
  (walk-windows (lambda (w) (or (gethash w window-identification-table)
				(puthash w (setq window-identification-count (1+ window-identification-count)) window-identification-table)))))
(add-hook 'window-configuration-change-hook 'window-identification-update)

(defun mode-line-window-control () (format "-W%s  " (or (gethash (selected-window) window-identification-table) "")))
(defvar mode-line-window-identification '(:eval (mode-line-window-control)))
(put 'mode-line-window-identification 'risky-local-variable t)
;; Insert between mode-line-frame-identification and mode-line-buffer-identification
(setcdr (nthcdr 6 mode-line-format) (cons 'mode-line-window-identification (nthcdr 7 mode-line-format)))



  reply	other threads:[~2013-02-10  9:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02  8:50 On removing sequence_number from window structure martin rudalics
2013-02-02 17:32 ` Dmitry Antipov
2013-02-02 17:50   ` martin rudalics
2013-02-08  8:17 ` Juri Linkov
2013-02-08  9:55   ` Eli Zaretskii
2013-02-08  9:59   ` martin rudalics
2013-02-08 15:17     ` Stefan Monnier
2013-02-08 15:33       ` Drew Adams
2013-02-09  0:30     ` Juri Linkov
2013-02-09  9:21       ` martin rudalics
2013-02-09 14:20         ` Stefan Monnier
2013-02-09 17:08           ` martin rudalics
2013-02-10  9:57             ` Juri Linkov [this message]
2013-02-10 13:33               ` martin rudalics

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=87r4kor0iy.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    /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.