27:4 The greatest gift that God could give David would be the privilege of spending his time contemplating and reflecting on the wonderful features of his God. The psalmist could achieve this best in Israel near the ark of the covenant where God localized His presence in a special sense. There the priests read and studied the Mosaic Law and worshipped God with prayers and songs. The temple in view here was not Solomon's since Solomon had not yet built it. It was probably the tent that David had constructed in Jerusalem to house the ark that was a successor to the Mosaic tabernacle that stood at Gibeon during David's reign.
"As in the well-known 23:6, this is not an ambition to be a priest or Levite but to enjoy the constant presence of God which is typified by their calling. Note the singleness of purpose (one thing)--the best answer to distracting fears (cf. 1-3)--and the priorities within that purpose: to beholdand to inquire; a preoccupation with God's Person and His will. It is the essence of worship; indeed of discipleship."75
27:5-6 By seeking the Lord David would obtain His protection from his enemies and a firm foundation for his life. These foes would not pursue him into the sanctuary. The psalmist's real security came in seeking refuge in the Lord Himself that His tabernacle only symbolized. David was sure the Lord would exalt him above his enemies eventually. Then he promised to worship the Lord with sacrifices and verbal praise.