Run of fresh-snapshots for ace-window
Merge these changes:
git pull https://janitor.debian.net/git/ace-window fresh-snapshots/main
git pull https://janitor.debian.net/git/ace-window fresh-snapshots/pristine-tar
git pull https://janitor.debian.net/git/ace-window fresh-snapshots/upstream
Summary
DEB_UPDATE_CHANGELOG=auto deb-new-upstream --snapshot --refresh-patchesDiff
Branch: main
diff --git a/README.md b/README.md
index b60d21e..45e196b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# ace-window
+[![GNU ELPA](https://elpa.gnu.org/packages/ace-window.svg)](https://elpa.gnu.org/packages/ace-window.html)
[![MELPA](https://melpa.org/packages/ace-window-badge.svg)](https://melpa.org/#/ace-window)
[![MELPA Stable](https://stable.melpa.org/packages/ace-window-badge.svg)](https://stable.melpa.org/#/ace-window)
diff --git a/ace-window-posframe.el b/ace-window-posframe.el
new file mode 100644
index 0000000..8f32169
--- /dev/null
+++ b/ace-window-posframe.el
@@ -0,0 +1,64 @@
+;;; ace-window-posframe.el --- posframe support for ace-window -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
+
+(require 'ace-window)
+
+;; Suppress warnings
+(declare-function posframe-poshandler-window-center "ext:posframe")
+(declare-function posframe-show "ext:posframe")
+(declare-function posframe-hide "ext:posframe")
+(declare-function posframe-workable-p "ext:posframe")
+
+(defvar aw--posframe-frames '())
+
+(defvar aw-posframe-position-handler #'posframe-poshandler-window-center)
+
+(defun aw--lead-overlay-posframe (path leaf)
+ (let* ((wnd (cdr leaf))
+ (str (format "%s" (apply #'string path)))
+ ;; It's important that buffer names are not unique across
+ ;; multiple invocations: posframe becomes very slow when
+ ;; creating new frames, and so being able to reuse old ones
+ ;; makes a huge difference. What defines "able to reuse" is
+ ;; something like: a frame exists which hasn't been deleted
+ ;; (with posframe-delete) and has the same configuration as
+ ;; the requested new frame.
+ (bufname (format " *aw-posframe-buffer-%s*" path)))
+ (with-selected-window wnd
+ (push bufname aw--posframe-frames)
+ (posframe-show bufname
+ :string str
+ :poshandler aw-posframe-position-handler
+ :font (face-font 'aw-leading-char-face)
+ :foreground-color (face-foreground 'aw-leading-char-face nil t)
+ :background-color (face-background 'aw-leading-char-face nil t)))))
+
+(defun aw--remove-leading-chars-posframe ()
+ ;; Hide rather than delete. See aw--lead-overlay-posframe for why.
+ (mapc #'posframe-hide aw--posframe-frames)
+ (setq aw--posframe-frames nil))
+
+(defun ace-window-posframe-enable ()
+ (unless (and (require 'posframe nil t) (posframe-workable-p))
+ (error "Posframe is not workable"))
+
+ (setq aw--lead-overlay-fn #'aw--lead-overlay-posframe)
+ (setq aw--remove-leading-chars-fn #'aw--remove-leading-chars-posframe))
+
+(defun ace-window-posframe-disable ()
+ (setq aw--lead-overlay-fn #'aw--lead-overlay)
+ (setq aw--remove-leading-chars-fn #'aw--remove-leading-chars))
+
+;;;###autoload
+(define-minor-mode ace-window-posframe-mode
+ "Minor mode for showing the ace window key with child frames."
+ :global t
+ :require 'ace-window
+ :group 'ace-window
+ :init-value nil
+ (if ace-window-posframe-mode
+ (ace-window-posframe-enable)
+ (ace-window-posframe-disable)))
+
+(provide 'ace-window-posframe)
diff --git a/ace-window.el b/ace-window.el
index 416aa7d..ccb2783 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -1,6 +1,6 @@
;;; ace-window.el --- Quickly switch windows. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
;; Maintainer: Oleh Krehel <ohwoeowho@gmail.com>
@@ -407,6 +407,15 @@ LEAF is (PT . WND)."
(overlay-put ol 'window wnd)
(push ol avy--overlays-lead)))))
+(defvar aw--lead-overlay-fn #'aw--lead-overlay
+ "Function used to display the lead chars.")
+
+(defun aw--remove-leading-chars ()
+ (avy--remove-leading-chars))
+
+(defvar aw--remove-leading-chars-fn #'aw--remove-leading-chars
+ "Function used to cleanup lead chars.")
+
(defun aw--make-backgrounds (wnd-list)
"Create a dim background overlay for each window on WND-LIST."
(when aw-background
@@ -571,8 +580,8 @@ Amend MODE-LINE to the mode line for the duration of the selection."
(if (and ace-window-display-mode
(null aw-display-mode-overlay))
(lambda (_path _leaf))
- #'aw--lead-overlay)
- #'avy--remove-leading-chars)))
+ aw--lead-overlay-fn)
+ aw--remove-leading-chars-fn)))
(if (eq res 'exit)
(setq aw-action nil)
(or (cdr res)
@@ -816,10 +825,14 @@ Switch the current window to the previous buffer."
(switch-to-buffer buffer)))
(defun aw-copy-window (window)
- "Copy the current buffer to WINDOW."
- (let ((buffer (current-buffer)))
+ "Copy the current buffer to WINDOW - including window-start and point."
+ (let ((buffer (current-buffer))
+ (window-start (window-start))
+ (point (point)))
(aw-switch-to-window window)
- (switch-to-buffer buffer)))
+ (switch-to-buffer buffer)
+ (set-window-start (frame-selected-window) window-start)
+ (goto-char point)))
(defun aw-split-window-vert (window)
"Split WINDOW vertically."
diff --git a/debian/changelog b/debian/changelog
index d91ad7d..a1808f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ace-window (0.10.0+git20220911.1.77115af-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+ * Drop patch 0001-clean-documentation.diff, present upstream.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 19 Jan 2023 00:18:38 -0000
+
ace-window (0.10.0-1) unstable; urgency=medium
[ David Krauser ]
diff --git a/debian/patches/0001-clean-documentation.diff b/debian/patches/0001-clean-documentation.diff
deleted file mode 100644
index 0570b21..0000000
--- a/debian/patches/0001-clean-documentation.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-From: Lev Lamberov <dogsleg@debian.org>
-Subject: Remove badges from README file
-
-This patch removes badges from README file. These badges are loaded
-from an external web site.
-
---- a/README.md
-+++ b/README.md
-@@ -1,8 +1,5 @@
- # ace-window
-
--[![MELPA](https://melpa.org/packages/ace-window-badge.svg)](https://melpa.org/#/ace-window)
--[![MELPA Stable](https://stable.melpa.org/packages/ace-window-badge.svg)](https://stable.melpa.org/#/ace-window)
--
- **GNU Emacs package for selecting a window to switch to**
-
- ## What and why
diff --git a/debian/patches/series b/debian/patches/series
index e6c5191..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-0001-clean-documentation.diff
Branch: pristine-tar
diff --git a/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.delta b/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.delta
new file mode 100644
index 0000000..0e3b617
Binary files /dev/null and b/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.delta differ
diff --git a/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.id b/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.id
new file mode 100644
index 0000000..eb4b022
--- /dev/null
+++ b/ace-window_0.10.0+git20220911.1.77115af.orig.tar.gz.id
@@ -0,0 +1 @@
+9c8373b849fe3c0e11d96e4b4d696e4517b864c7
Branch: upstream
Tag: upstream/0.10.0+git20220911.1.77115afdiff --git a/README.md b/README.md
index b60d21e..45e196b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# ace-window
+[![GNU ELPA](https://elpa.gnu.org/packages/ace-window.svg)](https://elpa.gnu.org/packages/ace-window.html)
[![MELPA](https://melpa.org/packages/ace-window-badge.svg)](https://melpa.org/#/ace-window)
[![MELPA Stable](https://stable.melpa.org/packages/ace-window-badge.svg)](https://stable.melpa.org/#/ace-window)
diff --git a/ace-window-posframe.el b/ace-window-posframe.el
new file mode 100644
index 0000000..8f32169
--- /dev/null
+++ b/ace-window-posframe.el
@@ -0,0 +1,64 @@
+;;; ace-window-posframe.el --- posframe support for ace-window -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
+
+(require 'ace-window)
+
+;; Suppress warnings
+(declare-function posframe-poshandler-window-center "ext:posframe")
+(declare-function posframe-show "ext:posframe")
+(declare-function posframe-hide "ext:posframe")
+(declare-function posframe-workable-p "ext:posframe")
+
+(defvar aw--posframe-frames '())
+
+(defvar aw-posframe-position-handler #'posframe-poshandler-window-center)
+
+(defun aw--lead-overlay-posframe (path leaf)
+ (let* ((wnd (cdr leaf))
+ (str (format "%s" (apply #'string path)))
+ ;; It's important that buffer names are not unique across
+ ;; multiple invocations: posframe becomes very slow when
+ ;; creating new frames, and so being able to reuse old ones
+ ;; makes a huge difference. What defines "able to reuse" is
+ ;; something like: a frame exists which hasn't been deleted
+ ;; (with posframe-delete) and has the same configuration as
+ ;; the requested new frame.
+ (bufname (format " *aw-posframe-buffer-%s*" path)))
+ (with-selected-window wnd
+ (push bufname aw--posframe-frames)
+ (posframe-show bufname
+ :string str
+ :poshandler aw-posframe-position-handler
+ :font (face-font 'aw-leading-char-face)
+ :foreground-color (face-foreground 'aw-leading-char-face nil t)
+ :background-color (face-background 'aw-leading-char-face nil t)))))
+
+(defun aw--remove-leading-chars-posframe ()
+ ;; Hide rather than delete. See aw--lead-overlay-posframe for why.
+ (mapc #'posframe-hide aw--posframe-frames)
+ (setq aw--posframe-frames nil))
+
+(defun ace-window-posframe-enable ()
+ (unless (and (require 'posframe nil t) (posframe-workable-p))
+ (error "Posframe is not workable"))
+
+ (setq aw--lead-overlay-fn #'aw--lead-overlay-posframe)
+ (setq aw--remove-leading-chars-fn #'aw--remove-leading-chars-posframe))
+
+(defun ace-window-posframe-disable ()
+ (setq aw--lead-overlay-fn #'aw--lead-overlay)
+ (setq aw--remove-leading-chars-fn #'aw--remove-leading-chars))
+
+;;;###autoload
+(define-minor-mode ace-window-posframe-mode
+ "Minor mode for showing the ace window key with child frames."
+ :global t
+ :require 'ace-window
+ :group 'ace-window
+ :init-value nil
+ (if ace-window-posframe-mode
+ (ace-window-posframe-enable)
+ (ace-window-posframe-disable)))
+
+(provide 'ace-window-posframe)
diff --git a/ace-window.el b/ace-window.el
index 416aa7d..ccb2783 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -1,6 +1,6 @@
;;; ace-window.el --- Quickly switch windows. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
;; Maintainer: Oleh Krehel <ohwoeowho@gmail.com>
@@ -407,6 +407,15 @@ LEAF is (PT . WND)."
(overlay-put ol 'window wnd)
(push ol avy--overlays-lead)))))
+(defvar aw--lead-overlay-fn #'aw--lead-overlay
+ "Function used to display the lead chars.")
+
+(defun aw--remove-leading-chars ()
+ (avy--remove-leading-chars))
+
+(defvar aw--remove-leading-chars-fn #'aw--remove-leading-chars
+ "Function used to cleanup lead chars.")
+
(defun aw--make-backgrounds (wnd-list)
"Create a dim background overlay for each window on WND-LIST."
(when aw-background
@@ -571,8 +580,8 @@ Amend MODE-LINE to the mode line for the duration of the selection."
(if (and ace-window-display-mode
(null aw-display-mode-overlay))
(lambda (_path _leaf))
- #'aw--lead-overlay)
- #'avy--remove-leading-chars)))
+ aw--lead-overlay-fn)
+ aw--remove-leading-chars-fn)))
(if (eq res 'exit)
(setq aw-action nil)
(or (cdr res)
@@ -816,10 +825,14 @@ Switch the current window to the previous buffer."
(switch-to-buffer buffer)))
(defun aw-copy-window (window)
- "Copy the current buffer to WINDOW."
- (let ((buffer (current-buffer)))
+ "Copy the current buffer to WINDOW - including window-start and point."
+ (let ((buffer (current-buffer))
+ (window-start (window-start))
+ (point (point)))
(aw-switch-to-window window)
- (switch-to-buffer buffer)))
+ (switch-to-buffer buffer)
+ (set-window-start (frame-selected-window) window-start)
+ (goto-char point)))
(defun aw-split-window-vert (window)
"Split WINDOW vertically."
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/share/emacs/site-lisp/elpa-src/ace-window-0.10.0/ace-window-posframe.el
No differences were encountered in the control files
Publish History
- 2023-02-23T00:35: ( Success ) (requested by runner)
Resulting package
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots elpa-ace-window
Lintian Result
- ace-window_0.10.0+git20220911.1.77115af-1~jan+nus1.dsc
- ace-window_0.10.0+git20220911.1.77115af-1~jan+nus1_amd64.buildinfo
- elpa-ace-window_0.10.0+git20220911.1.77115af-1~jan+nus1_all.deb
- ace-window_0.10.0+git20220911.1.77115af-1~jan+nus1_amd64.changes
Reviews
Reviewer | Verdict | Comment |
---|---|---|
jelmer@debian.org | approved |