TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preferred Process: The process (P1) further comprises combining the residue stream with an additional gas stream prior to passing the residue stream to the methanol synthesis loop, where the additional gas stream: has a third composition parameter R3 (where R3 is less than R2); comes from additional reformed hydrocarbon; and is a carbon dioxide stream recovered from flue gas, or a carbon dioxide-rich stream recovered from another chemical process. In the process (P1): the syngas is passed across the feed side at 50-150 degrees C; the feed side is maintained at a pressure of 10-30 bar; the permeate side is maintained at a pressure of 2-5 bar; the residue stream is compressed to a pressure of 45-100 bar before being passed to step (g); and a product stream from the methanol synthesis loop is routed to a condenser, where an overhead stream is withdrawn from the condenser, and at least a portion of the overhead stream is routed as a recycle stream back to the methanol synthesis loop. The step (i) comprises: providing a second membrane having a second feed side and a second permeate side, where the second membrane is selective for carbon dioxide over hydrogen and methane; passing the purge stream across the second feed side; withdrawing a carbon dioxide-enriched second permeate stream from the second permeate side; and passing the second permeate stream as the treated purge stream to step (j). In the process (P2): the syngas is passed across the first feed side at 50-150 degrees C; the first feed side is maintained at a pressure of 10-30 bar; the first permeate side is maintained at a pressure of 2-5 bar; and the first residue stream is compressed to a pressure of 45-100 bar before being passed to step (g1). Preferred Components: The membrane and the first membrane exhibit a selectivity to hydrogen over carbon dioxide of at least 10. The second membrane has a selectivity for carbon dioxide over hydrogen of at least 5, and a selectivity for carbon dioxide over methane of at least 10. EXAMPLE - No suitable example given.