* How to elegantly and effectively quote org fragments?
@ 2015-05-20 22:20 Alain.Cochard
2015-05-21 22:02 ` Nicolas Goaziou
2015-05-21 23:31 ` org-notify: can't define an org-notify-add Alain.Cochard
0 siblings, 2 replies; 9+ messages in thread
From: Alain.Cochard @ 2015-05-20 22:20 UTC (permalink / raw
To: emacs-orgmode; +Cc: Alain Cochard
Hello.
So far, the main motivation for me is to be able to insert into an org
file some org fragments found on the Internet, without their
interacting with the org file.
Sorry if these are easy questions -- I did spend time with the manual,
the FAQ, the list archive, and the web. The best I found is to use an
org SRC block, but I do not find it satisfactory. Plus I cannot even
have it work properly.
(1) Say I have have this in my org file (star in 1st column):
* a regular headline: writing org examples
#+BEGIN_SRC org
,* a headline only for the example
,** a subheadline
text
#+END_SRC
Is it the best that one can do to quote some org code? Since I use
(org-startup-indented t), I would expect to have the corresponding
indentation. Also, if not possible to avoid the escaping commas, I
would like to at least have them for each line, not only for the
headlines. So I would like something like this:
* a regular headline: writing org examples
#+BEGIN_SRC org
,* a headline only for the example
, * a subheadline
, text
#+END_SRC
Is (some of) this at all doable?
(2) Now, if in the org edit buffer I do 'C-c C-d' (org-deadline),
insert a DEADLINE:, and go back to my org file, the block now looks
like:
#+BEGIN_SRC org
,* a headline only for the example
,** a subheadline
DEADLINE: <2015-05-21 Thu>
text
#+END_SRC
If I do 'M-x org-agenda RET a', I get the following line in the Org
agenda buffer:
todo: Deadline: a regular headline: writing org examples
Is this normal? Since the deadline is part of the block, I would
expect no entry in the agenda; I tried to escape the DEADLINE with a
comma, but it does not change anything. So, is there a way to *quote*
a DEADLINE:, i.e., without having an associated entry in the agenda?
Thank you for your help.
[8.2.10 (8.2.10-40-gc763fa-elpa @
/home/cochard/.emacs.d/elpa/org-20150518/)]
GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of
2015-04-17 on buildvm-04.phx2.fedoraproject.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to elegantly and effectively quote org fragments?
2015-05-20 22:20 How to elegantly and effectively quote org fragments? Alain.Cochard
@ 2015-05-21 22:02 ` Nicolas Goaziou
2015-05-22 4:37 ` Alain.Cochard
2015-05-21 23:31 ` org-notify: can't define an org-notify-add Alain.Cochard
1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2015-05-21 22:02 UTC (permalink / raw
To: Alain.Cochard; +Cc: emacs-orgmode
Hello,
Alain.Cochard@unistra.fr writes:
> Sorry if these are easy questions -- I did spend time with the manual,
> the FAQ, the list archive, and the web. The best I found is to use an
> org SRC block, but I do not find it satisfactory. Plus I cannot even
> have it work properly.
You can also use a fixed-width area:
: * a headline only for the example
: ** a subheadline
: text
> (1) Say I have have this in my org file (star in 1st column):
>
> * a regular headline: writing org examples
>
> #+BEGIN_SRC org
> ,* a headline only for the example
> ,** a subheadline
> text
> #+END_SRC
>
> Is it the best that one can do to quote some org code? Since I use
> (org-startup-indented t), I would expect to have the corresponding
> indentation.
I'm not sure to understand. `org-indent-mode' is about virtual
indentation, not real one. So, there's no indentation to be inserted.
> Also, if not possible to avoid the escaping commas, I would like to at
> least have them for each line, not only for the headlines. So I would
> like something like this:
>
> * a regular headline: writing org examples
>
> #+BEGIN_SRC org
> ,* a headline only for the example
> , * a subheadline
> , text
> #+END_SRC
>
> Is (some of) this at all doable?
This is not possible. Escaping rules are explained in (info "(org)
Literal examples"), fourth footnote.
> (2) Now, if in the org edit buffer I do 'C-c C-d' (org-deadline),
> insert a DEADLINE:, and go back to my org file, the block now looks
> like:
>
> #+BEGIN_SRC org
> ,* a headline only for the example
> ,** a subheadline
> DEADLINE: <2015-05-21 Thu>
> text
> #+END_SRC
>
> If I do 'M-x org-agenda RET a', I get the following line in the Org
> agenda buffer:
>
> todo: Deadline: a regular headline: writing org examples
>
> Is this normal? Since the deadline is part of the block, I would
> expect no entry in the agenda; I tried to escape the DEADLINE with a
> comma, but it does not change anything. So, is there a way to *quote*
> a DEADLINE:, i.e., without having an associated entry in the agenda?
IIRC, this bug was fixed some months ago on development version.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* org-notify: can't define an org-notify-add
2015-05-20 22:20 How to elegantly and effectively quote org fragments? Alain.Cochard
2015-05-21 22:02 ` Nicolas Goaziou
@ 2015-05-21 23:31 ` Alain.Cochard
1 sibling, 0 replies; 9+ messages in thread
From: Alain.Cochard @ 2015-05-21 23:31 UTC (permalink / raw
To: emacs-orgmode; +Cc: Alain Cochard
Hello.
If I have in my emacs init file the following org-notify setup, as
specified by the org-notify doc (if I understand it correctly):
(require 'org-notify)
(org-notify-add 'my-appt '(:time "1h" :actions -message
:period "30s" :duration 20))
(org-notify-start)
and in my todo.org file:
* TODO test agenda
DEADLINE: <2015-05-21 Thu 17:55>
:PROPERTIES:
:notify: my-appt
:END:
the behavior I get is the one defined as the default in the
org-notify.el file:
;;; Provide a minimal default setup.
(org-notify-add 'default '(:time "1h" :actions -notify/window
:period "2m" :duration 60))
I can override this default in my init file, i.e., replacing
"org-notify-add 'my-appt" above by "org-notify-add 'default", and I
then get "my" default behavior.
So as far as I can see, everything behaves as if I did not use the
proper syntax for the :PROPERTIES: block (consistently, if I alter it
or remove it completely, I still get the default behavior).
Am I doing something trivially wrong? Any idea how I could debug
this? (I have no relevant message in the *Messages* buffer.)
Many thanks in advance.
Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpa @
/home/cochard/.emacs.d/elpa/org-20150518/)
GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of
2015-04-17 on buildvm-04.phx2.fedoraproject.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* org-notify: can't define an org-notify-add
@ 2015-05-22 4:07 Alain.Cochard
2015-08-24 13:45 ` Peter Münster
0 siblings, 1 reply; 9+ messages in thread
From: Alain.Cochard @ 2015-05-22 4:07 UTC (permalink / raw
To: emacs-orgmode; +Cc: Alain Cochard
Sorry I am posting this message again: I made a mistake and it
appeared within an unrelated thread (perhaps it is possible to remove
it from there?)
---
Hello.
If I have in my emacs init file the following org-notify setup, as
specified by the org-notify doc (if I understand it correctly):
(require 'org-notify)
(org-notify-add 'my-appt '(:time "1h" :actions -message
:period "30s" :duration 20))
(org-notify-start)
and in my todo.org file:
* TODO test agenda
DEADLINE: <2015-05-21 Thu 17:55>
:PROPERTIES:
:notify: my-appt
:END:
the behavior I get is the one defined as the default in the
org-notify.el file:
;;; Provide a minimal default setup.
(org-notify-add 'default '(:time "1h" :actions -notify/window
:period "2m" :duration 60))
I can override this default in my init file, i.e., replacing
"org-notify-add 'my-appt" above by "org-notify-add 'default", and I
then get "my" default behavior.
So as far as I can see, everything behaves as if I did not use the
proper syntax for the :PROPERTIES: block (consistently, if I alter it
or remove it completely, I still get the default behavior).
Am I doing something trivially wrong? Any idea how I could debug
this? (I have no relevant message in the *Messages* buffer.)
Many thanks in advance.
Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpa @
/home/cochard/.emacs.d/elpa/org-20150518/)
GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of
2015-04-17 on buildvm-04.phx2.fedoraproject.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to elegantly and effectively quote org fragments?
2015-05-21 22:02 ` Nicolas Goaziou
@ 2015-05-22 4:37 ` Alain.Cochard
2015-05-23 19:59 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Alain.Cochard @ 2015-05-22 4:37 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs-orgmode, Alain.Cochard
Nicolas Goaziou writes on Fri 22 May 2015 00:02:
> You can also use a fixed-width area:
>
> : * a headline only for the example
> : ** a subheadline
> : text
Ah, thank you. If I understand correctly, though, once one does that
(in an SRC org block, say) one looses the ability to edit the block as
org code using org-edit-special (C-c ').
> > (1) Say I have have this in my org file (star in 1st column):
> >
> > * a regular headline: writing org examples
> >
> > #+BEGIN_SRC org
> > ,* a headline only for the example
> > ,** a subheadline
> > text
> > #+END_SRC
> >
> > Is it the best that one can do to quote some org code? Since I use
> > (org-startup-indented t), I would expect to have the corresponding
> > indentation.
>
> I'm not sure to understand. `org-indent-mode' is about virtual
> indentation, not real one. So, there's no indentation to be inserted.
I understand that the indentation is virtual; it is just that I would
(ideally) expect for the quoted example to visually look the same as
it does in an org buffer.
> > Also, if not possible to avoid the escaping commas, I would like to at
> > least have them for each line, not only for the headlines. So I would
> > like something like this:
> >
> > * a regular headline: writing org examples
> >
> > #+BEGIN_SRC org
> > ,* a headline only for the example
> > , * a subheadline
> > , text
> > #+END_SRC
> >
> > Is (some of) this at all doable?
>
> This is not possible. Escaping rules are explained in (info "(org)
> Literal examples"), fourth footnote.
OK. I had missed this footnote. I will live with this, but am still
surprised by this fact -- the SRC org block looks ugly to me. When we
enter [[xx]] (say) the brackets become invisible, so I had assumed
that a similar mechanism could exist here; I guess there are
advantages to the present situation that I do not see...
> > Is this normal? Since the deadline is part of the block, I would
> > expect no entry in the agenda; I tried to escape the DEADLINE with a
> > comma, but it does not change anything. So, is there a way to *quote*
> > a DEADLINE:, i.e., without having an associated entry in the agenda?
>
> IIRC, this bug was fixed some months ago on development version.
Very good. I'll wait.
Thank you very much for the detailed explanations.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to elegantly and effectively quote org fragments?
2015-05-22 4:37 ` Alain.Cochard
@ 2015-05-23 19:59 ` Nicolas Goaziou
2015-05-25 8:33 ` Alain.Cochard
0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2015-05-23 19:59 UTC (permalink / raw
To: Alain.Cochard; +Cc: emacs-orgmode
Alain.Cochard@unistra.fr writes:
> Ah, thank you. If I understand correctly, though, once one does that
> (in an SRC org block, say) one looses the ability to edit the block as
> org code using org-edit-special (C-c ').
You can, in development version.
> I understand that the indentation is virtual; it is just that I would
> (ideally) expect for the quoted example to visually look the same as
> it does in an org buffer.
That's not possible.
> OK. I had missed this footnote. I will live with this, but am still
> surprised by this fact -- the SRC org block looks ugly to me. When we
> enter [[xx]] (say) the brackets become invisible, so I had assumed
> that a similar mechanism could exist here; I guess there are
> advantages to the present situation that I do not see...
I am not sure about what situation you're talking about, fontification
or escaping mechanism.
About the latter, the idea was to make it as little intrusive as
possible. In most languages, you never need to escape anything. Of
course, Org is an exception since many lines could conflict with
enclosing document.
Regards,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to elegantly and effectively quote org fragments?
2015-05-23 19:59 ` Nicolas Goaziou
@ 2015-05-25 8:33 ` Alain.Cochard
2015-06-01 17:20 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Alain.Cochard @ 2015-05-25 8:33 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs-orgmode, Alain.Cochard
> > I understand that the indentation is virtual; it is just that I would
> > (ideally) expect for the quoted example to visually look the same as
> > it does in an org buffer.
>
> That's not possible.
I understand that now. I'll stay disappointed about it :-)
> > OK. I had missed this footnote. I will live with this, but am still
> > surprised by this fact -- the SRC org block looks ugly to me. When we
> > enter [[xx]] (say) the brackets become invisible, so I had assumed
> > that a similar mechanism could exist here; I guess there are
> > advantages to the present situation that I do not see...
>
> I am not sure about what situation you're talking about, fontification
> or escaping mechanism.
>
> About the latter, the idea was to make it as little intrusive as
> possible. In most languages, you never need to escape anything. Of
> course, Org is an exception since many lines could conflict with
> enclosing document.
To the extent that I understand the terminology, I was talking about
escaping mechanism: it would be nice if the escaping commas could be
made invisible and not using any space.
Thanks for the explanations.
a.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How to elegantly and effectively quote org fragments?
2015-05-25 8:33 ` Alain.Cochard
@ 2015-06-01 17:20 ` Nicolas Goaziou
0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2015-06-01 17:20 UTC (permalink / raw
To: Alain.Cochard; +Cc: emacs-orgmode
Alain.Cochard@unistra.fr writes:
> > > I understand that the indentation is virtual; it is just that I would
> > > (ideally) expect for the quoted example to visually look the same as
> > > it does in an org buffer.
> >
> > That's not possible.
>
> I understand that now. I'll stay disappointed about it :-)
What about using real indentation?
> To the extent that I understand the terminology, I was talking about
> escaping mechanism: it would be nice if the escaping commas could be
> made invisible and not using any space.
I think it would be confusing as some Org constructs would appear as
active in current document whereas they are really in an Org src-block.
Regards,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: org-notify: can't define an org-notify-add
2015-05-22 4:07 Alain.Cochard
@ 2015-08-24 13:45 ` Peter Münster
0 siblings, 0 replies; 9+ messages in thread
From: Peter Münster @ 2015-08-24 13:45 UTC (permalink / raw
To: emacs-orgmode
On Fri, May 22 2015, Alain.Cochard@unistra.fr wrote:
> Am I doing something trivially wrong? Any idea how I could debug
> this? (I have no relevant message in the *Messages* buffer.)
>
> Many thanks in advance.
Hi,
It seems, that the Org Mode developers have not yet applied this patch:
http://article.gmane.org/gmane.emacs.orgmode/73647
As workaround, you can apply it on your local file.
I'll send the patch again.
--
Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-08-24 13:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 22:20 How to elegantly and effectively quote org fragments? Alain.Cochard
2015-05-21 22:02 ` Nicolas Goaziou
2015-05-22 4:37 ` Alain.Cochard
2015-05-23 19:59 ` Nicolas Goaziou
2015-05-25 8:33 ` Alain.Cochard
2015-06-01 17:20 ` Nicolas Goaziou
2015-05-21 23:31 ` org-notify: can't define an org-notify-add Alain.Cochard
-- strict thread matches above, loose matches on Subject: below --
2015-05-22 4:07 Alain.Cochard
2015-08-24 13:45 ` Peter Münster
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.