
39 S.W.3d 250 (2000)
In re Christopher Gerald CHRISTENSEN.
No. 07-00-0510-CV.
Court of Appeals of Texas, Amarillo.
December 8, 2000.
Christopher Gerald Christensen, Abilene, pro se.
Rebecca King, Potter County Dist. Atty., Amarillo, for appellee.
Before BOYD, C.J., and REAVIS and JOHNSON, JJ.
PER CURIAM.
Christopher Gerald Christensen has petitioned this court for a writ of mandamus to compel the trial court to set a hearing on and to rule on a pending motion. We conditionally grant the writ.

BACKGROUND
Relator Christopher Gerald Christensen was convicted of aggravated sexual assault in the 47th District Court of Potter County (the trial court). He is presently serving a 50-year sentence assessed following his conviction. By a Motion to Review the Trial/Appellate Record, relator requested respondent, Honorable David Gleason, judge of the trial court, to provide to relator on a "temporary loan basis" at the facility where relator is incarcerated, a copy of the trial/appellate record in trial court cause number 34,114-A, and appellate court cause number 07-96-0271-CR. The copy of relator's motion which is attached to his petition for writ of mandamus shows that his request references the "Texas Public Information Act, (V.T.C.A., Government Code § 552.000 et. seq.)." *251 Relator alleges that he submitted a proposed order on the motion, a Setting Request for June 12, 2000 "and/or the next Motion Day of Court," and a proposed order setting his motion for hearing. Relator claims that subsequently he filed a motion to compel a ruling on his original motion for a loan of the trial and appellate records sought, a proposed order on the motion, and a request for findings of fact and conclusions of law. He alleges that as of yet, the trial court has neither heard nor scheduled a hearing on his motion.
Respondent's reply to the petition for writ addresses the merits of relator's request for records. Respondent does not (1) contest relator's recitation of facts, (2) question whether relator's motion and requests for hearing have been presented to him, (3) assert that he has set or ruled on the motion or (4) question whether the motion was properly filed and is properly pending.

LAW
The legislature has prescribed jurisdiction of a court of appeals to issue writs of mandamus (1) to enforce its jurisdiction, and (2) against judges of district and county courts in the district of the particular court of appeals. Tex.Gov't Code Ann. § 22.221 (Vernon 1988 & Supp. 2000). Mandamus is a legal remedy, Westerman v. Mims, 111 Tex. 29, 227 S.W. 178, 181 (1921), even though equitable principles apply. Rivercenter Assoc. v. Rivera, 858 S.W.2d 366, 367 (Tex.1993); Callahan v. Giles, 137 Tex. 571, 155 S.W.2d 793, 795 (1941). A writ of mandamus is an extraordinary remedy that will issue only to correct a clear abuse of discretion or the violation of a duty imposed by law, when there is no other adequate remedy by law. Canadian Helicopters Ltd. v. Wittig, 876 S.W.2d 304, 305 (Tex. 1994).
Consideration of a motion properly filed and before a trial court is ministerial. See White v. Reiter, 640 S.W.2d 586, 594, 596 (Tex.Crim.App.1982). Fundamental requirements of due process mandate an opportunity to be heard. Creel v. District Atty. for Medina County, 818 S.W.2d 45, 46 (Tex.1991). Thus, a district court may be compelled via mandamus to consider and rule on a pending motion presented to the court. See State ex rel. Curry v. Gray, 726 S.W.2d 125, 128 (Tex.Crim.App.1987). Mandamus, however, will not issue to compel a particular result in a discretionary decision on a motion. Id; White, 640 S.W.2d at 593-94.

ANALYSIS
Relator's motion to the trial court recites that his request for a loan of the trial and appellate record is for the purpose of preparing an application for a writ of habeas corpus. Such an application would be returnable to the Court of Criminal Appeals. Tex.Crim.Proc.Code Ann. § 11.07 (Vernon Supp.2000). Relator, however, has requested a legal remedy within our jurisdiction, which jurisdiction he has invoked.
Relator is entitled to have his motion heard and ruled on by the trial court. Creel, 818 S.W.2d at 46; Gray, 726 S.W.2d at 128. What ruling is made on the motion is within the trial court's discretion. See Gray, 726 S.W.2d at 128; White, 640 S.W.2d at 593-94.

CONCLUSION
Relator's Motion for Leave to File Petition for Writ of Mandamus is granted. Relator's Petition for Writ of Mandamus is granted. Respondent is directed to set, hear and rule on relator's Motion to Review the Trial/Appellate Record within a reasonable time. We anticipate that respondent will comply with our directive. A writ of mandamus will issue only if respondent fails to do so.
