emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem jumping back & forth between foonote ref and def with 'C-c C-c'
@ 2018-07-20 16:28 Alain.Cochard
  2018-08-21 18:13 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Alain.Cochard @ 2018-07-20 16:28 UTC (permalink / raw)
  To: emacs-orgmode


Hello.  

I start emacs with

   emacs -Q -l .emacs.debug

where the file .emacs.debug contains only

   (add-to-list 'load-path "/home/cochard/Org/Coch-git/org-mode/lisp")

giving

   Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
   3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
   Org mode version 9.1.13 (release_9.1.13-894-gf79545 @
   /home/cochard/Org/Coch-git/org-mode/lisp/)

The manual says:

   ‘C-c C-c’
   If the cursor is on a footnote reference, jump to the definition.
   If it is a the definition, jump back to the reference.  

Now, I visit a file which contains only

   * head
   foo[fn:1] bar
   * Footnotes

   [fn:1] tnote

If the cursor is anywhere within the 1st instance of '[fn:1] ' (that
is, including the space) and I type 'C-c C-c' the cursor ends up on
the 1st letter of 'tnote'.

I am not sure if this corresponds to what the manual says but, if I
type 'C-c C-c' again, I get

   user-error: `C-c C-c' can do nothing useful here

i.e., I don't "jump back."  By contrast, with

   emacs -Q

which gives

   Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
   3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
   Org-mode version 8.2.10 (release_8.2.10 @
   /usr/share/emacs/24.5/lisp/org/)

if the cursor is anywhere within the 1st instance of '[fn:1]' and I
type 'C-c C-c' the cursor ends up on the space before 'tnote'.  A 2nd
'C-c C-c' brings the cursor back to the 1st '[' of the 1st '[fn:1]'.
This does correspond to what I would qualify as "jumping back."

In other words, version 8.2.10 behaves as I expect, not the master
version.  Am I doing/understanding something wrong?

Thank you,
regards.

PS: note the typo in the manual excerpt: "If it is a the
definition...".


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem jumping back & forth between foonote ref and def with 'C-c C-c'
  2018-07-20 16:28 Problem jumping back & forth between foonote ref and def with 'C-c C-c' Alain.Cochard
@ 2018-08-21 18:13 ` Nicolas Goaziou
  2018-08-24 16:59   ` Alain.Cochard
  2018-08-29 15:51   ` Alain.Cochard
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2018-08-21 18:13 UTC (permalink / raw)
  To: Alain.Cochard; +Cc: emacs-orgmode

Hello,

Alain.Cochard@unistra.fr writes:

> Now, I visit a file which contains only
>
>    * head
>    foo[fn:1] bar
>    * Footnotes
>
>    [fn:1] tnote
>
> If the cursor is anywhere within the 1st instance of '[fn:1] ' (that
> is, including the space) and I type 'C-c C-c' the cursor ends up on
> the 1st letter of 'tnote'.
>
> I am not sure if this corresponds to what the manual says but, if I
> type 'C-c C-c' again, I get
>
>    user-error: `C-c C-c' can do nothing useful here
>
> i.e., I don't "jump back."  By contrast, with
>
>    emacs -Q
>
> which gives
>
>    Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
>    3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
>    Org-mode version 8.2.10 (release_8.2.10 @
>    /usr/share/emacs/24.5/lisp/org/)
>
> if the cursor is anywhere within the 1st instance of '[fn:1]' and I
> type 'C-c C-c' the cursor ends up on the space before 'tnote'.  A 2nd
> 'C-c C-c' brings the cursor back to the 1st '[' of the 1st '[fn:1]'.
> This does correspond to what I would qualify as "jumping back."
>
> In other words, version 8.2.10 behaves as I expect, not the master
> version.  Am I doing/understanding something wrong?

As strange as it may sound, I think both are correct. 

In 9.1, Org puts point at the location where you can start to edit the
definition right away. If you want to "jump back", you can use the Org
mark ring, or simply move backward -- a single character is enough but
you can also move to the beginning of the line -- and use `C-c C-c'
again.

In 8.2, point is at a location where `C-c C-c' operates right away, but
you still have to move forward to start editing the definition.

My gut feelings is the current behaviour is slightly better, but YWWV.

WDYT?

> PS: note the typo in the manual excerpt: "If it is a the
> definition...".

This typo is not present in the latest manual.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem jumping back & forth between foonote ref and def with 'C-c C-c'
  2018-08-21 18:13 ` Nicolas Goaziou
@ 2018-08-24 16:59   ` Alain.Cochard
  2018-08-29 15:51   ` Alain.Cochard
  1 sibling, 0 replies; 6+ messages in thread
From: Alain.Cochard @ 2018-08-24 16:59 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, Alain.Cochard


Hello, and thanks for the feed back.

Nicolas Goaziou writes on Tue 21 Aug 2018 20:13:

 > As strange as it may sound, I think both are correct. 
 > 
 > In 9.1, Org puts point at the location where you can start to edit the
 > definition right away. If you want to "jump back", you can use the Org
 > mark ring, or simply move backward -- a single character is enough but
 > you can also move to the beginning of the line -- and use `C-c C-c'
 > again.
 > 
 > In 8.2, point is at a location where `C-c C-c' operates right away, but
 > you still have to move forward to start editing the definition.
 > 
 > My gut feelings is the current behaviour is slightly better, but YWWV.
 > 
 > WDYT?

When I use `C-c C-c', it is almost always to check the content of the
footnote, not to edit it, so you'll understand I prefer the 8.2
behavior.

But even if it is for editing, I'd say it is statistically unlikely
that the editing starts right at the place where the 9.1 behavior puts
the point.  So you generally have to move anyway, so what's one
additional forward character?

In fact, with 9.1, would it be a problem to allow `C-c C-c' to
directly go back to the reference?

Alternatively, could not there be an org variable whose customization
would allow to choose one behavior or the other?

Finally, something I just noticed: with 9.1, after doing `C-c C-x f'
and before entering any character, doing `C-c C-c' repetitively does
jump back and forth between reference and definition.  This seems to
me a little bit inconsistent with the behavior observed after having
entered some characters.

Regards


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem jumping back & forth between foonote ref and def with 'C-c C-c'
  2018-08-21 18:13 ` Nicolas Goaziou
  2018-08-24 16:59   ` Alain.Cochard
@ 2018-08-29 15:51   ` Alain.Cochard
  2018-08-30 22:07     ` Nicolas Goaziou
  1 sibling, 1 reply; 6+ messages in thread
From: Alain.Cochard @ 2018-08-29 15:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, Alain.Cochard

Nicolas Goaziou writes on Tue 21 Aug 2018 20:13:

 > > Now, I visit a file which contains only
 > >
 > >    * head
 > >    foo[fn:1] bar
 > >    * Footnotes
 > >
 > >    [fn:1] tnote
 > >
 > > If the cursor is anywhere within the 1st instance of '[fn:1] ' (that
 > > is, including the space) and I type 'C-c C-c' the cursor ends up on
 > > the 1st letter of 'tnote'.
 > >
 > > I am not sure if this corresponds to what the manual says but, if I
 > > type 'C-c C-c' again, I get
 > >
 > >    user-error: `C-c C-c' can do nothing useful here
 > >
 > > i.e., I don't "jump back."

 > As strange as it may sound, I think [this is] correct. 
 > 
 > In 9.1, Org puts point at the location where you can start to edit
 > the definition right away. If you want to "jump back", you can use
 > the Org mark ring, or simply move backward -- a single character is
 > enough but you can also move to the beginning of the line -- and
 > use `C-c C-c' again.

Hello again.  What I did not notice earlier is that, while performing
`C-c C-c' on the first instance of '[fn:1]' -- which results in the
point being put on the 1st letter of 'tnote' --, the minibuffer
displays the following message:

   Edit definition and go back with `C-c &' or, if unique, with `C-c
   C-c'.

So it seems to me that if the behavior is correct, then the message is
inconsistent (`C-c C-c' does not go/jump back).

Regards



-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem jumping back & forth between foonote ref and def with 'C-c C-c'
  2018-08-29 15:51   ` Alain.Cochard
@ 2018-08-30 22:07     ` Nicolas Goaziou
  2018-08-31  1:16       ` Alain.Cochard
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2018-08-30 22:07 UTC (permalink / raw)
  To: Alain.Cochard; +Cc: emacs-orgmode

Hello,

Alain.Cochard@unistra.fr writes:

> Hello again.  What I did not notice earlier is that, while performing
> `C-c C-c' on the first instance of '[fn:1]' -- which results in the
> point being put on the 1st letter of 'tnote' --, the minibuffer
> displays the following message:
>
>    Edit definition and go back with `C-c &' or, if unique, with `C-c
>    C-c'.
>
> So it seems to me that if the behavior is correct, then the message is
> inconsistent (`C-c C-c' does not go/jump back).

Fair enough. I reverted the 3 years old commit.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem jumping back & forth between foonote ref and def with 'C-c C-c'
  2018-08-30 22:07     ` Nicolas Goaziou
@ 2018-08-31  1:16       ` Alain.Cochard
  0 siblings, 0 replies; 6+ messages in thread
From: Alain.Cochard @ 2018-08-31  1:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou writes on Fri 31 Aug 2018 00:07:

 > Fair enough. I reverted the 3 years old commit.

I checked it on master.  Thanks for the feedback.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-31  1:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 16:28 Problem jumping back & forth between foonote ref and def with 'C-c C-c' Alain.Cochard
2018-08-21 18:13 ` Nicolas Goaziou
2018-08-24 16:59   ` Alain.Cochard
2018-08-29 15:51   ` Alain.Cochard
2018-08-30 22:07     ` Nicolas Goaziou
2018-08-31  1:16       ` Alain.Cochard

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).