{"id":986,"date":"2025-04-29T20:58:54","date_gmt":"2025-04-29T20:58:54","guid":{"rendered":"https:\/\/www.step3.net\/?p=986"},"modified":"2026-07-25T07:17:56","modified_gmt":"2026-07-25T07:17:56","slug":"emacs%e3%81%a8chatgpt%e3%81%ae%e8%89%af%e3%81%84%e9%96%a2%e4%bf%82","status":"publish","type":"post","link":"https:\/\/www.step3.net\/?p=986","title":{"rendered":"Emacs\u3068Chatgpt\u306e\u826f\u3044\u95a2\u4fc2"},"content":{"rendered":"<div style=\"text-align:center;\"><a href=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/20250302-130814.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"20250302-130814\" title=\"20250302-130814\" style=\"margin: 3px;\" src=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/20250302-130814.png\" width=\"300\" height=\"230\"><\/a><\/div>\n<p>\u3053\u308c\u307e\u3067\u306f\u3001\u30a8\u30c7\u30a3\u30bf\u3068\u3057\u3066\u306eEmacs\u3002<br \/>\n\u7279\u306b\u4e0d\u4fbf\u3092\u611f\u3058\u305f\u3053\u3068\u306f\u306a\u304b\u3063\u305f\u304c\u3001ChatGPT\u30a2\u30d7\u30ea\u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u3075\u3068\u8003\u3048\u305f\u3002Emacs\u306e\u62e1\u5f35\u6a5f\u80fd\u306fLisp\u3067\u66f8\u304b\u308c\u3066\u3044\u308b\u3002  \u3053\u306eLisp\u3001\u4eba\u5de5\u77e5\u80fd\uff08AI\uff09\u958b\u767a\u306e\u305f\u3081\u306b\u751f\u307e\u308c\u305f\u8a00\u8a9e\u3002\u3068\u3001\u5927\u5b664\u5e74\u306e\u3068\u304d\u306bReduce\u7279\u8ad6\u3067\u6771\u5927\u306e\u5f8c\u85e4\u82f1\u4e00\u5148\u751f\u304b\u3089\u6559\u308f\u3063\u305f\u3002\u305d\u308c\u306a\u3089\u3001Lisp\u3067AI\u30b7\u30b9\u30c6\u30e0\u3092\u958b\u767a\u3057\u3066\u304d\u305f\u4eba\u305f\u3061\u306f\u3001Emacs\u304b\u3089ChatGPT\u3092\u3069\u3046\u6d3b\u7528\u3057\u3066\u3044\u308b\u306e\u3060\u308d\u3046\uff1f  \u305d\u3093\u306a\u7591\u554f\u304c\u6e67\u3044\u3066\u304d\u305f\u3002<br \/>\n\u8abf\u3079\u3066\u3044\u304f\u3046\u3061\u306b\u3001LaTeX\u306e\u5927\u5bb6\u30fb\u5965\u6751\u6674\u5f66\u3055\u3093\u306e\u30da\u30fc\u30b8\u306b\u305f\u3069\u308a\u7740\u3044\u305f\u3002<br \/>\n> <a href=\" https:\/\/okumuralab.org\/~okumura\/misc\/250407.html\" target=\"_blank\">Emacs\u3067LLM\u3092\u4f7f\u3046: chatgpt-shell  <\/a><br \/>\n\u5965\u6751\u3055\u3093\u306f\u3001\u65e2\u306bEmacs\u4e0a\u3067OpenAI\u306eAPI\u3092\u4f7f\u3063\u3066ChatGPT\u3092\u6d3b\u7528\u3057\u3066\u3044\u305f\u3002<br \/>\n`.init.el`\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3068\u306e\u3053\u3068\u3002<br \/>\n&#8220;`elisp<br \/>\n;; ChatGPT!<br \/>\n(use-package chatgpt-shell<br \/>\n:ensure t<br \/>\n:custom<br \/>\n(chatgpt-shell-openai-key (getenv &#8220;OPENAI_API_KEY&#8221;)))<br \/>\n&#8220;`<br \/>\nOpenAI\u3068API\u5229\u7528\u5951\u7d04\u3092\u7d50\u3073\u3001API\u30ad\u30fc\u3092\u767a\u884c\u3057\u3066\u3082\u3089\u3044\u3001<br \/>\n`.bash_profile`\u306a\u3069\u306b\u74b0\u5883\u5909\u6570\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n&#8220;`bash<br \/>\n# OpenAI API Key<br \/>\nexport OPENAI_API_KEY=&#8221;xxxxxx&#8221;<br \/>\n&#8220;`<br \/>\n\u3042\u3068\u306f\u3001Emacs\u3092\u901a\u5e38\u901a\u308a\u8d77\u52d5\u3057\u3066<br \/>\n`M-x chatgpt-shell`<br \/>\n\u3068\u5165\u529b\u3059\u308c\u3070\u3001ChatGPT\u3068\u306e\u5bfe\u8a71\u30d0\u30c3\u30d5\u30a1\u304c\u958b\u304f\u3089\u3057\u3044\u3002<br \/>\n\u306a\u3093\u3060\u3001\u3053\u3093\u306a\u306b\u7c21\u5358\u3067\u3044\u3044\u306e\u304b\uff01  \u3057\u304b\u3082API\u3054\u3068\u306e\u8ab2\u91d1\u3067\u3001\u8ab2\u91d1\u5358\u4f4d\u3082\u81ea\u5206\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u306e\u3067\u5b89\u4fa1\uff01<br \/>\n\u3068\u3001\u9a5a\u3044\u305f\u3002<br \/>\n\u7269\u4e8b\u306e\u672c\u8cea\u3092\u3088\u304f\u77e5\u308b\u4eba\u306f\u3001\u6700\u77ed\u30eb\u30fc\u30c8\u3092\u77e5\u3063\u3066\u3044\u308b\u3002<br \/>\n\u3042\u3089\u305f\u3081\u3066\u3001\u305d\u308c\u3092\u5b9f\u611f\u3057\u305f\u3002<br \/>\n\u305f\u3060\u3001\u81ea\u5206\u306e\u74b0\u5883\uff08Apple Silicon Mac\uff09\u3067chatgpt-shell\u3092\u52d5\u304b\u305b\u308bEmacs\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u306f\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b\u306a\u304b\u3063\u305f\u3002.init.el\u306b\u4e0a\u8a18\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3057\u3066Emacs\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001Emacs\u304c\u8d77\u52d5\u3057\u306a\u3044\u3002  \u30d0\u30c3\u30d5\u30a1\u306b\u306f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u3002\u3069\u3046\u3084\u3089TLS\u304c\u5fc5\u8981\u3089\u3057\u3044\u3002  \u4eca\u307e\u3067\u30d3\u30eb\u30c9\u3057\u3066\u304d\u305fEmacs\u306f\u30ed\u30fc\u30ab\u30eb\u30ea\u30bd\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308c\u3070\u5341\u5206\u3060\u3063\u305f\u306e\u3067OpenSSL\u3084GnuTLS\u3092\u30ea\u30f3\u30af\u304b\u3089\u5916\u3057\u3066\u3044\u305f\u3002  API\u9023\u643a\u3092\u4f7f\u3046\u306a\u3089TLS\u306f\u5fc5\u9808\u3060\u3057\u3001Emacs Lisp\u306e\u8ffd\u52a0\u30d1\u30c3\u30b1\u30fc\u30b8\u3082ELPA\u7d4c\u7531\u3067\u53d6\u308a\u8fbc\u3080\u5834\u5408TLS\u901a\u4fe1\u306f\u5fc5\u9808\u3002<br \/>\nGnuTLS\u3092\u30ea\u30f3\u30af\u3057\u305fEmacs\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306b\u306f\u3001GnuTLS\u3092Mac\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n\u3053\u3053\u3067\u4e00\u82e6\u52b4\u3057\u305f\u3002<br \/>\n&#8220;`bash<br \/>\nbrew install gnutls<br \/>\n&#8220;`<br \/>\n\u3068Homebrew\u3067GnuTLS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082\u3001`configure`\u30b3\u30de\u30f3\u30c9\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<br \/>\n\u7d50\u5c40\u3001Apple Silicon Mac\u3067\u3042\u308b\u3053\u3068\u304c\u539f\u56e0\u3060\u3063\u305f\u3088\u3046\u3060\u3002<br \/>\nBrew\u74b0\u5883\u306f\u4ee5\u524d\u4f7f\u3063\u3066\u3044\u305fIntel Mac\u304b\u3089\u79fb\u884c\u3057\u3066\u304d\u305f\u3082\u306e\u3060\u3063\u305f\u305f\u3081\u3001\u60aa\u5f71\u97ff\u304c\u51fa\u3066\u3044\u305f\u3002<br \/>\n\u4e00\u5ea6\u3001Homebrew\u74b0\u5883\u3092\u5168\u3066\u524a\u9664\u3057\u3001\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<br \/>\n\u3053\u308c\u3067\u7121\u4e8b\u306b\u30d3\u30eb\u30c9\u304c\u901a\u3063\u305f\uff01<br \/>\n&#8220;`bash<br \/>\n$ cd ~\/emacs   # Emacs\u306e\u30bd\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078<br \/>\n$ make distclean<br \/>\n$ .\/autogen.sh<br \/>\n$ .\/configure &#8211;with-ns &#8211;without-x &#8211;disable-ns-self-contained &#8211;with-gnutls &#8211;without-webp &#8211;without-rsvg &#8211;without-png &#8211;without-gif &#8211;without-tiff &#8211;without-jpeg &#8211;without-xpm &#8211;without-lcms2<br \/>\n$ make<br \/>\n$ sudo make install<br \/>\n&#8220;`<br \/>\n\u3053\u3046\u3057\u3066\u3001chatgpt-shell\u751f\u6d3b\u304c\u59cb\u307e\u3063\u305f\u3002<br \/>\n\u4f7f\u3044\u59cb\u3081\u3066\u307f\u308b\u3068\u3001\u975e\u5e38\u306b\u5feb\u9069!!!<br \/>\n<a href=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/20250429-205647.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" alt=\"20250429-205647\" title=\"20250429-205647\" style=\"margin: 3px;\" src=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/20250429-205647.png\" width=\"500\" height=\"288\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u307e\u3067\u306f\u3001\u30a8\u30c7\u30a3\u30bf\u3068\u3057\u3066\u306eEmacs\u3002 \u7279\u306b\u4e0d\u4fbf\u3092\u611f\u3058\u305f\u3053\u3068\u306f\u306a\u304b\u3063\u305f\u304c\u3001ChatGPT\u30a2\u30d7\u30ea\u3092\u4f7f\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u3001\u3075\u3068\u8003\u3048\u305f\u3002Emacs\u306e\u62e1\u5f35\u6a5f\u80fd\u306fLisp\u3067\u66f8\u304b\u308c\u3066\u3044\u308b\u3002 \u3053\u306eLisp\u3001\u4eba\u5de5\u77e5\u80fd\uff08AI\uff09\u958b\u767a\u306e\u305f\u3081\u306b\u751f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-986","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=986"}],"version-history":[{"count":1,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":1420,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions\/1420"}],"wp:attachment":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}