Your so-called priority table (the “table of functional group priorities for nomenclature” shown here) is relevant for the choice of a characteristic group for citation at the end of a name by means of a suffix or a class name. It does not apply to the numbering of locants. This particular table could also be misleading since it mingles the concepts of classes, suffixes, endings, and prefixes.
The most important simplified criteria for the numbering of simple acyclic compounds are:
- lower locants for suffixes
- lower locants for multiple bonds
- lower locants for prefixes
- lower locants for substituents cited first as a prefix in the name
The corresponding actual wording in the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book) reads as follows:
P-14.4 NUMBERING
When several structural features appear in cyclic and acyclic compounds, low locants are assigned to them in the following decreasing order of seniority:
(…)
(c) principal characteristic groups and free valences (suffixes);
(…)
(e) saturation/unsaturation:
(i) low locants are given to hydro/dehydro prefixes (…) and ‘ene’ and ‘yne’ endings;
(ii) low locants are given first to multiple bonds as a set and then to double bonds (…);
(f) detachable alphabetized prefixes, all considered together in a series of increasing numerical order;
(g) lowest locants for the substituent cited first as a prefix in the name;
(…)
Since both compounds that are given in the question do not have any principal characteristic group (a characteristic group chosen for citation at the end of a name by means of a suffix or a class name, or implied by a trivial name), the first criterion (greater number of suffixes) given in P-14.4 (c) is not relevant in this case.
The systematic name of the first compound is 6-methylhept-2-yne rather than 2-methylhept-5-yne since low locants are given first to the ‘yne’ ending and the locant ‘2’ is lower than ‘5’.

The systematic name of the second example is (4E)-hex-4-en-1-yne rather than (2E)-hex-2-en-5-yne since low locants are given to multiple bonds as a set (even though this may give ‘yne’ endings lower locants than ‘ene’ endings), and the locant set ‘1,4’ is lower than ‘2,5’. Only if a choice remains, preference for low locants is given to the double bonds.
