all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question about display-buffer-overriding-action
@ 2022-03-16  1:34 Eduardo Ochs
  2022-03-16  1:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 15+ messages in thread
From: Eduardo Ochs @ 2022-03-16  1:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

how do I set `display-buffer-overriding-action' in a let to make
`pop-to-buffer' use the current window? The docs are here,

  (info "(elisp)Choosing Window")
  (info "(elisp)The Zen of Buffer Display")

but I'm probably misreading something over and over, because I've done
lots of tests and I can't get it right...

Here's a concrete example. The package "osm" is new in ELPA, and is an
OpenStreetMap viewer for Emacs. Suppose that we define this:


  (setq USETHISWINDOW nil)

  (defun find-osm (lat lon zoom &rest comments)
  "Open a map. LAT, LON and ZOOM are the latitude, longitude, and zoom factor.
  The COMMENTS are ignored. You need to have osm.el - OpenStreetMap
  viewer - installed for this to work."
    (let ((display-buffer-overriding-action USETHISWINDOW))
      (osm-goto lat lon zoom)))

  ;; Test: (find-osm -22.5 -41.9 15 "Near home")


The function `osm-goto' calls `osm--goto', that calls `pop-to-buffer',
and apparently one of the variables that controls the behavior of
`pop-to-buffer' is `display-buffer-overriding-action'. If we have two
windows open and USETHISWINDOW is nil, then - at least in my setting -
this test

  ;; Test: (find-osm -22.5 -41.9 15 "Near home")

opens the map in the other window. What is the value of USETHISWINDOW
that would mean "always open in the current window"?

  Thanks in advance!
    Eduardo Ochs
    http://angg.twu.net/#eev



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-03-26  1:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16  1:34 Question about display-buffer-overriding-action Eduardo Ochs
2022-03-16  1:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16  2:08   ` Eduardo Ochs
2022-03-16  2:12     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-17 20:19       ` Eduardo Ochs
2022-03-17 21:04       ` Eduardo Ochs
2022-03-17 22:14         ` Michael Heerdegen
2022-03-18  4:56           ` Eduardo Ochs
2022-03-19  1:30             ` Michael Heerdegen
2022-03-25  9:38       ` dal-blazej
2022-03-25 17:59         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-25 22:56           ` dal-blazej
2022-03-26  1:10         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16  2:16     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16 13:51     ` Eric S Fraga

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.