Index: gtk2_ardour/public_editor.h
===================================================================
--- gtk2_ardour/public_editor.h	(revision 9751)
+++ gtk2_ardour/public_editor.h	(working copy)
@@ -271,7 +271,7 @@
 	virtual framepos_t get_preferred_edit_position (bool ignore_playhead = false) = 0;
 	virtual void toggle_meter_updating() = 0;
 	virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
-	virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false) = 0;
+	virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false) = 0;
 	virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
 	virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
 	virtual framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next) = 0;
Index: gtk2_ardour/ardour_ui.cc
===================================================================
--- gtk2_ardour/ardour_ui.cc	(revision 9751)
+++ gtk2_ardour/ardour_ui.cc	(working copy)
@@ -3212,7 +3212,26 @@
 void
 ARDOUR_UI::create_xrun_marker (framepos_t where)
 {
-	editor->mouse_add_new_marker (where, false, true);
+	// editor->mouse_add_new_marker (where, false, true);
+
+	if (_session) {
+		/* adding xrun markers doesn't need to be undoable:
+		 * just add it, and don't make_current either.
+		 *
+		 * XXX doesn't do the right thing yet, since the xrun 
+		 * markers are created during capture, 
+		 * but begin_reversible_command (Operations::capture);
+		 * doesn't happen until the transport is stopped after
+		 * the capture.
+		 */
+		 
+		string markername;
+
+		_session->locations()->next_available_name(markername, _("xrun"));
+		Location *location = new Location (*_session, where, where, markername, Location::IsMark);
+		_session->locations()->add (location, false);
+	}
+
 }
 
 void
Index: gtk2_ardour/editor_markers.cc
===================================================================
--- gtk2_ardour/editor_markers.cc	(revision 9751)
+++ gtk2_ardour/editor_markers.cc	(working copy)
@@ -626,24 +626,18 @@
 }
 
 void
-Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
+Editor::mouse_add_new_marker (framepos_t where, bool is_cd)
 {
-	string markername, markerprefix;
+	string markername;
 	int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
 
-	if (is_xrun) {
-		markerprefix = "xrun";
-		flags = Location::IsMark;
-	} else {
-		markerprefix = "mark";
-	}
-
 	if (_session) {
-		_session->locations()->next_available_name(markername, markerprefix);
-		if (!is_xrun && !choose_new_marker_name(markername)) {
+		_session->locations()->next_available_name(markername, _("mark"));
+		Location *location = new Location (*_session, where, where, markername, (Location::Flags) flags);
+
+		if (!choose_new_marker_name(markername)) {
 			return;
 		}
-		Location *location = new Location (*_session, where, where, markername, (Location::Flags) flags);
 		_session->begin_reversible_command (_("add marker"));
 		XMLNode &before = _session->locations()->get_state();
 		_session->locations()->add (location, true);
Index: gtk2_ardour/editor_rulers.cc
===================================================================
--- gtk2_ardour/editor_rulers.cc	(revision 9751)
+++ gtk2_ardour/editor_rulers.cc	(working copy)
@@ -337,7 +337,7 @@
 
 	switch (t) {
 	case MarkerBarItem:
-		ruler_items.push_back (MenuElem (_("New location marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, false, false)));
+		ruler_items.push_back (MenuElem (_("New location marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, false)));
 		ruler_items.push_back (MenuElem (_("Clear all locations"), sigc::mem_fun(*this, &Editor::clear_markers)));
 		ruler_items.push_back (MenuElem (_("Unhide locations"), sigc::mem_fun(*this, &Editor::unhide_markers)));
 		ruler_items.push_back (SeparatorElem ());
@@ -355,7 +355,7 @@
 
 	case CdMarkerBarItem:
 		// TODO
-		ruler_items.push_back (MenuElem (_("New CD track marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, true, false)));
+		ruler_items.push_back (MenuElem (_("New CD track marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, true)));
 		break;
 
 
Index: gtk2_ardour/editor.h
===================================================================
--- gtk2_ardour/editor.h	(revision 9751)
+++ gtk2_ardour/editor.h	(working copy)
@@ -605,7 +605,7 @@
 
 	void hide_marker (ArdourCanvas::Item*, GdkEvent*);
 	void clear_marker_display ();
-	void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
+	void mouse_add_new_marker (framepos_t where, bool is_cd=false);
 	bool choose_new_marker_name(std::string &name);
 	void update_cd_marker_display ();
 	void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
Index: libs/ardour/session.cc
===================================================================
--- libs/ardour/session.cc	(revision 9751)
+++ libs/ardour/session.cc	(working copy)
@@ -985,6 +985,7 @@
 void
 Session::enable_record ()
 {
+
 	while (1) {
 		RecordState rs = (RecordState) g_atomic_int_get (&_record_status);
 
@@ -1005,6 +1006,11 @@
 			break;
 		}
 	}
+	
+	// XXX this doesn't belong here, but where will it owrk?
+	cerr << "begin_reversible_command (Operations::capture);" << endl;
+	begin_reversible_command (Operations::capture);
+
 }
 
 void
Index: libs/ardour/session_transport.cc
===================================================================
--- libs/ardour/session_transport.cc	(revision 9751)
+++ libs/ardour/session_transport.cc	(working copy)
@@ -463,7 +463,7 @@
 	reset_rf_scale (0);
 
 	if (did_record) {
-		begin_reversible_command (Operations::capture);
+		// begin_reversible_command (Operations::capture);
 		_have_captured = true;
 	}
 
@@ -495,6 +495,7 @@
 	}
 
 	if (did_record) {
+		cerr << "commit_reversible_command ();" << endl;
 		commit_reversible_command ();
 	}
 
