Re: [O] function for inserting a block
On Thu, Nov 9, 2017 at 5:31 AM, Thomas S. Dye wrote: > Aloha Nicolas, > > Nicolas Goaziou writes: > > > Hello, > > > > Takaaki Ishikawa writes: > > > >> I also support the idea of keeping " >> Please give importance to the backward compatibility in this case. > > > > I explained why I thought it could be removed. I also suggested > > solutions to get an equivalent feature without implementing it in Org. > > > > What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all > > bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like > > NIH. Or, to put it differently: why in the world would Org implement its > > own template system? > > The "why in the world" question is likely one that can be answered by > the author of the Org template system. > I guess that would be me. The reason why I implemented it was the same reason why I implemented org-mode. It scratched an itch that I was having, and so I implemented it to solve this issue, without much regard for existing expansion systems - back then, I am not sure which of them did even exist and how easy it would have been to deal with dependencies. The reason why the leading character is "<" lies in the fact that, at the time, I was experimenting with HTML tags, mainly because this was how emacs MUSE was handling markup. I left it at that because it led to very few conflicts and because "<" is a character that is easily typed. I have always come down on the side of NOT breaking backward compatibility unless we really HAVE TO in order to make progress. The reason for this bias is because most Org users are not reading this maling list and just want the system to function and to continue to function the way they are used to, while it is hopefully improving. It will stop them from upgrading if such breakage happens too often. So I would support reimplement the expansion (including org-try-structure-completion for people who use that in custom code), if possible of course on the back of one of the built-in expansion systems in Emacs, before pushing this change out in a release. I would certainly reimplement this in some way for myself, because using these abbreviations is already hardcoded in my spine, I think. That does not take away from that fact that I am really happy we now can wrap existing text into a block structure. Very useful indeed. Carsten > > > The only argument so far is "<" cannot be expanded since it not word > > constituent. Seriously. "<" has no meaning anyway. You can use "@", > > which is word constituent and just as meaningless. So, you can define, > > e.g., a skeleton, that will expand "@s" to "#+begin_src\n#+end_src". > > > > We can even document how to do it in the manual. > > For me, the issue isn't about how the template system is implemented, it > is about backwards compatibility of (org-try-structure-completion). > > All the best, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com > >
Re: [O] function for inserting a block
Aloha Nicolas, Nicolas Goaziou writes: > Hello, > > Takaaki Ishikawa writes: > >> I also support the idea of keeping "> Please give importance to the backward compatibility in this case. > > I explained why I thought it could be removed. I also suggested > solutions to get an equivalent feature without implementing it in Org. > > What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all > bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like > NIH. Or, to put it differently: why in the world would Org implement its > own template system? The "why in the world" question is likely one that can be answered by the author of the Org template system. > The only argument so far is "<" cannot be expanded since it not word > constituent. Seriously. "<" has no meaning anyway. You can use "@", > which is word constituent and just as meaningless. So, you can define, > e.g., a skeleton, that will expand "@s" to "#+begin_src\n#+end_src". > > We can even document how to do it in the manual. For me, the issue isn't about how the template system is implemented, it is about backwards compatibility of (org-try-structure-completion). All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] function for inserting a block
Hello, Takaaki Ishikawa writes: > I also support the idea of keeping " Please give importance to the backward compatibility in this case. I explained why I thought it could be removed. I also suggested solutions to get an equivalent feature without implementing it in Org. What is wrong with Abbrev mode, skeletons, tempo.el, expand.el, all bundled with Emacs, or YASnippet, in the Emacs ecosystem? It sounds like NIH. Or, to put it differently: why in the world would Org implement its own template system? The only argument so far is "<" cannot be expanded since it not word constituent. Seriously. "<" has no meaning anyway. You can use "@", which is word constituent and just as meaningless. So, you can define, e.g., a skeleton, that will expand "@s" to "#+begin_src\n#+end_src". We can even document how to do it in the manual. Regards, -- Nicolas Goaziou
Re: [O] function for inserting a block
Perhaps what we can do is re-instate this functionality using the built-in Emacs mechanisms?
Re: [O] function for inserting a block
I also support the idea of keeping ": > > Berry, Charles writes: > >>> On Nov 8, 2017, at 6:07 AM, Rasmus wrote: >>> >>> I think the template expansion a la ">> YASnippet installed for many years, and I never figured out how to use it >>> properly. To me, it is a bit too complex a replacement. >> >> >> Me too. "> >> I suspect that there will be cries of pain and anger from others who have >> not tuned in to this thread if it is removed. >> >> Chuck > > Agreed. It would be great if backward compatibility could be > maintained. I use (org-try-structure-completion) all the time. > > All the best, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com >
Re: [O] function for inserting a block
Berry, Charles writes: >> On Nov 8, 2017, at 6:07 AM, Rasmus wrote: >> >> I think the template expansion a la "> YASnippet installed for many years, and I never figured out how to use it >> properly. To me, it is a bit too complex a replacement. > > > Me too. " > I suspect that there will be cries of pain and anger from others who have not > tuned in to this thread if it is removed. > > Chuck Agreed. It would be great if backward compatibility could be maintained. I use (org-try-structure-completion) all the time. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] function for inserting a block
Hello, "Berry, Charles" writes: >> On Nov 8, 2017, at 6:07 AM, Rasmus wrote: >> >> I think the template expansion a la "> YASnippet installed for many years, and I never figured out how to use it >> properly. To me, it is a bit too complex a replacement. > > > Me too. " > I suspect that there will be cries of pain and anger from others who > have not tuned in to this thread if it is removed. Emacs provides already a lot of function for that. I don't think "
Re: [O] function for inserting a block
> On Nov 8, 2017, at 6:07 AM, Rasmus wrote: > > I think the template expansion a la " YASnippet installed for many years, and I never figured out how to use it > properly. To me, it is a bit too complex a replacement. Me too. "
Re: [O] function for inserting a block
On 8 November 2017, Bastien wrote: I'm aware of Yasnippet, but it is not in Emacs core and it can be daunting for newcomers to install, customize and use. The previous function was very straightforward and simple, the cost for losing it seems to high to me. I'd rather have 10 lines in Org (and in Emacs core) for it, than to ask users to install something that does a lot more that they don't need. I just realized that feature. I hope it comes back so that a little bit of the helpful Org magic is built right in. Bill -- William Denton :: Toronto, Canada --- Listening to Art: https://listeningtoart.org/ https://www.miskatonic.org/ --- GHG.EARTH: http://ghg.earth/ Caveat lector. --- STAPLR: http://staplr.org/
Re: [O] function for inserting a block
Bastien Guerry writes: > Hi Nicolas, > > Nicolas Goaziou writes: > >> Bastien writes: >> >>> is there a simple mechanism in Emacs core to restore the same >>> functionnality? >> >> Of course, it is called Abbrev mode: (info "(emacs)Abbrev >> Concepts"). > > Abbrev only expands on words constituents, so " >> You may also use (info "(autotype)Using Skeletons") for more advanced >> uses. > > I see. So combining the two, we would have something like this: > > (define-skeleton org-skeleton-src-block > "" nil > > > "#+begin_src" \n > _ \n > "#+end_src") > > (define-abbrev org-mode-abbrev-table " "" 'org-skeleton-src-block) > > ... modulo the restriction on " > I need to think about this and Kaushal proposal to see if we can > come up with a simple and backward-compatible solution. > > Already thanks for the pointers. I'd be happy to add something to the manual, once we've got a clear way of replicating the old system.
Re: [O] function for inserting a block
Hi Nicolas, Nicolas Goaziou writes: > Bastien writes: > >> is there a simple mechanism in Emacs core to restore the same >> functionnality? > > Of course, it is called Abbrev mode: (info "(emacs)Abbrev > Concepts"). Abbrev only expands on words constituents, so " You may also use (info "(autotype)Using Skeletons") for more advanced > uses. I see. So combining the two, we would have something like this: (define-skeleton org-skeleton-src-block "" nil > "#+begin_src" \n _ \n "#+end_src") (define-abbrev org-mode-abbrev-table "
Re: [O] Bug? org-clock-report options order sensitive? [9.1.2 (9.1.2-25-g2567fe-elpa @ emacs/.emacs.d/elpa/org-20171030/)]
Hello, umberto boccioni writes: > #+BEGIN: clocktable :fileskip0 :scope agenda In this case, ":scope" is probably seen as the value of the property ":fileskip0". You may want to try #+BEGIN: clocktable :fileskip0 t :scope agenda Regards, -- Nicolas Goaziou
Re: [O] Restore old easy template feature (Re: function for inserting a block)
Hi Kaushal, Kaushal Modi writes: > I am suggesting to have a minor mode that simply binds "<" to do the > template insertion (only when that is typed at BOL with optional > leading whitespace, or if a region is selected). I think this is a great suggestion and brings the best of both the new and the old system. I cannot test this myself until this week-end, but I'd happy too then. Thanks! -- Bastien
Re: [O] function for inserting a block
Hi, Thanks you, Eric, for providing this new functionality. Nicolas Goaziou writes: > Bastien writes: > >> Maybe I missed something in this thread, but what about making >> the change backward-compatible by allowing "> be expanded? For me, I'd rather type > I suggested the idea to remove " many other template systems, e.g., YASnippet, already provides this. > I didn't want to re-implement the wheel and let, instead, various parts > of Emacs cooperate. I am only reading the thread now; my apology for coming late to the "party". I think the template expansion a la "
Re: [O] Restore old easy template feature (Re: function for inserting a block)
Hello, Kaushal Modi writes: > I just like the convenience of hitting " logic do its thing. > > Let me know what you think. There are many ways to get dumb template insertion. Org doesn't need to implement yet another one. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] function for inserting a block
Bastien writes: > is there a simple mechanism in Emacs core to restore the same > functionnality? Of course, it is called Abbrev mode: (info "(emacs)Abbrev Concepts"). You may also use (info "(autotype)Using Skeletons") for more advanced uses. Regards,
Re: [O] Restore old easy template feature (Re: function for inserting a block)
On Wed, Nov 8, 2017, 7:27 AM Kaushal Modi wrote: > On Wed, Nov 8, 2017, 7:16 AM Bastien wrote: > >> >> is there a simple mechanism in Emacs core to restore the same >> functionnality? >> > > +1 > To clarify, I am not suggesting to blindly restore the old easy template system, and then have 2 sets of code doing similar things. I am suggesting to have a minor mode that simply binds "<" to do the template insertion (only when that is typed at BOL with optional leading whitespace, or if a region is selected). If they want to literally type "<" in those cases, they can either type "<<" or the old "C-q <". That minor mode will reuse the code that Eric added, so that typing " -- Kaushal Modi
[O] Restore old easy template feature (Re: function for inserting a block)
On Wed, Nov 8, 2017, 7:16 AM Bastien wrote: > > is there a simple mechanism in Emacs core to restore the same > functionnality? > +1 I'm aware of Yasnippet, but it is not in Emacs core and it can > be daunting for newcomers to install, customize and use. > I am aware of Yasnippet, have it installed, but haven't used for a long time. The old easy template system just worked and I used it dozens of times a day. The previous function was very straightforward and simple, the > cost for losing it seems to high to me. I'd rather have 10 lines > in Org (and in Emacs core) for it, than to ask users to install > something that does a lot more that they don't need. > I agree with that sentiment. In parallel to removing that feature, it would be needed to add details in the manual on how to restore that functionality using other means. Given the lack of time, I just restored for works for me in my personal config: https://github.com/kaushalmodi/.emacs.d/commit/9aa3be89a2f8dce3f2aa57f98e0a2f38fdca4c6b I just like the convenience of hitting " -- Kaushal Modi
Re: [O] function for inserting a block
Hi Nicolas, > I suggested the idea to remove " many other template systems, e.g., YASnippet, already provides this. > I didn't want to re-implement the wheel and let, instead, various parts > of Emacs cooperate. is there a simple mechanism in Emacs core to restore the same functionnality? I'm aware of Yasnippet, but it is not in Emacs core and it can be daunting for newcomers to install, customize and use. The previous function was very straightforward and simple, the cost for losing it seems to high to me. I'd rather have 10 lines in Org (and in Emacs core) for it, than to ask users to install something that does a lot more that they don't need. Let me know what you think. -- Bastien
Re: [O] function for inserting a block
Hello, Bastien writes: > Maybe I missed something in this thread, but what about making > the change backward-compatible by allowing " be expanded? For me, I'd rather type
Re: [O] function for inserting a block
Hi Eric, thanks *a lot* for implementing this change! Maybe I missed something in this thread, but what about making the change backward-compatible by allowing "