* Bug in display-buffer
@ 2010-11-12 23:02 Андрей Парамонов
2010-11-13 0:50 ` Drew Adams
0 siblings, 1 reply; 7+ messages in thread
From: Андрей Парамонов @ 2010-11-12 23:02 UTC (permalink / raw)
To: help-gnu-emacs
Hello Emacs hackers!
I've found a bug but do not know how to workaround/fix it.
Bug happens when I do the following:
1) Display a single window in a single frame,
2) Activate completions,
3) Call display-buffer with not-in-this-window=t
C-h v pop-up-frames RET says:
pop-up-frames's value is nil
Documentation:
Whether `display-buffer' should make a separate frame.
If nil, never make a separate frame.
display-buffer is called this way:
display-buffer: buffer-or-name=#<buffer *Python*> not-this-window=t frame=nil
I expect the new buffer to appear in place of completion window,
however a new frame pops up. This happens in spite of pop-up-frames
being off.
I've done quick investigation and it shows that the problem lies in
the code following the comment inside display-buffer:
;; When NOT-THIS-WINDOW is non-nil, temporarily dedicate
;; the selected window to its buffer, to avoid that some of
;; the `get-' routines below choose it. (Bug#1415)
As the completions window is dedicated and selected window becomes
dedicated too, we cannot choose window-to-undedicate and end up
calling
(frame-selected-window (funcall pop-up-frame-function))
In principle, in this very awkward situation display-buffer has 3 options:
1) To display buffer in selected window -- but not-in-this-window=t.
2) To display buffer in a new frame -- but pop-up-frames says we
*never* make a separate frame.
3) To display buffer in place of completions window -- but that window
is "dedicated".
To me option 3 seems the least unexpected. Is it a way to achieve such
behavior, by customizing or by changing display-buffer?
Best wishes,
Andrey Paramonov
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Bug in display-buffer
2010-11-12 23:02 Bug in display-buffer Андрей Парамонов
@ 2010-11-13 0:50 ` Drew Adams
2010-11-13 13:47 ` .emacs and other config file questions Tommy Kelly
[not found] ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2010-11-13 0:50 UTC (permalink / raw)
To: '?????? ?????????', help-gnu-emacs
> I've found a bug but do not know how to workaround/fix it.
To get a bug fixed, file a bug report:
M-x report-emacs-bug RET
^ permalink raw reply [flat|nested] 7+ messages in thread
* .emacs and other config file questions
2010-11-13 0:50 ` Drew Adams
@ 2010-11-13 13:47 ` Tommy Kelly
2010-11-15 15:04 ` Deniz Dogan
[not found] ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 7+ messages in thread
From: Tommy Kelly @ 2010-11-13 13:47 UTC (permalink / raw)
To: help-gnu-emacs
Back to using emacs after a long absence. This is partly a test to see
if I've set up Gnus properly so as to post to gmane. But I've a few
acatual (although probably old and well-worn) questions on emacs
configuration. I've browsed gmane archives and googled about for info
but can't find anything definitive:
1. "customize" versus Do It Yourself?
=====================================
Is there a general view as to the pros and cons of using customize
versus just writing the lisp yourself? Although I know very little lisp,
I'm inclined towards the latter -- primarily so I'm forced to
learn. Customize is cool and easy and simple, but I worry it leaves me
dependent on it. Make sense, or am I just trying to punch nails in with
my fist when even the cool kids these days use the customize nailgun?
Found a few items on this, including
http://article.gmane.org/gmane.emacs.help/25218 which references
something back in 1999 that I couldn't locate.
2. Why .gnus (and no, for example, .org)?
========================================
Gnus seems unusual among the many packages in that convention seems
to dictate we do most of its setup in .gnus, rather than in
.emacs. Why is that? After all, there's no similar "special" file
expected for, for example, org-mode or Newsticker or Rcirc. Is there a
problem with ditching .gnus and just putting gnus setup stuff into
.emacs (or something loaded from .emacs)? This is connected with the
earlier question about customize. If I use customize then I can find my
gnus setup info gets split into two places: my own code in .gnus, and
customize's stuff in (by default) .emacs. That's a bit smelly, no? Or is
there some stuff that *must* go in .gnus because it makes no sense until
Gnus is actually run?
Finally, something touching more than emacs, but in my case specific to it:
3. Mirroring the above?
=======================
I'm running primarily on a desktop iMac, but would like to run also from
a MacBook Pro Laptop. I have DropBox. I also have iDisk (MobileMe). And
in the past I've used unison. Anyone care to share how they handle their
config setup (i.e. their use of .emacs, customization, .gnus, and so on)
where they want the same setup mirrored across multiple machines?
thanks,
Tommy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: .emacs and other config file questions
[not found] ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
@ 2010-11-15 4:25 ` Tim X
2010-11-17 2:13 ` Stefan Monnier
1 sibling, 0 replies; 7+ messages in thread
From: Tim X @ 2010-11-15 4:25 UTC (permalink / raw)
To: help-gnu-emacs
Tommy Kelly <tommy.kelly@verilab.com> writes:
> Back to using emacs after a long absence. This is partly a test to see
> if I've set up Gnus properly so as to post to gmane. But I've a few
> acatual (although probably old and well-worn) questions on emacs
> configuration. I've browsed gmane archives and googled about for info
> but can't find anything definitive:
>
> 1. "customize" versus Do It Yourself?
> =====================================
> Is there a general view as to the pros and cons of using customize
> versus just writing the lisp yourself? Although I know very little lisp,
> I'm inclined towards the latter -- primarily so I'm forced to
> learn. Customize is cool and easy and simple, but I worry it leaves me
> dependent on it. Make sense, or am I just trying to punch nails in with
> my fist when even the cool kids these days use the customize nailgun?
> Found a few items on this, including
> http://article.gmane.org/gmane.emacs.help/25218 which references
> something back in 1999 that I couldn't locate.
>
I use to always do it all my self. However, after running into a couple
of problems, I've learnt that customize is a lot more reliable and tends
to behave better with upgrades etc.
I now have a lot of staff done with customize and some which I still do
myself. My advice is to use customize. I don't think there is any
problem with being dependent on it. Its not going away and lets face it,
most of the time we have real work we want to get done and don't really
need to be banging our heads unnecessarily.
> 2. Why .gnus (and no, for example, .org)?
> ========================================
> Gnus seems unusual among the many packages in that convention seems
> to dictate we do most of its setup in .gnus, rather than in
> .emacs. Why is that? After all, there's no similar "special" file
> expected for, for example, org-mode or Newsticker or Rcirc. Is there a
> problem with ditching .gnus and just putting gnus setup stuff into
> .emacs (or something loaded from .emacs)? This is connected with the
> earlier question about customize. If I use customize then I can find my
> gnus setup info gets split into two places: my own code in .gnus, and
> customize's stuff in (by default) .emacs. That's a bit smelly, no? Or is
> there some stuff that *must* go in .gnus because it makes no sense until
> Gnus is actually run?
Not sure it really matters. However, for what it is worth, all my gnus
stuff is now done via customize and I don't have a .gnus file anymore.
However, I also have very little gnus customizeation. Essentially I just
have a gnus-posting-styles entry and a gnus-select-method and thats it.
> Finally, something touching more than emacs, but in my case specific to it:
>
> 3. Mirroring the above?
> =======================
> I'm running primarily on a desktop iMac, but would like to run also from
> a MacBook Pro Laptop. I have DropBox. I also have iDisk (MobileMe). And
> in the past I've used unison. Anyone care to share how they handle their
> config setup (i.e. their use of .emacs, customization, .gnus, and so on)
> where they want the same setup mirrored across multiple machines?
>
The way I've done it is to have a central git repository for all my
config stuff. I then do a checkout on any system I need the config on.
I use to use drop box, but it didn't quite meet my needs. Sometimes, I
wanted local modifications to things like .emacs.
Essentially, what I have now is a central 'global' git repository that
holds the global config stuff. I then clone locally and make any local
changes in a local branch. this setup allows me to easily refresh from
the global repository and control what changes I push up from local
clones (making a global config change) and keep local those bits that
are local.
It may be too/more complex than necessary, depending on your
requirements. Drop box or things like the couchdb based ubuntu one etc
may be sufficient for your needs.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: .emacs and other config file questions
2010-11-13 13:47 ` .emacs and other config file questions Tommy Kelly
@ 2010-11-15 15:04 ` Deniz Dogan
2010-11-16 8:16 ` Tassilo Horn
0 siblings, 1 reply; 7+ messages in thread
From: Deniz Dogan @ 2010-11-15 15:04 UTC (permalink / raw)
To: Tommy Kelly; +Cc: help-gnu-emacs
2010/11/13 Tommy Kelly <tommy.kelly@verilab.com>:
> Back to using emacs after a long absence. This is partly a test to see
> if I've set up Gnus properly so as to post to gmane. But I've a few
> acatual (although probably old and well-worn) questions on emacs
> configuration. I've browsed gmane archives and googled about for info
> but can't find anything definitive:
>
> 1. "customize" versus Do It Yourself?
> =====================================
> Is there a general view as to the pros and cons of using customize
> versus just writing the lisp yourself? Although I know very little lisp,
> I'm inclined towards the latter -- primarily so I'm forced to
> learn. Customize is cool and easy and simple, but I worry it leaves me
> dependent on it. Make sense, or am I just trying to punch nails in with
> my fist when even the cool kids these days use the customize nailgun?
> Found a few items on this, including
> http://article.gmane.org/gmane.emacs.help/25218 which references
> something back in 1999 that I couldn't locate.
>
Take rcirc-track-minor-mode as an example, which if set through
customize immediately takes effect whereas it doesn't if you just setq
it. This is because rcirc-track-minor-mode is defined using
define-minor-mode which evaluates code whenever its value changes.
You shouldn't be afraid of using customize, it's there to help. The
only problem as I see it is that it doesn't let you easily split up
your customizations into separate files, but I could be wrong.
--
Deniz Dogan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: .emacs and other config file questions
2010-11-15 15:04 ` Deniz Dogan
@ 2010-11-16 8:16 ` Tassilo Horn
0 siblings, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2010-11-16 8:16 UTC (permalink / raw)
To: help-gnu-emacs
Deniz Dogan <deniz.a.m.dogan@gmail.com> writes:
Hi Deniz,
> Take rcirc-track-minor-mode as an example, which if set through
> customize immediately takes effect whereas it doesn't if you just setq
> it. This is because rcirc-track-minor-mode is defined using
> define-minor-mode which evaluates code whenever its value changes.
Well, but if you call the function instead of setting the variable, it
also takes effect immediately.
(rcirc-track-minor-mode 1)
And calling a mode's function is the canonical way to enable a major
mode and enable/disable a minor mode. The docs reflect that, too.
,----[ C-h v rcirc-track-minor-mode RET ]
| rcirc-track-minor-mode is a variable defined in `rcirc.el'.
| Its value is nil
|
| Documentation:
| Non-nil if Rcirc-Track minor mode is enabled.
| See the command `rcirc-track-minor-mode' for a description of this minor mode.
| Setting this variable directly does not take effect;
| either customize it (see the info node `Easy Customization')
| or call the function `rcirc-track-minor-mode'.
|
| You can customize this variable.
`----
But still you are right that using customize is not a bad thing. But I
prefer good-old lisp configurations, because that gives me the
possibility to structure my configs using outlines and do some stuff
like adding a minor mode function to a set of different major mode hooks
in one rush.
But for faces, I solely use the customize interface.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: .emacs and other config file questions
[not found] ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
2010-11-15 4:25 ` Tim X
@ 2010-11-17 2:13 ` Stefan Monnier
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-11-17 2:13 UTC (permalink / raw)
To: help-gnu-emacs
> 1. "customize" versus Do It Yourself?
> =====================================
> Is there a general view as to the pros and cons of using customize
> versus just writing the lisp yourself? Although I know very little lisp,
> I'm inclined towards the latter -- primarily so I'm forced to
> learn. Customize is cool and easy and simple, but I worry it leaves me
> dependent on it. Make sense, or am I just trying to punch nails in with
> my fist when even the cool kids these days use the customize nailgun?
> Found a few items on this, including
> http://article.gmane.org/gmane.emacs.help/25218 which references
> something back in 1999 that I couldn't locate.
If you can, I recommend to write the Lisp yourself in your .emacs rather
than let Customize do it for you. The only exception is for faces,
where doing it by hand without using Customize is rather painful and
poorly supported.
> 2. Why .gnus (and no, for example, .org)?
> ========================================
> Gnus seems unusual among the many packages in that convention seems
> to dictate we do most of its setup in .gnus, rather than in
> .emacs. Why is that?
No fundamental reason.
> Or is there some stuff that *must* go in .gnus because it makes no
> sense until Gnus is actually run?
Not that I know, no.
> I'm running primarily on a desktop iMac, but would like to run also from
> a MacBook Pro Laptop. I have DropBox. I also have iDisk (MobileMe). And
> in the past I've used unison. Anyone care to share how they handle their
> config setup (i.e. their use of .emacs, customization, .gnus, and so on)
> where they want the same setup mirrored across multiple machines?
I use a revision control system (Bazaar in my case) to version those
files with a central repository on some Internet-connected host.
That gives you all the features you need for syncing stuff between any
number of machines.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-11-17 2:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 23:02 Bug in display-buffer Андрей Парамонов
2010-11-13 0:50 ` Drew Adams
2010-11-13 13:47 ` .emacs and other config file questions Tommy Kelly
2010-11-15 15:04 ` Deniz Dogan
2010-11-16 8:16 ` Tassilo Horn
[not found] ` <mailman.0.1289683517.943.help-gnu-emacs@gnu.org>
2010-11-15 4:25 ` Tim X
2010-11-17 2:13 ` Stefan Monnier
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).