* Escaping again!
@ 2014-05-30 13:33 Rustom Mody
2014-05-30 14:00 ` Bastien
0 siblings, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2014-05-30 13:33 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
I have some pseudo-haskell in slides I am preparing with org and ox-reveal
- \(+\):: Int → Int → Int
- \(-\):: Int → Int →Int
- \(\leq\):: Int → Int → Bool
- \(=\):: Int → Int → Bool
Those '::' are haskell for has type
However putting a space before the '::' makes it into a definition list!
Ive also tried making the \( \) enclose the whole line -- no use!
So how to escape the :: and tell org: "Please dont make this a definition
list?"
[-- Attachment #2: Type: text/html, Size: 635 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 13:33 Escaping again! Rustom Mody
@ 2014-05-30 14:00 ` Bastien
2014-05-30 14:44 ` Rustom Mody
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Bastien @ 2014-05-30 14:00 UTC (permalink / raw)
To: Rustom Mody; +Cc: emacs-orgmode
Hi Rustom,
Rustom Mody <rustompmody@gmail.com> writes:
> - \(+\):: Int → Int → Int
> - \(-\):: Int → Int →Int
> - \(\leq\):: Int → Int → Bool
> - \(=\):: Int → Int → Bool
1. \(+\) :: Int → Int → Int
2. \(-\) :: Int → Int →Int
3. \(\leq\) :: Int → Int → Bool
4. \(=\) :: Int → Int → Bool
would do -- but this is not entirely satisfactory.
For now description lists accept both "-" and "+". I'm all for
allowing only "-" so that we could use
+ \(+\) :: Int → Int → Int
+ \(-\) :: Int → Int →Int
+ \(\leq\) :: Int → Int → Bool
+ \(=\) :: Int → Int → Bool
in your example.
What do you and others think?
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 14:00 ` Bastien
@ 2014-05-30 14:44 ` Rustom Mody
2014-05-30 15:15 ` Loyall, David
2014-05-30 15:23 ` Bastien
2014-06-01 8:44 ` Nicolas Goaziou
2014-06-01 12:57 ` Gregor Zattler
2 siblings, 2 replies; 12+ messages in thread
From: Rustom Mody @ 2014-05-30 14:44 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]
Hi Bastien
On Fri, May 30, 2014 at 7:30 PM, Bastien <bzg@gnu.org> wrote:
> Hi Rustom,
>
> Rustom Mody <rustompmody@gmail.com> writes:
>
> > - \(+\):: Int → Int → Int
> > - \(-\):: Int → Int →Int
> > - \(\leq\):: Int → Int → Bool
> > - \(=\):: Int → Int → Bool
>
> 1. \(+\) :: Int → Int → Int
> 2. \(-\) :: Int → Int →Int
> 3. \(\leq\) :: Int → Int → Bool
> 4. \(=\) :: Int → Int → Bool
>
> would do -- but this is not entirely satisfactory.
>
> For now description lists accept both "-" and "+". I'm all for
> allowing only "-" so that we could use
>
> + \(+\) :: Int → Int → Int
> + \(-\) :: Int → Int →Int
> + \(\leq\) :: Int → Int → Bool
> + \(=\) :: Int → Int → Bool
>
> in your example.
>
> What do you and others think?
>
>
If you are asking me about a proposed change, I thank you for the
consideration :-)
Please dont take the following too seriously -- I am just spoilt by the
fact that I am an old programmer.
Here is a command I ran on the org sources and its output:
$ grep -r '\\\\\\\\\\\\\\\\\\\\' .
./contrib/lisp/ox-groff.el: "\\(\\\\\\\\\\)?[ \t]*\n" ".br\n"
output)))
./lisp/ox-latex.el: "\\(\\\\\\\\\\)?[ \t]*\n" " \\\\\\\\\n"
output)))
./lisp/ox-latex.el: "\\(\\\\\\\\\\)?[ \t]*\n" " \\\\\\\\\n"
contents)))
./lisp/ox-odt.el: "\\(\\\\\\\\\\)?[ \t]*\n" "<text:line-break/>"
output t)))
./lisp/ox-man.el: (setq output (replace-regexp-in-string
"\\(\\\\\\\\\\)?[ \t]*\n" ".br\n"
./lisp/ox-html.el: "\\(\\\\\\\\\\)?[ \t]*\n"
./lisp/ox-html.el: "\\(\\\\\\\\\\)?[ \t]*\n"
./lisp/ox-texinfo.el: "\\(\\\\\\\\\\)?[ \t]*\n" " @*\n" output)))
./lisp/ox-texinfo.el: "\\(\\\\\\\\\\)?[ \t]*\n" " \\\\\\\\\n"
contents)))
./lisp/org.el: (looking-at "\\\\\\\\\\($\\|[^\\\\]\\)")))
So sometimes we need that much ESCAPE-ing.
I realise that the general support for escaping in org is much harder than
in a programming language like lisp because there are so many different
contexts and different entities to escape.
However I would also like to humbly submit that if one doesn't have
systematic general escaping, there will always be legitimate uses that will
not be addressable.
Anyways… if you are doing this just for me (!) very kind of you!
For now I am getting along using '꞉' (Unicode 0xA789).
Regards,
Rusi
--
http://blog.languager.org
[-- Attachment #2: Type: text/html, Size: 3706 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 14:44 ` Rustom Mody
@ 2014-05-30 15:15 ` Loyall, David
2014-05-30 15:23 ` Bastien
1 sibling, 0 replies; 12+ messages in thread
From: Loyall, David @ 2014-05-30 15:15 UTC (permalink / raw)
To: emacs-orgmode
>[...] if one doesn't have systematic general escaping, there
> will always be legitimate uses that will not be addressable.
+1
As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of course the reverse function.)
I've never even looked for one, though, because it is my understanding that org does not have general-case escaping, and without that, no such function could be complete (and stay complete).
I understand that it won't be easy, since every character I can see on my keyboard already has a purpose (or three).
To review: my requested new function is conceptually simple. If the implementation can't be simple due to the lack of general-case escaping, then maybe this is an argument in favor of a deep change to org, but, that's a conversation I don't know how to participate in. So good luck and thanks for your consideration, and thanks for such a useful piece of software. :)
Cheers,
--Dave
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 14:44 ` Rustom Mody
2014-05-30 15:15 ` Loyall, David
@ 2014-05-30 15:23 ` Bastien
2014-05-30 16:37 ` Rustom Mody
1 sibling, 1 reply; 12+ messages in thread
From: Bastien @ 2014-05-30 15:23 UTC (permalink / raw)
To: Rustom Mody; +Cc: emacs-orgmode
Hi Rustom,
Rustom Mody <rustompmody@gmail.com> writes:
> Anyways… if you are doing this just for me (!) very kind of you!
Well, I will make a separate thread asking if other users would be
fine with the change -- but glad you found the solution above.
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 15:23 ` Bastien
@ 2014-05-30 16:37 ` Rustom Mody
2014-05-30 17:27 ` Nick Dokos
0 siblings, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2014-05-30 16:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 588 bytes --]
David Loyall wrote:
> >[...] if one doesn't have systematic general escaping, there
> > will always be legitimate uses that will not be addressable.
> +1
>
> As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of
> course the reverse function.)
Just another instance that I had to deal with today.
When using reveal and ox-reveal one needs to set
#+REVEAL_ROOT: "path/to/reveal.js"
I wanted to 'comment out' that line.
After trying ':' and single-quote neither of which worked, I finally got it
by making it into:
#+REVEAL_ROOT_XX: ...
[-- Attachment #2: Type: text/html, Size: 910 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 16:37 ` Rustom Mody
@ 2014-05-30 17:27 ` Nick Dokos
2014-05-30 22:19 ` Bastien
0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2014-05-30 17:27 UTC (permalink / raw)
To: emacs-orgmode
Rustom Mody <rustompmody@gmail.com> writes:
> David Loyall wrote:
>
>> >[...] if one doesn't have systematic general escaping, there
>> > will always be legitimate uses that will not be addressable.
>
>> +1
>>
>> As a lowly user, I have often wished for a hypothetical function called org-escapify-region. (And of
>> course the reverse function.)
>
> Just another instance that I had to deal with today.
> When using reveal and ox-reveal one needs to set
> #+REVEAL_ROOT: "path/to/reveal.js"
>
> I wanted to 'comment out' that line.
> After trying ':' and single-quote neither of which worked, I finally got it by making it into:
>
> #+REVEAL_ROOT_XX: ...
I usually just do
# +FOO
adding a space.
Nick
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 17:27 ` Nick Dokos
@ 2014-05-30 22:19 ` Bastien
0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2014-05-30 22:19 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> I usually just do
>
> # +FOO
Well, I do
# #+FOO so that uncommenting makes this right again.
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 14:00 ` Bastien
2014-05-30 14:44 ` Rustom Mody
@ 2014-06-01 8:44 ` Nicolas Goaziou
2014-07-28 8:58 ` Bastien
2014-06-01 12:57 ` Gregor Zattler
2 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2014-06-01 8:44 UTC (permalink / raw)
To: Bastien; +Cc: Rustom Mody, emacs-orgmode
Hello,
Bastien <bzg@gnu.org> writes:
> For now description lists accept both "-" and "+". I'm all for
> allowing only "-" so that we could use
>
> + \(+\) :: Int → Int → Int
> + \(-\) :: Int → Int →Int
> + \(\leq\) :: Int → Int → Bool
> + \(=\) :: Int → Int → Bool
>
> in your example.
>
> What do you and others think?
I have no objection, with appropriate documentation, obviously.
Be careful, though, as some functions need to be updated accordingly:
`org-list-struct', `org-element--list-struct',
`org-at-item-description-p', `org-list-item-body-column',
`org-at-item-timer-p', `org-list-insert-item'... The latter should
probably use `org-at-item-description-p'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-05-30 14:00 ` Bastien
2014-05-30 14:44 ` Rustom Mody
2014-06-01 8:44 ` Nicolas Goaziou
@ 2014-06-01 12:57 ` Gregor Zattler
2014-06-01 13:47 ` Nicolas Goaziou
2 siblings, 1 reply; 12+ messages in thread
From: Gregor Zattler @ 2014-06-01 12:57 UTC (permalink / raw)
To: emacs-orgmode
Hi Bastien,
* Bastien <bzg@gnu.org> [30. May. 2014]:
[...]
> For now description lists accept both "-" and "+". I'm all for
> allowing only "-" so that we could use
[...]
> in your example.
>
> What do you and others think?
I'd like to be able to use a mix of "-" or "+" in list items as to
indicate positive respective negative aspects of something:
* should org-mode support a mix of "+" and "-" as the first char in plain lists?
+ would be a great to indicate positive and negative aspects of
something
- difficult to implement
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-06-01 12:57 ` Gregor Zattler
@ 2014-06-01 13:47 ` Nicolas Goaziou
0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2014-06-01 13:47 UTC (permalink / raw)
To: emacs-orgmode
Hello,
Gregor Zattler <telegraph@gmx.net> writes:
> I'd like to be able to use a mix of "-" or "+" in list items as to
> indicate positive respective negative aspects of something:
>
> * should org-mode support a mix of "+" and "-" as the first char in plain lists?
> + would be a great to indicate positive and negative aspects of
> something
> - difficult to implement
This was suggested a couple of years ago, and rejected. This would be
confusing. For example, it would not be always possible to "fix" mixed
bullets if mixing was not intended.
You can use two lists to separate positive and negative aspects of
something. IMO, this is also clearer.
Note that this is orthogonal to the issue at hand, so it belongs to
another thread.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Escaping again!
2014-06-01 8:44 ` Nicolas Goaziou
@ 2014-07-28 8:58 ` Bastien
0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2014-07-28 8:58 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Rustom Mody, emacs-orgmode
Hi Nicolas and Rustom,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> I have no objection, with appropriate documentation, obviously.
>
> Be careful, though, as some functions need to be updated accordingly:
> `org-list-struct', `org-element--list-struct',
> `org-at-item-description-p', `org-list-item-body-column',
> `org-at-item-timer-p', `org-list-insert-item'... The latter should
> probably use `org-at-item-description-p'.
Quite a lot of work for a minor useful restriction.
Let's put that aside for 8.4.
But if nobody disagree, I think this is a good restriction.
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-07-28 17:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 13:33 Escaping again! Rustom Mody
2014-05-30 14:00 ` Bastien
2014-05-30 14:44 ` Rustom Mody
2014-05-30 15:15 ` Loyall, David
2014-05-30 15:23 ` Bastien
2014-05-30 16:37 ` Rustom Mody
2014-05-30 17:27 ` Nick Dokos
2014-05-30 22:19 ` Bastien
2014-06-01 8:44 ` Nicolas Goaziou
2014-07-28 8:58 ` Bastien
2014-06-01 12:57 ` Gregor Zattler
2014-06-01 13:47 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).