all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller.no1@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 28025@debbugs.gnu.org
Subject: bug#28025: Daemon/server passes string incorrectly to/from Systemd
Date: Thu, 10 Aug 2017 14:42:11 +0200	[thread overview]
Message-ID: <CAHk_L7pqY2gds6LHOyZmAe9Rs0oF=UPaMO2O26Ob0+8qRhYVqg@mail.gmail.com> (raw)
In-Reply-To: <5ko9roecl6.fsf@fencepost.gnu.org>

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

> Can you explain how DICPATH enters this picture?  AFAIR, Hunspell
> should be able to find its dictionaries without that variable,
> assuming Hunspell is installed correctly.  So why do you need DICPATH?

Above stack trace points to "ispell-parse-hunspell-affix-file", which seems
to
be a parser for affix files. But as I wrote I am not sure, I don't know so
much
about how emacs does stuff internally. Anyway, I have checked so that path
given to emacs is not empty. When I do (getenv "DICPATH") it prints correct
path where dictionaries are. Hunspell is found as well, and Hunspell itself
finds everything correctly when I check from shell.

> I don't see what D-Bus would have to do with this.
Systemd-bus is D-bus if I understood Systemd docs correctly. I am by no
means an expert in either d-bus or sytemd, just ordinary user.

> I imagine that the environment of Emacs when started from systemd is
> different from when you start it normally, and something is missing that
> means hunspell can't find its dictionaries.

Yeah, I imagined that too, so that is why I passed DICPATH to systemd
service as well but that didn't solve the problem. Here is service file. If
Emas gets it's paths from Hunspell, than it sounds as expected, and after
that the only thing I can imagine is problem is how strings are passed
between processes.

I looked at process-environment var and the content is different,
but what regards PATH and DICPATH it's same:

Emacs daemon started with systemd as user service:

("TERM=dumb" "DICPATH=~/.emacs.d/hunspell"
"INVOCATION_ID=af861fc0688846f6a70a09261064560f" "MANAGERPID=604"
"XDG_RUNTIME_DIR=/run/user/1000" "USER=*****" "SHELL=/bin/bash"
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
"MAIL=/var/spool/mail/*****" "LOGNAME=*****" "LANG=sv_SE.UTF-8"
"JOURNAL_STREAM=9:15268" "HOME=/home/*****"
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus")

Emacs daemon started from shell:

("OLDPWD=/home/*****" "_=/usr/local/bin/emacs" "HISTSIZE=5000"
"PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/ant/bin:/opt/ant/bin"
"LARCH_PATH=/usr/share/splint/lib" "ANT_HOME=/opt/ant"
"XAUTHORITY=/home/*****/.Xauthority" "XDG_RUNTIME_DIR=/run/user/1000"
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus" "LOGNAME=*****"
"IRC_CLIENT=irssi" "SHLVL=3" "XDG_SEAT=seat0" "AUTOFEATURE=true autotest"
"TERM=dumb" "SHELL=/bin/bash" "WINDOWPATH=1" "VISUAL=emacsclient -c -a
emacs" "MAIL=/var/spool/mail/*****"
"_JAVA_OPTIONS=-Dsun.java2d.opengl=true" "GTK_MODULES=canberra-gtk-module"
"ALTERNATE_EDITOR=emacsclient -c -a emacs" "HOME=/home/*****"
"PWD=/home/*****/emacs" "TERMINOLOGY=1" "LSCOLORS=Gxfxcxdxdxegedabagacad"
"USER=*****" "XDG_SESSION_ID=c1" "HG=/usr/bin/hg" "SCM_CHECK=true"
"GIT_HOSTING=git@git.domain.com" "XDG_VTNR=1"
"JAVA_HOME=/usr/lib/jvm/default/jre"
"LCLIMPORTDIR=/usr/share/splint/imports" "EDITOR=emacsclient -t -a emacs
-t" "TODO=t" "HISTCONTROL=ignorespace:erasedups" "HISTIGNORE=pwd:ls:ls
-l:cd:cd ..:cd -:cd --" "TZ=:/etc/localtime" "LANG=sv_SE.UTF-8"
"DICPATH=/home/*****/.emacs.d/hunspell" "BASH_IT=/home/*****/.bash-it"
"BASH_IT_THEME=bobby" "XTERM_256_COLORS=1"
"LD_LIBRARY_PATH=:/usr/local/lib:/usr/local/lib" "GREP_COLOR=1;33")

When I run M-x ispell-buffer-with-debug, I get same backtrace as posted in
my original message. I also get following (*ispell-debug* buffer):

-- ispell-fhd: Skipping entry: AVAILABLE DICTIONARIES (path is not
mandatory for -d option):
-- ispell-fhd: Skipping entry: Can't open affix or dictionary files for
dictionary named "sv_SE".

I don't know it says it can't open entry, since I can see the dictionary,
and when started from shell, emacs has no problem opening it :).

I have to admit that I am not very proficient using edebug. To be honest I
have no idea how to step through code properly with it, and manual does
not give me much clues. It list all commands but one to use to step
through. I am probably just not smart enough to understand it. Anyway
stacktrace was gigantic, about 20 lines tall, but about 7800 chars wide so
I am not posting it here. But help how to step through and find more info
is appreciated.


2017-08-09 22:00 GMT+02:00 Glenn Morris <rgm@gnu.org>:

> Arthur Miller wrote:
>
> > I have checked that all paths are setup correctly. Emacs finds
> > dictionaries (DICPATH setts correctly in systemd service file),
> > and it also finds spellchecking program (/usr/bin/hunspell).
> >
> > I believe it might be something with passing strings to and from
> > d-bus, but I don't have experience with d-bus at all so I really
> > don't know.
>
> I don't see what D-Bus would have to do with this.
> I imagine that the environment of Emacs when started from systemd is
> different from when you start it normally, and something is missing that
> means hunspell can't find its dictionaries.
>
> You might compare the value of 'process-environment' in the two Emacs to
> see what differs. Or M-x ispell-buffer-with-debug might provide more
> information. Or edebug ispell-find-hunspell-dictionaries and step
> through it to see where things go wrong.
>
>
>

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

  reply	other threads:[~2017-08-10 12:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 13:07 bug#28025: Daemon/server passes string incorrectly to/from Systemd Arthur Miller
2017-08-09 16:15 ` Eli Zaretskii
2017-08-09 20:00 ` Glenn Morris
2017-08-10 12:42   ` Arthur Miller [this message]
2017-08-10 12:54     ` npostavs
2017-08-10 15:18       ` Eli Zaretskii
2017-08-11 16:54     ` Glenn Morris
2017-08-10 15:59 ` bug#28025: SV: " arthur.miller.no1
2017-08-11 14:06   ` bug#28025: " Arthur Miller
2017-08-11 14:13     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to='CAHk_L7pqY2gds6LHOyZmAe9Rs0oF=UPaMO2O26Ob0+8qRhYVqg@mail.gmail.com' \
    --to=arthur.miller.no1@gmail.com \
    --cc=28025@debbugs.gnu.org \
    --cc=rgm@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.