{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml-community/utop/issues/258","repository_url":"https://api.github.com/repos/ocaml-community/utop","labels_url":"https://api.github.com/repos/ocaml-community/utop/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/ocaml-community/utop/issues/258/comments","events_url":"https://api.github.com/repos/ocaml-community/utop/issues/258/events","html_url":"https://github.com/ocaml-community/utop/issues/258","id":362983166,"node_id":"MDU6SXNzdWUzNjI5ODMxNjY=","number":258,"title":"utop with emacs","user":{"login":"RogerTarani","id":12643512,"node_id":"MDQ6VXNlcjEyNjQzNTEy","avatar_url":"https://avatars0.githubusercontent.com/u/12643512?v=4","gravatar_id":"","url":"https://api.github.com/users/RogerTarani","html_url":"https://github.com/RogerTarani","followers_url":"https://api.github.com/users/RogerTarani/followers","following_url":"https://api.github.com/users/RogerTarani/following{/other_user}","gists_url":"https://api.github.com/users/RogerTarani/gists{/gist_id}","starred_url":"https://api.github.com/users/RogerTarani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RogerTarani/subscriptions","organizations_url":"https://api.github.com/users/RogerTarani/orgs","repos_url":"https://api.github.com/users/RogerTarani/repos","events_url":"https://api.github.com/users/RogerTarani/events{/privacy}","received_events_url":"https://api.github.com/users/RogerTarani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-23T22:28:32Z","updated_at":"2018-09-25T10:52:16Z","closed_at":null,"author_association":"NONE","body":"utop works perfectly in shell mode (Debian Stretch).\r\nWithin emacs, I'm fine with tuareg/merlin/auto-complete. But I can't have utop up&running there.\r\n\r\n```\r\nM-x utop\r\nutop command line: opam config exec -- utop -emac\r\n\r\nerror in process filter: pcase--u1: Unknown upattern `(quote wait)'\r\nerror in process filter: Unknown upattern `(quote wait)'\r\n```\r\nAnd the utop buffer shows no more than the following, accepting no input: \r\n```\r\nstdout:  #require \"package\";;      to load a package\r\nstdout:  #list;;                   to list the available packages\r\nstdout:  #camlp4o;;                to load camlp4 (standard syntax)\r\nstdout:  #camlp4r;;                to load camlp4 (revised syntax)\r\nstdout:  #predicates \"p,q,...\";;   to set these predicates\r\nstdout:  Topfind.reset();;         to force that packages will be reloaded\r\nstdout:  #thread;;                 to enable threads\r\nstdout:\r\n```\r\nWhen I use the configuration from RWO Dev, I get another error and utop not working.\r\n\r\nIt looks like the utop page is telling something different from the RWO Dev page.\r\nAnyway, I may be tired and confused.\r\n\r\nI've used instructions from [http://dev.realworldocaml.org/install.html](http://dev.realworldocaml.org/install.html) and [https://github.com/ocaml-community/utop](https://github.com/ocaml-community/utop).\r\nCan you pls. tell the recommended ~/.emacs configuration to get utop workin within emacs and other required cofiguration? (in addition to have utop installed correctly via opam, and working via the shell).\r\nThanks \r\n\r\nPls find herafter the part of my ~/.emacs regarding utop:\r\n```\r\n$ cat  ~/.emacs \r\n\r\n;; -- opam and utop setup --------------------------------\r\n;; Setup environment variables using opam\r\n(dolist\r\n   (var (car (read-from-string\r\n           (shell-command-to-string \"opam config env --sexp\"))))\r\n (setenv (car var) (cadr var)))\r\n\r\n;; Update the emacs path\r\n(setq exec-path (split-string (getenv \"PATH\") path-separator))\r\n\r\n;; Update the emacs load path\r\n(push (concat (getenv \"OCAML_TOPLEVEL_PATH\")\r\n          \"/../../share/emacs/site-lisp\") load-path)\r\n\r\n;; Automatically load utop.el\r\n(autoload 'utop \"utop\" \"Toplevel for OCaml\" t)\r\n;; the following from RWO dev/install looks like deprecated, so it's commented out\r\n;;(autoload 'utop-setup-ocaml-buffer \"utop\" \"Toplevel for OCaml\" t)\r\n;;(add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer)\r\n;; the following was added following https://github.com/ocaml-community/utop#integration-with-emacs\r\n(autoload 'utop-minor-mode \"utop\" \"Minor mode for utop\" t)\r\n(add-hook 'tuareg-mode-hook 'utop-minor-mode)\r\n;; to avoid manually activate this mode with \r\n;; M-x utop-minor-mode\r\n\r\n;; Use the opam installed utop\r\n(setq utop-command \"opam config exec -- utop -emacs\")\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/ocaml-community/utop/issues/comments/424296452","html_url":"https://github.com/ocaml-community/utop/issues/258#issuecomment-424296452","issue_url":"https://api.github.com/repos/ocaml-community/utop/issues/258","id":424296452,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDI5NjQ1Mg==","user":{"login":"diml","id":1251584,"node_id":"MDQ6VXNlcjEyNTE1ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1251584?v=4","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T10:52:16Z","updated_at":"2018-09-25T10:52:16Z","author_association":"COLLABORATOR","body":"utop behaves a bit differently in emacs, I didn't know how to display the completion bar so I just used normal emacs completion mechanism.\r\n\r\nHave you tried the `utop-minor-mode`? https://github.com/ocaml-community/utop#usage-1"}}
{"actor":{"display_login":"diml"}}