emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problems inserting accentuated dates
@ 2024-09-28 20:37 Kepa
  2024-10-07 19:18 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Kepa @ 2024-09-28 20:37 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

I have a problem some time ago. I don't know the cause:
I can't insert dates accentuated, for example Saturday (in Spanish it is Sábado). If I do it, I get:
<2024-09-28 s \341.>
Instead of
<2024-09-28 sá .>

And if I try to save the buffer, the minibuffer is open with "Select coding system" message.

I have no problem writing manually sáb. or sábado in the buffer, I have no coding problems.

If I do M-x describe-coding-system in the buffer, I get this:

Coding system for saving this buffer:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Default coding system (for new files):
  U -- utf-8 (alias: mule-utf-8 cp65001)

Coding system for keyboard input:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Coding system for terminal output:
  U -- utf-8 (alias: mule-utf-8 cp65001)

Coding system for inter-client cut and paste:
  U -- utf-16le-dos

Defaults for subprocess I/O:
  decoding: U -- utf-8-dos (alias: mule-utf-8-dos cp65001-dos)

  encoding: U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)


Priority order for recognizing coding systems when reading files:
  1. utf-8 (alias: mule-utf-8 cp65001)
  2. iso-latin-1 (alias: iso-8859-1 latin-1)
  3. iso-2022-7bit
  4. iso-2022-7bit-lock (alias: iso-2022-int-1)
  5. iso-2022-8bit-ss2
  6. emacs-mule
  7. raw-text
  8. iso-2022-jp (alias: junet)
  9. in-is13194-devanagari (alias: devanagari)
  10. chinese-iso-8bit (alias: cn-gb-2312 euc-china euc-cn cn-gb gb2312)
  11. utf-8-auto
  12. utf-8-with-signature
  13. utf-16
  14. utf-16be-with-signature (alias: utf-16-be)
  15. utf-16le-with-signature (alias: utf-16-le)
  16. utf-16be
  17. utf-16le
  18. japanese-shift-jis (alias: shift_jis sjis)
  19. chinese-big5 (alias: big5 cn-big5 cp950)
  20. undecided


I have not that problem in emacs -Q
GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24
Org mode version 9.8-pre

[-- Attachment #2: Type: text/html, Size: 6112 bytes --]

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

* Re: Problems inserting accentuated dates
  2024-09-28 20:37 Problems inserting accentuated dates Kepa
@ 2024-10-07 19:18 ` Ihor Radchenko
  2024-10-07 20:42   ` Kepa
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-10-07 19:18 UTC (permalink / raw)
  To: Kepa; +Cc: emacs-orgmode@gnu.org

Kepa <gnu.cognition199@slmails.com> writes:

> I have a problem some time ago. I don't know the cause:
> I can't insert dates accentuated, for example Saturday (in Spanish it is Sábado). If I do it, I get:
> <2024-09-28 s \341.>
> Instead of
> <2024-09-28 sá .>
> ...

This looks like coding system misconfiguration.

> ...
> I have not that problem in emacs -Q

So the problem is somewhere in your config.
Did you try to bisect it or narrow down the problem in some other way?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* RE: Problems inserting accentuated dates
  2024-10-07 19:18 ` Ihor Radchenko
@ 2024-10-07 20:42   ` Kepa
  2024-10-08  4:33     ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Kepa @ 2024-10-07 20:42 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode@gnu.org

Hi, Ihor

Sorry I don't know how mail lists work, so sometimes my answers don't go to the correct place.


The cause was this line:
(setq locale-coding-system 'utf-8)
But I don't know why, and I would like to know.
https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00313.html

Best regards

> -----Original Message-----
> From: yantar92 at posteo.net
> <yantar92_at_posteo_net_bkabf@simplelogin.co>
> Sent: Monday, October 7, 2024 9:18 PM
> To: Kepa <gnu.cognition199@slmails.com>
> Cc: emacs-orgmode at gnu.org <emacs-
> orgmode_at_gnu_org_kqcgkjat@simplelogin.co>
> Subject: Re: Problems inserting accentuated dates
> 
> Kepa <gnu.cognition199@slmails.com> writes:
> 
> > I have a problem some time ago. I don't know the cause:
> > I can't insert dates accentuated, for example Saturday (in Spanish it is
> Sábado). If I do it, I get:
> > <2024-09-28 s \341.>
> > Instead of
> > <2024-09-28 sá .>
> > ...
> 
> This looks like coding system misconfiguration.
> 
> > ...
> > I have not that problem in emacs -Q
> 
> So the problem is somewhere in your config.
> Did you try to bisect it or narrow down the problem in some other way?
> 
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support
> my work at <https://liberapay.com/yantar92>




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

* Re: Problems inserting accentuated dates
  2024-10-07 20:42   ` Kepa
@ 2024-10-08  4:33     ` tomas
  2024-10-08 20:28       ` Kepa
  0 siblings, 1 reply; 6+ messages in thread
From: tomas @ 2024-10-08  4:33 UTC (permalink / raw)
  To: Kepa; +Cc: Ihor Radchenko, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

On Mon, Oct 07, 2024 at 08:42:24PM +0000, Kepa wrote:
> Hi, Ihor
> 
> Sorry I don't know how mail lists work, so sometimes my answers don't go to the correct place.

This seems to work fine :)

> The cause was this line:
> (setq locale-coding-system 'utf-8)
> But I don't know why, and I would like to know.
> https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00313.html

OK. Asking Emacs, it tells us about the variable `locale-coding-system':

  locale-coding-system is a variable defined in ‘C source code’.

  Its value is ‘utf-8-unix’

  Coding system to use with system messages.
  Potentially also used for decoding keyboard input on X Windows,
  and is used for encoding standard output and error streams.

  Probably introduced at or before Emacs version 21.1.

Now my questions to you:

- this \341 thing happens directly when you enter á?
- you are using X on some operating system (e.g. Gnu/Linux,
  some BSD)?
- if yes: go to a terminal (XTerm), type in "locale" <ENTER>
  and tell us what the output is.

My guess is that your X (if you have one) is set up to trade in
an unibyte encoding (most probably iso-8859-1 aka Latin-1) and
you told Emacs to expect utf-8 (the iso-8859-1 encoding for "á"
is one byte represented in octal as 341 and an illegal byte in
an UTF-8 stream: Emacs is smart enough to have a way to keep those
internally, and that is how it shows them).

But alas, my guesses aren't always right :)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Problems inserting accentuated dates
  2024-10-08  4:33     ` tomas
@ 2024-10-08 20:28       ` Kepa
  2024-10-09  4:31         ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Kepa @ 2024-10-08 20:28 UTC (permalink / raw)
  To: tomas; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]


On 08/10/2024 6:33, tomas at tuxteam.de wrote:
> On Mon, Oct 07, 2024 at 08:42:24PM +0000, Kepa wrote:
>> Hi, Ihor
>>
>> Sorry I don't know how mail lists work, so sometimes my answers don't go to the correct place.
> This seems to work fine :)
If I answer to the recived e-mail, it usually works. If try to answer 
from the mail archive, it usually doesn't work.
>
>> The cause was this line:
>> (setq locale-coding-system 'utf-8)
>> But I don't know why, and I would like to know.
>> https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00313.html
> OK. Asking Emacs, it tells us about the variable `locale-coding-system':
>
>    locale-coding-system is a variable defined in ‘C source code’.
>
>    Its value is ‘utf-8-unix’
>
>    Coding system to use with system messages.
>    Potentially also used for decoding keyboard input on X Windows,
>    and is used for encoding standard output and error streams.
>
>    Probably introduced at or before Emacs version 21.1.
>
> Now my questions to you:
>
> - this \341 thing happens directly when you enter á?
No, I've never had problems entering anything.
> - you are using X on some operating system (e.g. Gnu/Linux,
>    some BSD)?
Windows OS
> - if yes: go to a terminal (XTerm), type in "locale" <ENTER>
>    and tell us what the output is.
>
> My guess is that your X (if you have one) is set up to trade in
> an unibyte encoding (most probably iso-8859-1 aka Latin-1) and
> you told Emacs to expect utf-8 (the iso-8859-1 encoding for "á"
> is one byte represented in octal as 341 and an illegal byte in
> an UTF-8 stream: Emacs is smart enough to have a way to keep those
> internally, and that is how it shows them).
>
> But alas, my guesses aren't always right :)
Probably it's that. Windows takes the dates from locale, or something...
>
> Cheers
Thanks!

[-- Attachment #2: Type: text/html, Size: 3246 bytes --]

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

* Re: Problems inserting accentuated dates
  2024-10-08 20:28       ` Kepa
@ 2024-10-09  4:31         ` tomas
  0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2024-10-09  4:31 UTC (permalink / raw)
  To: Kepa; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Tue, Oct 08, 2024 at 10:28:16PM +0200, Kepa wrote:
> 
> On 08/10/2024 6:33, tomas at tuxteam.de wrote:
> > On Mon, Oct 07, 2024 at 08:42:24PM +0000, Kepa wrote:
> > > Hi, Ihor
> > > 
> > > Sorry I don't know how mail lists work, so sometimes my answers don't go to the correct place.
> > This seems to work fine :)
> If I answer to the recived e-mail, it usually works. If try to answer from
> the mail archive, it usually doesn't work.

Are you subscribed?

If not, then probably your original address isn't there when you answer
from the archive, so the response goes to the list only, while when you
answer to the direct mail, the answer to that goes to both.

If yes, I don't have a good explanation :)

[...]

> > But alas, my guesses aren't always right :)
> Probably it's that. Windows takes the dates from locale, or something...

With Windows, I think all my guesses would be wrong. My last window was
around 3.1 or so ;-)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2024-10-09  4:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-28 20:37 Problems inserting accentuated dates Kepa
2024-10-07 19:18 ` Ihor Radchenko
2024-10-07 20:42   ` Kepa
2024-10-08  4:33     ` tomas
2024-10-08 20:28       ` Kepa
2024-10-09  4:31         ` tomas

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