Re: org-pop-mode
> Inline tasks seem to be limited to just body text; you > can't put sub-headings inside them, etc. Org-pop digressions can > contain sub-headings and whatever other structure, even further > digressions and "pop"s. So that's something significant that inline > headings lack. Thanks for clarifying. Do you actually use this feature? It was hard for me to come out with anything fitting my workflow. I tried to play very little with org-pop just now. Generally it looks a lot like inline tasks, but indeed a lot less integrated with standard org features. Some observations: - the visual appearance looks same as normal org structure. While, as you said, inline tasks are generally indented too much, the org-pop approach shows little indication that "inline" headlines are actually any different from normal org subheadings. Yes, you have cycling, but it will not be really useful for entries having more than a screen full of text. Probably, the "inline" headlines should be highlighted in some way. - refiling does not touch the :contd: heading - org-metaright and similar functions mess up the :contd: part - creating the :contd: headline feels too manual for me. A command to create the :contd: headline would be useful, I think. - Archiving does not work In summary, my impression is that hacking the existing inlinetask functionality to change visual appearance of inlinetasks (maybe less indentation) and to allow subtasks could be easier if you really want to integrate the whole thing with org-mode. Best, Ihor "Mark E. Shoulson" writes: > On 3/18/20 3:00 AM, Ihor Radchenko wrote: >>> Any feedback? >> >From the first glance it does not look too different from inline >> headings. Could you highlight the difference? >> >> Best, >> Ihor > > Oh! And I forgot a crucial feature that org-pop has over inline tasks: > you can put any amount of org-mode tree-structure inside an org-pop > digression. Inline tasks seem to be limited to just body text; you > can't put sub-headings inside them, etc. Org-pop digressions can > contain sub-headings and whatever other structure, even further > digressions and "pop"s. So that's something significant that inline > headings lack. > > ~mark > > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg
Re: org-pop-mode
On 3/18/20 3:00 AM, Ihor Radchenko wrote: Any feedback? >From the first glance it does not look too different from inline headings. Could you highlight the difference? Best, Ihor Oh! And I forgot a crucial feature that org-pop has over inline tasks: you can put any amount of org-mode tree-structure inside an org-pop digression. Inline tasks seem to be limited to just body text; you can't put sub-headings inside them, etc. Org-pop digressions can contain sub-headings and whatever other structure, even further digressions and "pop"s. So that's something significant that inline headings lack. ~mark
Re: org-pop-mode
On 3/18/20 4:24 PM, Adam Porter wrote: BTW, in the body of your email, the text you write has these two characters between sentences: " ". The second is a plain space, but the first is a Unicode non-breaking space, or "C-x 8 RET a0". I noticed because it's displayed in Emacs as an underline character next to the plain space. Huh! Interesting. Because I know for a fact that I'm hitting the space bar twice and not a NBSP. (I use and maintain https://github.com/kragen/xcompose so I can type all kinds of things; NBSP is Multi-Key Space Space). I guess because my mailer has me composing things in HTML mode, and I double-space my periods, and it's thinking "strings of whitespace are collapsed into a single space in HTML! I'd better do something to make sure those extra spaces, which he took so much care to type, aren't lost!" and makes on a NBSP to take up extra space. (There was recently a whole discussion on the Unicode mailing list about how 0x00A0 is almost universally used as a fixed-width space when the specs say it should be flex-width, sigh.) ~mark
Re: org-pop-mode
"Mark E. Shoulson" writes: > Heh; fair enough. The filename originally was "org-level-end.el", I > think; I started using the catchier "org-pop" because... well, it was > catchier. It made sense in my mind, in the "push"/"pop" sense used > with stacks in programming, that you "push" to a deeper level and this > library would allow you to "pop" back up to a higher one. I'll see if > I can think of something better, thanks. Well, org-heading-push-pop wouldn't be a /great/ name, but the push/pop paradigm is understandable, so you might consider that. :) > >> 2. In the code, I saw you comment about cl-flet, and I see you using >> fset and unwind-protect in the org-pop-with-continuations macro. >> Instead, use cl-letf with symbol-function, like: >> >>(cl-letf* (((symbol-function 'foo) >>#'my-foo) >> ((symbol-function 'bar) >>(lambda () >> ...))) >> BODY) >> >> See also Nic Ferrier's package, noflet. > > I'll take a look, thanks. It's questionable whether I really should > even be messing about with that macro anyway. I musnt have removed the > comments, but I had a whole thing there about how I had been trying > with cl-letf and/or cl-flet and it didn't work. Thing is, cl-flet, > according to the docs, (info:cl#Function Bindings) is strictly > *lexical* binding, which is not going to cut it. cl-letf might be > different; the docs are different about it, but I am pretty sure I > tried it and it didn't work, or didn't work "enough of the time." But > maybe I had it wrong, and maybe noflet will succeed. The issue is what the macros expand to. cl-letf rebinds the function symbols, just like fset, so it affects all code that runs in Emacs until the function symbols are set again. cl-flet expands into lambdas bound to variables and replaces calls to them with funcall, so it only affects calls in the macro's body. Use pp-macroexpand-last-sexp to see the expansions. BTW, in the body of your email, the text you write has these two characters between sentences: " ". The second is a plain space, but the first is a Unicode non-breaking space, or "C-x 8 RET a0". I noticed because it's displayed in Emacs as an underline character next to the plain space.
Re: org-pop-mode
On 3/18/20 3:15 PM, Adam Porter wrote: "Mark E. Shoulson" writes: This is something I've wanted for years in org-mode, but which in some ways could actually be _offensive_ to its ideals. If you're an outline purist, look away. ... So, I present a pre-alpha version, https://gist.github.com/clsn/09ac4b098b6ad7366bb5e0bc2d5f of org-pop-mode. To "pop" back up, create a headline at the level you're popping back to, and give it a tag of "contd", and the headline text should not be something important. Instructions and explanations are in the comments of the file (the part about installing from MELPA is a lie, though). Any feedback? Hi Mark, Indeed, this is something that is frequently asked about. I probably wouldn't use it myself, but it looks like you've done a good job on it. Here is some feedback: 1. I'd suggest a more descriptive name, especially if you plan to publish it to MELPA. org-pop doesn't seem to convey anything about what it does. :) Heh; fair enough. The filename originally was "org-level-end.el", I think; I started using the catchier "org-pop" because... well, it was catchier. It made sense in my mind, in the "push"/"pop" sense used with stacks in programming, that you "push" to a deeper level and this library would allow you to "pop" back up to a higher one. I'll see if I can think of something better, thanks. 2. In the code, I saw you comment about cl-flet, and I see you using fset and unwind-protect in the org-pop-with-continuations macro. Instead, use cl-letf with symbol-function, like: (cl-letf* (((symbol-function 'foo) #'my-foo) ((symbol-function 'bar) (lambda () ...))) BODY) See also Nic Ferrier's package, noflet. I'll take a look, thanks. It's questionable whether I really should even be messing about with that macro anyway. I must have removed the comments, but I had a whole thing there about how I had been trying with cl-letf and/or cl-flet and it didn't work. Thing is, cl-flet, according to the docs, (info:cl#Function Bindings) is strictly *lexical* binding, which is not going to cut it. cl-letf might be different; the docs are different about it, but I am pretty sure I tried it and it didn't work, or didn't work "enough of the time." But maybe I had it wrong, and maybe noflet will succeed. Thanks! ~mark
Re: org-pop-mode
On 3/18/20 3:00 AM, Ihor Radchenko wrote: Any feedback? >From the first glance it does not look too different from inline headings. Could you highlight the difference? Best, Ihor Well, it's true there is similarity. I even found in my notes where I noticed inline tasks and their similarity, but all I wrote there was "but mine is different," so maybe that isn't so helpful. I have not used inline tasks, and was only barely familiar with them (I did know they existed, though), so that is my excuse for having invented my own wheel. In terms of differences, let's see: inline tasks are, from a strict outline point-of-view, a zillion levels down (approximately), which makes them indent wy over if you're using org-indent-mode. My org-pop is the "normal," expected single level down. inline tasks mark the end of the task with a special header at the same level as the task. Org-pop marks the end of the digression with a special header at the same level as the "base" (the surrounding text). Your call as to what makes better sense. inline tasks are well-integrated and worked deep into the innards of org-mode, to the point that it seems from looking at code that they cause something of a headache to developers with their exceptional behavior. On the plus side, that means that many/most packages will Do the Right Thing in the face of inline tasks. My org-pop is new and non-standard, with hacks to make a few key things work right with it, but doesn't have the support of... well, anything else. I'm pretty sure exporting works well with inline tasks, but currently org-pop has no special tweaks for it (I'm not even sure what they should be). This is a reason to stick with inline tasks. Both approaches sinfully break the underlying outline-mode structure, which explicitly forbids exactly what we're trying to accomplish with them. Inline tasks have (way) more seniority and support and indulgence for doing so, though. I haven't experimented much with inline tasks as regards the two or three behaviors that I actually cared enough about to write org-pop; have to see if they do something like I would have wanted. Thanks! ~mark
Re: org-pop-mode
"Mark E. Shoulson" writes: > This is something I've wanted for years in org-mode, but which in some > ways could actually be _offensive_ to its ideals. If you're an > outline purist, look away. > > ... > > So, I present a pre-alpha version, > https://gist.github.com/clsn/09ac4b098b6ad7366bb5e0bc2d5f of > org-pop-mode. To "pop" back up, create a headline at the level you're > popping back to, and give it a tag of "contd", and the headline text > should not be something important. Instructions and explanations are > in the comments of the file (the part about installing from MELPA is a > lie, though). > > Any feedback? Hi Mark, Indeed, this is something that is frequently asked about. I probably wouldn't use it myself, but it looks like you've done a good job on it. Here is some feedback: 1. I'd suggest a more descriptive name, especially if you plan to publish it to MELPA. org-pop doesn't seem to convey anything about what it does. :) 2. In the code, I saw you comment about cl-flet, and I see you using fset and unwind-protect in the org-pop-with-continuations macro. Instead, use cl-letf with symbol-function, like: (cl-letf* (((symbol-function 'foo) #'my-foo) ((symbol-function 'bar) (lambda () ...))) BODY) See also Nic Ferrier's package, noflet.
Re: org-pop-mode
> Any feedback? >From the first glance it does not look too different from inline headings. Could you highlight the difference? Best, Ihor "Mark E. Shoulson" writes: > This is something I've wanted for years in org-mode, but which in some > ways could actually be _offensive_ to its ideals. If you're an outline > purist, look away. > > > It's something we can do with plain lists: work on a list item at level > X, then make a sublist at level X+1, and then "pop" back up to the same > list item you had been working on at level X, without needing a new > header. You just adjust the indentation. > > > + Some stuff at this level. > > + More stuff at this level. > > Might even have multiple paragraphs. > > - a sublevel, for a digression > > > And back to the same higher level, even without a new bullet. > > > I use org-mode to keep daily notes at work, sometimes almost > stream-of-consciousness, and often wished I could digress and then pop back. > > > So, I present a pre-alpha version, > https://gist.github.com/clsn/09ac4b098b6ad7366bb5e0bc2d5f of > org-pop-mode. To "pop" back up, create a headline at the level you're > popping back to, and give it a tag of "contd", and the headline text > should not be something important. Instructions and explanations are in > the comments of the file (the part about installing from MELPA is a lie, > though). > > > Any feedback? > > > ~mark > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yanta...@gmail.com, ihor_radche...@alumni.sutd.edu.sg
org-pop-mode
This is something I've wanted for years in org-mode, but which in some ways could actually be _offensive_ to its ideals. If you're an outline purist, look away. It's something we can do with plain lists: work on a list item at level X, then make a sublist at level X+1, and then "pop" back up to the same list item you had been working on at level X, without needing a new header. You just adjust the indentation. + Some stuff at this level. + More stuff at this level. Might even have multiple paragraphs. - a sublevel, for a digression And back to the same higher level, even without a new bullet. I use org-mode to keep daily notes at work, sometimes almost stream-of-consciousness, and often wished I could digress and then pop back. So, I present a pre-alpha version, https://gist.github.com/clsn/09ac4b098b6ad7366bb5e0bc2d5f of org-pop-mode. To "pop" back up, create a headline at the level you're popping back to, and give it a tag of "contd", and the headline text should not be something important. Instructions and explanations are in the comments of the file (the part about installing from MELPA is a lie, though). Any feedback? ~mark