all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Choi <akochoi_NOSPAM_@shaw.ca>
Subject: Re: Help me unlock a file while in emacs on the Mac
Date: Wed, 07 May 2003 18:17:53 GMT	[thread overview]
Message-ID: <m2ptmuiptm.fsf@owlbear.local> (raw)
In-Reply-To: congers-6C31E8.13275707052003@news.uswest.net

"Susan G. Conger" <congers@yoeric.com> writes:

> I need help.  I am trying to figure out the best way to unlock the file 
> I am currently editing in emacs on the Mac.  I need to have some type of 
> lisp command I believe that calls the shell and execute a command.  I 
> just don't know how to do this and it seems like it should be straight 
> forward.

I assume you want to unlock files with lock flags set in the Finder.
For read-only files, just use toggle-read-only.

Define the following two functions.

  (defun mac-unlock-file (fn)
    (interactive "fUnlock file: ")
    (call-process "/usr/bin/chflags" nil t nil "nouchg" (expand-file-name fn)))

  (defun mac-unlock-current-file ()
    (interactive)
    (mac-unlock-file (buffer-file-name)))

Then you can bind mac-unlock-current-file to a key (please see the
manual for how to do this) or just call it by typing M-x
mac-unlock-current-file.

  reply	other threads:[~2003-05-07 18:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 17:27 Help me unlock a file while in emacs on the Mac Susan G. Conger
2003-05-07 18:17 ` Andrew Choi [this message]
2003-05-07 18:46   ` Susan G. Conger
2003-05-07 19:23     ` Andrew Choi
2003-05-07 19:31       ` Susan G. Conger
2003-05-07 21:02       ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=m2ptmuiptm.fsf@owlbear.local \
    --to=akochoi_nospam_@shaw.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

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