Question: I created a view block, whose machine name is "news." 

How do I display it using `module_invoke()` and the machine name of the view?

Answer: 
tostinni's answer is the correct one in most cases. However, if you want to include the View title, it is a bit more ugly.

From the `views_embed_view()` documentation:

> 
> Note that this function does NOT display the title of the view. If you want to do that, you will need to do what this function does manually, by loading the view, getting the preview and then getting `$view->get_title()`.
> 
> 
> 

For example:

```
$name = 'view_machine_name';
$display_id = 'block_1';
$view = views_get_view($name);
if (!$view || !$view->access($display_id)) {
  return;
}
$view_content = $view->preview($display_id);
$title = $view->get_title();

```

*Updated*: @rojosnow noted that the docs point out you must get the preview *before* calling `get_title()` so I've flipped those two lines around.
From my own experience, you can transform a path to a view title or content with a function like the following.

```
<?php
function view_path_to_title($path)
{
  // only if your path is a URL alias
  $sql = "SELECT src FROM {url_alias} WHERE dst = '%s'";
  $src = db_result(db_query($sql, $path));

  // if you do not use URL aliases, you probably use $path here instead of $src
  $menu_item = menu_get_item($src);

  // make sure it worked as expected
  if(!empty($menu_item)
  && $menu_item["page_callback"] == "views_page"
  && count($menu_item["page_arguments"]) >= 2)
  {
    $args = $menu_item["page_arguments"];
    $view = views_get_view($args[0]);
  }
  else
  {
    $view = null;
  }

  if ($view)
  {
    // just loading a view is not quite enough, we have to setup the
    // arguments, including the display, and the "execute" the view
    $view->set_display($args[1]);
    array_shift($args); // view name
    array_shift($args); // display name
    $view->set_arguments($args);
    $view->execute();
    $title = $view->get_title();
    if($title)
    {
      return $title;
    }
  }

  // some "random" default
  return $path;
}

```

To render the view, use `$view->render()` instead of `$view->get_title()`.

For sure, until I properly called the `$view->execute()`, nothing worked right. I would get empty strings (maybe null) as return values.