* Emacs configuration
@ 2002-09-30 9:22 arthur.chereau
0 siblings, 0 replies; 19+ messages in thread
From: arthur.chereau @ 2002-09-30 9:22 UTC (permalink / raw)
Hi,
I'm configuring emacs 21.2 and there are some things I can't find any doc about, so I'm
asking you:
- How is it possible to configure the action done by the printer icon ? I'd like it to
call a2ps-buffer.
- How is it possible to force emacs to confirm when killing the *scratch* buffer ?
- Is it possible to change the menu ordering, for instance moving Buffers before Files ?
- Is there any means of having only one emacs process running for all the emacs windows
? I mean, not like emacsclient or gnuserv, but when one calls emacs from the command
line, having emacs spawn a new window like C-x 5 2 but no new process (to speed up the
start). Then, is it possible to have multiple emacs windows that share the same process
but don't share buffers (that is, "independant" windows) ?
- Last, is it possible to put all the configuration files under a ~/.emacs/ directory,
containing the .emacs file and the contents of the ~/ .emacs.d/ directory ?
Thanks !
------------------------------------------
Faites un voeu et puis Voila ! www.voila.fr
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033377809.21117.help-gnu-emacs@gnu.org>
@ 2002-09-30 17:01 ` Jesper Harder
2002-09-30 17:02 ` Kevin Rodgers
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Jesper Harder @ 2002-09-30 17:01 UTC (permalink / raw)
"arthur.chereau" <arthur.chereau@voila.fr> writes:
> I'm configuring emacs 21.2 and there are some things I can't find any
> doc about, so I'm asking you:
>
> - How is it possible to configure the action done by the printer icon?
> I'd like it to call a2ps-buffer.
I don't know the command `a2ps-buffer' -- do you mean `ps-print-buffer'?
You can change the command from `print-buffer' to `ps-print-buffer' like
this:
(setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'ps-print-buffer)
> - How is it possible to force emacs to confirm when killing the
> *scratch* buffer ?
(save-excursion
(set-buffer "*scratch*")
(make-local-variable 'kill-buffer-query-functions)
(setq kill-buffer-query-functions
(list (lambda ()
(if (buffer-modified-p)
(y-or-n-p "Really kill buffer? ")
t)))))
> - Is there any means of having only one emacs process running for all
> the emacs windows ? I mean, not like emacsclient or gnuserv,
Why not? This is exactly what they're meant for.
> - Last, is it possible to put all the configuration files under a
> ~/.emacs/ directory, containing the .emacs file and the contents of
> the ~/ .emacs.d/ directory ?
You can set `user-init-file' in your site-start.el file to tell Emacs
where to look for .emacs.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033377809.21117.help-gnu-emacs@gnu.org>
2002-09-30 17:01 ` Jesper Harder
@ 2002-09-30 17:02 ` Kevin Rodgers
2002-10-01 6:04 ` Evgeny Roubinchtein
2002-10-01 14:57 ` Stefan Monnier <foo@acm.com>
3 siblings, 0 replies; 19+ messages in thread
From: Kevin Rodgers @ 2002-09-30 17:02 UTC (permalink / raw)
arthur.chereau wrote:
> - How is it possible to force emacs to confirm when killing the *scratch* buffer ?
(defun scratch-kill-buffer-query-function ()
(cond ((equal (buffer-name) "*scratch*")
(yes-or-no-p "Do you really want to kill the *scratch* buffer? "))
(t)))
(add-hook 'kill-buffer-query-function 'scratch-kill-buffer-query-function)
--
<a href="mailto:<kevinr@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033377809.21117.help-gnu-emacs@gnu.org>
2002-09-30 17:01 ` Jesper Harder
2002-09-30 17:02 ` Kevin Rodgers
@ 2002-10-01 6:04 ` Evgeny Roubinchtein
2002-10-01 14:57 ` Stefan Monnier <foo@acm.com>
3 siblings, 0 replies; 19+ messages in thread
From: Evgeny Roubinchtein @ 2002-10-01 6:04 UTC (permalink / raw)
>>>>> "AC" == arthur chereau <arthur.chereau> writes:
AC> - Is it possible to change the menu ordering, for instance
AC> moving Buffers before Files ?
You could do that by surgery on the keymap which is the value of the
[menu-bar] entry in the global-map, but that's _really_ ugly,
something like:
(let ((lst (lookup-key global-map [menu-bar]))
(prev nil)
buf-menu
current)
(while lst
(setq current (car lst))
(when (and (listp current) (eq (car current) 'buffer))
(setcdr prev (cdr lst))
(setq buf-menu current))
(setq prev lst
lst (cdr lst)))
(define-key global-map [menu-bar buffer] buf-menu))
Can anyone think of a less ugly alternative?
AC> Is there any means of having only one emacs process running
AC> for all the emacs windows? I mean, not like emacsclient or
AC> gnuserv, but when one calls emacs from the command line,
AC> having emacs spawn a new window like C-x 5 2 but no new
AC> process (to speed up the start).
You would need the emacs process that's already running to run a
server of _some_ kind: otherwise, how would it know to open a new
window? To the best of my knowledge, the only standard servers that
come with Emacs are emacsserv and gnuserv. You could conceivably hack
emacs to react to SIGUSR1, or somesuch, by opening a new window. I
have no idea how hard/easy it would be.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
@ 2002-10-01 13:04 arthur.chereau
0 siblings, 0 replies; 19+ messages in thread
From: arthur.chereau @ 2002-10-01 13:04 UTC (permalink / raw)
Cc: harder
Hi,
Thanks for your answers !
> I don't know the command `a2ps-buffer' -- do you mean `ps-print-buffer'?
a2ps-buffer is from a2ps-print.el. It makes emacs print through a2ps.
You can find it at ftp://ftp.cppsig.org/pub/tools/emacs/
> You can change the command from `print-buffer' to `ps-print-buffer' like
> this:
> (setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'ps-print-buffer)
Unfortunately I get the following error when I try this:
Symbol's function definition is void: setf
In fact I would like to keep the print-buffer and ps-print-buffer commands, but
to attach a2ps-buffer to the printer icon.
> > - How is it possible to force emacs to confirm when killing the
> > *scratch* buffer ?
> (save-excursion
> (set-buffer "*scratch*")
> (make-local-variable 'kill-buffer-query-functions)
> (setq kill-buffer-query-functions
> (list (lambda ()
> (if (buffer-modified-p)
> (y-or-n-p "Really kill buffer? ")
> t)))))
Unfortunately this doesn't work either. When I just call
$ emacs
then type in and C-x C-c, emacs dies without prompting to save the buffer.
I use emacs 21.2 and I've changed
(setq default-major-mode 'text-mode)
(setq initial-major-mode 'text-mode)
but when I use a minimal .emacs only containing your code it's the same, so I
don't understand why it doesn't work.
Maybe it's possible to automatically kill the *scratch* buffer when emacs
starts and replace it with something like a "_scratch_" buffer that would be a
normal text buffer ("_scratch_" being a default name used when emacs is called
without an argument). But I've read that killing the *scratch* buffer may be
dangereous, so I don't know...
> You can set `user-init-file' in your site-start.el file to tell Emacs
> where to look for .emacs.
I've tried to use site-start.el but I think I'm missing something:
First, I'm sure site-start.el is read by emacs (seen with strace and if
something is wrong in site-start.el emacs complains)
I had these lines in my .emacs:
(setq my-emacsdir (expand-file-name "~/.emacs.d"))
(setq recentf-save-file (concat my-emacsdir "recentf"))
(setq save-place-file (concat my-emacsdir "places"))
When I put them in site-start.el they have no effect.
I tried to put some variants of
(setq user-init-file ".emacs.d/.emacs")
in site-start.el, but it didn't work, maybe for the same reason the previous
setq had no effect.
What I would like to do is to change
- the ~/.emacs.d/ directory into ~/.emacs/
- the .emacs location to ~/.emacs/
- the .emacs name into emacs.el
so that everything would be in ~/.emacs/ and the init file would be
~/.emacs/emacs.el
I don't know if emacs can do that.
------------------------------------------
Faites un voeu et puis Voila ! www.voila.fr
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033477527.28155.help-gnu-emacs@gnu.org>
@ 2002-10-01 14:09 ` Jesper Harder
0 siblings, 0 replies; 19+ messages in thread
From: Jesper Harder @ 2002-10-01 14:09 UTC (permalink / raw)
"arthur.chereau" <arthur.chereau@voila.fr> writes:
>> You can change the command from `print-buffer' to `ps-print-buffer'
>> like this:
>
>> (setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'ps-print-buffer)
>
> Unfortunately I get the following error when I try this: Symbol's
> function definition is void: setf
Right, setf is defined in cl, try this:
(require 'cl)
(setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'a2ps-buffer)
> In fact I would like to keep the print-buffer and ps-print-buffer
> commands, but to attach a2ps-buffer to the printer icon.
Yep, that's what it does.
>> > - How is it possible to force emacs to confirm when killing the
>> > *scratch* buffer ?
>
> Unfortunately this doesn't work either. When I just call $ emacs then
> type in and C-x C-c, emacs dies without prompting to save the buffer.
Try this instead:
(defun jh-setup-scratch ()
(with-current-buffer "*scratch*"
(setq buffer-offer-save t)
(make-local-variable 'kill-buffer-query-functions)
(setq kill-buffer-query-functions
(list (lambda ()
(if (buffer-modified-p)
(y-or-n-p "Really kill buffer? ")
t))))))
(add-hook 'emacs-startup-hook 'jh-setup-scratch)
> I tried to put some variants of
> (setq user-init-file ".emacs.d/.emacs")
> in site-start.el, but it didn't work, maybe for the same reason the
> previous setq had no effect.
I think that should be
(setq user-init-file "/path/to/home/.emacs.d/.emacs")
What do you see when you do `C-h v user-init-file'?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033377809.21117.help-gnu-emacs@gnu.org>
` (2 preceding siblings ...)
2002-10-01 6:04 ` Evgeny Roubinchtein
@ 2002-10-01 14:57 ` Stefan Monnier <foo@acm.com>
3 siblings, 0 replies; 19+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-01 14:57 UTC (permalink / raw)
>>>>> "arthur" == arthur chereau <arthur.chereau@voila.fr> writes:
> - Is there any means of having only one emacs process running for all the
> emacs windows ? I mean, not like emacsclient or gnuserv, but when one
> calls emacs from the command line, having emacs spawn a new window like
> C-x 5 2 but no new process (to speed up the start). Then, is it possible
> to have multiple emacs windows that share the same process but don't share
> buffers (that is, "independant" windows) ?
You mean you want to have a separate window per buffer ?
Or do you mean `frame' ?
I use such a setup. For the emacsserver/emacsclient, I just use
(defun sm-server-visit-hook () (pop-to-buffer (current-buffer)))
(add-hook 'server-visit-hook 'sm-server-visit-hook)
it's not perfect because of some odd behavior of the server.el code,
but in Emacs-21.4 it will hopefully work better.
Stefan
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
@ 2002-10-01 15:21 arthur.chereau
0 siblings, 0 replies; 19+ messages in thread
From: arthur.chereau @ 2002-10-01 15:21 UTC (permalink / raw)
Cc: harder
> Right, setf is defined in cl, try this:
>
> (require 'cl)
> (setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'a2ps-buffer)
That works, thanks !
> Try this instead:
> (defun jh-setup-scratch ()
> (with-current-buffer "*scratch*"
> (setq buffer-offer-save t)
> (make-local-variable 'kill-buffer-query-functions)
> (setq kill-buffer-query-functions
> (list (lambda ()
> (if (buffer-modified-p)
> (y-or-n-p "Really kill buffer? ")
> t))))))
>
> (add-hook 'emacs-startup-hook 'jh-setup-scratch)
That works too !
> I think that should be
>
> (setq user-init-file "/path/to/home/.emacs.d/.emacs")
>
> What do you see when you do `C-h v user-init-file'?
It's undefined if .emacs is in ~/.emacs.d/, and if I put 2 .emacs (one in ~/ and one in
~/.emacs.d/), it always says "/home/arthur/.emacs".
What's strange is that strace reports:
stat64("/usr/share/emacs/site-lisp/site-start.el", {st_mode=S_IFREG|0644, st_size=1001,
...}) = 0
open("/usr/share/emacs/site-lisp/site-start.el", O_RDONLY|O_LARGEFILE) = 3
close(3) = 0
stat64("/usr/share/emacs/site-lisp/site-start.el", {st_mode=S_IFREG|0644, st_size=1001,
...}) = 0
open("/usr/share/emacs/site-lisp/site-start.el", O_RDONLY|O_LARGEFILE) = 3
close(3) = 0
stat64("/usr/share/emacs/site-lisp/site-start.el", {st_mode=S_IFREG|0644, st_size=1001,
...}) = 0
open("/usr/share/emacs/site-lisp/site-start.el", O_RDONLY|O_LARGEFILE) = 3
read(3, "(setq user-init-file \"/home/arth"..., 1053) = 1053
close(3) = 0
stat64("/home/arthur/.emacs.elc", 0xbfffeb28) = -1 ENOENT (No such file or directory)
stat64("/home/arthur/.emacs.elc.gz", 0xbfffeb28) = -1 ENOENT (No such file or directory)
stat64("/home/arthur/.emacs.el.gz", 0xbfffeb28) = -1 ENOENT (No such file or directory)
stat64("/home/arthur/.emacs.el", 0xbfffeb28) = -1 ENOENT (No such file or directory)
stat64("/home/arthur/.emacs", {st_mode=S_IFREG|0644, st_size=15632, ...}) = 0
open("/home/arthur/.emacs", O_RDONLY|O_LARGEFILE) = 3
close(3) = 0
site-start.el is:
(setq user-init-file "/home/arthur/.emacs.d/.emacs")
So I think I'm missing something with site-start.el but can't figure out what.
------------------------------------------
Faites un voeu et puis Voila ! www.voila.fr
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Emacs configuration
[not found] <mailman.1033485728.6848.help-gnu-emacs@gnu.org>
@ 2002-10-01 20:45 ` Jesper Harder
0 siblings, 0 replies; 19+ messages in thread
From: Jesper Harder @ 2002-10-01 20:45 UTC (permalink / raw)
"arthur.chereau" <arthur.chereau@voila.fr> writes:
>> What do you see when you do `C-h v user-init-file'?
>
> It's undefined if .emacs is in ~/.emacs.d/, and if I put 2 .emacs (one
> in ~/ and one in ~/.emacs.d/), it always says "/home/arthur/.emacs".
>
> site-start.el is: (setq user-init-file "/home/arthur/.emacs.d/.emacs")
>
> So I think I'm missing something with site-start.el but can't figure
> out what.
Hmm, it doesn't work for me either. It looks like a bug to me unless
someone has a better explanation.
Another way to solve it would be to just alias the emacs command:
alias emacs='emacs -q -l ~/.emacs/.emacs'
^ permalink raw reply [flat|nested] 19+ messages in thread
* emacs configuration
@ 2021-09-30 15:13 Jude DaShiell
2021-09-30 15:56 ` tomas
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Jude DaShiell @ 2021-09-30 15:13 UTC (permalink / raw)
To: help-gnu-emacs
Has emacs got something like an #include directive that can be used as it
is in C? If so, it might be worth using it to tidy up my .emacs file.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:13 emacs configuration Jude DaShiell
@ 2021-09-30 15:56 ` tomas
2021-09-30 16:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: tomas @ 2021-09-30 15:56 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
On Thu, Sep 30, 2021 at 11:13:06AM -0400, Jude DaShiell wrote:
> Has emacs got something like an #include directive that can be used as it
> is in C? If so, it might be worth using it to tidy up my .emacs file.
There is (load ...) or (require ...), depending on what you are trying
to achieve.
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:13 emacs configuration Jude DaShiell
2021-09-30 15:56 ` tomas
@ 2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 17:32 ` 2QdxY4RzWzUUiLuE
2021-09-30 21:49 ` Jean Louis
2021-09-30 16:03 ` 2QdxY4RzWzUUiLuE
2021-09-30 16:38 ` John W Higgins
3 siblings, 2 replies; 19+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-30 15:57 UTC (permalink / raw)
To: help-gnu-emacs
Jude DaShiell wrote:
> Has emacs got something like an #include directive that can
> be used as it is in C? If so, it might be worth using it to
> tidy up my .emacs file.
Split up the source into several files, do `require' and
`provide' in each of them, and `load-file' from the main,
still ~/.emacs file.
If a language needs a preprocessor that's not a good sign.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:13 emacs configuration Jude DaShiell
2021-09-30 15:56 ` tomas
2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-30 16:03 ` 2QdxY4RzWzUUiLuE
2021-09-30 16:38 ` John W Higgins
3 siblings, 0 replies; 19+ messages in thread
From: 2QdxY4RzWzUUiLuE @ 2021-09-30 16:03 UTC (permalink / raw)
To: help-gnu-emacs
On 2021-09-30 at 11:13:06 -0400,
Regarding "emacs configuration,"
Jude DaShiell <jdashiel@panix.com> wrote:
> Has emacs got something like an #include directive that can be used as it
> is in C? If so, it might be worth using it to tidy up my .emacs file.
I think you want load-library.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:56 ` tomas
@ 2021-09-30 16:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 19+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-30 16:05 UTC (permalink / raw)
To: help-gnu-emacs
tomas wrote:
> There is (load ...) or (require ...), depending on what you
> are trying to achieve.
What other people call painful and error-prone refactoring
which has to be done now and then when it has reached the
eruption/meltdown stage ... I call modularity.
I have never had any problem ever with that and why would I?
Or anyone when it's so easy to do ... I honestly don't
understand it. Isn't it much easier to do right than
wrong, even?
(In general I mean. The OP doesn't know how it seems. Then it
is difficult, granted. It sounds like I'm bragging but that's
a joke, I honestly don't understand it.)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:13 emacs configuration Jude DaShiell
` (2 preceding siblings ...)
2021-09-30 16:03 ` 2QdxY4RzWzUUiLuE
@ 2021-09-30 16:38 ` John W Higgins
3 siblings, 0 replies; 19+ messages in thread
From: John W Higgins @ 2021-09-30 16:38 UTC (permalink / raw)
To: help-gnu-emacs
Good Morning,
On Thu, Sep 30, 2021 at 8:44 AM Jude DaShiell <jdashiel@panix.com> wrote:
> Has emacs got something like an #include directive that can be used as it
> is in C? If so, it might be worth using it to tidy up my .emacs file.
>
>
This is what I've used for years - I'm sure it's not elegant or anything
else - but it's served me well.
First I use a ~/.emacs.d/init.el file as opposed to a ~/.emacs file - they
are equivalent[1].
;; Starting point is that load-file-name returns the name of the current
file - so again for me this is ~/.emacs.d/init.el as opposed to ~/.emacs
;; Setup the config dir
(setq dev-emacs-init-file load-file-name)
(setq dev-emacs-config-dir
(file-name-directory dev-emacs-init-file))
;; We now have dev-emacs-config-dir with ~/.emacs.d stored
;; Setup 'init' folder
(setq dev-init-dir
(expand-file-name "init" dev-emacs-config-dir))
;; Now we have dev-init-dir with ~/.emacs.d/init
;; Load all the custom files inside the init dir
;; This loads any file under the ~/.emacs.d/init folder with a file name of
000_blah.el in numerical order.
;; i.e. 001_blah.el loads before 001_foo.el or 002_blah.el
(if (file-exists-p dev-init-dir)
(setq init-files (directory-files dev-init-dir t
"[0-9][0-9][0-9]_.*.el$")))
(dolist (file init-files)
(load file))
;; This allows me to have as many files as my brain feels is appropriate.
John
P.S. I'm very certain I copied this from somewhere at some point. I have no
idea where or when however :)
[1] - https://www.emacswiki.org/emacs/DotEmacsDotD
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-30 17:32 ` 2QdxY4RzWzUUiLuE
2021-09-30 21:49 ` Jean Louis
1 sibling, 0 replies; 19+ messages in thread
From: 2QdxY4RzWzUUiLuE @ 2021-09-30 17:32 UTC (permalink / raw)
To: help-gnu-emacs
On 2021-09-30 at 17:57:11 +0200,
Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> If a language needs a preprocessor that's not a good sign.
Lisp's reader macros, defmacro, and backquote scratch mostly the same
itches as C's preprocessor does.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 17:32 ` 2QdxY4RzWzUUiLuE
@ 2021-09-30 21:49 ` Jean Louis
2021-09-30 22:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 19+ messages in thread
From: Jean Louis @ 2021-09-30 21:49 UTC (permalink / raw)
To: help-gnu-emacs
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-09-30 19:27]:
> Jude DaShiell wrote:
>
> > Has emacs got something like an #include directive that can
> > be used as it is in C? If so, it might be worth using it to
> > tidy up my .emacs file.
>
> Split up the source into several files, do `require' and
> `provide' in each of them, and `load-file' from the main,
> still ~/.emacs file.
>
> If a language needs a preprocessor that's not a good sign.
Not related to discussion, rather to "preprocessor", on my side I am
working with the database. And the database could practically include
certain Emacs Lisp expressions. Those could evolve from multiple
users. That is where preprocessor could be useful on my side as to
include such customized snippets or modified functions for each user
being different. That is currently handled on my side by using
`eval'. Other possible use for preprocessor is to dynamically include
some date, signature, link snippets in the script.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 21:49 ` Jean Louis
@ 2021-09-30 22:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 20:34 ` Jean Louis
0 siblings, 1 reply; 19+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-30 22:11 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> Not related to discussion, rather to "preprocessor", on my
> side I am working with the database. And the database could
> practically include certain Emacs Lisp expressions.
> Those could evolve from multiple users. That is where
> preprocessor could be useful on my side as to include such
> customized snippets or modified functions for each user
> being different. That is currently handled on my side by
> using `eval'. Other possible use for preprocessor is to
> dynamically include some date, signature, link snippets in
> the script.
But can't you do that with different functions and/or
different arguments to the functions?
What's the one thing that makes the
preprocessor indispensible?
I.e. why isn't the "processor" enough?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: emacs configuration
2021-09-30 22:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-10-01 20:34 ` Jean Louis
0 siblings, 0 replies; 19+ messages in thread
From: Jean Louis @ 2021-10-01 20:34 UTC (permalink / raw)
To: help-gnu-emacs
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-10-01 01:14]:
> Jean Louis wrote:
>
> > Not related to discussion, rather to "preprocessor", on my
> > side I am working with the database. And the database could
> > practically include certain Emacs Lisp expressions.
> > Those could evolve from multiple users. That is where
> > preprocessor could be useful on my side as to include such
> > customized snippets or modified functions for each user
> > being different. That is currently handled on my side by
> > using `eval'. Other possible use for preprocessor is to
> > dynamically include some date, signature, link snippets in
> > the script.
>
> But can't you do that with different functions and/or
> different arguments to the functions?
In the above example those can be different functions but they don't
come from file system, they may be different functions for different
users, coming from one or multiple databases, loaded shortly before
the moment of execution, not how it is common to load it longer time
before execution.
Specific example, main programmer does not need necessarily hard code
how an action will appear for the user. The action could be for
example to open PDF file at specific page. The type of PDF has Emacs
Lisp field value which can be customized by the user. Customization is
not on computer's file system, it is in the database.
> What's the one thing that makes the preprocessor indispensible?
In Emacs Lisp files, I don't use pre-processor. I use it rather in
Emacs Lisp snippets stored in the database, of shorter nature, and
text files that include Emacs Lisp. It is similar to Org mode that
expands specific blocks into something else what is otherwise written
in the file, like lists, tables, pictures.
Example is that people's and companies' contact information may
change, but the instruction is there for several people. If contact
information ever changes the instruction document will automatically
update itself because it is pre-processed. Instead of text "Contact
Emamnuel @ 123.COM" it could automatically update itself to "Contact
Emmanual @ xyz.com".
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-10-01 20:34 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-30 15:13 emacs configuration Jude DaShiell
2021-09-30 15:56 ` tomas
2021-09-30 16:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 15:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 17:32 ` 2QdxY4RzWzUUiLuE
2021-09-30 21:49 ` Jean Louis
2021-09-30 22:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 20:34 ` Jean Louis
2021-09-30 16:03 ` 2QdxY4RzWzUUiLuE
2021-09-30 16:38 ` John W Higgins
[not found] <mailman.1033485728.6848.help-gnu-emacs@gnu.org>
2002-10-01 20:45 ` Emacs configuration Jesper Harder
-- strict thread matches above, loose matches on Subject: below --
2002-10-01 15:21 arthur.chereau
[not found] <mailman.1033377809.21117.help-gnu-emacs@gnu.org>
2002-09-30 17:01 ` Jesper Harder
2002-09-30 17:02 ` Kevin Rodgers
2002-10-01 6:04 ` Evgeny Roubinchtein
2002-10-01 14:57 ` Stefan Monnier <foo@acm.com>
[not found] <mailman.1033477527.28155.help-gnu-emacs@gnu.org>
2002-10-01 14:09 ` Jesper Harder
2002-10-01 13:04 arthur.chereau
2002-09-30 9:22 arthur.chereau
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).