* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2012-05-06 18:14 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2012-05-06 18:14 UTC (permalink / raw
To: gentoo-commits
commit: eca97d812a0b8bf2c85be7006d88127debc185e8
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May 6 18:15:05 2012 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May 6 18:15:05 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=eca97d81
Allow UTF-8 characters in ChangeLog.
---
ChangeLog | 66 ++++++++++++++++++++++++++++++------------------------------
1 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e023aed..e79d8ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,37 +1,37 @@
-2011-12-10 Ulrich Mueller <ulm@gentoo.org>
+2011-12-10 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (checkconfig, start): Drop baselayout-1 compatibility.
-2010-09-20 Ulrich Mueller <ulm@gentoo.org>
+2010-09-20 Ulrich Müller <ulm@gentoo.org>
* Version 0.18 released.
-2010-09-18 Ulrich Mueller <ulm@gentoo.org>
+2010-09-18 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (stop): Output ebegin/eend messages. Export some
variables before calling the stop script, bug 337829.
* emacs-stop.sh: New file, example stop script.
* Makefile (DISTFILES): Add emacs-stop.sh.
-2009-11-20 Ulrich Mueller <ulm@gentoo.org>
+2009-11-20 Ulrich Müller <ulm@gentoo.org>
* Version 0.17 released.
-2009-10-05 Ulrich Mueller <ulm@gentoo.org>
+2009-10-05 Ulrich Müller <ulm@gentoo.org>
* emacs-wrapper.sh: Always display the saved output if the
EMACS_DEBUG variable is set.
* emacs.rc (start): Export EMACS_DEBUG.
* emacs.conf (EMACS_DEBUG): Document variable.
-2009-09-19 Ulrich Mueller <ulm@gentoo.org>
+2009-09-19 Ulrich Müller <ulm@gentoo.org>
* Version 0.16 released.
* emacs-wrapper.sh: Save Emacs's output in a temporary file.
Display it only in case of error.
-2009-07-17 Ulrich Mueller <ulm@gentoo.org>
+2009-07-17 Ulrich Müller <ulm@gentoo.org>
* Version 0.15 released.
@@ -40,7 +40,7 @@
(start): Test for OpenRC. Compatibility code for start-stop-daemon
of baselayout-1.
-2009-03-18 Ulrich Mueller <ulm@gentoo.org>
+2009-03-18 Ulrich Müller <ulm@gentoo.org>
* Version 0.14 released.
@@ -49,16 +49,16 @@
(EMACS_SHELL): Default to bash.
* emacs.conf (EMACS_SHELL): Renamed from SHELL.
-2009-03-03 Ulrich Mueller <ulm@gentoo.org>
+2009-03-03 Ulrich Müller <ulm@gentoo.org>
* 10emacs-daemon-gentoo.el: Remove backwards compatibility code.
-2009-02-25 Ulrich Mueller <ulm@gentoo.org>
+2009-02-25 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (start): Export the SHELL variable.
* emacs-wrapper.sh: Don't assign SHELL.
-2009-02-23 Ulrich Mueller <ulm@gentoo.org>
+2009-02-23 Ulrich Müller <ulm@gentoo.org>
* Version 0.13 released.
@@ -66,23 +66,23 @@
to "process-attributes" following Emacs upstream. Add code for
backwards compatibility.
-2009-02-01 Ulrich Mueller <ulm@gentoo.org>
+2009-02-01 Ulrich Müller <ulm@gentoo.org>
* Version 0.12 released.
-2009-01-28 Ulrich Mueller <ulm@gentoo.org>
+2009-01-28 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (depend): Add dependencies, in order to start after the
D-Bus daemon. Thanks to Tassilo Horn <tassilo@member.fsf.org> for
pointing this out. Also depend on localmount and bootmisc.
-2009-01-21 Ulrich Mueller <ulm@gentoo.org>
+2009-01-21 Ulrich Müller <ulm@gentoo.org>
* emacs.rc: Use different syntax for assignment of default values.
(EMACS_OPTS, start): Include --daemon option in variable.
* emacs.conf (EMACS_OPTS): Document the above.
-2009-01-14 Ulrich Mueller <ulm@gentoo.org>
+2009-01-14 Ulrich Müller <ulm@gentoo.org>
* Version 0.11 released.
@@ -90,13 +90,13 @@
* emacs.rc (start): Make a minor text addition to start message
-2009-01-02 Ulrich Mueller <ulm@gentoo.org>
+2009-01-02 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (stop): Optionally call a custom script defined by
EMACS_STOP before stopping the daemon; bug 246462.
* emacs.conf (EMACS_STOP): Document as a variable.
-2009-01-01 Ulrich Mueller <ulm@gentoo.org>
+2009-01-01 Ulrich Müller <ulm@gentoo.org>
* README: Some additions. List authors.
@@ -106,35 +106,35 @@
* Makefile (DISTFILES): Put it into the tarball
-2008-12-27 Ulrich Mueller <ulm@gentoo.org>
+2008-12-27 Ulrich Müller <ulm@gentoo.org>
* Version 0.10 released.
-2008-12-24 Ulrich Mueller <ulm@gentoo.org>
+2008-12-24 Ulrich Müller <ulm@gentoo.org>
* emacs-wrapper.sh: Use a "for" loop to time out. Remove redundant
argument of "exit".
* emacs.rc (start): Move ebegin message.
-2008-12-19 Ulrich Mueller <ulm@gentoo.org>
+2008-12-19 Ulrich Müller <ulm@gentoo.org>
* Version 0.9 released.
-2008-12-17 Ulrich Mueller <ulm@gentoo.org>
+2008-12-17 Ulrich Müller <ulm@gentoo.org>
* emacs-wrapper.sh: Use "wait" for exit status of child process,
and exit with it. Change order of killed processes on timeout.
-2008-12-12 Ulrich Mueller <ulm@gentoo.org>
+2008-12-12 Ulrich Müller <ulm@gentoo.org>
* 10emacs-daemon-gentoo.el: Use string-match for the command name.
-2008-12-08 Ulrich Mueller <ulm@gentoo.org>
+2008-12-08 Ulrich Müller <ulm@gentoo.org>
* Version 0.8 released.
-2008-12-07 Ulrich Mueller <ulm@gentoo.org>
+2008-12-07 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (start): If unset, determine SHELL from passwd file.
* emacs.conf (SHELL): Document variable.
@@ -142,7 +142,7 @@
* emacs-wrapper.sh: Add copyright header.
-2008-12-05 Ulrich Mueller <ulm@gentoo.org>
+2008-12-05 Ulrich Müller <ulm@gentoo.org>
* emacs-wrapper.sh: Add a timeout and kill Emacs if the daemon
doesn't detach properly.
@@ -150,19 +150,19 @@
* emacs.conf (EMACS_START): Update documentation.
(EMACS_TIMEOUT): New variable.
-2008-12-03 Ulrich Mueller <ulm@gentoo.org>
+2008-12-03 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (checkconfig): Use numerical user id for root.
-2008-11-30 Ulrich Mueller <ulm@gentoo.org>
+2008-11-30 Ulrich Müller <ulm@gentoo.org>
* Version 0.7 released.
-2008-11-16 Ulrich Mueller <ulm@gentoo.org>
+2008-11-16 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (checkconfig): Use "checkpath" builtin function.
-2008-11-13 Ulrich Mueller <ulm@gentoo.org>
+2008-11-13 Ulrich Müller <ulm@gentoo.org>
* Version 0.6 released.
@@ -174,7 +174,7 @@
* emacs.conf: Add a comment about multiplexed configuration files.
-2008-11-10 Ulrich Mueller <ulm@gentoo.org>
+2008-11-10 Ulrich Müller <ulm@gentoo.org>
* Version 0.5 released.
@@ -182,18 +182,18 @@
* emacs.rc (EMACS): Allow to override from config file.
* Makefile (DISTFILES): Add emacs.conf.
-2008-11-04 Ulrich Mueller <ulm@gentoo.org>
+2008-11-04 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (description): Add description.
* 10emacs-daemon-gentoo.el (special-event-map): Restart the server
on reception of SIGUSR1. Output a message before terminating.
-2008-11-03 Ulrich Mueller <ulm@gentoo.org>
+2008-11-03 Ulrich Müller <ulm@gentoo.org>
* 10emacs-daemon-gentoo.el: Check if a daemon is already running.
-2008-11-02 Ulrich Mueller <ulm@gentoo.org>
+2008-11-02 Ulrich Müller <ulm@gentoo.org>
* Version 0.4 released.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2012-05-06 18:47 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2012-05-06 18:47 UTC (permalink / raw
To: gentoo-commits
commit: c4088bf48e7f69a278508155398589086173f9bd
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May 6 18:25:12 2012 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May 6 18:25:12 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=c4088bf4
Drop subversion keywords.
---
ChangeLog | 1 -
Makefile | 1 -
emacs-stop.sh | 1 -
emacs-wrapper.sh | 1 -
emacs.rc | 1 -
5 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e79d8ad..0af36d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -201,4 +201,3 @@
Copyright 2008-2011 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
-$Id$
diff --git a/Makefile b/Makefile
index 41d8f57..dab5cea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
-# $Id$
PN = emacs-daemon
PV = $(shell sed '/^[ \t]*\* .*[Vv]ersion/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' \
diff --git a/emacs-stop.sh b/emacs-stop.sh
index db825b9..68c5453 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,7 +1,6 @@
#!/bin/bash
# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
-# $Id$
# Lisp expression to be evaluated when stopping Emacs.
# Any additional commands should preferably be added to kill-emacs-hook.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index 43c628f..eea8e75 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,7 +1,6 @@
#!/bin/bash
# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
-# $Id$
# Save output in a temporary file and display in case of error
logfile=$(mktemp ${TMPDIR:-/tmp}/emacs.log.XXXXXX)
diff --git a/emacs.rc b/emacs.rc
index c78e10c..2211548 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,7 +1,6 @@
#!/sbin/runscript
# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
-# $Id$
: ${EMACS:=/usr/bin/emacs}
: ${EMACSCLIENT:=/usr/bin/emacsclient}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2012-07-21 9:01 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2012-07-21 9:01 UTC (permalink / raw
To: gentoo-commits
commit: 6536eacb7efcc735e16383d71019e5eb2793a7ac
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 21 08:52:38 2012 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jul 21 08:52:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=6536eacb
Update copyright years.
---
10emacs-daemon-gentoo.el | 2 +-
ChangeLog | 2 +-
Makefile | 2 +-
emacs-stop.sh | 2 +-
emacs-wrapper.sh | 2 +-
emacs.rc | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 871e431..2afb3d8 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,6 +1,6 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2011 Gentoo Foundation
+;; Copyright 2008-2012 Gentoo Foundation
;; Distributed under the terms of the GNU General Public License v2 or later
(and
diff --git a/ChangeLog b/ChangeLog
index 0af36d3..ae24eec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -199,5 +199,5 @@
* emacs.rc, 10emacs-daemon-gentoo.el, Makefile: New files.
-Copyright 2008-2011 Gentoo Foundation
+Copyright 2008-2012 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
diff --git a/Makefile b/Makefile
index dab5cea..b4c0459 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 68c5453..fececd7 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Lisp expression to be evaluated when stopping Emacs.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index eea8e75..8abf741 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Save output in a temporary file and display in case of error
diff --git a/emacs.rc b/emacs.rc
index 2211548..67ddd2d 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 2008-2011 Gentoo Foundation
+# Copyright 2008-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2012-07-21 9:01 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2012-07-21 9:01 UTC (permalink / raw
To: gentoo-commits
commit: 6fd391d1047fdb8295ef2dd871439be780afd939
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 21 08:56:24 2012 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jul 21 08:56:24 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=6fd391d1
Version 0.19 released.
---
ChangeLog | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ae24eec..452eaa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-21 Ulrich Müller <ulm@gentoo.org>
+
+ * Version 0.19 released.
+
2011-12-10 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (checkconfig, start): Drop baselayout-1 compatibility.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-03-23 22:08 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-03-23 22:08 UTC (permalink / raw
To: gentoo-commits
commit: 512371dee097c2bcff99b04793733e2868730958
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:42:21 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:42:21 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=512371de
Update copyright years.
---
ChangeLog | 2 +-
Makefile | 2 +-
emacs.rc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b284e70..9eb8e9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -211,5 +211,5 @@
* emacs.rc, 10emacs-daemon-gentoo.el, Makefile: New files.
-Copyright 2008-2012 Gentoo Foundation
+Copyright 2008-2013 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
diff --git a/Makefile b/Makefile
index 0578d81..4abfa5c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2012 Gentoo Foundation
+# Copyright 2008-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs.rc b/emacs.rc
index 8bef6da..3ab53f7 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 2008-2012 Gentoo Foundation
+# Copyright 2008-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-03-23 22:08 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-03-23 22:08 UTC (permalink / raw
To: gentoo-commits
commit: bed97d1e77dd5161fc8513a156e85e334e987ea1
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 11:52:22 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 11:52:22 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=bed97d1e
Specify retry schedule for stop.
* emacs.rc (stop): Specify retry schedule for start-stop-daemon:
Send SIGTERM, wait for EMACS_TIMEOUT, then send SIGKILL.
---
ChangeLog | 5 +++++
emacs.rc | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 452eaa0..80137ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-23 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc (stop): Specify retry schedule for start-stop-daemon:
+ Send SIGTERM, wait for EMACS_TIMEOUT, then send SIGKILL.
+
2012-07-21 Ulrich Müller <ulm@gentoo.org>
* Version 0.19 released.
diff --git a/emacs.rc b/emacs.rc
index 67ddd2d..8bef6da 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -74,7 +74,7 @@ stop() {
fi
ebegin "Stopping Emacs daemon for user ${USER}"
- start-stop-daemon --stop \
+ start-stop-daemon --stop --retry "TERM/${EMACS_TIMEOUT}/KILL/5" \
--user "${USER}" --pidfile "${PIDFILE}" --exec "${EMACS}"
eend $?
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-03-23 22:08 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-03-23 22:08 UTC (permalink / raw
To: gentoo-commits
commit: d4b4b87a97d192a73f376269f13e94ccbe80cbac
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:43:13 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:43:13 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=d4b4b87a
Version 0.20 released.
---
ChangeLog | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9eb8e9e..1e1b769 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2013-03-23 Ulrich Müller <ulm@gentoo.org>
+ * Version 0.20 released.
+
* Makefile (dist): Use xz for compression.
(clean): Remove *.xz.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-03-23 22:08 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-03-23 22:08 UTC (permalink / raw
To: gentoo-commits
commit: b26bc78b855b9817ea14620c852d933c8cb2c199
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:39:58 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:39:58 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=b26bc78b
Use xz for compression.
* Makefile (dist): Use xz for compression.
(clean): Remove *.xz.
---
ChangeLog | 3 +++
Makefile | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 80137ef..b284e70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-03-23 Ulrich Müller <ulm@gentoo.org>
+ * Makefile (dist): Use xz for compression.
+ (clean): Remove *.xz.
+
* emacs.rc (stop): Specify retry schedule for start-stop-daemon:
Send SIGTERM, wait for EMACS_TIMEOUT, then send SIGKILL.
diff --git a/Makefile b/Makefile
index b4c0459..0578d81 100644
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,8 @@ DISTFILES = README ChangeLog emacs.rc emacs.conf emacs-wrapper.sh \
all:
dist: $(DISTFILES)
- tar -cjf $(P).tar.bz2 --transform='s%^%$(P)/%' $^
- tar -tjvf $(P).tar.bz2
+ tar -cJf $(P).tar.xz --transform='s%^%$(P)/%' $^
+ tar -tJvf $(P).tar.xz
clean:
- -rm -f *~ *.tmp *.gz *.bz2
+ -rm -f *~ *.tmp *.xz
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-08-06 19:09 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-08-06 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 4ed06fede86a786d2121ce78a4e7bba467fa5da2
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 4 16:57:29 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 4 16:57:29 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=4ed06fed
Comment changes; refer to the emacs binary in lower case.
---
emacs.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/emacs.conf b/emacs.conf
index edd29bd..dce7d78 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -2,7 +2,7 @@
# This can also be used as multiplexed configuration, i.e. runscript
# looks for both /etc/conf.d/emacs and /etc/conf.d/emacs.<user>.
-# Absolute path to the Emacs and emacsclient binaries
+# Absolute path to the emacs and emacsclient binaries
#EMACS="/usr/bin/emacs"
#EMACSCLIENT="/usr/bin/emacsclient"
@@ -19,7 +19,7 @@
# Timeout (in seconds) to wait for the daemon to detach
#EMACS_TIMEOUT="30"
-# Options to pass to Emacs. Don't remove "--daemon".
+# Options to pass to emacs. Don't remove "--daemon".
#EMACS_OPTS="--daemon"
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2013-08-06 19:09 Ulrich Mueller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Mueller @ 2013-08-06 19:09 UTC (permalink / raw
To: gentoo-commits
commit: f7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 6 19:09:42 2013 +0000
Commit: Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 6 19:09:42 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=f7ce8ab1
New variable EMACSCLIENT_OPTS.
* emacs-stop.sh: New variable EMACSCLIENT_OPTS, allows to specify
additional options for emacsclient.
* emacs.rc (stop): Export EMACSCLIENT_OPTS to environment.
* emacs.conf: Add explanation for new variable.
---
ChangeLog | 7 +++++++
emacs-stop.sh | 3 ++-
emacs.conf | 4 ++++
emacs.rc | 3 ++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1e1b769..75c0d8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-08-06 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs-stop.sh: New variable EMACSCLIENT_OPTS, allows to specify
+ additional options for emacsclient.
+ * emacs.rc (stop): Export EMACSCLIENT_OPTS to environment.
+ * emacs.conf: Add explanation for new variable.
+
2013-03-23 Ulrich Müller <ulm@gentoo.org>
* Version 0.20 released.
diff --git a/emacs-stop.sh b/emacs-stop.sh
index fececd7..58aaeef 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -6,7 +6,8 @@
# Any additional commands should preferably be added to kill-emacs-hook.
EMACS_LISP_EXPR="(kill-emacs)"
-su "${USER}" -c "${EMACSCLIENT} --eval \"${EMACS_LISP_EXPR}\"" \
+su "${USER}" \
+ -c "${EMACSCLIENT} ${EMACSCLIENT_OPTS} --eval \"${EMACS_LISP_EXPR}\"" \
</dev/null &>/dev/null &
pid=$!
diff --git a/emacs.conf b/emacs.conf
index dce7d78..4c7549c 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -22,6 +22,10 @@
# Options to pass to emacs. Don't remove "--daemon".
#EMACS_OPTS="--daemon"
+# Options to pass to emacsclient. This variable is only used if you
+# call emacsclient from a custom stop script, see EMACS_STOP above.
+#EMACSCLIENT_OPTS=""
+
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
# this as the user's login shell. If (explicitly set to) empty, then
# the shell field from the passwd file is used.
diff --git a/emacs.rc b/emacs.rc
index 3ab53f7..b7ee39c 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -67,7 +67,8 @@ start() {
stop() {
# Optionally, call a custom script before stopping.
if [ "${EMACS_STOP}" ] && [ -x "${EMACS_STOP}" ]; then
- export USER PIDFILE EMACS EMACSCLIENT EMACS_TIMEOUT EMACS_DEBUG
+ export USER PIDFILE EMACS EMACS_TIMEOUT EMACS_DEBUG
+ export EMACSCLIENT EMACSCLIENT_OPTS
ebegin "Calling Emacs stop script for ${USER}"
"${EMACS_STOP}"
eend $? || return
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2014-02-02 11:29 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2014-02-02 11:29 UTC (permalink / raw
To: gentoo-commits
commit: d54ebf1d9b4616d26a38d71320c7f4a4118ff7dd
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 2 10:53:04 2014 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 2 10:53:04 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=d54ebf1d
Update copyright years.
---
10emacs-daemon-gentoo.el | 2 +-
ChangeLog | 2 +-
Makefile | 2 +-
emacs-stop.sh | 2 +-
emacs-wrapper.sh | 2 +-
emacs.rc | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 2afb3d8..45cea39 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,6 +1,6 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2012 Gentoo Foundation
+;; Copyright 2008-2014 Gentoo Foundation
;; Distributed under the terms of the GNU General Public License v2 or later
(and
diff --git a/ChangeLog b/ChangeLog
index 75c0d8f..5ed9b28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -220,5 +220,5 @@
* emacs.rc, 10emacs-daemon-gentoo.el, Makefile: New files.
-Copyright 2008-2013 Gentoo Foundation
+Copyright 2008-2014 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
diff --git a/Makefile b/Makefile
index 4abfa5c..1677ed7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2013 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 58aaeef..3b111b5 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2012 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Lisp expression to be evaluated when stopping Emacs.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index 8abf741..ab9a5fb 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2012 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Save output in a temporary file and display in case of error
diff --git a/emacs.rc b/emacs.rc
index b7ee39c..702de56 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 2008-2013 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2014-02-02 11:29 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2014-02-02 11:29 UTC (permalink / raw
To: gentoo-commits
commit: 5d11d4dd5522c9c4389ba219aeaa333de6e67406
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 2 10:54:40 2014 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 2 10:54:40 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=5d11d4dd
Version 0.21 released.
---
ChangeLog | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 5ed9b28..5e32173 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-02 Ulrich Müller <ulm@gentoo.org>
+
+ * Version 0.21 released.
+
2013-08-06 Ulrich Müller <ulm@gentoo.org>
* emacs-stop.sh: New variable EMACSCLIENT_OPTS, allows to specify
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2016-05-06 13:20 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2016-05-06 13:20 UTC (permalink / raw
To: gentoo-commits
commit: 7342873eb24c5d7c4ca4e4bda4230b0df402dff0
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 6 13:05:56 2016 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri May 6 13:05:56 2016 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=7342873e
Update copyright years.
10emacs-daemon-gentoo.el | 2 +-
ChangeLog | 2 +-
Makefile | 2 +-
emacs-stop.sh | 2 +-
emacs-wrapper.sh | 2 +-
emacs.rc | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 45cea39..462ca79 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,6 +1,6 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2014 Gentoo Foundation
+;; Copyright 2008-2016 Gentoo Foundation
;; Distributed under the terms of the GNU General Public License v2 or later
(and
diff --git a/ChangeLog b/ChangeLog
index 5e32173..6e53e42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -224,5 +224,5 @@
* emacs.rc, 10emacs-daemon-gentoo.el, Makefile: New files.
-Copyright 2008-2014 Gentoo Foundation
+Copyright 2008-2016 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
diff --git a/Makefile b/Makefile
index 1677ed7..738fd7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2014 Gentoo Foundation
+# Copyright 2008-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 3b111b5..574230d 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2014 Gentoo Foundation
+# Copyright 2008-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Lisp expression to be evaluated when stopping Emacs.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index ab9a5fb..da21d72 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2014 Gentoo Foundation
+# Copyright 2008-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
# Save output in a temporary file and display in case of error
diff --git a/emacs.rc b/emacs.rc
index 702de56..651255d 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 2008-2014 Gentoo Foundation
+# Copyright 2008-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2016-05-06 13:20 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2016-05-06 13:20 UTC (permalink / raw
To: gentoo-commits
commit: d0a7227898d508370a541901fa7d345d23f9b0de
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 6 13:12:37 2016 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri May 6 13:12:37 2016 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=d0a72278
Version 0.22 released.
ChangeLog | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 6e5a605..3485c9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2016-05-06 Ulrich Müller <ulm@gentoo.org>
+ * Version 0.22 released.
+
* emacs.rc: Update shebang line to /sbin/openrc-run which is used
by new OpenRC versions.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2016-05-06 13:20 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2016-05-06 13:20 UTC (permalink / raw
To: gentoo-commits
commit: 318b154b018c2236f7c4c9e9f7d965485fb54ea0
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 6 13:10:14 2016 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri May 6 13:10:14 2016 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=318b154b
Update shebang line for new OpenRC versions.
* emacs.rc: Update shebang line to /sbin/openrc-run which is used
by new OpenRC versions.
ChangeLog | 5 +++++
emacs-stop.sh | 4 ++--
emacs.conf | 2 +-
emacs.rc | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6e53e42..6e5a605 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-06 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc: Update shebang line to /sbin/openrc-run which is used
+ by new OpenRC versions.
+
2014-02-02 Ulrich Müller <ulm@gentoo.org>
* Version 0.21 released.
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 574230d..0577359 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -20,6 +20,6 @@ done
echo "${0##*/}: timeout waiting for emacsclient" >&2
kill ${pid} 2>/dev/null
-# exit 0: runscript shall continue and (forcibly) kill the emacs process
-# exit 1: runscript shall exit with an error
+# exit 0: openrc-run shall continue and (forcibly) kill the emacs process
+# exit 1: openrc-run shall exit with an error
exit 0
diff --git a/emacs.conf b/emacs.conf
index 4c7549c..b6303d8 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -1,5 +1,5 @@
# /etc/conf.d/emacs: config file for /etc/init.d/emacs.<user>
-# This can also be used as multiplexed configuration, i.e. runscript
+# This can also be used as multiplexed configuration, i.e. openrc-run
# looks for both /etc/conf.d/emacs and /etc/conf.d/emacs.<user>.
# Absolute path to the emacs and emacsclient binaries
diff --git a/emacs.rc b/emacs.rc
index 651255d..9fffe02 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 2008-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2016-06-08 6:43 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2016-06-08 6:43 UTC (permalink / raw
To: gentoo-commits
commit: 4ee412a68934c5b07f9813363803ffeaf1ea3c0c
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 8 06:42:27 2016 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun 8 06:42:27 2016 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4ee412a6
Update URL and e-mail address of project.
* README: Update URL and e-mail address of project.
ChangeLog | 4 ++++
README | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3485c9a..ba66948 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-08 Ulrich Müller <ulm@gentoo.org>
+
+ * README: Update URL and e-mail address of project.
+
2016-05-06 Ulrich Müller <ulm@gentoo.org>
* Version 0.22 released.
diff --git a/README b/README
index 2b91b7c..a111878 100644
--- a/README
+++ b/README
@@ -32,8 +32,8 @@ which is extensively commented. You may also create individual
/etc/conf.d/emacs.<username> files for "multiplexed" user
configuration.
-Please contact the Gentoo GNU Emacs team directly through
-<http://bugs.gentoo.org/> (preferred) or by e-mail <emacs@gentoo.org>
+Please contact the Gentoo GNU Emacs team directly through Bugzilla
+https://bugs.gentoo.org/ (preferred) or by e-mail gnu-emacs@gentoo.org
if you have problems, feature requests or bug reports.
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2018-09-16 14:49 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2018-09-16 14:49 UTC (permalink / raw
To: gentoo-commits
commit: 3e7b97ff16261134334e058e1492df90ea9d054c
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 16 14:42:51 2018 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 16 14:42:51 2018 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=3e7b97ff
Update copyright notices to follow the new policy.
10emacs-daemon-gentoo.el | 2 +-
ChangeLog | 1 -
Makefile | 2 +-
emacs-stop.sh | 2 +-
emacs-wrapper.sh | 2 +-
emacs.rc | 2 +-
6 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 462ca79..facee18 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,6 +1,6 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2016 Gentoo Foundation
+;; Copyright 2008-2016 Ulrich Müller
;; Distributed under the terms of the GNU General Public License v2 or later
(and
diff --git a/ChangeLog b/ChangeLog
index ba66948..f16cbd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,5 +235,4 @@
* emacs.rc, 10emacs-daemon-gentoo.el, Makefile: New files.
-Copyright 2008-2016 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2 or later
diff --git a/Makefile b/Makefile
index 738fd7e..56d3fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2016 Gentoo Foundation
+# Copyright 2008-2016 Ulrich Müller and Christian Faulhammer
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 0577359..7635d4e 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2016 Gentoo Foundation
+# Copyright 2008-2016 Ulrich Müller
# Distributed under the terms of the GNU General Public License v2 or later
# Lisp expression to be evaluated when stopping Emacs.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index da21d72..5034727 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2016 Gentoo Foundation
+# Copyright 2008-2016 Ulrich Müller
# Distributed under the terms of the GNU General Public License v2 or later
# Save output in a temporary file and display in case of error
diff --git a/emacs.rc b/emacs.rc
index 9fffe02..e2648f3 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2008-2016 Gentoo Foundation
+# Copyright 2008-2016 Ulrich Müller
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2018-12-09 22:36 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2018-12-09 22:36 UTC (permalink / raw
To: gentoo-commits
commit: 7188c8a7950f250cb1a871d7a847cef7e050a46d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 9 22:32:42 2018 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 9 22:32:42 2018 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=7188c8a7
Use simplified copyright notice for GLEP 76 compliance.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 2 +-
Makefile | 2 +-
emacs-stop.sh | 2 +-
emacs-wrapper.sh | 2 +-
emacs.rc | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index facee18..9ea5ba0 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,6 +1,6 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2016 Ulrich Müller
+;; Copyright 2008-2016 Gentoo Authors
;; Distributed under the terms of the GNU General Public License v2 or later
(and
diff --git a/Makefile b/Makefile
index 56d3fe6..beec1ee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2016 Ulrich Müller and Christian Faulhammer
+# Copyright 2008-2016 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
diff --git a/emacs-stop.sh b/emacs-stop.sh
index 7635d4e..a9ee9bb 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2016 Ulrich Müller
+# Copyright 2008-2016 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
# Lisp expression to be evaluated when stopping Emacs.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index 5034727..f418970 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2008-2016 Ulrich Müller
+# Copyright 2008-2016 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
# Save output in a temporary file and display in case of error
diff --git a/emacs.rc b/emacs.rc
index e2648f3..e70d20b 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2008-2016 Ulrich Müller
+# Copyright 2008-2016 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-05 13:08 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-05 13:08 UTC (permalink / raw
To: gentoo-commits
commit: 1d61333bbe3952cf324b75b44888542401e36851
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 5 12:54:31 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar 5 12:54:31 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=1d61333b
Remove obsolete code
* emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
* emacs-stop.sh: Remove example script.
* 10emacs-daemon-gentoo.el: Sharp-quote function name.
Remove redundant check for daemonp being bound.
* Makefile (DISTFILES): Drop emacs-stop.sh.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 5 ++---
ChangeLog | 8 ++++++++
Makefile | 4 ++--
README | 5 -----
emacs-stop.sh | 25 -------------------------
emacs.conf | 2 +-
emacs.rc | 7 +------
7 files changed, 14 insertions(+), 42 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 9ea5ba0..840166d 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,10 +1,9 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2016 Gentoo Authors
+;; Copyright 2008-2025 Gentoo Authors
;; Distributed under the terms of the GNU General Public License v2 or later
(and
- (fboundp 'daemonp)
(daemonp)
(null after-init-time)
(let* ((file (concat "/var/run/emacs/" (user-login-name) "/emacs.pid"))
@@ -32,4 +31,4 @@
(add-hook 'kill-emacs-hook
`(lambda () (ignore-errors (delete-file ,file))))))
;; Restart the server if signal SIGUSR1 is received.
- (define-key special-event-map [sigusr1] 'server-start)))
+ (define-key special-event-map [sigusr1] #'server-start)))
diff --git a/ChangeLog b/ChangeLog
index f16cbd9..4b18d6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-05 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
+ * emacs-stop.sh: Remove example script.
+ * 10emacs-daemon-gentoo.el: Sharp-quote function name.
+ Remove redundant check for daemonp being bound.
+ * Makefile (DISTFILES): Drop emacs-stop.sh.
+
2016-06-08 Ulrich Müller <ulm@gentoo.org>
* README: Update URL and e-mail address of project.
diff --git a/Makefile b/Makefile
index beec1ee..f180383 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2016 Gentoo Authors
+# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
@@ -7,7 +7,7 @@ PV = $(shell sed '/^[ \t]*\* .*[Vv]ersion/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' \
P = $(PN)-$(PV)
DISTFILES = README ChangeLog emacs.rc emacs.conf emacs-wrapper.sh \
- emacs-stop.sh 10emacs-daemon-gentoo.el
+ 10emacs-daemon-gentoo.el
.PHONY: all dist clean
diff --git a/README b/README
index a111878..4891b0c 100644
--- a/README
+++ b/README
@@ -42,8 +42,3 @@ Authors
Ulrich Müller <ulm@gentoo.org>
Christian Faulhammer <fauli@gentoo.org> (documentation)
-
-
-Local Variables:
-coding: utf-8
-End:
diff --git a/emacs-stop.sh b/emacs-stop.sh
deleted file mode 100644
index a9ee9bb..0000000
--- a/emacs-stop.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# Copyright 2008-2016 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2 or later
-
-# Lisp expression to be evaluated when stopping Emacs.
-# Any additional commands should preferably be added to kill-emacs-hook.
-EMACS_LISP_EXPR="(kill-emacs)"
-
-su "${USER}" \
- -c "${EMACSCLIENT} ${EMACSCLIENT_OPTS} --eval \"${EMACS_LISP_EXPR}\"" \
- </dev/null &>/dev/null &
-pid=$!
-
-# Wait for emacsclient
-for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do
- sleep 1
- kill -0 ${pid} 2>/dev/null || exit 0
-done
-
-echo "${0##*/}: timeout waiting for emacsclient" >&2
-kill ${pid} 2>/dev/null
-
-# exit 0: openrc-run shall continue and (forcibly) kill the emacs process
-# exit 1: openrc-run shall exit with an error
-exit 0
diff --git a/emacs.conf b/emacs.conf
index b6303d8..0733e20 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -13,7 +13,7 @@
#EMACS_START="/usr/libexec/emacs/emacs-wrapper.sh"
# Optionally, you may execute a custom script before stopping the
-# daemon. See /usr/libexec/emacs/emacs-stop.sh for an example. #246462
+# daemon. #246462
#EMACS_STOP=""
# Timeout (in seconds) to wait for the daemon to detach
diff --git a/emacs.rc b/emacs.rc
index e70d20b..cedf3c4 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2008-2016 Gentoo Authors
+# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
@@ -20,11 +20,6 @@ depend() {
}
checkconfig() {
- if [ "${RC_VERSION:-0}" = "0" ]; then
- eerror "This script cannot be used for baselayout-1."
- return 1
- fi
-
if [ "${USER}" = "${RC_SVCNAME}" ]; then
eerror "You have to create an init script for each user:"
eerror "ln -s emacs /etc/init.d/emacs.<user>"
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-05 13:08 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-05 13:08 UTC (permalink / raw
To: gentoo-commits
commit: f2551f65034bf63298f1a3787bf60bf92821487e
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 5 13:05:35 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar 5 13:05:35 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=f2551f65
Use --fg-daemon instead of --daemon, let OpenRC handle the rest
* emacs.rc (EMACS_OPTS): Use --fg-daemon instead of --daemon.
(EMACSCLIENT, EMACS_TIMEOUT): Remove.
(start, stop): Don't export EMACS_TIMEOUT, EMACS_DEBUG,
EMACSCLIENT and EMACSCLIENT_OPTS.
(start): Call start-stop-daemon with options --background and
--make-pidfile. Unset XDG_RUNTIME_DIR because it points to the
directory of the superuser and is not writable for us.
* emacs.conf: Update accordingly.
* emacs-wrapper.sh: Simplify; keep only the login shell wrapper.
* 10emacs-daemon-gentoo.el: Don't write the pid file, as this is
now handled by OpenRC's start-stop-daemon command.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 16 ++++------------
ChangeLog | 12 ++++++++++++
emacs-wrapper.sh | 26 +-------------------------
emacs.conf | 19 ++++---------------
emacs.rc | 15 ++++++++-------
5 files changed, 29 insertions(+), 59 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 840166d..b878eb4 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -14,21 +14,13 @@
(insert-file-contents-literally file nil 0 100)
(and (looking-at "[0-9]+")
(string-to-number (match-string 0))))))))
- (cond
- ((and (integerp pid)
- (string-match
- "emacs" (or (cdr (assq 'comm (process-attributes pid))) ""))
- (/= pid (emacs-pid)))
+ (when (and (integerp pid)
+ (string-match
+ "emacs" (or (cdr (assq 'comm (process-attributes pid))) ""))
+ (/= pid (emacs-pid)))
;; If another Emacs daemon is already running for this user,
;; then we would steal its server socket. So we better die.
(message "Another Emacs daemon is already running at process id %d" pid)
(kill-emacs))
- ((file-writable-p file)
- ;; Write process id to file
- (with-temp-file file
- (insert (number-to-string (emacs-pid)) "\n"))
- ;; Remove file on exit
- (add-hook 'kill-emacs-hook
- `(lambda () (ignore-errors (delete-file ,file))))))
;; Restart the server if signal SIGUSR1 is received.
(define-key special-event-map [sigusr1] #'server-start)))
diff --git a/ChangeLog b/ChangeLog
index 4b18d6f..71c0d78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2025-03-05 Ulrich Müller <ulm@gentoo.org>
+ * emacs.rc (EMACS_OPTS): Use --fg-daemon instead of --daemon.
+ (EMACSCLIENT, EMACS_TIMEOUT): Remove.
+ (start, stop): Don't export EMACS_TIMEOUT, EMACS_DEBUG,
+ EMACSCLIENT and EMACSCLIENT_OPTS.
+ (start): Call start-stop-daemon with options --background and
+ --make-pidfile. Unset XDG_RUNTIME_DIR because it points to the
+ directory of the superuser and is not writable for us.
+ * emacs.conf: Update accordingly.
+ * emacs-wrapper.sh: Simplify; keep only the login shell wrapper.
+ * 10emacs-daemon-gentoo.el: Don't write the pid file, as this is
+ now handled by OpenRC's start-stop-daemon command.
+
* emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
* emacs-stop.sh: Remove example script.
* 10emacs-daemon-gentoo.el: Sharp-quote function name.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index f418970..22c8cd9 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,27 +1,3 @@
#!/bin/bash
-# Copyright 2008-2016 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2 or later
-
-# Save output in a temporary file and display in case of error
-logfile=$(mktemp ${TMPDIR:-/tmp}/emacs.log.XXXXXX)
-trap "rm -f '${logfile}'" EXIT
-
# Start Emacs with a login shell wrapper to read the user's profile
-exec -l "${SHELL}" -c "exec \"${EMACS}\" $*" </dev/null &>"${logfile}" &
-pid=$!
-
-# Wait for Emacs daemon to detach
-for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do
- sleep 1
- if ! kill -0 ${pid} 2>/dev/null; then
- wait ${pid} # get exit status
- status=$?
- [[ ${status} -ne 0 || -n ${EMACS_DEBUG} ]] && cat "${logfile}"
- exit ${status}
- fi
-done
-
-cat "${logfile}"
-echo "${0##*/}: timeout waiting for ${EMACS} to detach" >&2
-kill ${pid} $(pgrep -P ${pid}) 2>/dev/null
-exit 1
+exec -l "${SHELL}" -c "exec \"${EMACS}\" $*"
diff --git a/emacs.conf b/emacs.conf
index 0733e20..46975e0 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -2,9 +2,11 @@
# This can also be used as multiplexed configuration, i.e. openrc-run
# looks for both /etc/conf.d/emacs and /etc/conf.d/emacs.<user>.
-# Absolute path to the emacs and emacsclient binaries
+# Absolute path to the emacs binary
#EMACS="/usr/bin/emacs"
-#EMACSCLIENT="/usr/bin/emacsclient"
+
+# Options to pass to emacs. Don't remove "--fg-daemon".
+#EMACS_OPTS="--fg-daemon"
# Emacs detaches and exits the parent process only after loading the
# user's .emacs (initialisation). Anything may happen there, so we use
@@ -16,20 +18,7 @@
# daemon. #246462
#EMACS_STOP=""
-# Timeout (in seconds) to wait for the daemon to detach
-#EMACS_TIMEOUT="30"
-
-# Options to pass to emacs. Don't remove "--daemon".
-#EMACS_OPTS="--daemon"
-
-# Options to pass to emacsclient. This variable is only used if you
-# call emacsclient from a custom stop script, see EMACS_STOP above.
-#EMACSCLIENT_OPTS=""
-
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
# this as the user's login shell. If (explicitly set to) empty, then
# the shell field from the passwd file is used.
#EMACS_SHELL="/bin/bash"
-
-# Enable additional output for debugging.
-#EMACS_DEBUG=""
diff --git a/emacs.rc b/emacs.rc
index cedf3c4..042935b 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -3,11 +3,9 @@
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
-: ${EMACSCLIENT:=/usr/bin/emacsclient}
-: ${EMACS_OPTS:=--daemon}
+: ${EMACS_OPTS:=--fg-daemon}
: ${EMACS_SHELL=/bin/bash}
: ${EMACS_START:=/usr/libexec/emacs/emacs-wrapper.sh}
-: ${EMACS_TIMEOUT:=30}
USER=${RC_SVCNAME##*.}
PIDFILE_DIR=/var/run/emacs/${USER}
PIDFILE=${PIDFILE_DIR}/emacs.pid
@@ -50,10 +48,14 @@ start() {
SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
/etc/passwd)}
- export SHELL EMACS EMACS_TIMEOUT EMACS_DEBUG
+ export SHELL EMACS
+
+ # XDG_RUNTIME_DIR points to /run/user/0 which is not writable for us
+ # Unset it, otherwise Emacs would try to create its server socket there
+ unset XDG_RUNTIME_DIR
ebegin "Starting Emacs daemon for user ${USER}"
- start-stop-daemon --start \
+ start-stop-daemon --start --background --make-pidfile \
--user "${USER}" --pidfile "${PIDFILE}" --chdir "${home}" \
--exec "${EMACS_START}" -- ${EMACS_OPTS}
eend $?
@@ -62,8 +64,7 @@ start() {
stop() {
# Optionally, call a custom script before stopping.
if [ "${EMACS_STOP}" ] && [ -x "${EMACS_STOP}" ]; then
- export USER PIDFILE EMACS EMACS_TIMEOUT EMACS_DEBUG
- export EMACSCLIENT EMACSCLIENT_OPTS
+ export USER PIDFILE EMACS
ebegin "Calling Emacs stop script for ${USER}"
"${EMACS_STOP}"
eend $? || return
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-05 13:36 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-05 13:36 UTC (permalink / raw
To: gentoo-commits
commit: 4679ffa22311bbbff28e2a8caeb694a5b09c7c3c
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 5 13:05:35 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar 5 13:35:10 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4679ffa2
Use --fg-daemon instead of --daemon, let OpenRC handle the rest
* emacs.rc (EMACS_OPTS): Use --fg-daemon instead of --daemon.
(EMACSCLIENT): Remove.
(start, stop): Don't export EMACS_DEBUG, EMACSCLIENT and
EMACSCLIENT_OPTS.
(start): Call start-stop-daemon with options --background and
--make-pidfile. Unset XDG_RUNTIME_DIR because it points to the
directory of the superuser and is not writable for us.
* emacs.conf: Update accordingly.
* emacs-wrapper.sh: Simplify; keep only the login shell wrapper.
* 10emacs-daemon-gentoo.el: Don't write the pid file, as this is
now handled by OpenRC's start-stop-daemon command.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 16 ++++------------
ChangeLog | 12 ++++++++++++
emacs-wrapper.sh | 26 +-------------------------
emacs.conf | 18 +++++-------------
emacs.rc | 14 ++++++++------
5 files changed, 30 insertions(+), 56 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 840166d..b878eb4 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -14,21 +14,13 @@
(insert-file-contents-literally file nil 0 100)
(and (looking-at "[0-9]+")
(string-to-number (match-string 0))))))))
- (cond
- ((and (integerp pid)
- (string-match
- "emacs" (or (cdr (assq 'comm (process-attributes pid))) ""))
- (/= pid (emacs-pid)))
+ (when (and (integerp pid)
+ (string-match
+ "emacs" (or (cdr (assq 'comm (process-attributes pid))) ""))
+ (/= pid (emacs-pid)))
;; If another Emacs daemon is already running for this user,
;; then we would steal its server socket. So we better die.
(message "Another Emacs daemon is already running at process id %d" pid)
(kill-emacs))
- ((file-writable-p file)
- ;; Write process id to file
- (with-temp-file file
- (insert (number-to-string (emacs-pid)) "\n"))
- ;; Remove file on exit
- (add-hook 'kill-emacs-hook
- `(lambda () (ignore-errors (delete-file ,file))))))
;; Restart the server if signal SIGUSR1 is received.
(define-key special-event-map [sigusr1] #'server-start)))
diff --git a/ChangeLog b/ChangeLog
index 4b18d6f..8d3df52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2025-03-05 Ulrich Müller <ulm@gentoo.org>
+ * emacs.rc (EMACS_OPTS): Use --fg-daemon instead of --daemon.
+ (EMACSCLIENT): Remove.
+ (start, stop): Don't export EMACS_DEBUG, EMACSCLIENT and
+ EMACSCLIENT_OPTS.
+ (start): Call start-stop-daemon with options --background and
+ --make-pidfile. Unset XDG_RUNTIME_DIR because it points to the
+ directory of the superuser and is not writable for us.
+ * emacs.conf: Update accordingly.
+ * emacs-wrapper.sh: Simplify; keep only the login shell wrapper.
+ * 10emacs-daemon-gentoo.el: Don't write the pid file, as this is
+ now handled by OpenRC's start-stop-daemon command.
+
* emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
* emacs-stop.sh: Remove example script.
* 10emacs-daemon-gentoo.el: Sharp-quote function name.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index f418970..22c8cd9 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -1,27 +1,3 @@
#!/bin/bash
-# Copyright 2008-2016 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2 or later
-
-# Save output in a temporary file and display in case of error
-logfile=$(mktemp ${TMPDIR:-/tmp}/emacs.log.XXXXXX)
-trap "rm -f '${logfile}'" EXIT
-
# Start Emacs with a login shell wrapper to read the user's profile
-exec -l "${SHELL}" -c "exec \"${EMACS}\" $*" </dev/null &>"${logfile}" &
-pid=$!
-
-# Wait for Emacs daemon to detach
-for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do
- sleep 1
- if ! kill -0 ${pid} 2>/dev/null; then
- wait ${pid} # get exit status
- status=$?
- [[ ${status} -ne 0 || -n ${EMACS_DEBUG} ]] && cat "${logfile}"
- exit ${status}
- fi
-done
-
-cat "${logfile}"
-echo "${0##*/}: timeout waiting for ${EMACS} to detach" >&2
-kill ${pid} $(pgrep -P ${pid}) 2>/dev/null
-exit 1
+exec -l "${SHELL}" -c "exec \"${EMACS}\" $*"
diff --git a/emacs.conf b/emacs.conf
index 0733e20..b962fd9 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -2,9 +2,11 @@
# This can also be used as multiplexed configuration, i.e. openrc-run
# looks for both /etc/conf.d/emacs and /etc/conf.d/emacs.<user>.
-# Absolute path to the emacs and emacsclient binaries
+# Absolute path to the emacs binary
#EMACS="/usr/bin/emacs"
-#EMACSCLIENT="/usr/bin/emacsclient"
+
+# Options to pass to emacs. Don't remove "--fg-daemon".
+#EMACS_OPTS="--fg-daemon"
# Emacs detaches and exits the parent process only after loading the
# user's .emacs (initialisation). Anything may happen there, so we use
@@ -16,20 +18,10 @@
# daemon. #246462
#EMACS_STOP=""
-# Timeout (in seconds) to wait for the daemon to detach
+# Timeout (in seconds) to wait for termination of the daemon
#EMACS_TIMEOUT="30"
-# Options to pass to emacs. Don't remove "--daemon".
-#EMACS_OPTS="--daemon"
-
-# Options to pass to emacsclient. This variable is only used if you
-# call emacsclient from a custom stop script, see EMACS_STOP above.
-#EMACSCLIENT_OPTS=""
-
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
# this as the user's login shell. If (explicitly set to) empty, then
# the shell field from the passwd file is used.
#EMACS_SHELL="/bin/bash"
-
-# Enable additional output for debugging.
-#EMACS_DEBUG=""
diff --git a/emacs.rc b/emacs.rc
index cedf3c4..449e45b 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -3,8 +3,7 @@
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
-: ${EMACSCLIENT:=/usr/bin/emacsclient}
-: ${EMACS_OPTS:=--daemon}
+: ${EMACS_OPTS:=--fg-daemon}
: ${EMACS_SHELL=/bin/bash}
: ${EMACS_START:=/usr/libexec/emacs/emacs-wrapper.sh}
: ${EMACS_TIMEOUT:=30}
@@ -50,10 +49,14 @@ start() {
SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
/etc/passwd)}
- export SHELL EMACS EMACS_TIMEOUT EMACS_DEBUG
+ export SHELL EMACS
+
+ # XDG_RUNTIME_DIR points to /run/user/0 which is not writable for us
+ # Unset it, otherwise Emacs would try to create its server socket there
+ unset XDG_RUNTIME_DIR
ebegin "Starting Emacs daemon for user ${USER}"
- start-stop-daemon --start \
+ start-stop-daemon --start --background --make-pidfile \
--user "${USER}" --pidfile "${PIDFILE}" --chdir "${home}" \
--exec "${EMACS_START}" -- ${EMACS_OPTS}
eend $?
@@ -62,8 +65,7 @@ start() {
stop() {
# Optionally, call a custom script before stopping.
if [ "${EMACS_STOP}" ] && [ -x "${EMACS_STOP}" ]; then
- export USER PIDFILE EMACS EMACS_TIMEOUT EMACS_DEBUG
- export EMACSCLIENT EMACSCLIENT_OPTS
+ export USER PIDFILE EMACS EMACS_TIMEOUT
ebegin "Calling Emacs stop script for ${USER}"
"${EMACS_STOP}"
eend $? || return
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-05 15:56 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-05 15:56 UTC (permalink / raw
To: gentoo-commits
commit: 9194427d20f8472106acc8a1c540d033abed6f34
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 5 15:54:25 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar 5 15:54:25 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=9194427d
Version 0.23 released
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ChangeLog | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8d3df52..82c0f88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2025-03-05 Ulrich Müller <ulm@gentoo.org>
+ * Version 0.23 released.
+
* emacs.rc (EMACS_OPTS): Use --fg-daemon instead of --daemon.
(EMACSCLIENT): Remove.
(start, stop): Don't export EMACS_DEBUG, EMACSCLIENT and
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-07 16:58 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-07 16:58 UTC (permalink / raw
To: gentoo-commits
commit: 4c751e364e093f4632240fc30de89d2e34f616da
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 7 16:57:43 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 7 16:57:43 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=4c751e36
Make running Emacs more robust
* emacs.rc (checkconfig): Make running Emacs more robust.
Taken from elisp-common.eclass.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ChangeLog | 5 +++++
emacs.rc | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 82c0f88..bb62705 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-07 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.rc (checkconfig): Make running Emacs more robust.
+ Taken from elisp-common.eclass.
+
2025-03-05 Ulrich Müller <ulm@gentoo.org>
* Version 0.23 released.
diff --git a/emacs.rc b/emacs.rc
index 449e45b..35a76f9 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -30,8 +30,12 @@ checkconfig() {
return 1
fi
- local has_daemon=$(${EMACS} -batch -q --no-site-file \
- --eval "(princ (fboundp 'daemonp))")
+ # EMACS could be a microemacs variant that ignores the -batch option
+ # and would therefore hang, waiting for user interaction.
+ # Redirecting stdin and unsetting TERM and DISPLAY will cause most
+ # of them to exit with an error.
+ local has_daemon=$(unset TERM DISPLAY; ${EMACS} -batch -q --no-site-file \
+ --eval "(princ (fboundp 'daemonp))" </dev/null)
if [ "${has_daemon}" != t ]; then
eerror "${EMACS} does not support running as a daemon"
return 1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: /
@ 2025-03-09 20:48 Ulrich Müller
0 siblings, 0 replies; 24+ messages in thread
From: Ulrich Müller @ 2025-03-09 20:48 UTC (permalink / raw
To: gentoo-commits
commit: 0381452423e624e26fc554f759ea84d6f47a8143
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 9 19:39:22 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 9 19:39:22 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=03814524
Wrapper and site-init moved to emacs-common
* emacs-wrapper.sh:
* 10emacs-daemon-gentoo.el: Files removed. These have been moved
to the emacs-common package.
* Makefile (DISTFILES): Updated.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 26 --------------------------
ChangeLog | 7 +++++++
Makefile | 3 +--
emacs-wrapper.sh | 3 ---
emacs.conf | 6 ++----
emacs.rc | 42 +++++++++++++++++++++---------------------
6 files changed, 31 insertions(+), 56 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
deleted file mode 100644
index b878eb4..0000000
--- a/10emacs-daemon-gentoo.el
+++ /dev/null
@@ -1,26 +0,0 @@
-;;; emacs-daemon site-lisp configuration
-
-;; Copyright 2008-2025 Gentoo Authors
-;; Distributed under the terms of the GNU General Public License v2 or later
-
-(and
- (daemonp)
- (null after-init-time)
- (let* ((file (concat "/var/run/emacs/" (user-login-name) "/emacs.pid"))
- (pid (if (file-readable-p file)
- ;; Get process id from file
- (with-temp-buffer
- (ignore-errors
- (insert-file-contents-literally file nil 0 100)
- (and (looking-at "[0-9]+")
- (string-to-number (match-string 0))))))))
- (when (and (integerp pid)
- (string-match
- "emacs" (or (cdr (assq 'comm (process-attributes pid))) ""))
- (/= pid (emacs-pid)))
- ;; If another Emacs daemon is already running for this user,
- ;; then we would steal its server socket. So we better die.
- (message "Another Emacs daemon is already running at process id %d" pid)
- (kill-emacs))
- ;; Restart the server if signal SIGUSR1 is received.
- (define-key special-event-map [sigusr1] #'server-start)))
diff --git a/ChangeLog b/ChangeLog
index bb62705..35823a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-03-09 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs-wrapper.sh:
+ * 10emacs-daemon-gentoo.el: Files removed. These have been moved
+ to the emacs-common package.
+ * Makefile (DISTFILES): Updated.
+
2025-03-07 Ulrich Müller <ulm@gentoo.org>
* emacs.rc (checkconfig): Make running Emacs more robust.
diff --git a/Makefile b/Makefile
index f180383..2e866ae 100644
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,7 @@ PV = $(shell sed '/^[ \t]*\* .*[Vv]ersion/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' \
ChangeLog)
P = $(PN)-$(PV)
-DISTFILES = README ChangeLog emacs.rc emacs.conf emacs-wrapper.sh \
- 10emacs-daemon-gentoo.el
+DISTFILES = README ChangeLog emacs.rc emacs.conf
.PHONY: all dist clean
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
deleted file mode 100644
index 22c8cd9..0000000
--- a/emacs-wrapper.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-# Start Emacs with a login shell wrapper to read the user's profile
-exec -l "${SHELL}" -c "exec \"${EMACS}\" $*"
diff --git a/emacs.conf b/emacs.conf
index b962fd9..54a4880 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -8,10 +8,8 @@
# Options to pass to emacs. Don't remove "--fg-daemon".
#EMACS_OPTS="--fg-daemon"
-# Emacs detaches and exits the parent process only after loading the
-# user's .emacs (initialisation). Anything may happen there, so we use
-# a wrapper script to ensure that the Emacs daemon properly starts.
-# This also executes a login shell to read the user's profile. #246460
+# Wrapper script for starting Emacs. This executes a login shell,
+# in order to read the user's profile. #246460
#EMACS_START="/usr/libexec/emacs/emacs-wrapper.sh"
# Optionally, you may execute a custom script before stopping the
diff --git a/emacs.rc b/emacs.rc
index 35a76f9..8302aa8 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -2,11 +2,11 @@
# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
-: ${EMACS:=/usr/bin/emacs}
-: ${EMACS_OPTS:=--fg-daemon}
-: ${EMACS_SHELL=/bin/bash}
-: ${EMACS_START:=/usr/libexec/emacs/emacs-wrapper.sh}
-: ${EMACS_TIMEOUT:=30}
+: "${EMACS:=/usr/bin/emacs}"
+: "${EMACS_OPTS:=--fg-daemon}"
+: "${EMACS_SHELL=/bin/bash}"
+: "${EMACS_START:=/usr/libexec/emacs/emacs-wrapper.sh}"
+: "${EMACS_TIMEOUT:=30}"
USER=${RC_SVCNAME##*.}
PIDFILE_DIR=/var/run/emacs/${USER}
PIDFILE=${PIDFILE_DIR}/emacs.pid
@@ -20,14 +20,14 @@ depend() {
checkconfig() {
if [ "${USER}" = "${RC_SVCNAME}" ]; then
- eerror "You have to create an init script for each user:"
- eerror "ln -s emacs /etc/init.d/emacs.<user>"
- return 1
+ eerror "You have to create an init script for each user:"
+ eerror "ln -s emacs /etc/init.d/emacs.<user>"
+ return 1
fi
if ! id -u "${USER}" >/dev/null; then
- eerror "${USER}: No such user"
- return 1
+ eerror "${USER}: No such user"
+ return 1
fi
# EMACS could be a microemacs variant that ignores the -batch option
@@ -35,10 +35,10 @@ checkconfig() {
# Redirecting stdin and unsetting TERM and DISPLAY will cause most
# of them to exit with an error.
local has_daemon=$(unset TERM DISPLAY; ${EMACS} -batch -q --no-site-file \
- --eval "(princ (fboundp 'daemonp))" </dev/null)
+ --eval "(princ (fboundp 'daemonp))" </dev/null)
if [ "${has_daemon}" != t ]; then
- eerror "${EMACS} does not support running as a daemon"
- return 1
+ eerror "${EMACS} does not support running as a daemon"
+ return 1
fi
checkpath -d --owner 0 --mode 0755 "${PIDFILE_DIR%/*}"
@@ -52,7 +52,7 @@ start() {
eval home="~${USER}"
SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
- /etc/passwd)}
+ /etc/passwd)}
export SHELL EMACS
# XDG_RUNTIME_DIR points to /run/user/0 which is not writable for us
@@ -61,22 +61,22 @@ start() {
ebegin "Starting Emacs daemon for user ${USER}"
start-stop-daemon --start --background --make-pidfile \
- --user "${USER}" --pidfile "${PIDFILE}" --chdir "${home}" \
- --exec "${EMACS_START}" -- ${EMACS_OPTS}
+ --user "${USER}" --pidfile "${PIDFILE}" --chdir "${home}" \
+ --exec "${EMACS_START}" -- ${EMACS_OPTS}
eend $?
}
stop() {
# Optionally, call a custom script before stopping.
if [ "${EMACS_STOP}" ] && [ -x "${EMACS_STOP}" ]; then
- export USER PIDFILE EMACS EMACS_TIMEOUT
- ebegin "Calling Emacs stop script for ${USER}"
- "${EMACS_STOP}"
- eend $? || return
+ export USER PIDFILE EMACS EMACS_TIMEOUT
+ ebegin "Calling Emacs stop script for ${USER}"
+ "${EMACS_STOP}"
+ eend $? || return
fi
ebegin "Stopping Emacs daemon for user ${USER}"
start-stop-daemon --stop --retry "TERM/${EMACS_TIMEOUT}/KILL/5" \
- --user "${USER}" --pidfile "${PIDFILE}" --exec "${EMACS}"
+ --user "${USER}" --pidfile "${PIDFILE}" --exec "${EMACS}"
eend $?
}
^ permalink raw reply related [flat|nested] 24+ messages in thread
end of thread, other threads:[~2025-03-09 20:48 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 16:58 [gentoo-commits] proj/emacs-tools:emacs-daemon commit in: / Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2025-03-09 20:48 Ulrich Müller
2025-03-05 15:56 Ulrich Müller
2025-03-05 13:36 Ulrich Müller
2025-03-05 13:08 Ulrich Müller
2025-03-05 13:08 Ulrich Müller
2018-12-09 22:36 Ulrich Müller
2018-09-16 14:49 Ulrich Müller
2016-06-08 6:43 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2016-05-06 13:20 Ulrich Müller
2014-02-02 11:29 Ulrich Müller
2014-02-02 11:29 Ulrich Müller
2013-08-06 19:09 Ulrich Mueller
2013-08-06 19:09 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2013-03-23 22:08 Ulrich Mueller
2012-07-21 9:01 Ulrich Mueller
2012-07-21 9:01 Ulrich Mueller
2012-05-06 18:47 Ulrich Mueller
2012-05-06 18:14 Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox