bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38354: 27.0.50; Implement display action display-buffer-in-tab


From: Juri Linkov
Subject: bug#38354: 27.0.50; Implement display action display-buffer-in-tab
Date: Wed, 27 Nov 2019 00:30:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> The only problem is that I don't know how to use matched numbered groups
>> \1 from matches of buffer names in display conditions.
>>
>> display-buffer-assq-regexp uses string-match-p, not string-match.
>
> If you really need 'string-match', we have to save the match data.

This is implemented now by using a lambda for tab name (the last example).
Examples:

1. open the buffer test1 in a new tab

  (push '("\\`test1\\'" .
          (display-buffer-in-tab))
        display-buffer-alist)

2. open the buffer test2 in a new tab with the explicit name "Tab test2"

  (push '("\\`test2\\'" .
          (display-buffer-in-tab
           (name . "Tab test2")))
        display-buffer-alist)

3. open the buffer test3 in a new tab with the explicit name constructed
   from the buffer name:

  (push '("\\`test3\\'" .
          (display-buffer-in-tab
           (name . (lambda (buffer _alist)
                     (format "[%s]" buffer)))))
        display-buffer-alist)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]