external editor.
* Removed the "always reply with external editor" option from citadel.rc
because the per-user editor choice makes it superfluous.
$Id$
+Tue Jan 10 22:26:00 EST 2006 ajc
+* Added a per-user client option to always compose messages using the
+ external editor.
+* Removed the "always reply with external editor" option from citadel.rc
+ because the per-user editor choice makes it superfluous.
+
Tue Jan 10 17:20:30 EST 2006 ajc
* Added "Content-Identifer: ExJournalReport" to journal envelope headers
(Requested by SECCAS for compatibility with their archival service.)
formout(ipc, "help");
break;
case 4:
- entmsg(ipc, 0, 0);
+ entmsg(ipc, 0, ((userflags & US_EXTEDIT) ? 2 : 0));
break;
case 36:
entmsg(ipc, 0, 1);
alternate_semantics=no
-# When the user hits the <R>eply key after reading a message, reply_with_editor
-# selects whether it uses the built-in editor (select 'no') or an external
-# editor (select 'yes').
-#
-reply_with_external_editor=no
-
# COMMAND SET CONFIGURATION
#
extern char arg_screen;
#endif
extern char rc_alt_semantics;
-extern char rc_reply_extedit;
extern char instant_msgs;
void ctdl_logoff(char *file, int line, CtdlIPC *ipc, int code);
#define logoff(ipc, code) ctdl_logoff(__FILE__, __LINE__, (ipc), (code))
rc_force_mail_prompts = 0;
rc_ansi_color = 0;
rc_color_use_bg = 0;
- rc_reply_extedit = 0;
strcpy(rc_url_cmd, "");
strcpy(rc_gotmail_cmd, "");
#ifdef HAVE_OPENSSL
rc_alt_semantics = 0;
}
}
- if (!strncasecmp(buf, "reply_with_external_editor=", 27)) {
- if (!strncasecmp(&buf[27], "yes", 3)) {
- rc_reply_extedit = 1;
- }
- else {
- rc_reply_extedit = 0;
- }
- }
+
if (!strncasecmp(buf, "cmd=", 4)) {
strcpy(buf, &buf[4]);
a line in your citadel.rc file like this:</p>
<pre>editor=/usr/bin/vi<br></pre>
<p>The above example would make Citadel call the vi editor when using
-the <tt><b>.E</b>nter <b>E</b>ditor</tt> command. You can also make
+the <tt><b>.E</b>nter <b>E</b>ditor</tt> command, or when a user
+selects the "Always compose messages with the full-screen
+editor" option. You can also make
it the default editor for the <tt><b>E</b>nter</tt> command by editing
the <tt>citadel.rc</tt> file. <b>But be warned:</b> external editors
on public systems can
#define QR2_SELFLIST 2 /* Self-service mailing list mgmt */
#define US_NEEDVALID 1 /* User needs to be validated */
+#define US_EXTEDIT 2 /* Always use external editor */
#define US_PERM 4 /* Permanent user */
#define US_LASTOLD 16 /* Print last old message with new */
#define US_EXPERT 32 /* Experienced user */
#define US_COLOR 16384 /* User wants ANSI color support */
#define US_USER_SET (US_LASTOLD | US_EXPERT | US_UNLISTED | \
US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
- US_FLOORS | US_COLOR | US_PROMPTCTL )
+ US_FLOORS | US_COLOR | US_PROMPTCTL | US_EXTEDIT)
#define UA_KNOWN 2
#define UA_GOTOALLOWED 4
* Run the queue.
*/
void JournalRunQueue(void) {
- struct jnlq *jptr;
+ struct jnlq *jptr = NULL;
while (jnlq != NULL) {
begin_critical_section(S_JOURNAL_QUEUE);
int msg_arr_size = 0;
int num_msgs;
char rc_alt_semantics;
-char rc_reply_extedit;
extern char room_name[];
extern unsigned room_flags;
extern long highest_msg_read;
goto RMSGREAD;
case 'r':
savedpos = num_msgs;
- entmsg(ipc, 1, (rc_reply_extedit ? 2 : 0));
+ entmsg(ipc, 1, ((userflags & US_EXTEDIT) ? 2 : 0));
num_msgs = savedpos;
goto RMSGREAD;
case 'u':
temp = sval;
color(DIM_WHITE);
- scr_printf("%45s ", prompt);
+ scr_printf("%50s ", prompt);
color(DIM_MAGENTA);
scr_printf("[");
color(BRIGHT_MAGENTA);
user->flags = set_attr(ipc, user->flags,
"Be unlisted in userlog",
US_UNLISTED, 0);
+
+ if (strlen(editor_paths[0]) > 0) {
+ user->flags = set_attr(ipc, user->flags,
+ "Always enter messages with the full-screen editor",
+ US_EXTEDIT, 0);
+ }
+
}
if (mode == 2) {
void smtp_data(void) {
char *body;
struct CtdlMessage *msg;
- long msgnum;
+ long msgnum = (-1L);
char nowstamp[SIZ];
struct recptypes *valid;
int scan_errors;