unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to change default "insert file" path /tmp to home directory?
@ 2013-05-10 20:23 gerlach
  2013-05-10 20:48 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: gerlach @ 2013-05-10 20:23 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,
I googl'ed a lot and didn't find it: how can I change the default 
"insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?

tia
Eckard


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-10 20:23 How to change default "insert file" path /tmp to home directory? gerlach
@ 2013-05-10 20:48 ` Peter Dyballa
  2013-05-10 21:02 ` Pascal J. Bourguignon
  2013-05-11  0:50 ` Barry Margolin
  2 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2013-05-10 20:48 UTC (permalink / raw)
  To: gerlach; +Cc: help-gnu-emacs


Am 10.05.2013 um 22:23 schrieb gerlach:

> how can I change the default "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?

Just go home!

--
Mit friedvollen Grüßen

  Pete

Im Leben lernt der Mensch als erstes das Gehen und Sprechen.
Später lernt er still zu sitzen und den Mund zu halten.





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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-10 20:23 How to change default "insert file" path /tmp to home directory? gerlach
  2013-05-10 20:48 ` Peter Dyballa
@ 2013-05-10 21:02 ` Pascal J. Bourguignon
  2013-05-10 21:14   ` gerlach
  2013-05-13 21:08   ` gerlach
  2013-05-11  0:50 ` Barry Margolin
  2 siblings, 2 replies; 11+ messages in thread
From: Pascal J. Bourguignon @ 2013-05-10 21:02 UTC (permalink / raw)
  To: help-gnu-emacs

gerlach <jack@aiai.de> writes:

> Hi,
> I googl'ed a lot and didn't find it: how can I change the default
> "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?

M-: (setq default-directory "/home/gerlach/") RET


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You can take the lisper out of the lisp job, but you can't take the lisp out
of the lisper (; -- antifuchs


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-10 21:02 ` Pascal J. Bourguignon
@ 2013-05-10 21:14   ` gerlach
  2013-05-13 21:08   ` gerlach
  1 sibling, 0 replies; 11+ messages in thread
From: gerlach @ 2013-05-10 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

Am 10.05.2013 23:02, schrieb Pascal J. Bourguignon:

> M-: (setq default-directory "/home/gerlach/") RET
>
thx a lot Pascal!


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-10 20:23 How to change default "insert file" path /tmp to home directory? gerlach
  2013-05-10 20:48 ` Peter Dyballa
  2013-05-10 21:02 ` Pascal J. Bourguignon
@ 2013-05-11  0:50 ` Barry Margolin
  2013-05-14  9:52   ` gerlach
  2 siblings, 1 reply; 11+ messages in thread
From: Barry Margolin @ 2013-05-11  0:50 UTC (permalink / raw)
  To: help-gnu-emacs

In article <av53a9Fkok3U1@mid.individual.net>, gerlach <jack@aiai.de> 
wrote:

> Hi,
> I googl'ed a lot and didn't find it: how can I change the default 
> "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?

The default is whatever directory the current buffer was loaded from. So 
it's only /tmp if you happen to be editing something from /tmp.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-10 21:02 ` Pascal J. Bourguignon
  2013-05-10 21:14   ` gerlach
@ 2013-05-13 21:08   ` gerlach
  2013-05-13 21:31     ` gerlach
                       ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: gerlach @ 2013-05-13 21:08 UTC (permalink / raw)
  To: help-gnu-emacs

Am 10.05.2013 23:02, schrieb Pascal J. Bourguignon:
> gerlach <jack@aiai.de> writes:
>
>> Hi,
>> I googl'ed a lot and didn't find it: how can I change the default
>> "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?
>
> M-: (setq default-directory "/home/gerlach/") RET
>
>

i state today that its any longer working! Default directory is /tmp 
once again. At least in Why?

my /home/gerlach/.emacs
(setq fill-column 50)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq default-directory "/home/gerlach/")


BTW: (setq fill-column 50)  is ignored. Even if I insert 20 instead of 
50. Why?

The .emacs file is found and read, the proof: when I produce a error like
(setq asdasdfasdfasdf fill-column 50)  the error is claimed by emacs at 
start.

(add-hook 'before-save-hook 'delete-trailing-whitespace)  is also 
ignored. I have to execute the command explicitely.


Then I want to enable php highlightning with my old emacs (Suse 11.1, 
don't know the version) this worked fine:
(setq auto-mode-alist
      (append
      '( (".*\.php$" .html-mode) (".*\.php$" .html-mode)
       )
       auto-mode-alist))

In my actual emacs 23.3.1  nothing works ... even not default-directory 
"/home/gerlach/" ... incredible ... WHY?


I use emacs in text mode (-nw) only.

tia
Eckard




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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-13 21:08   ` gerlach
@ 2013-05-13 21:31     ` gerlach
  2013-05-13 21:40     ` Peter Dyballa
  2013-05-13 21:48     ` Barry Margolin
  2 siblings, 0 replies; 11+ messages in thread
From: gerlach @ 2013-05-13 21:31 UTC (permalink / raw)
  To: help-gnu-emacs

Am 13.05.2013 23:08, schrieb gerlach:
> Am 10.05.2013 23:02, schrieb Pascal J. Bourguignon:
>> gerlach <jack@aiai.de> writes:
>>
>>> Hi,
>>> I googl'ed a lot and didn't find it: how can I change the default
>>> "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?
>>
>> M-: (setq default-directory "/home/gerlach/") RET
>>
>>
>
> i state today that its any longer working! Default directory is /tmp
> once again. Why?
>
> my /home/gerlach/.emacs
> (setq fill-column 50)
> (add-hook 'before-save-hook 'delete-trailing-whitespace)
> (setq default-directory "/home/gerlach/")
>
>
> BTW: (setq fill-column 50)  is ignored. Even if I insert 20 instead of
> 50. Why?
>
> The .emacs file is found and read, the proof: when I produce a error like
> (setq asdasdfasdfasdf fill-column 50)  the error is claimed by emacs at
> start.
>
> (add-hook 'before-save-hook 'delete-trailing-whitespace)  is also
> ignored. I have to execute the command explicitely.
now it works ... I don't know what changed ... !?!
>
>
> Then I want to enable php highlightning with my old emacs (Suse 11.1,
> don't know the version) this worked fine:
> (setq auto-mode-alist
>       (append
>       '( (".*\.php$" .html-mode) (".*\.php$" .html-mode)
>        )
>        auto-mode-alist))
>
works now in my ubuntu 12.04. aptitude install php-elisp installed the 
php plugin and that code in .emacs

(global-font-lock-mode 1)
(require 'php-mode)
(setq auto-mode-alist
   (append '(("\.php$" . php-mode)
             ("\.module$" . php-mode))
               auto-mode-alist))



> In my actual emacs 23.3.1  nothing works ... even not default-directory
> "/home/gerlach/" ... incredible ... WHY?

Any ideas?

>
>
> I use emacs in text mode (-nw) only.
>
> tia
> Eckard
>
>



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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-13 21:08   ` gerlach
  2013-05-13 21:31     ` gerlach
@ 2013-05-13 21:40     ` Peter Dyballa
  2013-05-13 21:48     ` Barry Margolin
  2 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2013-05-13 21:40 UTC (permalink / raw)
  To: gerlach; +Cc: help-gnu-emacs


Am 13.05.2013 um 23:08 schrieb gerlach:

> At least in Why?

Because you're not at home! The variable default-directory is buffer-local, which means that each buffer in GNU Emacs has one such private "personalised" variable. And they all can have different values by reflecting some state of the buffer. (I presume there are thousands of Gerlachs in Germany. Each one has this surname, but first names, street names, town names, and eMail addresses can be different.)

Could (getenv "HOME") be an alternative?

--
Mit friedvollen Grüßen

  Pete

                  Sorry my terrible English, my native language Lisp




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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-13 21:08   ` gerlach
  2013-05-13 21:31     ` gerlach
  2013-05-13 21:40     ` Peter Dyballa
@ 2013-05-13 21:48     ` Barry Margolin
  2 siblings, 0 replies; 11+ messages in thread
From: Barry Margolin @ 2013-05-13 21:48 UTC (permalink / raw)
  To: help-gnu-emacs

In article <avd31vFdl82U1@mid.individual.net>, gerlach <jack@aiai.de> 
wrote:

> Am 10.05.2013 23:02, schrieb Pascal J. Bourguignon:
> > gerlach <jack@aiai.de> writes:
> >
> >> Hi,
> >> I googl'ed a lot and didn't find it: how can I change the default
> >> "insert path" (ctrl-x i) from /tmp to e.g.  /home/gerlach  ?
> >
> > M-: (setq default-directory "/home/gerlach/") RET
> >
> >
> 
> i state today that its any longer working! Default directory is /tmp 
> once again. At least in Why?
> 
> my /home/gerlach/.emacs
> (setq fill-column 50)
> (add-hook 'before-save-hook 'delete-trailing-whitespace)
> (setq default-directory "/home/gerlach/")
> 
> 
> BTW: (setq fill-column 50)  is ignored. Even if I insert 20 instead of 
> 50. Why?

fill-column is a buffer-local variable. Use setq-default to set the 
default value for new buffers.

And as I mentioned in another reply, default-directory is also 
buffer-local. However, it doesn't help much to set its default value, 
because it's automatically changed to the directory containing the file 
you're editing. You can use setq-default, but that will only work for 
buffers that aren't editing files.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-11  0:50 ` Barry Margolin
@ 2013-05-14  9:52   ` gerlach
  2013-05-14 13:44     ` Suvayu Ali
  0 siblings, 1 reply; 11+ messages in thread
From: gerlach @ 2013-05-14  9:52 UTC (permalink / raw)
  To: help-gnu-emacs

Am 11.05.2013 02:50, schrieb Barry Margolin:
> the current buffer was loaded from. So
> it's only /tmp if you happen to be

ok, using mutt mailreader I get always /tmp. So mutt is setting /tmp 
somewhere as directory.

thx


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

* Re: How to change default "insert file" path /tmp to home directory?
  2013-05-14  9:52   ` gerlach
@ 2013-05-14 13:44     ` Suvayu Ali
  0 siblings, 0 replies; 11+ messages in thread
From: Suvayu Ali @ 2013-05-14 13:44 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, May 14, 2013 at 11:52:46AM +0200, gerlach wrote:
> Am 11.05.2013 02:50, schrieb Barry Margolin:
> >the current buffer was loaded from. So
> >it's only /tmp if you happen to be
> 
> ok, using mutt mailreader I get always /tmp. So mutt is setting /tmp
> somewhere as directory.

Mutt edits the message as a temporary file in $tmpdir.  Usually this is
set to /tmp.  Here is the relevant section from the mutt manual.

  3.307. tmpdir
  
     Type: path
     Default: (empty)
  
     This variable allows you to specify where Mutt will place its temporary
     files needed for displaying and composing messages. If this variable is
     not set, the environment variable $TMPDIR is used. If $TMPDIR is not
     set then "/tmp" is used.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



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

end of thread, other threads:[~2013-05-14 13:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 20:23 How to change default "insert file" path /tmp to home directory? gerlach
2013-05-10 20:48 ` Peter Dyballa
2013-05-10 21:02 ` Pascal J. Bourguignon
2013-05-10 21:14   ` gerlach
2013-05-13 21:08   ` gerlach
2013-05-13 21:31     ` gerlach
2013-05-13 21:40     ` Peter Dyballa
2013-05-13 21:48     ` Barry Margolin
2013-05-11  0:50 ` Barry Margolin
2013-05-14  9:52   ` gerlach
2013-05-14 13:44     ` Suvayu Ali

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).