emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Guillaume MULLER <guillaume.muller@emse.fr>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Bug in org-insert-link?
Date: Mon, 9 Oct 2023 16:40:27 +0200	[thread overview]
Message-ID: <58073f8e-a7bc-49e4-aa59-7123dcff4cb3@emse.fr> (raw)
In-Reply-To: <878r8hjrtp.fsf@localhost>


[-- Attachment #1.1.1: Type: text/plain, Size: 1963 bytes --]

Hi,

Thanks for the answer... I'll have a look at your links.

However, since I wrote the email, I've seen the behavior occur without changing (at least voluntarily) the cursor position in the Org buffer...

On 10/5/23 12:18, Ihor Radchenko wrote:
> Guillaume MULLER <guillaume.muller@emse.fr> writes:
> 
>> ...
>> - Switch back to (Doom)Emacs ("window"/desktop)
>> - Click inside the Emacs "window" to give it focus
>> [Here is the problem: sometimes I forgot that I already started the org-insert-link]
>> - Call org-insert-link
>> - Paste the URL
>> - Validate the link creation
>>
>> Then the link is inserted where I clicked last (to give focus to the Emacs "window").
> 
> By default, Emacs moves point to where you click. You can do the same
> thing if you deliberately C-x o from the minibuffer. See 9.3 Editing in
> the Minibuffer section of Emacs manual.
> I see nothing wrong on the Org side.
> 
>> Of course, the problem lies in my mistake of calling twice the org-insert-link method, but the behavior is very strange, and it took me some time to identify why my links were inserted at random places in my text.
>>
>> However, wouldn't it be possible to prevent it from the beginning by forbidding me to call org-insert-link twice, i.e. making it a singleton/atomic function (I don't see a UseCase where this could be useful to be able to call it inside itself, but maybe I'm wrong)?
> 
> Check out 22.1 Mouse Commands for Editing section of Emacs manual.
> `x-mouse-click-focus-ignore-position' might be something you want to
> customize.
> 

-- 
Guillaume MULLER
Associate Professor, PhD
Fayol Institue - ISI Department
🚪 #426
☎ 04 77 42 02 71
🕸 https://www.mines-stetienne.fr
🧍= Physical Address =
   Espace Fauriel
   29 Rue Pierre et Dominique Ponchardier
   42100 Saint-Étienne
📬 = Postal Address =
   École des Mines de Saint-Étienne
   158 cours Fauriel
   42100 Saint-Étienne

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 673 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2023-10-09 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 15:29 Bug in org-insert-link? Guillaume MULLER
2023-10-05 10:18 ` Ihor Radchenko
2023-10-09 14:40   ` Guillaume MULLER [this message]
2023-10-10 11:25     ` Ihor Radchenko
2023-10-10 11:33       ` Guillaume MULLER
2023-10-10 11:38         ` Ihor Radchenko
2023-12-04 15:24     ` Guillaume MULLER
2023-12-04 16:13       ` Guillaume MULLER
2023-12-05 12:29         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58073f8e-a7bc-49e4-aa59-7123dcff4cb3@emse.fr \
    --to=guillaume.muller@emse.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).