* Need "xemacs/init.el" => "emacs/init.el" help
@ 2016-01-21 19:44 Tom Browder
2016-01-21 21:45 ` Dale Snell
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Tom Browder @ 2016-01-21 19:44 UTC (permalink / raw)
To: help-gnu-emacs
I have bitten the bullet to start using Emacs vs. my 20+ years using
XEmacs use. I have never been a real power user, but I have my
init.el doing the things I need most.
So far I have discovered the excellent "M-x list-packages" way to
install packages and have started trying to duplicate the behavior I'm
used to with XEmacs. I've also discovered Eric Schulte's "Emacs 24
Starter Kit" here:
http://github.com/eschulte/emacs24-starter-kit/
but I will save that for a bit later.
One of the things I use all the time in XEmacs is NO line wrapping
except when I manually use function "fill-paragraph". (I have that
bound to a key for ease of use.) I will admit that the
"fill-paragraph" didn't work reliably in XEmacs in all modes (I hope
Emacs will be able to fix that), but for the most part it does what I
need in XEmacs. But I cannot get it to work in Emacs.
Here's my entire Emacs init.el at the moment (all blank lines and some
comments removed):
; Personal emacs mods of Tom Browder
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
; packages installed via M-x list-packages:
; perl6-mode
(setq-default major-mode 'text-mode)
(set-default 'truncate-lines t)
(setq-default fill-column 70)
(global-set-key [f6] 'fill-paragraph)
; prefer cperl for Perl 5
(defalias 'perl-mode 'cperl-mode)
So far, and only using a text buffer, the truncate lines t seems to
work, but I can't get any such line to wrap with the "fill-paragraph"
function.
I have read about the init.el entries not normally affecting modes
already loaded without special lisp code. Is that what may be
happening in my case?
Any help will be greatly appreciated.
BTW, the major motivation for the change to Emacs has been the arrival
of Perl 6 and a special Perl 6 mode available with Emacs. In
addition, all the *emacs people I correspond with on various projects
use Emacs. Emacs is still not as pretty in appearance as XEmacs, but
functionality seems much better.
Best regards,
-Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 19:44 Need "xemacs/init.el" => "emacs/init.el" help Tom Browder
@ 2016-01-21 21:45 ` Dale Snell
2016-01-21 21:49 ` Emanuel Berg
2016-01-21 21:46 ` Emanuel Berg
2016-01-22 7:04 ` Eli Zaretskii
2 siblings, 1 reply; 11+ messages in thread
From: Dale Snell @ 2016-01-21 21:45 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]
On Thu, 21 Jan 2016 13:44:03 -0600, in message
CAFMGiz_qX6SCJU5ta0emDA2YaT0AF-2sFgpDQeBPdtfMUNq0aw@mail.gmail.com, Tom
Browder wrote:
> I have bitten the bullet to start using Emacs vs. my 20+ years using
> XEmacs use. I have never been a real power user, but I have my
> init.el doing the things I need most.
>
> So far I have discovered the excellent "M-x list-packages" way to
> install packages and have started trying to duplicate the behavior I'm
> used to with XEmacs. I've also discovered Eric Schulte's "Emacs 24
> Starter Kit" here:
>
> http://github.com/eschulte/emacs24-starter-kit/
>
> but I will save that for a bit later.
>
> One of the things I use all the time in XEmacs is NO line wrapping
> except when I manually use function "fill-paragraph". (I have that
> bound to a key for ease of use.) I will admit that the
> "fill-paragraph" didn't work reliably in XEmacs in all modes (I hope
> Emacs will be able to fix that), but for the most part it does what I
> need in XEmacs. But I cannot get it to work in Emacs.
>
> Here's my entire Emacs init.el at the moment (all blank lines and some
> comments removed):
>
> ; Personal emacs mods of Tom Browder
> (require 'package)
> (add-to-list 'package-archives '("melpa" .
> "http://melpa.org/packages/")) ; packages installed via M-x
> list-packages: ; perl6-mode
> (setq-default major-mode 'text-mode)
> (set-default 'truncate-lines t)
> (setq-default fill-column 70)
> (global-set-key [f6] 'fill-paragraph)
> ; prefer cperl for Perl 5
> (defalias 'perl-mode 'cperl-mode)
>
> So far, and only using a text buffer, the truncate lines t seems to
> work, but I can't get any such line to wrap with the "fill-paragraph"
> function.
Here are some lines from my init file:
;;; Set the major mode for new buffers to text-mode:
(setq major-more 'text-mode)
;;; Set the fill column:
(add-hook 'text-mode-hook (lambda () (setq-default fill-column 66)))
Also, Emacs defines M-q to run fill-paragraph by default; there's
no need to define your own keybinding.
Anyway, I hope this helps.
--Dale
--
"Wanted: Young, skinny, wirey fellows not over 18. Must be expert
riders willing to risk death daily. Orphans preferred. Wages $25
per week." -- Pony Express advertisement, 1860
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 21:45 ` Dale Snell
@ 2016-01-21 21:49 ` Emanuel Berg
2016-01-21 22:14 ` Dale Snell
0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg @ 2016-01-21 21:49 UTC (permalink / raw)
To: help-gnu-emacs
Dale Snell <ddsnell@frontier.com> writes:
> ;;; Set the major mode for new buffers to text-mode:
> (setq major-more 'text-mode) ;;; Set the fill column:
> (add-hook 'text-mode-hook (lambda () (setq-default
> fill-column 66)))
Hm - `setq-default' in a mode-specific hook?
Isn't that a contradiction in, uhm, purpose?
What happens if you just put
(setq-default fill-column 66)
in the init file?
> Also, Emacs defines M-q to run fill-paragraph by
> default; there's no need to define your
> own keybinding.
Well, there can be such a need even in the face of
default bindings but in this case there isn't as M-q
is very good and especially compared to F6 which is
very bad.
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 21:49 ` Emanuel Berg
@ 2016-01-21 22:14 ` Dale Snell
2016-01-21 22:29 ` Tom Browder
2016-01-22 1:14 ` Emanuel Berg
0 siblings, 2 replies; 11+ messages in thread
From: Dale Snell @ 2016-01-21 22:14 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
On Thu, 21 Jan 2016 22:49:50 +0100, in message
87io2mli0x.fsf@debian.uxu, Emanuel Berg wrote:
> Dale Snell <ddsnell@frontier.com> writes:
>
> > ;;; Set the major mode for new buffers to text-mode:
> > (setq major-more 'text-mode) ;;; Set the fill column:
> > (add-hook 'text-mode-hook (lambda () (setq-default
> > fill-column 66)))
>
> Hm - `setq-default' in a mode-specific hook?
> Isn't that a contradiction in, uhm, purpose?
>
> What happens if you just put
>
> (setq-default fill-column 66)
>
> in the init file?
That didn't work, which is why I used the hook. I forget where I
found that method. It might even have been in the Emacs manual.
Or it was on someone's web page. I don't know, it's been years
since I wrote that part. You're probably right about the
"setq-default", though. I'll have to try plain "setq" and see
what happens.
>
> > Also, Emacs defines M-q to run fill-paragraph by
> > default; there's no need to define your
> > own keybinding.
>
> Well, there can be such a need even in the face of
> default bindings but in this case there isn't as M-q
> is very good and especially compared to F6 which is
> very bad.
>
There we are in agreement. I know Emacs defines some function
keys by default, but I generally don't use them. I have two
function keys set: [f1] for help, and [f12] to compile-command.
Actually, I have [f12] to run the command, S-[f12] to set the
command, and C-[f12] to abort the run. Since neither the help
function nor compile-command are things I use that much, I'm fine
with them bound to function keys.
--Dale
--
Sign in coffee shop: "Children left unattended will be given an
espresso and a Free Puppy."
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 22:14 ` Dale Snell
@ 2016-01-21 22:29 ` Tom Browder
2016-01-22 23:21 ` Tom Browder
2016-01-22 1:14 ` Emanuel Berg
1 sibling, 1 reply; 11+ messages in thread
From: Tom Browder @ 2016-01-21 22:29 UTC (permalink / raw)
To: ddsnell; +Cc: help-gnu-emacs
On Thu, Jan 21, 2016 at 4:14 PM, Dale Snell <ddsnell@frontier.com> wrote:
> On Thu, 21 Jan 2016 22:49:50 +0100, in message
> 87io2mli0x.fsf@debian.uxu, Emanuel Berg wrote:
>> Dale Snell <ddsnell@frontier.com> writes:
Thanks so much, Dale and Emanuel, for the speedy response. Let me
absorb your inputs...
BTW, the reason I use F6 is, as far as I know, the old XEmacs didn't
use 'M-q' for 'fill-paragraph' or, more likely, I was in a giant rush
years ago to get what I needed going. As far as F6 being a "bad" key
because it is so far to reach, I'm NOT a touch typist and reaching for
the F6 key decades ago didn't seem like a big deal to me. The VT
effect, though, is a big deal and I think I can get my old brain
around using 'M-q'.
I'll report back results when I get a chance to do some tests..
Cheers!
-Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 22:29 ` Tom Browder
@ 2016-01-22 23:21 ` Tom Browder
0 siblings, 0 replies; 11+ messages in thread
From: Tom Browder @ 2016-01-22 23:21 UTC (permalink / raw)
To: ddsnell@frontier.com; +Cc: help-gnu-emacs@gnu.org
On Thursday, January 21, 2016, Tom Browder <tom.browder@gmail.com> wrote:
...
> I'll report back results when I get a chance to do some tests..
Okay, all is well with fill-paragraph--I stupidly was using a long line
with NO spaces to test!
Thanks for your help!
Best,
-Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 22:14 ` Dale Snell
2016-01-21 22:29 ` Tom Browder
@ 2016-01-22 1:14 ` Emanuel Berg
2016-01-22 1:43 ` Dale Snell
1 sibling, 1 reply; 11+ messages in thread
From: Emanuel Berg @ 2016-01-22 1:14 UTC (permalink / raw)
To: help-gnu-emacs
Dale Snell <ddsnell@frontier.com> writes:
>> What happens if you just put
>>
>> (setq-default fill-column 66)
>>
>> in the init file?
>
> That didn't work, which is why I used the hook.
Perhaps some other configuration is interfering.
Try this single line in a file ~/fill-column.el:
(setq-default fill-column 15)
(It is set to a ridiculous low just to see if
it works.)
Now invoke Emacs like this:
$ emacs -Q -l ~/fill-column.el
Now fill the *scratch* message with M-q. To me it gets
very thin: 15 chars.
> I know Emacs defines some function keys by default,
> but I generally don't use them. I have two function
> keys set: [f1] for help, and [f12] to
> compile-command. Actually, I have [f12] to run the
> command, S-[f12] to set the command, and C-[f12] to
> abort the run. Since neither the help function nor
> compile-command are things I use that much, I'm fine
> with them bound to function keys.
Right, the more often you use the shortcuts the closer
and shorter you want them to be. Default Emacs isn't
bad at this. Most of the really frequent things are
close and short: `forward-word' is M-f,
`backward-word' M-b, `forward-char' C-f,
`backward-char' C-b, and so on.
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-22 1:14 ` Emanuel Berg
@ 2016-01-22 1:43 ` Dale Snell
0 siblings, 0 replies; 11+ messages in thread
From: Dale Snell @ 2016-01-22 1:43 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
On Fri, 22 Jan 2016 02:14:42 +0100, in message
87egdal8jh.fsf@debian.uxu, Emanuel Berg wrote:
> Try this single line in a file ~/fill-column.el:
>
> (setq-default fill-column 15)
>
> (It is set to a ridiculous low just to see if
> it works.)
>
> Now invoke Emacs like this:
>
> $ emacs -Q -l ~/fill-column.el
>
> Now fill the *scratch* message with M-q. To me it gets
> very thin: 15 chars.
Thanks, Emmanuel, that worked just fine. I also tried changing
the setq-default in my init file to plain setq, and everything
worked fine. Now I have to go through my init file and fix any
misused setq-defaults. *sigh* (My goal in using the hook was to
keep the fill-column limited to those modes derived from
text-mode. I.e., I didn't want it to affect fundamental-mode.)
All these years of using Emacs, and I'm still pretty much a tyro
at Elisp. Ah well, I learn. Slowly, maybe, but I learn.
--Dale
--
A child of five could understand this! Fetch me a child of five!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 19:44 Need "xemacs/init.el" => "emacs/init.el" help Tom Browder
2016-01-21 21:45 ` Dale Snell
@ 2016-01-21 21:46 ` Emanuel Berg
2016-01-22 7:04 ` Eli Zaretskii
2 siblings, 0 replies; 11+ messages in thread
From: Emanuel Berg @ 2016-01-21 21:46 UTC (permalink / raw)
To: help-gnu-emacs
Tom Browder <tom.browder@gmail.com> writes:
> ; Personal emacs mods of Tom Browder (require
> 'package) (add-to-list 'package-archives '("melpa" .
> "http://melpa.org/packages/")) ; packages installed
> via M-x list-packages: ; perl6-mode (setq-default
> major-mode 'text-mode) (set-default 'truncate-lines t)
> (setq-default fill-column 70) (global-set-key [f6]
> 'fill-paragraph) ; prefer cperl for Perl 5 (defalias
> 'perl-mode 'cperl-mode)
>
> So far, and only using a text buffer, the truncate
> lines t seems to work, but I can't get any such line
> to wrap with the "fill-paragraph" function.
>
> I have read about the init.el entries not normally
> affecting modes already loaded without special lisp
> code. Is that what may be happening in my case?
>
> Any help will be greatly appreciated.
OK, first F6 is a *very bad* key for that! Try M-q
which is the default keystroke for `fill-paragraph'.
Second, your code should work what I can see!
Try starting Emacs like this:
$ emacs -Q
Then find your init file and evaluate only this part:
(global-set-key [f6] #'fill-paragraph)
Last, hit F6. Still no luck?
Also, you do this in X, right? Either in a terminal
emulator (e.g., xterm) with -nw or the GUI Emacs
(normal invocation these days) and F6 should be fine.
In a Linux VT tho without special attention F6 doesn't
work. And the reason it hasn't received such attention
is, again, it is a bad key (too distant: out of hand
touch type position).
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-21 19:44 Need "xemacs/init.el" => "emacs/init.el" help Tom Browder
2016-01-21 21:45 ` Dale Snell
2016-01-21 21:46 ` Emanuel Berg
@ 2016-01-22 7:04 ` Eli Zaretskii
2016-01-22 23:25 ` Tom Browder
2 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-01-22 7:04 UTC (permalink / raw)
To: help-gnu-emacs
> From: Tom Browder <tom.browder@gmail.com>
> Date: Thu, 21 Jan 2016 13:44:03 -0600
>
> One of the things I use all the time in XEmacs is NO line wrapping
> except when I manually use function "fill-paragraph".
Actually, Emacs offers at least 2 separate wrap-related features you
may wish trying:
. M-x auto-fill-mode RET
. M-x visual-line-mode RET
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Need "xemacs/init.el" => "emacs/init.el" help
2016-01-22 7:04 ` Eli Zaretskii
@ 2016-01-22 23:25 ` Tom Browder
0 siblings, 0 replies; 11+ messages in thread
From: Tom Browder @ 2016-01-22 23:25 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs@gnu.org
On Friday, January 22, 2016, Eli Zaretskii <eliz@gnu.org> wrote:
>
> Actually, Emacs offers at least 2 separate wrap-related features you
> may wish trying:
>
> . M-x auto-fill-mode RET
> . M-x visual-line-mode RET
>
Thanks, Eli. I did look at those but put them aside for a serious read
later.
Best,
-Tom
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-01-22 23:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 19:44 Need "xemacs/init.el" => "emacs/init.el" help Tom Browder
2016-01-21 21:45 ` Dale Snell
2016-01-21 21:49 ` Emanuel Berg
2016-01-21 22:14 ` Dale Snell
2016-01-21 22:29 ` Tom Browder
2016-01-22 23:21 ` Tom Browder
2016-01-22 1:14 ` Emanuel Berg
2016-01-22 1:43 ` Dale Snell
2016-01-21 21:46 ` Emanuel Berg
2016-01-22 7:04 ` Eli Zaretskii
2016-01-22 23:25 ` Tom Browder
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).