انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید

اوبونتو ۲۴٫۰۴ با پشتیبانی بلند مدّت (۱۲ سال) منتشر شد 🎉

نظرسنجی

خرابی در نصب emacs راهنمای بکنید

emacs
0 (0%)
vim
8 (100%)

مجموع آرای اعضا: 8

بستن رای گیری: 12 اسفند 1400، 11:20 ب‌ظ

نویسنده موضوع: میخواهم یکی از این ادیتور ها رو یاد بگیرم vim vs emacsراهنمای می کنید  (دفعات بازدید: 3211 بار)

0 کاربر و 1 مهمان درحال مشاهده موضوع.

آفلاین darksouls

  • Full Member
  • *
  • ارسال: 135
  • جنسیت : پسر
سلام دوست عزیز بدون هیچ ایرور ویا بیام خواستی اجرا نمیشه بالا چندبار گفتم
 ~ via  v12.22.5
❯ emacs

~ via  v12.22.5
❯ systemctl status emacs                         
Unit emacs.service could not be found.

~ via  v12.22.5


آفلاین Dragon-

  • عضو کاربران ایرانی اوبونتو
  • *
  • ارسال: 5118
  • جنسیت : پسر
این دستور چی میگه؟
command -v emacs
میدونید که زکات علم نشر آن است

آفلاین darksouls

  • Full Member
  • *
  • ارسال: 135
  • جنسیت : پسر

command -v emacs
alias emacs='/home/mamad/.oh-my-zsh/plugins/emacs/emacsclient.sh --no-wait'


.oh-my-zsh/plugins/emacs on  master
❯ cat emacsclient.sh
#!/bin/sh

emacsfun() {
  local cmd frames

  # Build the Emacs Lisp command to check for suitable frames
  # See https://www.gnu.org/software/emacs/manual/html_node/elisp/Frames.html#index-framep
  case "$*" in
  *-t*|*--tty*|*-nw*) cmd="(memq 't (mapcar 'framep (frame-list)))" ;; # if != nil, there are tty frames
  *) cmd="(delete 't (mapcar 'framep (frame-list)))" ;; # if != nil, there are graphical terminals (x, w32, ns)
  esac

  # Check if there are suitable frames
  frames="$(emacsclient -a '' -n -e "$cmd" 2>/dev/null)"

  # Only create another X frame if there isn't one present
  if [ -z "$frames" -o "$frames" = nil ]; then
    emacsclient --alternate-editor "" --create-frame "$@"
    return $?
  fi

  emacsclient --alternate-editor "" "$@"
}

# Adapted from https://github.com/davidshepherd7/emacs-read-stdin/blob/master/emacs-read-stdin.sh
# If the second argument is - then write stdin to a tempfile and open the
# tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh)
if [ $# -ge 2 -a "$2" = "-" ]; then
  # Create a tempfile to hold stdin
  tempfile="$(mktemp --tmpdir emacs-stdin-$USERNAME.XXXXXXX 2>/dev/null \
    || mktemp -t emacs-stdin-$USERNAME)" # support BSD mktemp
  # Redirect stdin to the tempfile
  cat - > "$tempfile"
  # Reset $2 to the tempfile so that "$@" works as expected
  set -- "$1" "$tempfile" "${@:3}"
fi

emacsfun "$@"




آفلاین Dragon-

  • عضو کاربران ایرانی اوبونتو
  • *
  • ارسال: 5118
  • جنسیت : پسر
انگار اصلا emacs نصب نشده و اون چیزی که اجرا می‌کنید، یه alias به یه اسکریپت هست. توی اون اسکریپا، دستوری به اسم emacsclient به کار رفته که نمی‌دونم چی هست. خروجی این دستورات رو هم قرار بدید.
command -v emacsclient
apt list --installed emacs*
میدونید که زکات علم نشر آن است

آفلاین darksouls

  • Full Member
  • *
  • ارسال: 135
  • جنسیت : پسر
❯ command -v emacsclient
apt list --installed emacs
/usr/bin/emacsclient

Listing... Done
emacs/impish,impish,now 1:27.1+1-3ubuntu3 all [installed]




آفلاین esmaeelE

  • ناظر انجمن
  • *
  • ارسال: 1239
  • جنسیت : پسر
فکر می‌کنم برای emacs باید بستهٔ emacs-gtk نصب بشه.


آفلاین Dragon-

  • عضو کاربران ایرانی اوبونتو
  • *
  • ارسال: 5118
  • جنسیت : پسر
❯ command -v emacsclient
apt list --installed emacs
/usr/bin/emacsclient

Listing... Done
emacs/impish,impish,now 1:27.1+1-3ubuntu3 all [installed]



اون علامت * رو همراه دستور نزدید.
میدونید که زکات علم نشر آن است

آفلاین darksouls

  • Full Member
  • *
  • ارسال: 135
  • جنسیت : پسر
میگه همچین دستوری وجود نداره بخاطر همین

آفلاین darksouls

  • Full Member
  • *
  • ارسال: 135
  • جنسیت : پسر
فکر می‌کنم برای emacs باید بستهٔ emacs-gtk نصب بشه.
❯ sudo apt install emacs-gtk
[sudo] password for mamad:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  fwupd-unsigned
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  emacs-common-non-dfsg
The following packages will be REMOVED:
  emacs-nox
The following NEW packages will be installed:
  emacs-gtk
0 upgraded, 1 newly installed, 1 to remove and 29 not upgraded.
Need to get 0 B/3,316 kB of archives.
After this operation, 1,192 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: emacs-nox: dependency problems, but removing anyway as you requested:
 emacs depends on emacs-gtk (>= 1:27.1) | emacs-lucid (>= 1:27.1) | emacs-nox (>= 1:27.1); however:
  Package emacs-gtk is not installed.
  Package emacs-lucid is not installed.
  Package emacs-nox is to be removed.

(Reading database ... 380709 files and directories currently installed.)
Removing emacs-nox (1:27.1+1-3ubuntu3) ...
Remove dictionaries-common for emacs
remove/dictionaries-common: Purging byte-compiled files for flavour emacs
Remove emacsen-common for emacs
emacsen-common: Handling removal of emacsen flavor emacs
Selecting previously unselected package emacs-gtk.
(Reading database ... 380703 files and directories currently installed.)
Preparing to unpack .../emacs-gtk_1%3a27.1+1-3ubuntu3_amd64.deb ...
Unpacking emacs-gtk (1:27.1+1-3ubuntu3) ...
Setting up emacs-gtk (1:27.1+1-3ubuntu3) ...
update-alternatives: using /usr/bin/emacs-gtk to provide /usr/bin/emacs (emacs) in auto mode
Install emacsen-common for emacs
emacsen-common: Handling install of emacsen flavor emacs
emacs: error while loading shared libraries: libotf.so.0: cannot open shared object file: No such file or directory
ERROR: install script from emacsen-common package failed
dpkg: error processing package emacs-gtk (--configure):
 installed emacs-gtk package post-installation script subprocess returned error exit status 1
Processing triggers for desktop-file-utils (0.26-1ubuntu2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69ubuntu1) ...
Errors were encountered while processing:
 emacs-gtk
E: Sub-process /usr/bin/dpkg returned an error code (1



emacs                                         
emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
emacs: error while loading shared libraries: libotf.so.0: cannot open shared object file: No such file or directory
Error: Could not start the Emacs daemon



آفلاین esmaeelE

  • ناظر انجمن
  • *
  • ارسال: 1239
  • جنسیت : پسر
کتابخونه‌ای که مشکل داره را جدا نصب کنید.
sudo apt install libotf0
سپس نصب emacs را بررسی کنید.


آفلاین Dragon-

  • عضو کاربران ایرانی اوبونتو
  • *
  • ارسال: 5118
  • جنسیت : پسر
چرا emacs-nox رو نصب کردید؟ این بسته، emacs هست ولی محیط گرافیکی emacs رو نداره. فقط emacs تحت ترمینال در اختیار شما میذاره.
از zsh استفاده می‌کنید؟
همونطوری که گفتند، کتابخانه‌ای که لازم داره رو نصب، و دوباره بررسی کنید emacs-gtk رو نصب کنید.
توزیع شما چیه؟ چیه نسخه‌ای؟
میدونید که زکات علم نشر آن است