{"action":"created","issue":{"url":"https://api.github.com/repos/polymode/polymode/issues/174","repository_url":"https://api.github.com/repos/polymode/polymode","labels_url":"https://api.github.com/repos/polymode/polymode/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/polymode/polymode/issues/174/comments","events_url":"https://api.github.com/repos/polymode/polymode/issues/174/events","html_url":"https://github.com/polymode/polymode/issues/174","id":363953351,"node_id":"MDU6SXNzdWUzNjM5NTMzNTE=","number":174,"title":"Indentation of R chunks in LaTeX environments","user":{"login":"mwlodarczak","id":1136154,"node_id":"MDQ6VXNlcjExMzYxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1136154?v=4","gravatar_id":"","url":"https://api.github.com/users/mwlodarczak","html_url":"https://github.com/mwlodarczak","followers_url":"https://api.github.com/users/mwlodarczak/followers","following_url":"https://api.github.com/users/mwlodarczak/following{/other_user}","gists_url":"https://api.github.com/users/mwlodarczak/gists{/gist_id}","starred_url":"https://api.github.com/users/mwlodarczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwlodarczak/subscriptions","organizations_url":"https://api.github.com/users/mwlodarczak/orgs","repos_url":"https://api.github.com/users/mwlodarczak/repos","events_url":"https://api.github.com/users/mwlodarczak/events{/privacy}","received_events_url":"https://api.github.com/users/mwlodarczak/received_events","type":"User","site_admin":false},"labels":[{"id":1014456822,"node_id":"MDU6TGFiZWwxMDE0NDU2ODIy","url":"https://api.github.com/repos/polymode/polymode/labels/indentation","name":"indentation","color":"fc92f1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2018-09-26T10:13:50Z","updated_at":"2018-10-15T17:34:42Z","closed_at":"2018-10-13T07:06:38Z","author_association":"NONE","body":"Thanks for this great package!\r\n\r\nI have had a lot of success using polymode with .Rnw fies and I have recently tried to use it to produce beamer presentations with R chunks included.\r\n\r\nIn this cases, R chunks are commonly included in `frame` environments, which leads to two indentation problems:\r\n\r\n1. When a new chunk is inserted (with `poly-noweb-electric-<`, for instance),  it is indented correctly relative to the enclosing environment. However, after leaving the chunk, the indentation is lost and the point lands in column 0.\r\n\r\n2. Selecting the entire buffer and running `indent-region` hangs Emacs. See for instance, [this sample Rnw document](https://gist.github.com/1803930).\r\n\r\nAs far as I understand, the head-tail mode is basically like fundamental mode so I imagine this is what might be messing this up.\r\n\r\nThis is on Emacs 25.1.1, polymode 20180912.1854, polymode-R 20180924.957 and poly-noweb 20180923.1439 \r\n\r\nBest wishes,\r\nMarcin\r\n"},"comment":{"url":"https://api.github.com/repos/polymode/polymode/issues/comments/429944429","html_url":"https://github.com/polymode/polymode/issues/174#issuecomment-429944429","issue_url":"https://api.github.com/repos/polymode/polymode/issues/174","id":429944429,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTk0NDQyOQ==","user":{"login":"mwlodarczak","id":1136154,"node_id":"MDQ6VXNlcjExMzYxNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1136154?v=4","gravatar_id":"","url":"https://api.github.com/users/mwlodarczak","html_url":"https://github.com/mwlodarczak","followers_url":"https://api.github.com/users/mwlodarczak/followers","following_url":"https://api.github.com/users/mwlodarczak/following{/other_user}","gists_url":"https://api.github.com/users/mwlodarczak/gists{/gist_id}","starred_url":"https://api.github.com/users/mwlodarczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwlodarczak/subscriptions","organizations_url":"https://api.github.com/users/mwlodarczak/orgs","repos_url":"https://api.github.com/users/mwlodarczak/repos","events_url":"https://api.github.com/users/mwlodarczak/events{/privacy}","received_events_url":"https://api.github.com/users/mwlodarczak/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T17:34:42Z","updated_at":"2018-10-15T17:34:42Z","author_association":"NONE","body":"I can confirm that this now works, many thanks!\r\n\r\nThere is only a small oddity -- the first time you call `indent-region` on the entire buffer, everything works fine. If you call it again on the same (properly indented) buffer, the mark jumps to the end of the buffer, stays there for a short while and then returns to the beginning of the buffer."}}
{"actor":{"display_login":"mwlodarczak"}}