Q:

Item set in registry Magento 2

How to set item in core registry ? I have created order list , now i want load current order set in core registry in custom module. 
 public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        \Magento\Sales\Api\Data\OrderInterface $order,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        $this->order = $order;
        parent::__construct($context, $data);
        $this->_isScopePrivate = true;
    }

    /**
     * @return void
     */
    protected function _prepareLayout()
    {
        $this->pageConfig->getTitle()->set(__('Order # %1', $this->getOrder()->getRealOrderId()));
        $infoBlock = $this->_paymentHelper->getInfoBlock($this->getOrder()->getPayment(), $this->getLayout());
        $this->setChild('payment_info', $infoBlock);
    }

    /**
     * @return string
     */
    public function getPaymentInfoHtml()
    {
        return $this->getChildHtml('payment_info');
    }

    /**
     * Retrieve current order model instance
     *
     * @return \Magento\Sales\Model\Order
     */
    public function getOrder()
    {
        $data = $this->getRequest()->getParams('id');
        return $order = $this->order->loadByIncrementId($data);

    }

in core file 

public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context, $data);
        $this->_isScopePrivate = true;
    }

    /**
     * @return void
     */
    protected function _prepareLayout()
    {
        $this->pageConfig->getTitle()->set(__('Order # %1', $this->getOrder()->getRealOrderId()));
        $infoBlock = $this->_paymentHelper->getInfoBlock($this->getOrder()->getPayment(), $this->getLayout());
        $this->setChild('payment_info', $infoBlock);
    }

    /**
     * @return string
     */
    public function getPaymentInfoHtml()
    {
        return $this->getChildHtml('payment_info');
    }

    /**
     * Retrieve current order model instance
     *
     * @return \Magento\Sales\Model\Order
     */
    public function getOrder()
    {
        return $this->_coreRegistry->registry('current_order');
    }

A:

In order to ,get a registry variable then you should register that variable. 
So. you should add $this->_coreRegistry->register('current_order',$order ) at  getOrder()  function.
So you need some change at getOrder()
  public function getOrder()
    {
        $data = $this->getRequest()->getParams('id');
        return $order = $this->order->loadByIncrementId($data);

    }

to
  public function getOrder()
    {
        $data = $this->getRequest()->getParams('id');
         $order = $this->order->loadByIncrementId($data);
         /* if aleady exits then remove and set new once */
         if($this->_coreRegistry->registry('current_order')){

             $this->_coreRegistry->unregister('current_order');
         }
         $this->_coreRegistry->register('current_order',$order );
        return $order;   
    }

