GNU bug report logs -
#17809
24.4.50; Completions display
Previous Next
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
forcemerge 17809 12618
thanks
[ I discovered the same bug report from Dani, so merging both. ]
>> Maybe it would be a good thing to add a new action parameter to
>> `display-buffer' that would be like the existing `quit-function'
>> in `with-current-buffer-window', and will call its body between
>> displaying the buffer and applying final actions alists like
>> (window-height . fit-window-to-buffer)
>
> `display-buffer' has no body and hardly ever will get one.
I really see no difference between the already existing
QUIT-FUNCTION and a new possible BODY-FUNCTION.
Currently QUIT-FUNCTION is called this way in
`with-current-buffer-window':
(if (functionp ,quit-function)
(funcall ,quit-function ,window ,value)
and BODY-FUNCTION could be called in `window--display-buffer'
with something like:
(if (functionp (cdr (assq 'body-function alist)))
(funcall (cdr (assq 'body-function alist)))
Then, for instance, `dired-mark-pop-up' instead of:
(with-current-buffer-window
buffer
(cons 'display-buffer-below-selected
'((window-height . fit-window-to-buffer)))
#'(lambda (window _value)
(with-selected-window window
(with-current-buffer buffer
(let ((inhibit-read-only t))
(dired-format-columns-of-files
(if (eq (car files) t) (cdr files) files))
will use:
(with-current-buffer-window
buffer
(cons 'display-buffer-below-selected
'((window-height . fit-window-to-buffer)
(body-function .
(lambda ()
(with-current-buffer buffer
(let ((inhibit-read-only t))
(dired-format-columns-of-files
(if (eq (car files) t) (cdr files) files))
Is there a problem with this approach?
This bug report was last modified 10 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.