---
title: "#LLM: universal argument emacs M-x 호출 인자값"
url: "https://notes.junghanacs.com/notes/20250329T080125"
author: "Junghan Kim"
date: "2025-03-29T08:01:00+09:00"
lastmod: "2025-03-29T00:00:00+09:00"
description: "Emacs universal argument로 M-x 명령에 숫자 인자를 주는 법을 적은 로그이다."
---

> [!abstract] 이 노트에 대하여
> 
> C-u 80 M-x 같은 형태로 universal argument를 전달하는 방법을 간단히 확인한다. 잘 알고 나면 사소하지만 막상 헷갈릴 때 다시 찾게 되는 Emacs 기초 메모다.

## BIBLIOGRAPHY

## 관련노트

## 히스토리

-   [2025-03-29 Sat 08:01]

## [|2025-03-29 Sat 08:01|](https://notes.junghanacs.com/journal/20250324T000000#h-2025-03-29)

@user 이맥스에서 M-x 호출 할 때 인자 값으로 80을 넣고 싶다면 universal argument 사용법은?

@assistant Emacs에서 `M-x` 호출 시 인자 값으로 80을 넣고 싶다면, **Universal Argument** 를 사용할 수 있습니다. 방법은 다음과 같습니다:

1.  **Universal Argument** 를 호출합니다: `C-u`
2.  숫자 80을 입력합니다: `80`
3.  명령어를 호출합니다: `M-x`

따라서, 전체 키 입력은 `C-u 80 M-x` 입니다. 이때 `M-x` 대신에 실제로 실행하고자 하는 명령어를 입력하면 됩니다.

예를 들어, 특정 명령어 `my-command` 를 실행하고 싶다면, `C-u 80 M-x my-command` 를 입력합니다.

이렇게 하면 `my-command` 에 인자 값으로 80이 전달됩니다. 다만, 명령어가 인자를 받을 수 있는지 확인해야 합니다.

-   Citations: [1] <http://xahlee.info/emacs/emacs/emacs_universal_argument.html> [2] <http://xahlee.info/emacs/emacs/elisp_universal_argument.html> [3] <https://www.gnu.org/software/emacs/manual/html_node/emacs/Arguments.html> [4] <https://blog.naver.com/jodi999/223255999558> [5] <http://gnu.ist.utl.pt/software/emacs/manual/html_node/Arguments.html>

@user
