From: Matt Price <moptop99@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: help-gnu-emacs@gnu.org
Subject: Re: naming and/or directly addressing particular windows?
Date: Wed, 5 Dec 2012 11:11:01 -0500 [thread overview]
Message-ID: <CAN_Dec9qr0T-S0umr5QH2Oy1Qx65XS6pOVu59jeQRbfyT3aG1Q@mail.gmail.com> (raw)
In-Reply-To: <50BDBBE6.8080504@gmx.at>
On Tue, Dec 4, 2012 at 4:01 AM, martin rudalics <rudalics@gmx.at> wrote:
>> in the 'let' expression above, how would I replace \\*foo\\* and *foo*
>> with a regular expression that will match, say,
>>
>> (concat (buffer-name) "-" [:digit:])
>
> Try ".+-[0-9]$" instead of "\\*foo\\*" and "foo-1" instead of "*foo*".
ah, that works, though I was ble to get something slightly more
restrictive working instead:
(let ((display-buffer-alist
(cons
`( ,(rx-to-string `(and ,(buffer-name) "-" (zero-or-more
digit))) (display-buffer-in-main))
display-buffer-alist)))
(org-tree-to-indirect-buffer))
>
> Note that if the purpose of your functions is to display buffers always
> approximately at the same location within an Emacs frame, then side
> windows (see the function `display-buffer-in-side-window' and the
> variables `window-sides-vertical' and `window-sides-slots') might be
> more appropriate.
>
> In your case there would be a centered "main window", the "guide window"
> at the left and the "metadata window" at the bottom of the frame.
I can see that would be better. I seem to have some code working so
leaving it as-is for now but will hopefully return to this question
later.
>
> In any case be always aware of two issues:
>
> (1) A user may delete any window at any time (with a few restrictions).
> So be prepared that you may have to re-create your windows and give
> them a name for showing the buffer of your choice.
>
> (2) Emacs and other applications might reuse or split a window at any
> time, for example, to display information like a warning or a
> backtrace.
>
> You can fix some of these by making windows dedicated and/or fixing
> their sizes but doing that is not entirely trivial.
Yes, my code is rather fragile as it stands, and is going to need to
protect against those kind of disturbances somehow. I'll have to
figure these issues out.
for now, I've put my fragile and incomplete code on github so org-mode
users can think about the interface design & make
suggestions/contributions:
https://github.com/titaniumbones/org-writers-room
I really appreciate all your help & hope that something useful comes
out of this! Thanks again,
Matt
next prev parent reply other threads:[~2012-12-05 16:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 17:46 naming and/or directly addressing particular windows? martin rudalics
2012-12-03 12:38 ` Matt Price
2012-12-03 17:42 ` martin rudalics
2012-12-03 19:58 ` Matt Price
2012-12-03 20:58 ` Jambunathan K
2012-12-04 13:52 ` Matt Price
2012-12-04 9:01 ` martin rudalics
2012-12-05 16:11 ` Matt Price [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-01 15:22 Matt Price
2012-12-01 15:59 ` Drew Adams
2012-12-02 5:31 ` Matt Price
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN_Dec9qr0T-S0umr5QH2Oy1Qx65XS6pOVu59jeQRbfyT3aG1Q@mail.gmail.com \
--to=moptop99@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=rudalics@gmx.at \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).