all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Scott Jaderholm <jaderholm@gmail.com>
To: emacs-devel@gnu.org
Subject: appt-disp-window raising frame toggle patch
Date: Fri, 4 Nov 2011 22:25:47 -0400	[thread overview]
Message-ID: <CAA9PRe_oyXhFR9+5Q3qrLgqtqKVh6obvJcM6BQUUQgdw34E11Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 385 bytes --]

Currently if you use the display window method with appt it will also raise
the frame in your window manager. I didn't like this as my keyboard focus
kept being taking so I added a custom variable to toggle this. Attached is
a patch. If anyone knows a simple way for me to eliminate raising in this
function on my system until (if) this patch gets applied please share.

Thanks,
Scott

[-- Attachment #1.2: Type: text/html, Size: 419 bytes --]

[-- Attachment #2: 0001-Add-custom-variable-for-toggling-whether-displaying-.patch --]
[-- Type: text/x-patch, Size: 1186 bytes --]

From 572c98a0b4281884c9727bdba5ce5d8c4f228c1e Mon Sep 17 00:00:00 2001
From: Scott Jaderholm <jaderholm@gmail.com>
Date: Fri, 4 Nov 2011 22:14:08 -0400
Subject: [PATCH] Add custom variable for toggling whether displaying appointment window raises frame.

---
 lisp/calendar/appt.el |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index c44eb6e..b720356 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -166,6 +166,10 @@ Only relevant if reminders are being displayed in a window."
   :type 'function
   :group 'appt)
 
+(defcustom appt-disp-window-raises-frame t
+  "Non-nil raises the frame when displaying appointment window."
+  :type 'boolean
+  :group 'appt)
 
 ;;; Internal variables below this point.
 
@@ -472,7 +476,8 @@ separate appointment."
     (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t))
     (set-buffer-modified-p nil)
     (setq buffer-read-only t)
-    (raise-frame (selected-frame))
+    (when appt-disp-window-raises-frame
+      (raise-frame (selected-frame)))
     (select-window this-window)))
 
 (defun appt-delete-window ()
-- 
1.7.0.4


             reply	other threads:[~2011-11-05  2:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-05  2:25 Scott Jaderholm [this message]
2011-11-07 19:44 ` appt-disp-window raising frame toggle patch Glenn Morris
2011-11-07 21:03   ` Glenn Morris

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=CAA9PRe_oyXhFR9+5Q3qrLgqtqKVh6obvJcM6BQUUQgdw34E11Q@mail.gmail.com \
    --to=jaderholm@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.