emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Johansson <mejlaandersj@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Bug? Encoding trouble in org-id-locations-load
Date: Fri, 03 Nov 2017 15:11:38 +0100	[thread overview]
Message-ID: <87po8z5u5h.fsf@gmail.com> (raw)

Hi,
I use org-id and got some surprising reports of duplicate IDs. It 
seems that the issue is that one of my files containing IDs has a 
filename consisting of some non-ascii characters (a Swedish ä). 
When this filename is read in from ~org-id-locations-file~ in 
~org-id-locations-load~ the ä is interpreted as “\303\244”.
But ~org-id-files~ and ~org-id-locations~ is also populated from 
currently open files, so I usually get that file represented twice 
as two different files in ~org-id-files~. So I get both 
“j-allmänt.org” and j-allm\303\244nt.org“. Both seem to be scanned 
correctly by ~org-id-update-id-locations~ and this results in 
duplicate IDs.

I tried changing the call to ~insert-file-contents-literally~ in 
~org-id-locations-load~ to just ~insert-file-contents~ and this 
seemed to fix the behaviour (as correct decoding is done then?). I 
don’t know if there are other unwanted effects from using 
~insert-file-contents~, but otherwise this seems to me to be a 
more correct solution.

Cheers,
Anders Johansson

             reply	other threads:[~2017-11-03 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 14:11 Anders Johansson [this message]
2017-11-03 21:05 ` Bug? Encoding trouble in org-id-locations-load Jorge Morais Neto
2017-11-04 21:41 ` Nicolas Goaziou

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=87po8z5u5h.fsf@gmail.com \
    --to=mejlaandersj@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).