unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* "args-out-of-range" error when using data from external process on Windows
@ 2024-04-18  5:39 Alexis
  2024-04-18  6:01 ` Eli Zaretskii
  2024-04-18  6:05 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Alexis @ 2024-04-18  5:39 UTC (permalink / raw)
  To: emacs-devel


[Not currently subscribed to the list, so please cc me on 
replies.]   Hi all,  A user of my `Ebuku` package has reported an 
"args-out-of-range" error that i'm out of my depth trying to 
diagnose. Here's the GitHub issue: 
 
  https://github.com/flexibeast/ebuku/issues/32 
 
i can't reproduce the issue on my own system:  * Gentoo + Emacs 
29.3.  * LANG=en_AU.UTF-8 * The only set LC_* variables are: 
  LC_MESSAGES=C LC_TIME=en_AU.UTF-8 
* current-language-environment = "English" locale-coding-system = 
* utf-8-unix    Their system:  Windows 11, using Emacs 29.2 
* obtained via Scoop package manager; not using WSL 
* LANG=zh_CN.UTF-8, LC_ALL=zh_CN.UTF-8 
* current-language-environment: UTF-8 locale-coding-system = cp936 
* default-process-coding-system = '(utf-8-dos . utf-8-unix) 
* `Ebuku` uses `call-process` to call the Python-based `buku` 
* bookmark database manager and present the resulting output in 
* Emacs. buku stores data in an SQLite database. 
 
  https://github.com/jarun/buku/ 
 
The link: 
 
  https://google.github.io/comprehensive-rust/ 
 
in the buku database results in:  ``` Debugger entered--Lisp 
error: (args-out-of-range "1884. Welcome to Comprehensive Rust 🦀 
- Comprehens..." 15862 15893) 
  match-string(1 "1884. Welcome to Comprehensive Rust 🦀 - 
  Comprehensive Rust 🦀") ebuku--search-helper("--print" "[all]" 
  "-1000" "") ebuku-show-all() ebuku() 
  funcall-interactively(ebuku)1 command-execute(ebuku record) 
  execute-extended-command(nil "ebuku" "ebuku") 
  funcall-interactively(execute-extended-command nil "ebuku" 
  "ebuku") command-execute(execute-extended-command) 
```  Once the Unicode CRAB emoji is removed, there's no issue. 
The link: 
 
  https://coredumped.dev/2021/05/26/taking-org-roam-everywhere-with-logseq/ 
 
in the buku database results in:  ``` Debugger entered--Lisp 
error: (args-out-of-range "2027. Taking org-roam everywhere with 
logseq • Core Dumped" 32318 32355) 
  match-string(1 "2027. Taking org-roam everywhere with logseq • 
  Cor...")  (setq tags (match-string 1 line)) (progn (string-match 
  "^\\s-*[#] \\(.*\\)$" line) (setq tags (match-string 1 line))) 
  [snip rest of traceback] 
```  The user has confirmed that the buku database is UTF-8. 

Does anyone have any suggestions about what might be happening? i 
presume my code is making some incorrect assumptions, or not doing 
some encoding stuff that it should be. i really want to get 
encoding and language support right, so even outside of this 
specific issue, general comments about things i need to fix in 
this regard would be most welcome. :-) 


Alexis.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* "args-out-of-range" error when using data from external process on Windows
@ 2024-04-18  6:11 Alexis
  2024-04-18  7:08 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Alexis @ 2024-04-18  6:11 UTC (permalink / raw)
  To: emacs-devel


[Second attempt, after the formatting somehow got messed by the 
sending process up on the first attempt, sorry ....]

[Not currently subscribed to the list, so please cc me on 
replies.]
 
Hi all,

A user of my `Ebuku` package has reported an "args-out-of-range" 
error that i'm out of my depth trying to diagnose. Here's the 
GitHub issue: 

  https://github.com/flexibeast/ebuku/issues/32

i can't reproduce the issue on my own system:

* Gentoo + Emacs 29.3
* LANG=en_AU.UTF-8
* The only set LC_* variables are:
  LC_MESSAGES=C
  LC_TIME=en_AU.UTF-8
* current-language-environment: "English"
* locale-coding-system: utf-8-unix

Their system:

* Windows 11, using Emacs 29.2, obtained via Scoop package 
  manager; not using WSL
* LANG=zh_CN.UTF-8, LC_ALL=zh_CN.UTF-8
* current-language-environment: UTF-8 locale-coding-system: cp936
* default-process-coding-system: '(utf-8-dos . utf-8-unix)

`Ebuku` uses `call-process` to call the Python-based `buku` * 
bookmark database manager and present the resulting output in 
Emacs. buku stores data in an SQLite database.

  https://github.com/jarun/buku/

The link: 

  https://google.github.io/comprehensive-rust/

in the buku database results in:

```
Debugger entered--Lisp error: (args-out-of-range "1884. Welcome to 
Comprehensive Rust 🦀 - Comprehens..." 15862 15893) 
  match-string(1 "1884. Welcome to Comprehensive Rust 🦀 - 
  Comprehensive Rust 🦀")
  ebuku--search-helper("--print" "[all]" "-1000" "")
  ebuku-show-all() ebuku()
  funcall-interactively(ebuku)
  command-execute(ebuku record)
  execute-extended-command(nil "ebuku""ebuku")
  funcall-interactively(execute-extended-command nil "ebuku" 
  "ebuku")
  command-execute(execute-extended-command)
```

Once the Unicode CRAB emoji is removed, there's no issue. The 
link:
 
  https://coredumped.dev/2021/05/26/taking-org-roam-everywhere-with-logseq/ 

in the buku database results in:

```
Debugger entered--Lisp error:
  (args-out-of-range "2027. Taking org-roam everywhere with logseq 
  • Core Dumped" 32318 32355)
  match-string(1 "2027. Taking org-roam everywhere with logseq • 
  Cor...")
  (setq tags (match-string 1 line)) (progn (string-match 
  "^\\s-*[#] \\(.*\\)$" line)
  (setq tags (match-string 1 line)))
  [snip rest of traceback]
  ```

The user has confirmed that the buku database is UTF-8.

Does anyone have any suggestions about what might be happening? i 
presume my code is making some incorrect assumptions, or not doing 
some encoding stuff that it should be. i really want to get 
encoding and language support right, so even outside of this 
specific issue, general comments about things i need to fix in 
this regard would be most welcome. :-)


Alexis.



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

end of thread, other threads:[~2024-04-21  0:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  5:39 "args-out-of-range" error when using data from external process on Windows Alexis
2024-04-18  6:01 ` Eli Zaretskii
2024-04-18  7:07   ` Alexis
2024-04-18  8:35     ` Eli Zaretskii
2024-04-18 11:20       ` Alexis
2024-04-19  3:16       ` Alexis
2024-04-19  7:29         ` Eli Zaretskii
2024-04-21  0:57           ` Alexis
2024-04-18  6:05 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2024-04-18  6:11 Alexis
2024-04-18  7:08 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).