GNU bug report logs - #17809
24.4.50; Completions display

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Thu, 19 Jun 2014 07:12:03 UTC

Severity: wishlist

Tags: patch

Merged with 12618

Found in version 24.2.50

Fixed in version 24.4.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Subject: bug#17809: closed (Re: bug#17809: 24.4.50; Completions display)
Date: Tue, 08 Jul 2014 08:05:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#17809: 24.4.50; Completions display

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 17809 <at> debbugs.gnu.org.

-- 
17809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17809
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: martin rudalics <rudalics <at> gmx.at>, 17809-done <at> debbugs.gnu.org
Subject: Re: bug#17809: 24.4.50; Completions display
Date: Tue, 08 Jul 2014 11:03:16 +0300
Version: 24.4.50

> Looks fine, thanks.
>
>> +	     (with-selected-window ,window
>> +	       (goto-char (point-min)))
>
> I believe set-window-point is simpler and more efficient.

Now installed to the trunk with set-window-point.

[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; Completions display
Date: Thu, 19 Jun 2014 09:57:47 +0300
Severity: wishlist
Tags: patch

This is a follow-up to bug#17554.  There are two existing
display actions that could help to better display *Completions*:

- display-buffer-at-bottom for minibuffer-completion-help
  to display *Completions* near the active minibuffer
  where it would be easier to find them;

- display-buffer-below-selected for completion-at-point
  that could work like displaying *Marking Files* in Dired
  to display *Completions* near the point of completion
  in the current buffer.

=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el	2014-06-02 00:18:22 +0000
+++ lisp/minibuffer.el	2014-06-19 06:55:32 +0000
@@ -1796,7 +1796,25 @@ (defun minibuffer-completion-help (&opti
              ;; window, mark it as softly-dedicated, so bury-buffer in
              ;; minibuffer-hide-completions will know whether to
              ;; delete the window or not.
-             (display-buffer-mark-dedicated 'soft))
+             (display-buffer-mark-dedicated 'soft)
+             ;; Disable `pop-up-windows' temporarily to allow
+             ;; `display-buffer--maybe-pop-up-frame-or-window'
+             ;; in the overridden actions below to pop up a frame
+             ;; if `pop-up-frames' is non-nil, but not to pop up a window.
+             (pop-up-windows nil)
+             (display-buffer-base-action
+              ;; First check for defined `display-buffer-base-action'
+              ;; that might be already bound by `completion-at-point'.
+              (or (and (car-safe display-buffer-base-action)
+                       display-buffer-base-action)
+                  ;; This is a copy of `display-buffer-fallback-action'
+                  ;; where `display-buffer-use-some-window' is replaced
+                  ;; with `display-buffer-at-bottom'.
+                  '((display-buffer--maybe-same-window
+                     display-buffer-reuse-window
+                     display-buffer--maybe-pop-up-frame-or-window
+                     display-buffer-at-bottom)
+                    (window-height . fit-window-to-buffer)))))
         (with-output-to-temp-buffer "*Completions*"
           ;; Remove the base-size tail because `sort' requires a properly
           ;; nil-terminated list.
@@ -2073,7 +2091,17 @@ (defun completion-at-point ()
 The completion method is determined by `completion-at-point-functions'."
   (interactive)
   (let ((res (run-hook-wrapped 'completion-at-point-functions
-                               #'completion--capf-wrapper 'all)))
+                               #'completion--capf-wrapper 'all))
+        ;; Display buffer like in `minibuffer-completion-help',
+        ;; but instead of `display-buffer-at-bottom'
+        ;; use `display-buffer-below-selected'.
+        (pop-up-windows nil)
+        (display-buffer-base-action
+         '((display-buffer--maybe-same-window
+            display-buffer-reuse-window
+            display-buffer--maybe-pop-up-frame-or-window
+            display-buffer-below-selected)
+           (window-height . shrink-window-if-larger-than-buffer))))
     (pcase res
       (`(,_ . ,(and (pred functionp) f)) (funcall f))
       (`(,hookfun . (,start ,end ,collection . ,plist))




This bug report was last modified 10 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.